Skip to content
Snippets Groups Projects
Commit 2f2bff7a authored by Marco Clemencic's avatar Marco Clemencic
Browse files

v6r3

parent 0404029d
No related branches found
No related tags found
No related merge requests found
Showing
with 125 additions and 185 deletions
......@@ -2,7 +2,7 @@
# Maintainer : J. Palacios
package DaVinciFilter
version v6r3
version v6r4
# Structure, i.e. directories to process.
#============================================================================
......
v6r3
v6r4
$Id: release.notes,v 1.114 2007-04-19 09:07:41 pkoppenb Exp $
$Id: release.notes,v 1.118 2007-05-26 12:11:44 jpalac Exp $
!===========================================================================
! Package : DaVinciFilter
! Responsible : P. Koppenburg, J. Palacios
!============================================================================
!========================== DaVinciFilter v6r4 2007-05-26 ===================
! 2007-05-26 - Juan PALACIOS
- remove src/DaVinciFilter_load.cpp
! 2007-05-10 - Patrick Koppenburg
- src/BooleanFilterCriterion.cpp
- src/DaughterVertexFilterCriterion.cpp
- src/FilterDesktop.cpp
- src/NumberOfParticlesFilter.cpp
. Corrected unchecked StatusCode
. Increment to v6r4
! 2007-05-02 - Patrick Koppenburg for Wolfgang Manner
- Printout typo in initalisation of PVIPFilterCriterion fixed.
- incement to v6r3p1
!========================== DaVinciFilter v6r3 2007-04-19 ===================
! 2007-03-20 - Patrick Koppenburg
- Doxygen typo fix in MomentumMotherDirectionFilterCriterion
......
// $Id: BooleanFilterCriterion.cpp,v 1.8 2007-02-16 13:43:24 pkoppenb Exp $
// $Id: BooleanFilterCriterion.cpp,v 1.9 2007-05-10 07:43:26 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -96,10 +96,10 @@ StatusCode BooleanFilterCriterion::finalize() {
debug() << ">>> Release criteria tools" << endreq;
std::vector<IFilterCriterion*>::iterator i;
for (i=m_andList.begin();i!=m_andList.end();++i) toolSvc()->releaseTool(*i);
// std::vector<IFilterCriterion*>::iterator i;
//for (i=m_andList.begin();i!=m_andList.end();++i) toolSvc()->releaseTool(*i);
m_andList.clear();
for (i=m_orList.begin();i!=m_orList.end();++i) toolSvc()->releaseTool(*i);
// for (i=m_orList.begin();i!=m_orList.end();++i) toolSvc()->releaseTool(*i);
m_orList.clear();
return FilterCriterionBase::finalize() ;
......
// $Id:
#include "GaudiKernel/DeclareFactoryEntries.h"
#include "GaudiKernel/ObjectFactory.h"
DECLARE_FACTORY_ENTRIES( DaVinciFilter ) {
// Filter
DECLARE_TOOL( ParticleFilter );
DECLARE_TOOL( BooleanFilterCriterion );
DECLARE_TOOL( ByPIDFilterCriterion );
DECLARE_TOOL( VeloChargeFilterCriterion );
DECLARE_TOOL( DaughterPVIPFilterCriterion );
DECLARE_TOOL( DaughterMomentumSumFilterCriterion );
DECLARE_TOOL( DaughterPtProductFilterCriterion );
DECLARE_TOOL( DaughterPVIPFilterCriterion );
DECLARE_TOOL( DaughterPVIPSumFilterCriterion );
DECLARE_TOOL( DaughterVertexFilterCriterion );
DECLARE_TOOL( DLLFilterCriterion );
DECLARE_TOOL( FlightDistanceFilterCriterion );
DECLARE_TOOL( KinFilterCriterion );
// DECLARE_TOOL( LifetimeSignificanceCriterion ); ///< @todo Restore LifetimeSignificanceCriterion that needs Relations
// DECLARE_TOOL( MassConstrainedChi2FilterCriterion ); // Not needed anymore
DECLARE_TOOL( MassDifferenceFilterCriterion );
DECLARE_TOOL( MassFilterCriterion );
DECLARE_TOOL( Momentum2FlightAngleFilterCriterion ) ;
DECLARE_TOOL( MomentumMotherDirectionFilterCriterion );
DECLARE_TOOL( MomentumMotherFlightAngleFilterCriterion );
DECLARE_TOOL( OverlapFilterCriterion ) ;
DECLARE_TOOL( PIDFilterCriterion );
DECLARE_TOOL( PVIPFilterCriterion );
// DECLARE_TOOL( SumLogFilterCriterion ); ///< @todo Users should use or adapt other tools instead
DECLARE_TOOL( TrackFilterCriterion );
DECLARE_TOOL( TrackTypeFilterCriterion ); ///< @todo to be removed when corresponding tracking tool exists
DECLARE_TOOL( TrackQualityFilterCriterion ); ///< @todo to be removed when corresponding tracking tool exists
DECLARE_TOOL( TwoDaughterDistanceVertexFilterCriterion );
DECLARE_TOOL( TwoDaughterCloseApprFilterCriterion );
DECLARE_TOOL( VtxFilterCriterion );
DECLARE_TOOL( VtxIsolationFilterCriterion );
// Filter n particles
DECLARE_TOOL( KinBestParticles );
DECLARE_ALGORITHM( ApplyParticleFilter );
DECLARE_ALGORITHM( FilterByBestParticles );
DECLARE_ALGORITHM( FilterDesktop );
DECLARE_ALGORITHM( NumberOfParticlesFilter );
DECLARE_ALGORITHM( PIDFilter );
DECLARE_ALGORITHM( RandomEventFilter );
DECLARE_TOOL( FilterCriteriaTESTool );
}
// $Id: DaughterVertexFilterCriterion.cpp,v 1.6 2007-02-16 13:43:25 pkoppenb Exp $
// $Id: DaughterVertexFilterCriterion.cpp,v 1.7 2007-05-10 07:43:26 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -139,7 +139,8 @@ bool DaughterVertexFilterCriterion::testVertices( const LHCb::Vertex* const & mV
double distance = 0 ;
double distanceErr = 0 ;
m_vtxDisTool->calcVertexDis( *mV, *mD, distance, distanceErr );
StatusCode sc = m_vtxDisTool->calcVertexDis( *mV, *mD, distance, distanceErr );
if (!sc) return false ;
debug() << "Delta Z is " << deltaZ << ", Distance is " << distance << " +/- " << distanceErr << endmsg ;
......
// $Id: FilterDesktop.cpp,v 1.14 2007-01-12 14:01:25 ranjard Exp $
// $Id: FilterDesktop.cpp,v 1.15 2007-05-10 07:43:26 pkoppenb Exp $
// from Gaudi
#include "GaudiKernel/DeclareFactoryEntries.h"
......@@ -36,7 +36,8 @@ FilterDesktop::FilterDesktop( const std::string& name,
declareProperty( "OutputPlotsPath", m_outputPlotsPath = "" );
declareProperty( "OutputLocation" , m_outputLocation = "" ) ;
// declareProperty ( "MakePlots" , m_makePlots = false) ;
setProperty ( "HistoProduce", "0" ) ; // overwrites GaudiHistoAlg.cpp
StatusCode sc = setProperty ( "HistoProduce", "0" ) ; // overwrites GaudiHistoAlg.cpp
if (!sc) Exception("Could not reset property HistoProduce");
}
//=============================================================================
......@@ -123,9 +124,9 @@ StatusCode FilterDesktop::execute() {
debug() << "Saved " << accepted.size() << " from "
<< PV.size() << " candidates" << endreq;
}
setFilterPassed(!empty);
sc = setFilterPassed(!empty);
return StatusCode::SUCCESS;
return sc;
};
//=============================================================================
......
// $Id: NumberOfParticlesFilter.cpp,v 1.1 2007-02-16 17:37:26 pkoppenb Exp $
// $Id: NumberOfParticlesFilter.cpp,v 1.2 2007-05-10 07:43:26 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -68,8 +68,7 @@ StatusCode NumberOfParticlesFilter::execute() {
++m_tested;
if( passed ) ++m_passed;
setFilterPassed( passed ); // Mandatory. Set to true if event is accepted.
return StatusCode::SUCCESS;
return setFilterPassed( passed );
}
//=============================================================================
......
// $Id: PVIPFilterCriterion.cpp,v 1.29 2007-02-16 13:43:25 pkoppenb Exp $
// $Id: PVIPFilterCriterion.cpp,v 1.30 2007-05-02 14:44:27 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -72,11 +72,11 @@ StatusCode PVIPFilterCriterion::initialize()
setActive();
}
if (m_maxIP>0.){
info() << ">>> Maximum IP: " << m_minIP << " mm" << endmsg;
info() << ">>> Maximum IP: " << m_maxIP << " mm" << endmsg;
setActive();
}
if (m_maxIPsignif>0.){
info() << ">>> Maximum IP: " << m_minIPsignif << " sigma" << endmsg;
info() << ">>> Maximum IP: " << m_maxIPsignif << " sigma" << endmsg;
setActive();
}
......
# $Id: requirements,v 1.92 2007-03-21 13:02:40 pkoppenb Exp $
# $Id: requirements,v 1.93 2007-05-10 10:01:16 pkoppenb Exp $
# Created : 05/02/2002
# Maintainer : P. Koppenburg, J. Palacios
#
......@@ -6,7 +6,7 @@
# http://cern.ch/lhcb-comp/Support/html/new_structure.pdf
package DaVinciTools
version v15r3
version v15r4
# Structure, i.e. directories to process.
#============================================================================
......
v15r3
v15r4
! $Id: release.notes,v 1.259 2007-04-19 09:10:21 pkoppenb Exp $
! $Id: release.notes,v 1.262 2007-05-26 12:05:33 jpalac Exp $
!============================================================================
! Package : DaVinciTools
! Responsible : J. Palacios
!============================================================================
!========================== DaVinciTools v15r4 2007-05-26 ===================
! 2007-05-26 - Juan PALACIOS
- remove src/DaVinciTools_load.cpp
! 2007-05-25 - Patrick Koppenburg
- Much more verbose printout in Particle2State
! 2007-05-10 - Patrick Koppenburg
- src/CheckPV.cpp
- src/CheckSelResult.cpp
- src/ConjugateNeutralPID.cpp
- src/DecodeSimpleDecayString.cpp
- src/MakeResonances.cpp
- src/MakeResonances.h
- src/OnOfflineTool.cpp
- src/PhysDesktop.cpp
- src/RelatedPVFinder.cpp
- src/SelResultCorrelations.cpp
. Corrected unchecked StatusCode
. Increment to v15r4
!========================== DaVinciTools v15r3 2007-04-19 ===================
! 2007-03-21 - Patrick Koppenburg
- Moved PhysDesktop and Particle2VertexIPSAsct from DaVinciKernel component
......
// $Id: CheckPV.cpp,v 1.12 2007-01-15 10:32:26 jpalac Exp $
// $Id: CheckPV.cpp,v 1.13 2007-05-10 10:01:16 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -99,11 +99,10 @@ StatusCode CheckPV::execute() {
}
}
setFilterPassed(ok);
if (ok) debug() << "Event accepted because there are " << n << " primary vertices." << endreq ;
else debug() << "Event rejected because there are " << n << " primary vertices." << endreq ;
return StatusCode::SUCCESS;
return setFilterPassed(ok);
};
//=============================================================================
......
// $Id: CheckSelResult.cpp,v 1.1 2007-03-05 09:05:35 pkoppenb Exp $
// $Id: CheckSelResult.cpp,v 1.2 2007-05-10 10:01:16 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -79,15 +79,15 @@ StatusCode CheckSelResult::execute() {
m_totEvents++ ;
if ( !exist<SelResults>(m_selResults)){
Warning("SelResults container not found!") ;
setFilterPassed(false);
Warning("SelResults container not found!").ignore();
setFilterPassed(false).ignore();
return StatusCode::SUCCESS; // ?
}
SelResults* m_SelResCtr = get<SelResults>(m_selResults);
if(!m_SelResCtr ) {
warning() << "SelResult container not found at " << m_selResults << endreq;
setFilterPassed(false);
setFilterPassed(false).ignore();
return StatusCode::FAILURE;
} else verbose() << "SelResult container found at " << m_selResults << endreq;
......@@ -119,8 +119,8 @@ StatusCode CheckSelResult::execute() {
m_allpassed = false ;
}
}
if (m_ANDmode) setFilterPassed(m_allpassed);
else setFilterPassed(m_onepassed);
if (m_ANDmode) setFilterPassed(m_allpassed).ignore();
else setFilterPassed(m_onepassed).ignore();
verbose() << "Result is: " << filterPassed() << endreq ;
if ( filterPassed() ){
m_nEvents++;
......@@ -131,9 +131,8 @@ StatusCode CheckSelResult::execute() {
}
}
if ( !m_avoidSelResult ) writeSelResult(m_SelResCtr) ;
return StatusCode::SUCCESS;
if ( !m_avoidSelResult ) return writeSelResult(m_SelResCtr) ;
else return StatusCode::SUCCESS;
};
//=============================================================================
......
// $Id: ConjugateNeutralPID.cpp,v 1.1 2006-12-18 11:17:00 jpalac Exp $
// $Id: ConjugateNeutralPID.cpp,v 1.2 2007-05-10 10:01:16 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -60,7 +60,7 @@ StatusCode ConjugateNeutralPID::execute()
debug() << "==> Execute" << endmsg;
++m_nEvents; // Increment event counter
setFilterPassed( false );
StatusCode sc = setFilterPassed( false );
LHCb::Particle::ConstVector inparts = desktop()->particles();
verbose() << "Retrieved " << inparts.size() << " particles from desktop" << endmsg;
......@@ -81,7 +81,7 @@ StatusCode ConjugateNeutralPID::execute()
}
// Save the desktop to the TES
StatusCode sc = desktop()->saveDesktop();
sc = desktop()->saveDesktop();
if( !sc )
{
err() << " Unable to save desktop" << endmsg;
......@@ -90,7 +90,7 @@ StatusCode ConjugateNeutralPID::execute()
if( !outparts.empty() )
{
setFilterPassed( true );
sc = setFilterPassed( true );
++m_nAccepted; // Increment accepted event counter
m_nCandidates += outparts.size(); // Increment candidate counter
......@@ -101,7 +101,7 @@ StatusCode ConjugateNeutralPID::execute()
debug() << "Writing nothing to output" << endmsg;
return StatusCode::SUCCESS;
return sc ;
}
//=============================================================================
......
// $Id: DaVinciTools_load.cpp,v 1.75 2007-03-21 13:02:40 pkoppenb Exp $
// Include files
#include "GaudiKernel/DeclareFactoryEntries.h"
#include "GaudiKernel/ObjectFactory.h"
// Declare OBJECT / CONVERTER / ALGORITHM / TOOL using the macros DECLARE_xxx
// The statements are like that:
//
// DECLARE_CONVERTER( MyConverter );
// DECLARE_OBJECT( DataObject );
//
// They should be inside the 'DECLARE_FACTORY_ENTRIES' body.
DECLARE_FACTORY_ENTRIES( DaVinciTools ) {
// Miscellaneous
DECLARE_TOOL( Algorithm2ID ) ;
DECLARE_TOOL( CheckOverlap );
DECLARE_TOOL( CheckVeloOverlap );
DECLARE_TOOL( ContextTool );
DECLARE_TOOL( DecayFinder );
DECLARE_TOOL( DecodeSimpleDecayString );
DECLARE_TOOL( GeomDispCalculator ) ;
DECLARE_TOOL( NeutralCCChangePIDTool ) ;
DECLARE_TOOL( OnOfflineTool ) ;
DECLARE_TOOL( ParticleDescendants ) ;
DECLARE_TOOL( Particle2State ) ;
DECLARE_TOOL( Particle2VertexIPSAsct ) ;
DECLARE_TOOL( PhysDesktop );
DECLARE_TOOL( RecursivePlotTool ) ;
DECLARE_TOOL( RelatedPV ) ;
DECLARE_TOOL( RelatedPVFinder ) ;
DECLARE_TOOL( SimplePlotTool ) ;
DECLARE_TOOL( TrgDispCalculator ) ;
DECLARE_TOOL( BremAdder ) ;
DECLARE_TOOL( CaloElectron ) ;
// Algorithms
DECLARE_ALGORITHM( CheckPV );
DECLARE_ALGORITHM( CheckSelResult );
DECLARE_ALGORITHM( ConjugateNeutralPID );
DECLARE_ALGORITHM( MakeResonances ) ;
DECLARE_ALGORITHM( Particle2VertexAsctAlg );
DECLARE_ALGORITHM( SimplePlots );
DECLARE_ALGORITHM( SelResultsCorrelations );
}
// $Id: DecodeSimpleDecayString.cpp,v 1.6 2007-01-15 10:32:29 jpalac Exp $
// $Id: DecodeSimpleDecayString.cpp,v 1.7 2007-05-10 10:01:16 pkoppenb Exp $
// Include files
// from ANSI C++
......@@ -201,8 +201,8 @@ DecodeSimpleDecayString::splitDescriptor(const std::string& descriptor,
StatusCode DecodeSimpleDecayString::do_cc(void) {
std::string descriptor_cc = this->conjugate(m_descriptor);
this->splitDescriptor(descriptor_cc, m_mother_cc, m_daughters_cc);
return StatusCode::SUCCESS;
StatusCode sc = this->splitDescriptor(descriptor_cc, m_mother_cc, m_daughters_cc);
return sc;
}
//=============================================================================
// Conjugator from Gerhard
......
// $Id: MakeResonances.cpp,v 1.25 2007-03-07 17:27:20 pkoppenb Exp $
// $Id: MakeResonances.cpp,v 1.27 2007-05-10 13:10:32 pkoppenb Exp $
#include <algorithm>
......@@ -61,7 +61,8 @@ MakeResonances::MakeResonances( const std::string& name,
declareProperty( "MotherToNGammas" , m_motherToNGammas = false) ;
declareProperty( "OutputLocation" , m_outputLocation = "" ) ;
declareProperty( "PrintStats", m_printStats = false ) ;
setProperty ( "HistoProduce", "0" ) ; // overwrites GaudiHistoAlg.cpp
StatusCode sc = setProperty ( "HistoProduce", "0" ) ; // overwrites GaudiHistoAlg.cpp
if (!sc) Exception("Could not reset property HistoProduce");
}
//=============================================================================
// Destructor
......@@ -153,7 +154,8 @@ StatusCode MakeResonances::createDecays(){
if ( !dsds ) return StatusCode::FAILURE ;
if ( m_decayDescriptors.empty() ){
debug() << "No decay descriptors array defined. Pushing back " << getDecayDescriptor() << endmsg ;
debug() << "No decay descriptors array defined. Pushing back "
<< getDecayDescriptor() << endmsg ;
m_decayDescriptors.push_back(getDecayDescriptor());
}
debug() << "Decay descriptors are " << m_decayDescriptors << endmsg ;
......@@ -193,7 +195,8 @@ StatusCode MakeResonances::createDecays(){
if(daughtersBeforecc == daughters){
warning() << "You have chosen two charged-conjugated modes with identical final states: "
<< m_decayDescriptors << endmsg ;
warning() << "All final state particle will be duplicated as " << motherBeforecc << " and " << mother << endmsg ;
warning() << "All final state particle will be duplicated as "
<< motherBeforecc << " and " << mother << endmsg ;
}
sc = createDecay(mother, daughters);
if (sc.isFailure()) return sc;
......@@ -216,7 +219,7 @@ StatusCode MakeResonances::createDecay(const std::string& mother,
if (NULL==pmother){
err() << "Cannot find particle property for mother " << mother << endmsg ;
return StatusCode::FAILURE;
} else verbose() << "Found ParticleProperty " << pmother << endmsg ;
} else verbose() << "Found ParticleProperty " << pmother->pdgID() << endmsg ;
int pid = pmother->pdgID() ;
verbose() << "Found pid of " << mother << " = " << pid << endmsg ;
if (!consideredPID(pid)) m_allPids.push_back(pid) ;
......@@ -237,6 +240,7 @@ StatusCode MakeResonances::createDecay(const std::string& mother,
if (!consideredPID(pd->pdgID())) m_allPids.push_back(pd->pdgID()) ;
}
verbose() << "Pushed back " << dpid.size() << " daughters" << endmsg ;
// OK
double mass = pmother->mass();
double minmass = mass - std::min(m_massWindow,m_lowerMassWindow);
......@@ -245,11 +249,13 @@ StatusCode MakeResonances::createDecay(const std::string& mother,
// decay container
Decay dk;
StatusCode sc = dk.initialize(pid,dpid,minmass,maxmass,m_minMomentum,m_minPt,m_checkOverlap, m_particleDescendants);
StatusCode sc = dk.initialize(pid,dpid,minmass,maxmass,m_minMomentum,
m_minPt,m_checkOverlap, m_particleDescendants);
if (!sc) {
err() << "Cannot initialize Decay object with " << pid << " " << dpid << endmsg ;
return sc;
}
m_decays.push_back(dk);
info() << "Initialized decay # " << m_decays.size() << endmsg ;
......@@ -262,9 +268,9 @@ StatusCode MakeResonances::execute() {
++m_nEvents ;
setFilterPassed(false); // Mandatory. Set to true if event is accepted.
StatusCode sc = setFilterPassed(false); // Mandatory. Set to true if event is accepted.
LHCb::Particle::ConstVector Daughters, Resonances ;
StatusCode sc = applyFilter(desktop()->particles(),Daughters,m_daughterFilter);
sc = applyFilter(desktop()->particles(),Daughters,m_daughterFilter);
if (!sc) {
err() << "Unable to filter daughters" << endmsg;
return StatusCode::FAILURE ;
......@@ -307,14 +313,14 @@ StatusCode MakeResonances::execute() {
return StatusCode::FAILURE ;
}
if ( !Final.empty()){
setFilterPassed(true); // Mandatory. Set to true if event is accepted.
++m_nAccepted;
m_nCandidates+=Final.size();
sc = setFilterPassed(true); // Mandatory. Set to true if event is accepted.
}
if ( msgLevel(MSG::DEBUG) || m_printStats )
always() << "Found " << Final.size() << " candidates " << endmsg ;
return StatusCode::SUCCESS;
return sc;
};
//=============================================================================
// Filter particles
......@@ -357,24 +363,10 @@ StatusCode MakeResonances::applyFilter(const LHCb::Particle::ConstVector& vIn,
return StatusCode::SUCCESS;
}
//=============================================================================
// Check if Particle needs to be considered
//=============================================================================
inline bool MakeResonances::consideredPID(const int& pid)const{
verbose() << "consideredPID " << pid << endmsg ;
bool out = false ;// not in list
for ( std::vector<int>::const_iterator ap = m_allPids.begin() ; ap != m_allPids.end() ; ++ap ){
if ( *ap == pid ) {
out = true; // in list
break ;
}
}
verbose() << "consideredPID " << pid << " " << out << endmsg ;
return out ;
}
//=============================================================================
// Apply one decay
//=============================================================================
StatusCode MakeResonances::applyDecay(Decay& d, LHCb::Particle::ConstVector& Resonances){
StatusCode sc = StatusCode::SUCCESS ;
verbose() << "In applyDecay" << endmsg ;
LHCb::Particle::ConstVector DaughterVector ;
bool inloop = d.getFirstCandidates(DaughterVector); // get first daughter vector
......@@ -394,11 +386,10 @@ StatusCode MakeResonances::applyDecay(Decay& d, LHCb::Particle::ConstVector& Res
verbose() << "Found a candidate with mass " << sum4.M() << endmsg ;
// LF
// vertex fit or make mother to n gammas!
const LHCb::Particle* Mother =
makeMother(DaughterVector,d.getMotherPid());
const LHCb::Particle* Mother = makeMother(DaughterVector,d.getMotherPid());
if (0==Mother){
if(m_motherToNGammas) Warning("Something failed making mother to n gammas",StatusCode::SUCCESS,1);
else Warning("Something failed in vertex fitting",StatusCode::SUCCESS,1);
if(m_motherToNGammas) sc = Warning("Something failed making mother to n gammas",StatusCode::SUCCESS,1);
else sc = Warning("Something failed in vertex fitting",StatusCode::SUCCESS,1);
}
else {
verbose() << "Getting mother " << Mother->particleID().pid()
......@@ -410,13 +401,13 @@ StatusCode MakeResonances::applyDecay(Decay& d, LHCb::Particle::ConstVector& Res
}
debug() << "Found " << Resonances.size() << " candidates with PID "
<< d.getMotherPid().pid() << endmsg ;
return StatusCode::SUCCESS ;
return sc ;
}
//=============================================================================
// Make Mother Vertex fit
//=============================================================================
const LHCb::Particle* MakeResonances::makeMother(const LHCb::Particle::ConstVector& Daughters,
const LHCb::Particle* MakeResonances::makeMother(const LHCb::Particle::ConstVector&
Daughters,
const LHCb::ParticleID& motherPid){
verbose() << "Will make particle with PID " << motherPid.pid() << endmsg ;
......@@ -430,13 +421,14 @@ const LHCb::Particle* MakeResonances::makeMother(const LHCb::Particle::ConstVect
} else{
sc = vertexFitter()->fit(Daughters,Candidate,CandidateVertex);
if (!sc){
Warning("Failed to fit vertex",StatusCode::SUCCESS,1);
return 0;
Warning("Failed to fit vertex",StatusCode::SUCCESS,1).ignore();
return NULL;
}
debug() << "Fit vertex at " << CandidateVertex.position()
<< " with chi^2 " << CandidateVertex.chi2() << endmsg;
// may add a chi^2 cut here
}
}
if (!sc) return NULL;
verbose() << "Calling desktop()->save(const LHCb::Particle*)" << endmsg ;
return desktop()->save(&Candidate);
......
// $Id: MakeResonances.h,v 1.13 2007-03-07 17:27:20 pkoppenb Exp $
// $Id: MakeResonances.h,v 1.14 2007-05-10 10:01:17 pkoppenb Exp $
#ifndef MAKERESONANCES_H
#define MAKERESONANCES_H 1
......@@ -47,8 +47,19 @@ protected:
const LHCb::Particle* makeMother(const LHCb::Particle::ConstVector&,
const LHCb::ParticleID&);
StatusCode makePlots(const LHCb::Particle::ConstVector&,IPlotTool*); ///< make plots
inline bool consideredPID(const int& pid)const ; ///< make plots
inline bool consideredPID(const int& pid)const{
verbose() << "consideredPID " << pid << endmsg ;
bool out = false ;// not in list
for ( std::vector<int>::const_iterator ap = m_allPids.begin() ; ap != m_allPids.end() ; ++ap ){
if ( *ap == pid ) {
out = true; // in list
break ;
}
}
verbose() << "consideredPID " << pid << " " << out << endmsg ;
return out ;
}
private:
// globals
......@@ -106,7 +117,7 @@ private:
Decay(){
std::vector<int> a;
m_checkOrder = false ;
initialize(0,a,0.,100000.,-1.,-1.,NULL, NULL);
initialize(0,a,0.,100000.,-1.,-1.,NULL, NULL).ignore();
};
~Decay(){};
bool fillPidParticles(const LHCb::Particle::ConstVector&); ///< fill maps at each even
......
// $Id: OnOfflineTool.cpp,v 1.10 2007-02-06 10:17:30 pkoppenb Exp $
// $Id: OnOfflineTool.cpp,v 1.11 2007-05-10 10:01:17 pkoppenb Exp $
// Include files
// from Gaudi
......@@ -76,7 +76,7 @@ StatusCode OnOfflineTool::initialize(){
} else {
m_pvRelator = tool<IRelatedPVFinder>(m_offlinePVRelatorName); // not private
}
m_pvRelator->setDefaults(getPVLocation(),dispCalculator());
sc = m_pvRelator->setDefaults(getPVLocation(),dispCalculator());
return sc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment