Skip to content
Snippets Groups Projects
Commit a6d24e18 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (GeneratorFilters-00-03-31)

	* Updating BSignalFilter to account for intermediate resonances in kinematic cuts (AGENE-1076)
parent cc769dc7
No related merge requests found
################################################################################
# Package: GeneratorFilters
################################################################################
# Declare the package name:
atlas_subdir( GeneratorFilters )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/StoreGate
GaudiKernel
Generators/GeneratorModules
PRIVATE
Control/AthenaKernel
Control/CxxUtils
Event/EventInfo
Event/xAOD/xAODJet
Event/xAOD/xAODTruth
Generators/TruthUtils
PhysicsAnalysis/AnalysisCommon/ParticleEvent
PhysicsAnalysis/TruthParticleID/McParticleEvent
Reconstruction/MissingETEvent )
# External dependencies:
find_package( CLHEP )
find_package( HepMC )
find_package( HepPDT )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
# Component(s) in the package:
atlas_add_library( GeneratorFiltersLib
src/*.cxx
PUBLIC_HEADERS GeneratorFilters
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel StoreGateLib SGtests GeneratorModulesLib
PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent MissingETEvent )
atlas_add_component( GeneratorFilters
src/components/*.cxx
INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} StoreGateLib SGtests GaudiKernel GeneratorModulesLib AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent MissingETEvent GeneratorFiltersLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......@@ -67,7 +67,7 @@ class BSignalFilter : public GenFilter
// Find child
void FindAllChildren(const HepMC::GenParticle* mother,std::string treeIDStr,
bool fromFinalB, bool &foundSignal, bool &passedAllCuts,
TLorentzVector &p1, TLorentzVector &p2) const;
TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB) const;
// Check whether child has pass cuts
bool FinalStatePassedCuts(const HepMC::GenParticle* child) const;
......
......@@ -253,7 +253,7 @@ StatusCode BSignalFilter::filterEvent()
bool havePassedCuts=true;
TLorentzVector CandPart1, CandPart2;
//
FindAllChildren((*pitr),"",false,isSignal,havePassedCuts,CandPart1,CandPart2);
FindAllChildren((*pitr),"",false,isSignal,havePassedCuts,CandPart1,CandPart2,false);
//
ATH_MSG_DEBUG("");
ATH_MSG_DEBUG(" ------------------------------- ");
......@@ -396,26 +396,14 @@ bool BSignalFilter::LVL2_eMu_Trigger(const HepMC::GenParticle* child) const
void BSignalFilter::FindAllChildren(const HepMC::GenParticle* mother,std::string treeIDStr,
bool fromFinalB, bool &foundSignal, bool &passedAllCuts,
TLorentzVector &p1, TLorentzVector &p2) const
TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB) const
{
int pID = mother->pdg_id();
//
if ( !(mother->end_vertex()) && (mother->status() != 2) ) // i.e. this is a final state
{
bool hasChildGoodParent = false;
bool hasChildGoodParent = fromFinalB && (fromSelectedB || m_B_pdgid==0);
//
HepMC::GenVertex::particle_iterator firstChildParent, lastChildParent, thisChildParent;
firstChildParent = mother->production_vertex()->particles_begin(HepMC::parents);
lastChildParent = mother->production_vertex()->particles_end(HepMC::parents);
for( thisChildParent = firstChildParent; thisChildParent != lastChildParent++; ++thisChildParent )
{
int SigChild_parentID = (*thisChildParent)->pdg_id();
if( SigChild_parentID == m_B_pdgid ){
hasChildGoodParent = true;
}else if( MC::PID::isHadron(pID) && MC::PID::isCharged(pID) && SigChild_parentID == 333 ){ // If the parent is a phi(1020)
hasChildGoodParent = true;
}
}
if( fromFinalB && hasChildGoodParent )
{
foundSignal=true;
......@@ -468,7 +456,7 @@ void BSignalFilter::FindAllChildren(const HepMC::GenParticle* mother,std::string
stringstream childCntSS; childCntSS << childCnt;
childIDStr = treeIDStr + childCntSS.str();
PrintChild( (*thisChild), childIDStr, fromFinalB );
FindAllChildren( (*thisChild),childIDStr,fromFinalB,foundSignal,passedAllCuts,p1,p2);
FindAllChildren( (*thisChild),childIDStr,fromFinalB,foundSignal,passedAllCuts,p1,p2,(pID==m_B_pdgid) || fromSelectedB);
}
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment