ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAODBSignalFilter Class Reference

#include <xAODBSignalFilter.h>

Inheritance diagram for xAODBSignalFilter:
Collaboration diagram for xAODBSignalFilter:

Public Member Functions

virtual StatusCode filterInitialize () override final
 
virtual StatusCode filterEvent () override final
 
virtual StatusCode filterFinalize () override final
 
 GenFilter (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void FindAllChildren (const xAOD::TruthParticle *mother, std::string treeIDStr, bool fromFinalB, bool &foundSignal, bool &passedAllCuts, TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB, TLorentzVector &total_4mom) const
 
bool FinalStatePassedCuts (const xAOD::TruthParticle *child) const
 
bool test_cuts (const double myPT, const double testPT, const double myEta, const double testEta) const
 
bool LVL1_Mu_Trigger (const xAOD::TruthParticle *child) const
 
bool LVL2_eMu_Trigger (const xAOD::TruthParticle *child) const
 
void PrintChild (const xAOD::TruthParticle *child, const std::string &treeIDStr, const bool fromFinalB) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< bool > m_localLVL1MuonCutOn {this, "LVL1MuonCutOn", false}
 
Gaudi::Property< bool > m_localLVL2MuonCutOn {this, "LVL2MuonCutOn", false}
 
Gaudi::Property< bool > m_localLVL2ElectronCutOn {this, "LVL2ElectronCutOn", false}
 
Gaudi::Property< double > m_localLVL1MuonCutPT {this, "LVL1MuonCutPT", 0.0}
 
Gaudi::Property< double > m_localLVL1MuonCutEta {this, "LVL1MuonCutEta", 102.5}
 
Gaudi::Property< double > m_localLVL2MuonCutPT {this, "LVL2MuonCutPT", 0.0}
 
Gaudi::Property< double > m_localLVL2MuonCutEta {this, "LVL2MuonCutEta", 102.5}
 
Gaudi::Property< double > m_localLVL2ElectronCutPT {this, "LVL2ElectronCutPT", 0.0}
 
Gaudi::Property< double > m_localLVL2ElectronCutEta {this, "LVL2ElectronCutEta", 102.5}
 
Gaudi::Property< bool > m_cuts_f_e_on {this, "Cuts_Final_e_switch", false}
 
Gaudi::Property< double > m_cuts_f_e_pT {this, "Cuts_Final_e_pT", 0.}
 
Gaudi::Property< double > m_cuts_f_e_eta {this, "Cuts_Final_e_eta", 2.5}
 
Gaudi::Property< bool > m_cuts_f_mu_on {this, "Cuts_Final_mu_switch", false}
 
Gaudi::Property< double > m_cuts_f_mu_pT {this, "Cuts_Final_mu_pT", 0.}
 
Gaudi::Property< double > m_cuts_f_mu_eta {this, "Cuts_Final_mu_eta", 102.5}
 
Gaudi::Property< bool > m_cuts_f_had_on {this, "Cuts_Final_hadrons_switch", false}
 
Gaudi::Property< double > m_cuts_f_had_pT {this, "Cuts_Final_hadrons_pT", 0.}
 
Gaudi::Property< double > m_cuts_f_had_eta {this, "Cuts_Final_hadrons_eta", 102.5}
 
Gaudi::Property< bool > m_cuts_f_gam_on {this, "Cuts_Final_gamma_switch", false}
 
Gaudi::Property< double > m_cuts_f_gam_pT {this, "Cuts_Final_gamma_pT", 0.}
 
Gaudi::Property< double > m_cuts_f_gam_eta {this, "Cuts_Final_gamma_eta", 102.5}
 
Gaudi::Property< bool > m_cuts_f_K0_on {this, "Cuts_Final_K0_switch", false}
 
Gaudi::Property< double > m_cuts_f_K0_pT {this, "Cuts_Final_K0_pT", 0.}
 
Gaudi::Property< double > m_cuts_f_K0_eta {this, "Cuts_Final_K0_eta", 102.5}
 
Gaudi::Property< int > m_B_pdgid {this, "B_PDGCode", 0}
 
Gaudi::Property< bool > m_InvMass_switch {this, "InvMass_switch", false}
 
Gaudi::Property< int > m_InvMass_PartId1 {this, "InvMass_PartId1", 13}
 
Gaudi::Property< int > m_InvMass_PartId2 {this, "InvMass_PartId2", -13}
 
Gaudi::Property< double > m_InvMass_PartFakeMass1 {this, "InvMass_PartFakeMass1", -1.}
 
Gaudi::Property< double > m_InvMass_PartFakeMass2 {this, "InvMass_PartFakeMass2", -1.}
 
Gaudi::Property< double > m_InvMassMin {this, "InvMassMin", 0.0}
 
Gaudi::Property< double > m_InvMassMax {this, "InvMassMax", 14000000.0}
 
Gaudi::Property< bool > m_TotalInvMass_switch {this, "TotalInvMass_switch", false}
 
Gaudi::Property< double > m_TotalInvMassMin {this, "TotalInvMassMin", 0.0}
 
Gaudi::Property< double > m_TotalInvMassMax {this, "TotalInvMassMax", 14000000.0}
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthPartContKey {this, "TruthParticleContainerKey", "TruthGen"}
 
int m_EventCnt {}
 
double m_LVL1Counter {}
 
double m_LVL2Counter {}
 
double m_rejectedTrigger {}
 
double m_rejectedAll {}
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Utility event-mangling functions

Todo:
Replace with HepMC units when available
ServiceHandle< IPartPropSvc > m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
 Handle on the particle property service. More...
 
SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection. More...
 
void GeVToMeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1000. More...
 
void MeVToGeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1/1000. More...
 
void cmTomm (HepMC::GenEvent *evt)
 Scale event lengths by x 10. More...
 
void mmTocm (HepMC::GenEvent *evt)
 Scale event lengths by x 1/10. More...
 

Detailed Description

Definition at line 32 of file xAODBSignalFilter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]

HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inlineinherited

Access the current signal event (first in the McEventCollection)

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

Definition at line 76 of file GenBase.h.

76  {
77  if (events()->empty())
78  ATH_MSG_ERROR("McEventCollection is empty during first event access");
79  return *(events()->begin());
80  }

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]

McEventCollection* events GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inherited

Access the current event's McEventCollection.

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

◆ cmTomm()

void GenBase::cmTomm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 10.

Definition at line 78 of file GenBase.cxx.

78  {
79  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
80  const HepMC::FourVector fv((*vtx)->position().x() * 10,
81  (*vtx)->position().y() * 10,
82  (*vtx)->position().z() * 10,
83  (*vtx)->position().t() * 10);
84  (*vtx)->set_position(fv);
85  }
86 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ event_const()

const HepMC::GenEvent* GenBase::event_const ( ) const
inlineinherited

Access the current signal event (const)

Definition at line 83 of file GenBase.h.

83  {
84  if (events_const()->empty())
85  ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
86  return *(events_const()->begin());
87  }

◆ events_const() [1/2]

const McEventCollection* GenBase::events_const ( ) const
inlineinherited

Access the current event's McEventCollection (const)

Definition at line 96 of file GenBase.h.

96  {
97  return events_const( getContext() );
98  }

◆ events_const() [2/2]

const McEventCollection* GenBase::events_const ( const EventContext &  ctx) const
inlineinherited

Definition at line 99 of file GenBase.h.

99  {
101  if (!ret.isValid())
102  ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
103  return ret.cptr();
104  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode GenFilter::execute ( )
virtualinherited
Todo:
Probably the filter should only look at the first event... right?

Reimplemented from GenBase.

Definition at line 29 of file GenFilter.cxx.

29  {
30  if (events_const()->empty()) {
31  ATH_MSG_ERROR("No events found in McEventCollection");
32  return StatusCode::FAILURE;
33  } else if (events_const()->size() > 1) {
35  ATH_MSG_WARNING("More than one event in current McEventCollection -- which is valid?");
36  }
38 #ifdef HEPMC3
39  if (filterPassed() || m_keepAll ) {
40 #else
41  if (filterPassed() ) {
42 #endif
43  ATH_MSG_DEBUG("Event passed filter");
44  m_nPass += 1;
45  } else {
46  ATH_MSG_DEBUG("Event failed filter");
47  m_nFail += 1;
48  }
49  // Bail out once we have enough events
50  if (m_nPass >= m_nNeeded && m_nNeeded > 0)
51  sc = StatusCode::FAILURE;
52  return sc;
53 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ filterEvent()

StatusCode xAODBSignalFilter::filterEvent ( )
finaloverridevirtual

Implements GenFilter.

Definition at line 38 of file xAODBSignalFilter.cxx.

39 {
40  ATH_MSG_INFO("");
41  ATH_MSG_INFO(" ---------------------------------- ");
42  ATH_MSG_INFO(" >>> xAODBSignalFilter::FilterEvent <<< ");
43  ATH_MSG_INFO(" ---------------------------------- ");
44  ATH_MSG_INFO("");
45 
46  // ** Return ERROR and exit if the user has not selected the PDGid of the B-meson/hadron signal **
48  if (m_B_pdgid == 0)
49  {
50  ATH_MSG_ERROR("");
51  ATH_MSG_ERROR(" ==>> 'B_PDGCode = 0'! Please define the PDGid of the B-meson/hadron signal!");
52  ATH_MSG_ERROR("");
53  return StatusCode::FAILURE;
54  }
55 // Retrieve TruthGen container from xAOD Gen slimmer, contains all particles witout barcode_zero and
56 // duplicated barcode ones
58  CHECK(xTruthParticleContainer.isValid());
59 
60 bool acceptEvent = true;
61 unsigned int nPart = xTruthParticleContainer->size();
62 // ** Check HepMC for particles activating LVL1 trigger, if that is what user wishes **
63 //
64 bool LVL1Passed = false;
65 const xAOD::TruthParticle* LVL1Muon = 0;
66 //
68  {
69  //
70 
71  // Loop over all particles in the event
72  for (unsigned int iPart = 0; iPart < nPart; ++iPart) {
73  const xAOD::TruthParticle* part = (*xTruthParticleContainer)[iPart];
74 
75  bool LVL1Result = LVL1_Mu_Trigger(part);
76  if (LVL1Result)
77  {
78  LVL1Passed = true;
79  LVL1Muon = part; // Remember the muon for LVL2 testing
80  break;
81  }
82  } // loop over TruthParticles
83  }
84 
85 // ** Check HepMC for particles activating LVL2 trigger, if that is what user wishes **
86 //
87 bool LVL2Passed = false;
88 //
89 if (LVL1Passed && (m_localLVL2MuonCutOn || m_localLVL2ElectronCutOn))
90  {
91  for (unsigned int iPart = 0; iPart < nPart; ++iPart) {
92  const xAOD::TruthParticle* part = (*xTruthParticleContainer)[iPart];
93  bool LVL2Result = LVL2_eMu_Trigger(part);
94  if (LVL2Result)
95  {
96  if (part != LVL1Muon) // Check the particle triggering LVL2 isn't
97  LVL2Passed = true; // the muon that triggered LVL1 --> Artificial,
98  // since, effectively, LVL2 trigger is not applied.
99  // This is needed to "trigger" the 2nd muon!
100  }
101  } //loop over particles
102  }
103 
104  // ** Flag event as passing LVL1 if it has passed **
105  //
106  if (m_localLVL1MuonCutOn && LVL1Passed)
107  {
108  ATH_MSG_DEBUG(" LVL1 Trigger activated for event " << m_EventCnt);
109  m_LVL1Counter++;
110  }
111  // ** Flag event as passing LVL2 if it has passed **
112  //
113  if ((m_localLVL2MuonCutOn || m_localLVL2ElectronCutOn) && LVL2Passed)
114  {
115  ATH_MSG_DEBUG(" LVL2 Trigger activated for event " << m_EventCnt);
116  m_LVL2Counter++;
117  }
118 
119  // ** If user hasn't requested triggers then set everything to true so nothing is thrown away **
120  //
122  {
123  LVL1Passed = true;
124  LVL2Passed = true;
125  }
127  LVL2Passed = true;
128 
129  // ** Reject event if an undecayed quark is found **
130  //
131  for (unsigned int iPart = 0; iPart < nPart; ++iPart) {
132  const xAOD::TruthParticle* part = (*xTruthParticleContainer)[iPart];
134  {
135  acceptEvent = false;
136  ATH_MSG_WARNING(" Undecayed quark " << part);
137  }
138  }
139 
140  // ** Look for signal events **
141  //
142  bool SignalPassedCuts = false;
143  if (LVL1Passed && LVL2Passed)
144  {
145  // ** Loop on all particles **
146  for (unsigned int iPart = 0; iPart < nPart; ++iPart) {
147  const xAOD::TruthParticle* part = (*xTruthParticleContainer)[iPart];
148  const int particleID = part->pdgId();
149  //
150  bool motherIsB = false;
151  bool newBChain = false;
152 
153  if ((MC::isBottomMeson(particleID) || MC::isBottomBaryon(particleID)) && MC::isPhysical(part) )
154  {
155  // ** Reject whole event if any of B-hadrons in the event is not decayed **
156  if (MC::isStable(part) )
157  {
158  acceptEvent = false;
159  }
160 
161  for(size_t thisParent_id=0; thisParent_id < part->prodVtx()->nIncomingParticles(); thisParent_id++)
162  {
163  auto parent = part->prodVtx()->incomingParticle(thisParent_id);
164  int parentID = parent->pdgId();
165  if (MC::isBottomMeson(parentID) || MC::isBottomBaryon(parentID))
166  motherIsB = true;
167  }
168  if (motherIsB)
169  {
170  newBChain = false; // Since the chain is not new
171  }
172  else
173  {
174  newBChain = true;
175  }
176  }
177  else
178  {
179  newBChain = false;
180  } // Since particle is not b
181 
182  // ** New B-signal found, output message and find whole decay tree **
183  if (newBChain)
184  {
185  const HepPDT::ParticleData *HadronData = particleData(particleID);
186  std::string HadronName = "unknown particle";
187  if (HadronData)
188  {
189  HadronName = HadronData->name();
190  if (particleID < 0)
191  HadronName = "anti - " + HadronName;
192  }
193  ATH_MSG_DEBUG("");
194  ATH_MSG_DEBUG(" ------------------------------------------ ");
195  ATH_MSG_DEBUG(" *** xAODBSignalFilter.cxx: B-signal found *** ");
196  ATH_MSG_DEBUG(" ------------------------------------------ ");
197  ATH_MSG_DEBUG("");
198  ATH_MSG_DEBUG(" Event " << m_EventCnt << " --> B-hadron/B-meson (" << HadronName << ") " << part);
199  ATH_MSG_DEBUG("");
200 
201  // ** Looping on all children checking if they have passed the selection cuts defined by the user **
203  {
204  ATH_MSG_DEBUG(" *** KINEMATIC CUTS ON PARTICLES ACTIVATED *** ");
205  ATH_MSG_DEBUG("");
206  ATH_MSG_DEBUG(" --------------------------------- ");
207  ATH_MSG_DEBUG(" Started looping on all children ");
208  ATH_MSG_DEBUG(" --------------------------------- ");
209  ATH_MSG_DEBUG("");
210  //
211  bool isSignal = false;
212  bool havePassedCuts = true;
213  TLorentzVector CandPart1, CandPart2, total_4mom;
214  //
215  FindAllChildren(part, "", false, isSignal, havePassedCuts, CandPart1, CandPart2, false, total_4mom);
216  //
217  ATH_MSG_DEBUG("");
218  ATH_MSG_DEBUG(" ------------------------------- ");
219  ATH_MSG_DEBUG(" Ended looping on all children ");
220  ATH_MSG_DEBUG(" ------------------------------- ");
221  ATH_MSG_DEBUG("");
222 
223  SignalPassedCuts = (isSignal && havePassedCuts);
224 
225  // ** If signal event is found and InvMass_switch = true, check if the selected
226  // couple of particles has an invariant mass within the range set by the user **
227  if (m_InvMass_switch)
228  {
229  if (SignalPassedCuts)
230  {
231  bool accept_mass = false;
232  bool accept_total_mass = false;
233  ATH_MSG_DEBUG("");
234  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES ACTIVATED! *** ");
235  ATH_MSG_DEBUG("");
236  if (m_InvMass_switch)
237  ATH_MSG_DEBUG(" -- Mass cuts -->> " << m_InvMassMin << " < mass < " << m_InvMassMax << " MeV");
238  //
239  double invMass = (CandPart1 + CandPart2).M();
240  double invMass_total = total_4mom.M();
241  //
242 
243  if (m_InvMass_switch)
244  {
245  ATH_MSG_DEBUG(" -- Invariant mass of the couple of particles = " << invMass << " MeV");
247  {
248  ATH_MSG_DEBUG(" ==>> Event has passed the mass filter!");
249  ATH_MSG_DEBUG("");
250  accept_mass = true;
251  }
252  else
253  {
254  ATH_MSG_DEBUG(" ==>> Event has NOT passed the mass filter!");
255  ATH_MSG_DEBUG("");
256  }
257  SignalPassedCuts = SignalPassedCuts && accept_mass;
258  }
260  {
261  ATH_MSG_DEBUG(" -- Total invariant mass of the final-state particles = " << invMass_total << " MeV");
262  if (m_TotalInvMassMin < invMass_total && invMass_total < m_TotalInvMassMax)
263  {
264  ATH_MSG_DEBUG(" ==>> Event has passed the total mass filter!");
265  ATH_MSG_DEBUG("");
266  accept_total_mass = true;
267  }
268  else
269  {
270  ATH_MSG_DEBUG(" ==>> Event has NOT passed the total mass filter!");
271  ATH_MSG_DEBUG("");
272  }
273  SignalPassedCuts = SignalPassedCuts && accept_total_mass;
274  }
275  }
276  else
277  {
278  ATH_MSG_DEBUG("");
279  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES NOT APPLIED (since the event is not a signal that passed cuts)! *** ");
280  ATH_MSG_DEBUG("");
281  }
282  }
283  else
284  {
285  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES NOT ACTIVATED *** ");
286  ATH_MSG_DEBUG("");
287  }
288  }
289  else
290  {
291  SignalPassedCuts = true;
292  //
293  ATH_MSG_DEBUG(" *** KINEMATIC CUTS ON PARTICLES NOT ACTIVATED ==>> ACCEPT ALL EVENTS! *** ");
294  ATH_MSG_DEBUG("");
295  }
296  } // End newBChain
297  if (SignalPassedCuts)
298  break; // We have found the signal, we do not need to look for other particles
299  } // End particle iteration
300 
301  if (SignalPassedCuts)
302  {
303  ATH_MSG_DEBUG(" -->> All signal children have passed cuts on particles!");
304  }
305  else
306  {
307  ATH_MSG_DEBUG(" -->> Signal children have NOT passed cuts on particles!");
308  }
309  } // end of LVL1/LVL2 selection
310  else
311  {
312  ATH_MSG_DEBUG("");
313  ATH_MSG_DEBUG(" -->> Event has NOT passed the trigger!");
314  }
315  // ** Reject event if it has not passed triggers **
316  // --> If not requested by user these flags will be set
317  // to true so there will be no erroneous rejection
318  if ((!LVL1Passed) || (!LVL2Passed))
319  {
321  acceptEvent = false;
322  }
323 
324  // ** Check if all conditions are true **
325  // --> Accept the event if acceptEvent is true and the event is a signal event
326  acceptEvent = acceptEvent && SignalPassedCuts;
327 
328  // ** Print whether the event has passed or not **
329  //
330  ATH_MSG_DEBUG("");
331  if (!acceptEvent)
332  {
333  setFilterPassed(false);
334  m_rejectedAll++;
335  ATH_MSG_DEBUG(" ==========================");
336  ATH_MSG_DEBUG(" Event REJECTED by Filter ");
337  ATH_MSG_DEBUG(" ==========================");
338  }
339  else
340  {
341  setFilterPassed(true);
342  ATH_MSG_DEBUG(" ==========================");
343  ATH_MSG_DEBUG(" Event ACCEPTED by Filter ");
344  ATH_MSG_DEBUG(" ==========================");
345  }
346  ATH_MSG_DEBUG("");
347 
348  // End of execution for each event
349  return StatusCode::SUCCESS;
350 }

◆ filterFinalize()

StatusCode xAODBSignalFilter::filterFinalize ( )
finaloverridevirtual

Reimplemented from GenFilter.

Definition at line 633 of file xAODBSignalFilter.cxx.

634 {
635  double total = m_EventCnt;
636  ATH_MSG_ALWAYS(" I===============================================================================================");
637  ATH_MSG_ALWAYS(" I xAODBSignalFilter Summary Report ");
638  ATH_MSG_ALWAYS(" I===============================================================================================");
640  {
641  ATH_MSG_ALWAYS(" I LVL1 muon trigger report:");
642  ATH_MSG_ALWAYS(" I Muon pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
643  << m_localLVL1MuonCutPT << " MeV ");
644  ATH_MSG_ALWAYS(" I Muon pseudo-rapidity cut" << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
646  ATH_MSG_ALWAYS(" I No of events containing at least " << '\t' << '\t' << '\t' << '\t' << '\t' << "I");
647  ATH_MSG_ALWAYS(" I one particle satisfying these cuts " << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
648  << m_LVL1Counter);
650  {
651  ATH_MSG_ALWAYS(" I LVL2 muon trigger report:");
652  ATH_MSG_ALWAYS(" I Muon pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
653  << m_localLVL2MuonCutPT << " MeV ");
654  ATH_MSG_ALWAYS(" I Muon pseudo-rapidity cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
656  }
658  {
659  ATH_MSG_ALWAYS(" I LVL2 electron trigger report:");
660  ATH_MSG_ALWAYS(" I Electron pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << " I" << '\t' << m_localLVL2ElectronCutPT << " MeV ");
661  ATH_MSG_ALWAYS(" I Electron pseudo-rapidity cut " << '\t' << '\t' << '\t' << '\t' << '\t' << "I"
662  << '\t' << m_localLVL2ElectronCutEta);
663  }
665  {
666  ATH_MSG_ALWAYS(" I No of events containing at least one muon satisfying LVL1 cut" << '\t' << "I");
667  ATH_MSG_ALWAYS(" I and at least one separate particle passing these LVL2 cuts " << '\t' << '\t' << "I" << '\t'
668  << m_LVL2Counter);
669  }
670  }
671  ATH_MSG_ALWAYS(" I Total no of input events " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
672  << total);
673  ATH_MSG_ALWAYS(" I No of events rejected by trigger " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
674  << m_rejectedTrigger);
675  ATH_MSG_ALWAYS(" I No of events rejected in total " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
676  << m_rejectedAll);
678  ATH_MSG_ALWAYS(" I To obtain correct cross section, multiply BX in PythiaB report by " << '\t' << '\t' << "I" << '\t'
679  << m_LVL1Counter / total);
681  ATH_MSG_ALWAYS(" I To obtain correct cross section, multiply BX in PythiaB report by " << '\t' << '\t' << "I" << '\t'
682  << m_LVL2Counter / total);
684  ATH_MSG_ALWAYS(" I No trigger requests made");
685  //
686  ATH_MSG_ALWAYS(" I=========================================== End of report =====================================");
687 
688  return StatusCode::SUCCESS;
689 }

◆ filterInitialize()

StatusCode xAODBSignalFilter::filterInitialize ( )
finaloverridevirtual

Reimplemented from GenFilter.

Definition at line 32 of file xAODBSignalFilter.cxx.

33 {
35  return StatusCode::SUCCESS;
36 }

◆ finalize()

StatusCode GenFilter::finalize ( )
inherited

Definition at line 56 of file GenFilter.cxx.

56  {
57  ATH_MSG_INFO("Events passed = " << m_nPass << " Events failed = " << m_nFail);
59  return StatusCode::SUCCESS;
60 }

◆ FinalStatePassedCuts()

bool xAODBSignalFilter::FinalStatePassedCuts ( const xAOD::TruthParticle child) const
private

Definition at line 477 of file xAODBSignalFilter.cxx.

478 {
479  bool accept = true;
480 
481  // ** Look if children has passed the cuts **
482  //
483  int pID = child->pdgId();
484  double myPT = child->pt();
485  double myEta = child->eta();
486 
487  ATH_MSG_DEBUG("");
488  ATH_MSG_DEBUG(" ** Found a child with: ");
489  ATH_MSG_DEBUG(" - id = " << pID);
490  ATH_MSG_DEBUG(" - pT = " << myPT << " MeV");
491  ATH_MSG_DEBUG(" - eta = " << myEta);
492  ATH_MSG_DEBUG("");
493 
494  if (m_cuts_f_e_on)
495  {
496  if (MC::isElectron(pID))
497  {
498  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the electron --> ( " << m_cuts_f_e_pT
499  << " , " << m_cuts_f_e_eta << " )");
500  if (test_cuts(myPT, m_cuts_f_e_pT, myEta, m_cuts_f_e_eta))
501  {
502  ATH_MSG_DEBUG(" ==>> Found an electron which passed the pT and eta cuts!");
503  ATH_MSG_DEBUG(" - Electron: pT = " << myPT << " MeV");
504  ATH_MSG_DEBUG(" - Electron: eta = " << myEta);
505  ATH_MSG_DEBUG("");
506  ATH_MSG_DEBUG(" ==>> Accepted the electron!");
507  ATH_MSG_DEBUG("");
508  }
509  else
510  {
511  accept = false;
512  ATH_MSG_DEBUG(" ==>> The electron has NOT passed the pT and eta cuts!");
513  ATH_MSG_DEBUG("");
514  }
515  }
516  }
517  if (m_cuts_f_mu_on)
518  {
519  if (MC::isMuon(pID))
520  {
521  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the muon --> ( " << m_cuts_f_mu_pT
522  << " , " << m_cuts_f_mu_eta << " )");
523  if (test_cuts(myPT, m_cuts_f_mu_pT, myEta, m_cuts_f_mu_eta))
524  {
525  ATH_MSG_DEBUG(" ==>> Found a muon which passed the pT and eta cuts!");
526  ATH_MSG_DEBUG(" - Muon: pT = " << myPT << " MeV");
527  ATH_MSG_DEBUG(" - Muon: eta = " << myEta);
528  ATH_MSG_DEBUG("");
529  ATH_MSG_DEBUG(" ==>> Accepted the muon!");
530  ATH_MSG_DEBUG("");
531  }
532  else
533  {
534  accept = false;
535  ATH_MSG_DEBUG(" ==>> The muon has NOT passed the pT and eta cuts!");
536  ATH_MSG_DEBUG("");
537  }
538  }
539  }
540  if (m_cuts_f_had_on)
541  {
542  if (MC::isHadron(pID) && MC::isCharged(pID))
543  {
544  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the charged hadron --> ( " << m_cuts_f_had_pT
545  << " , " << m_cuts_f_had_eta << " )");
546  if (test_cuts(myPT, m_cuts_f_had_pT, myEta, m_cuts_f_had_eta))
547  {
548  ATH_MSG_DEBUG(" ==>> Found a charged hadron which passed the pT and eta cuts!");
549  ATH_MSG_DEBUG(" - Charged hadron: pT = " << myPT << " MeV");
550  ATH_MSG_DEBUG(" - Charged hadron: eta = " << myEta);
551  ATH_MSG_DEBUG("");
552  ATH_MSG_DEBUG(" ==>> Accepted the charged hadron!");
553  ATH_MSG_DEBUG("");
554  }
555  else
556  {
557  accept = false;
558  ATH_MSG_DEBUG(" ==>> The charged hadron has NOT passed the pT and eta cuts!");
559  ATH_MSG_DEBUG("");
560  }
561  }
562  }
563  if (m_cuts_f_gam_on)
564  {
565  if (MC::isPhoton(pID))
566  {
567  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the gamma --> ( " << m_cuts_f_gam_pT
568  << " , " << m_cuts_f_gam_eta << " )");
569  if (test_cuts(myPT, m_cuts_f_gam_pT, myEta, m_cuts_f_gam_eta))
570  {
571  ATH_MSG_DEBUG(" ==>> Found a gamma which passed the pT and eta cuts!");
572  ATH_MSG_DEBUG(" - Gamma: pT = " << myPT << " MeV");
573  ATH_MSG_DEBUG(" - Gamma: eta = " << myEta);
574  ATH_MSG_DEBUG("");
575  ATH_MSG_DEBUG(" ==>> Accepted the gamma!");
576  ATH_MSG_DEBUG("");
577  }
578  else
579  {
580  accept = false;
581  ATH_MSG_DEBUG(" ==>> The gamma has NOT passed the pT and eta cuts!");
582  ATH_MSG_DEBUG("");
583  }
584  }
585  }
586  if (m_cuts_f_K0_on)
587  {
588  if (std::abs(pID) == MC::K0)
589  {
590  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the K0 --> ( " << m_cuts_f_K0_pT
591  << " , " << m_cuts_f_K0_eta << " )");
592  if (test_cuts(myPT, m_cuts_f_K0_pT, myEta, m_cuts_f_K0_eta))
593  {
594  ATH_MSG_DEBUG(" ==>> Found a K0 which passed the pT and eta cuts!");
595  ATH_MSG_DEBUG(" - K0: pT = " << myPT << " MeV");
596  ATH_MSG_DEBUG(" - K0: eta = " << myEta);
597  ATH_MSG_DEBUG("");
598  ATH_MSG_DEBUG(" ==>> Accepted the K0!");
599  ATH_MSG_DEBUG("");
600  }
601  else
602  {
603  accept = false;
604  ATH_MSG_DEBUG(" ==>> The K0 has NOT passed the pT and eta cuts!");
605  ATH_MSG_DEBUG("");
606  }
607  }
608  }
609 
610  return accept;
611 }

◆ FindAllChildren()

void xAODBSignalFilter::FindAllChildren ( const xAOD::TruthParticle mother,
std::string  treeIDStr,
bool  fromFinalB,
bool &  foundSignal,
bool &  passedAllCuts,
TLorentzVector &  p1,
TLorentzVector &  p2,
bool  fromSelectedB,
TLorentzVector &  total_4mom 
) const
private

Definition at line 383 of file xAODBSignalFilter.cxx.

386 {
387  int pID = mother->pdgId();
388  //
389  if (!(mother->decayVtx()) && MC::isStable(mother)) // i.e. this is a final state
390  {
391  bool hasChildGoodParent = fromFinalB && (fromSelectedB || m_B_pdgid == 0);
392  //
393  if (fromFinalB && hasChildGoodParent)
394  {
395  foundSignal = true;
396  bool passedCut = FinalStatePassedCuts(mother); // X = X && ... in case of multiple particles (e.g. KK)
397  if (m_cuts_f_e_on && MC::isElectron(pID))
398  passedAllCuts = passedAllCuts && passedCut;
399  if (m_cuts_f_mu_on && MC::isMuon(pID))
400  passedAllCuts = passedAllCuts && passedCut;
401  if (m_cuts_f_had_on && MC::isHadron(pID) && MC::isCharged(pID))
402  passedAllCuts = passedAllCuts && passedCut;
403  if (m_cuts_f_gam_on && MC::isPhoton(pID))
404  passedAllCuts = passedAllCuts && passedCut;
405  if (m_cuts_f_K0_on && std::abs(pID) == MC::K0)
406  passedAllCuts = passedAllCuts && passedCut;
407  //
409  {
410  if (m_InvMass_PartFakeMass1 < 0.)
411  p1.SetPxPyPzE(mother->px(), mother->py(), mother->pz(), mother->e());
412  else
413  p1.SetXYZM(mother->px(), mother->py(), mother->pz(), m_InvMass_PartFakeMass1);
414  total_4mom = total_4mom + p1;
415  }
417  {
418  if (m_InvMass_PartFakeMass2 < 0.)
419  p2.SetPxPyPzE(mother->px(), mother->py(), mother->pz(), mother->e());
420  else
421  p2.SetXYZM(mother->px(), mother->py(), mother->pz(), m_InvMass_PartFakeMass2);
422  total_4mom = total_4mom + p2;
423  }
424  else if (m_TotalInvMass_switch)
425  {
426  TLorentzVector current_4p;
427  current_4p.SetPxPyPzE(mother->px(), mother->py(), mother->pz(), mother->e());
428  total_4mom = total_4mom + current_4p;
429  }
430  }
431  return;
432  }
433  else
434  {
435  if (!(mother->decayVtx())) // i.e. something is wrong in HepMC
436  {
437  if (MC::isDecayed(mother))
438  ATH_MSG_DEBUG(" Inconsistent entry in HepMC (status 2 particle not decayed), chain rejected!");
439  return;
440  }
441  }
442 
443  int childCnt = 0;
444  std::string childIDStr;
445  if (!(treeIDStr == ""))
446  treeIDStr = treeIDStr + ".";
447 
448  // ** Find out whether particle is child of final (non-excited) B, used for cuts **
449  if ((!fromFinalB) && (MC::isBottomMeson(pID) || MC::isBottomBaryon(pID)))
450  {
451  fromFinalB = true;
452  int pID;
453  for(size_t thisChild_id=0; thisChild_id < mother->decayVtx()->nOutgoingParticles(); thisChild_id++)
454  {
455  auto child = mother->decayVtx()->outgoingParticle(thisChild_id);
456  pID = child->pdgId();
457  if (MC::isBottomMeson(pID) || MC::isBottomBaryon(pID))
458  fromFinalB = false;
459  }
460  }
461 
462  // ** Main loop: iterate over all children, call method recursively.
463  for(size_t thisChild_id=0; thisChild_id < mother->decayVtx()->nOutgoingParticles(); thisChild_id++)
464  {
465  auto child = mother->decayVtx()->outgoingParticle(thisChild_id);
466  childCnt++;
467  std::stringstream childCntSS;
468  childCntSS << childCnt;
469  childIDStr = treeIDStr + childCntSS.str();
470  PrintChild(child, childIDStr, fromFinalB);
471  FindAllChildren(child, childIDStr, fromFinalB, foundSignal, passedAllCuts, p1, p2, (pID == m_B_pdgid) || fromSelectedB, total_4mom);
472  }
473 
474  return;
475 }

◆ GenFilter()

GenFilter::GenFilter

Definition at line 33 of file GenFilter.cxx.

9  : GenBase(name, pSvcLocator)
10 {
11  declareProperty("TotalPassed", m_nNeeded=-1);
12 #ifdef HEPMC3
13  declareProperty("KeepAllEvents", m_keepAll=false);
14 #endif
15  m_nPass = 0;
16  m_nFail = 0;
17 }

◆ GeVToMeV()

void GenBase::GeVToMeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1000.

Todo:
Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)

Definition at line 58 of file GenBase.cxx.

58  {
59  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
60  const HepMC::FourVector fv((*p)->momentum().px() * 1000,
61  (*p)->momentum().py() * 1000,
62  (*p)->momentum().pz() * 1000,
63  (*p)->momentum().e() * 1000);
64  (*p)->set_momentum(fv);
65  (*p)->set_generated_mass(1000 * (*p)->generated_mass());
66  }
67 }

◆ initialize()

StatusCode GenFilter::initialize ( )
virtualinherited

Reimplemented from GenBase.

Definition at line 20 of file GenFilter.cxx.

20  {
22  m_nPass = 0;
23  m_nFail = 0;
25  return StatusCode::SUCCESS;
26 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ LVL1_Mu_Trigger()

bool xAODBSignalFilter::LVL1_Mu_Trigger ( const xAOD::TruthParticle child) const
private

Definition at line 357 of file xAODBSignalFilter.cxx.

358 {
359  bool accept = false;
360  double myPT = child->pt();
361  double myEta = child->eta();
362 
363  if (MC::isMuon(child) && m_localLVL1MuonCutOn)
365 
366  return accept;
367 }

◆ LVL2_eMu_Trigger()

bool xAODBSignalFilter::LVL2_eMu_Trigger ( const xAOD::TruthParticle child) const
private

Definition at line 369 of file xAODBSignalFilter.cxx.

370 {
371  bool accept = false;
372  double myPT = child->pt();
373  double myEta = child->eta();
374 
377  if (MC::isMuon(child) && m_localLVL2MuonCutOn)
379 
380  return accept;
381 }

◆ MeVToGeV()

void GenBase::MeVToGeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1/1000.

Definition at line 68 of file GenBase.cxx.

68  {
69  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
70  const HepMC::FourVector fv((*p)->momentum().px() / 1000,
71  (*p)->momentum().py() / 1000,
72  (*p)->momentum().pz() / 1000,
73  (*p)->momentum().e() / 1000);
74  (*p)->set_momentum(fv);
75  (*p)->set_generated_mass((*p)->generated_mass() / 1000);
76  }
77 }

◆ mmTocm()

void GenBase::mmTocm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 1/10.

Definition at line 87 of file GenBase.cxx.

87  {
88  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
89  const HepMC::FourVector fv((*vtx)->position().x() / 10,
90  (*vtx)->position().y() / 10,
91  (*vtx)->position().z() / 10,
92  (*vtx)->position().t() / 10);
93  (*vtx)->set_position(fv);
94  }
95 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ nFailed()

int GenFilter::nFailed ( ) const
inlineinherited

Definition at line 53 of file GenFilter.h.

53 { return m_nFail; }

◆ nNeeded()

int GenFilter::nNeeded ( ) const
inlineinherited

Definition at line 54 of file GenFilter.h.

54 { return m_nNeeded; }

◆ nPassed()

int GenFilter::nPassed ( ) const
inlineinherited

Definition at line 52 of file GenFilter.h.

52 { return m_nPass; }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ particleData()

const HepPDT::ParticleData* GenBase::particleData ( int  pid) const
inlineinherited

Access an element in the particle data table.

Definition at line 126 of file GenBase.h.

126  {
127  return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
128  }

◆ particleTable()

const HepPDT::ParticleDataTable& GenBase::particleTable ( ) const
inlineinherited

Get a particle data table.

Definition at line 118 of file GenBase.h.

118  {
119  return *(m_ppSvc->PDT());
120  }

◆ partPropSvc()

const ServiceHandle<IPartPropSvc> GenBase::partPropSvc ( ) const
inlineinherited

Access the particle property service.

Definition at line 113 of file GenBase.h.

113  {
114  return m_ppSvc;
115  }

◆ pdt()

const HepPDT::ParticleDataTable& GenBase::pdt ( ) const
inlineinherited

Shorter alias to get a particle data table.

Definition at line 123 of file GenBase.h.

123 { return particleTable(); }

◆ PrintChild()

void xAODBSignalFilter::PrintChild ( const xAOD::TruthParticle child,
const std::string &  treeIDStr,
const bool  fromFinalB 
) const
private

Definition at line 613 of file xAODBSignalFilter.cxx.

615 {
616  int pID = child->pdgId();
617  // ** Find name **
618  const HepPDT::ParticleData *pData = particleData(std::abs(pID));
619  std::string pName = "unknown particle";
620  if (pData)
621  {
622  pName = pData->name();
623  if (pID < 0)
624  pName = "anti - " + pName;
625  }
626  ATH_MSG_DEBUG(" " << treeIDStr << " "
627  << "Child (" << pName
628  << ") " << child << " , from final B = " << fromFinalB);
629 
630  return;
631 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ test_cuts()

bool xAODBSignalFilter::test_cuts ( const double  myPT,
const double  testPT,
const double  myEta,
const double  testEta 
) const
private

Definition at line 352 of file xAODBSignalFilter.cxx.

353 {
354  return ((myPT >= testPT) && (std::abs(myEta) <= testEta));
355 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_B_pdgid

Gaudi::Property<int> xAODBSignalFilter::m_B_pdgid {this, "B_PDGCode", 0}
private

Definition at line 73 of file xAODBSignalFilter.h.

◆ m_cuts_f_e_eta

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_e_eta {this, "Cuts_Final_e_eta", 2.5}
private

Definition at line 59 of file xAODBSignalFilter.h.

◆ m_cuts_f_e_on

Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_e_on {this, "Cuts_Final_e_switch", false}
private

Definition at line 57 of file xAODBSignalFilter.h.

◆ m_cuts_f_e_pT

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_e_pT {this, "Cuts_Final_e_pT", 0.}
private

Definition at line 58 of file xAODBSignalFilter.h.

◆ m_cuts_f_gam_eta

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_gam_eta {this, "Cuts_Final_gamma_eta", 102.5}
private

Definition at line 68 of file xAODBSignalFilter.h.

◆ m_cuts_f_gam_on

Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_gam_on {this, "Cuts_Final_gamma_switch", false}
private

Definition at line 66 of file xAODBSignalFilter.h.

◆ m_cuts_f_gam_pT

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_gam_pT {this, "Cuts_Final_gamma_pT", 0.}
private

Definition at line 67 of file xAODBSignalFilter.h.

◆ m_cuts_f_had_eta

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_had_eta {this, "Cuts_Final_hadrons_eta", 102.5}
private

Definition at line 65 of file xAODBSignalFilter.h.

◆ m_cuts_f_had_on

Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_had_on {this, "Cuts_Final_hadrons_switch", false}
private

Definition at line 63 of file xAODBSignalFilter.h.

◆ m_cuts_f_had_pT

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_had_pT {this, "Cuts_Final_hadrons_pT", 0.}
private

Definition at line 64 of file xAODBSignalFilter.h.

◆ m_cuts_f_K0_eta

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_K0_eta {this, "Cuts_Final_K0_eta", 102.5}
private

Definition at line 71 of file xAODBSignalFilter.h.

◆ m_cuts_f_K0_on

Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_K0_on {this, "Cuts_Final_K0_switch", false}
private

Definition at line 69 of file xAODBSignalFilter.h.

◆ m_cuts_f_K0_pT

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_K0_pT {this, "Cuts_Final_K0_pT", 0.}
private

Definition at line 70 of file xAODBSignalFilter.h.

◆ m_cuts_f_mu_eta

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_mu_eta {this, "Cuts_Final_mu_eta", 102.5}
private

Definition at line 62 of file xAODBSignalFilter.h.

◆ m_cuts_f_mu_on

Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_mu_on {this, "Cuts_Final_mu_switch", false}
private

Definition at line 60 of file xAODBSignalFilter.h.

◆ m_cuts_f_mu_pT

Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_mu_pT {this, "Cuts_Final_mu_pT", 0.}
private

Definition at line 61 of file xAODBSignalFilter.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EventCnt

int xAODBSignalFilter::m_EventCnt {}
private

Definition at line 89 of file xAODBSignalFilter.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_InvMass_PartFakeMass1

Gaudi::Property<double> xAODBSignalFilter::m_InvMass_PartFakeMass1 {this, "InvMass_PartFakeMass1", -1.}
private

Definition at line 78 of file xAODBSignalFilter.h.

◆ m_InvMass_PartFakeMass2

Gaudi::Property<double> xAODBSignalFilter::m_InvMass_PartFakeMass2 {this, "InvMass_PartFakeMass2", -1.}
private

Definition at line 79 of file xAODBSignalFilter.h.

◆ m_InvMass_PartId1

Gaudi::Property<int> xAODBSignalFilter::m_InvMass_PartId1 {this, "InvMass_PartId1", 13}
private

Definition at line 76 of file xAODBSignalFilter.h.

◆ m_InvMass_PartId2

Gaudi::Property<int> xAODBSignalFilter::m_InvMass_PartId2 {this, "InvMass_PartId2", -13}
private

Definition at line 77 of file xAODBSignalFilter.h.

◆ m_InvMass_switch

Gaudi::Property<bool> xAODBSignalFilter::m_InvMass_switch {this, "InvMass_switch", false}
private

Definition at line 75 of file xAODBSignalFilter.h.

◆ m_InvMassMax

Gaudi::Property<double> xAODBSignalFilter::m_InvMassMax {this, "InvMassMax", 14000000.0}
private

Definition at line 82 of file xAODBSignalFilter.h.

◆ m_InvMassMin

Gaudi::Property<double> xAODBSignalFilter::m_InvMassMin {this, "InvMassMin", 0.0}
private

Definition at line 81 of file xAODBSignalFilter.h.

◆ m_localLVL1MuonCutEta

Gaudi::Property<double> xAODBSignalFilter::m_localLVL1MuonCutEta {this, "LVL1MuonCutEta", 102.5}
private

Definition at line 52 of file xAODBSignalFilter.h.

◆ m_localLVL1MuonCutOn

Gaudi::Property<bool> xAODBSignalFilter::m_localLVL1MuonCutOn {this, "LVL1MuonCutOn", false}
private

Definition at line 48 of file xAODBSignalFilter.h.

◆ m_localLVL1MuonCutPT

Gaudi::Property<double> xAODBSignalFilter::m_localLVL1MuonCutPT {this, "LVL1MuonCutPT", 0.0}
private

Definition at line 51 of file xAODBSignalFilter.h.

◆ m_localLVL2ElectronCutEta

Gaudi::Property<double> xAODBSignalFilter::m_localLVL2ElectronCutEta {this, "LVL2ElectronCutEta", 102.5}
private

Definition at line 56 of file xAODBSignalFilter.h.

◆ m_localLVL2ElectronCutOn

Gaudi::Property<bool> xAODBSignalFilter::m_localLVL2ElectronCutOn {this, "LVL2ElectronCutOn", false}
private

Definition at line 50 of file xAODBSignalFilter.h.

◆ m_localLVL2ElectronCutPT

Gaudi::Property<double> xAODBSignalFilter::m_localLVL2ElectronCutPT {this, "LVL2ElectronCutPT", 0.0}
private

Definition at line 55 of file xAODBSignalFilter.h.

◆ m_localLVL2MuonCutEta

Gaudi::Property<double> xAODBSignalFilter::m_localLVL2MuonCutEta {this, "LVL2MuonCutEta", 102.5}
private

Definition at line 54 of file xAODBSignalFilter.h.

◆ m_localLVL2MuonCutOn

Gaudi::Property<bool> xAODBSignalFilter::m_localLVL2MuonCutOn {this, "LVL2MuonCutOn", false}
private

Definition at line 49 of file xAODBSignalFilter.h.

◆ m_localLVL2MuonCutPT

Gaudi::Property<double> xAODBSignalFilter::m_localLVL2MuonCutPT {this, "LVL2MuonCutPT", 0.0}
private

Definition at line 53 of file xAODBSignalFilter.h.

◆ m_LVL1Counter

double xAODBSignalFilter::m_LVL1Counter {}
private

Definition at line 90 of file xAODBSignalFilter.h.

◆ m_LVL2Counter

double xAODBSignalFilter::m_LVL2Counter {}
private

Definition at line 91 of file xAODBSignalFilter.h.

◆ m_mcEventKey

std::string GenBase::m_mcEventKey {}
protectedinherited

StoreGate key for the MC event collection (defaults to GEN_EVENT)

Definition at line 137 of file GenBase.h.

◆ m_mcevents_const

SG::ReadHandleKey<McEventCollection> GenBase::m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
privateinherited

Const handle to the MC event collection.

Definition at line 163 of file GenBase.h.

◆ m_mkMcEvent

BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
protectedinherited

Flag to determine if a new MC event collection should be made if it doesn't exist.

Definition at line 139 of file GenBase.h.

◆ m_nFail

int GenFilter::m_nFail
protectedinherited

Definition at line 66 of file GenFilter.h.

◆ m_nNeeded

int GenFilter::m_nNeeded
protectedinherited

Definition at line 67 of file GenFilter.h.

◆ m_nPass

int GenFilter::m_nPass
protectedinherited

Definition at line 65 of file GenFilter.h.

◆ m_ppSvc

ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
privateinherited

Handle on the particle property service.

Definition at line 160 of file GenBase.h.

◆ m_rejectedAll

double xAODBSignalFilter::m_rejectedAll {}
private

Definition at line 93 of file xAODBSignalFilter.h.

◆ m_rejectedTrigger

double xAODBSignalFilter::m_rejectedTrigger {}
private

Definition at line 92 of file xAODBSignalFilter.h.

◆ m_TotalInvMass_switch

Gaudi::Property<bool> xAODBSignalFilter::m_TotalInvMass_switch {this, "TotalInvMass_switch", false}
private

Definition at line 83 of file xAODBSignalFilter.h.

◆ m_TotalInvMassMax

Gaudi::Property<double> xAODBSignalFilter::m_TotalInvMassMax {this, "TotalInvMassMax", 14000000.0}
private

Definition at line 85 of file xAODBSignalFilter.h.

◆ m_TotalInvMassMin

Gaudi::Property<double> xAODBSignalFilter::m_TotalInvMassMin {this, "TotalInvMassMin", 0.0}
private

Definition at line 84 of file xAODBSignalFilter.h.

◆ m_truthPartContKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> xAODBSignalFilter::m_truthPartContKey {this, "TruthParticleContainerKey", "TruthGen"}
private

Definition at line 86 of file xAODBSignalFilter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAODBSignalFilter::m_TotalInvMassMin
Gaudi::Property< double > m_TotalInvMassMin
Definition: xAODBSignalFilter.h:84
xAODBSignalFilter::test_cuts
bool test_cuts(const double myPT, const double testPT, const double myEta, const double testEta) const
Definition: xAODBSignalFilter.cxx:352
isBottomMeson
bool isBottomMeson(const T &p)
Definition: AtlasPID.h:908
GenFilter::m_nNeeded
int m_nNeeded
Definition: GenFilter.h:67
P4Helpers::invMass
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
Definition: P4Helpers.h:252
isBottomBaryon
bool isBottomBaryon(const T &p)
Definition: AtlasPID.h:924
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAODBSignalFilter::m_localLVL2MuonCutOn
Gaudi::Property< bool > m_localLVL2MuonCutOn
Definition: xAODBSignalFilter.h:49
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAODBSignalFilter::m_cuts_f_e_eta
Gaudi::Property< double > m_cuts_f_e_eta
Definition: xAODBSignalFilter.h:59
xAODBSignalFilter::m_cuts_f_e_pT
Gaudi::Property< double > m_cuts_f_e_pT
Definition: xAODBSignalFilter.h:58
xAODBSignalFilter::m_TotalInvMass_switch
Gaudi::Property< bool > m_TotalInvMass_switch
Definition: xAODBSignalFilter.h:83
xAOD::TruthParticle_v1::pz
float pz() const
The z component of the particle's momentum.
xAODBSignalFilter::m_cuts_f_K0_on
Gaudi::Property< bool > m_cuts_f_K0_on
Definition: xAODBSignalFilter.h:69
xAODBSignalFilter::m_InvMass_PartFakeMass2
Gaudi::Property< double > m_InvMass_PartFakeMass2
Definition: xAODBSignalFilter.h:79
GenBase::events_const
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition: GenBase.h:96
SG::ReadHandle< McEventCollection >
xAODBSignalFilter::m_InvMassMax
Gaudi::Property< double > m_InvMassMax
Definition: xAODBSignalFilter.h:82
xAODBSignalFilter::m_cuts_f_had_eta
Gaudi::Property< double > m_cuts_f_had_eta
Definition: xAODBSignalFilter.h:65
xAODBSignalFilter::m_cuts_f_mu_on
Gaudi::Property< bool > m_cuts_f_mu_on
Definition: xAODBSignalFilter.h:60
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
xAODBSignalFilter::m_cuts_f_gam_pT
Gaudi::Property< double > m_cuts_f_gam_pT
Definition: xAODBSignalFilter.h:67
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
GenFilter::filterEvent
virtual StatusCode filterEvent()=0
xAODBSignalFilter::LVL1_Mu_Trigger
bool LVL1_Mu_Trigger(const xAOD::TruthParticle *child) const
Definition: xAODBSignalFilter.cxx:357
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAODBSignalFilter::m_cuts_f_had_pT
Gaudi::Property< double > m_cuts_f_had_pT
Definition: xAODBSignalFilter.h:64
xAODBSignalFilter::m_localLVL2MuonCutPT
Gaudi::Property< double > m_localLVL2MuonCutPT
Definition: xAODBSignalFilter.h:53
GenFilter::filterInitialize
virtual StatusCode filterInitialize()
Definition: GenFilter.h:45
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
isSMQuark
bool isSMQuark(const T &p)
Definition: AtlasPID.h:169
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAODBSignalFilter::m_rejectedAll
double m_rejectedAll
Definition: xAODBSignalFilter.h:93
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAODBSignalFilter::m_LVL1Counter
double m_LVL1Counter
Definition: xAODBSignalFilter.h:90
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
xAODBSignalFilter::FindAllChildren
void FindAllChildren(const xAOD::TruthParticle *mother, std::string treeIDStr, bool fromFinalB, bool &foundSignal, bool &passedAllCuts, TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB, TLorentzVector &total_4mom) const
Definition: xAODBSignalFilter.cxx:383
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MC::isPhysical
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
Definition: HepMCHelpers.h:51
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
GenBase::m_ppSvc
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Definition: GenBase.h:160
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
xAODBSignalFilter::m_cuts_f_had_on
Gaudi::Property< bool > m_cuts_f_had_on
Definition: xAODBSignalFilter.h:63
xAODBSignalFilter::FinalStatePassedCuts
bool FinalStatePassedCuts(const xAOD::TruthParticle *child) const
Definition: xAODBSignalFilter.cxx:477
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
xAODBSignalFilter::m_cuts_f_gam_eta
Gaudi::Property< double > m_cuts_f_gam_eta
Definition: xAODBSignalFilter.h:68
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAODBSignalFilter::m_InvMassMin
Gaudi::Property< double > m_InvMassMin
Definition: xAODBSignalFilter.h:81
xAODBSignalFilter::m_InvMass_PartFakeMass1
Gaudi::Property< double > m_InvMass_PartFakeMass1
Definition: xAODBSignalFilter.h:78
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAODBSignalFilter::m_localLVL2ElectronCutOn
Gaudi::Property< bool > m_localLVL2ElectronCutOn
Definition: xAODBSignalFilter.h:50
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAODBSignalFilter::m_localLVL1MuonCutOn
Gaudi::Property< bool > m_localLVL1MuonCutOn
Definition: xAODBSignalFilter.h:48
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAODBSignalFilter::m_cuts_f_K0_eta
Gaudi::Property< double > m_cuts_f_K0_eta
Definition: xAODBSignalFilter.h:71
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAODBSignalFilter::m_EventCnt
int m_EventCnt
Definition: xAODBSignalFilter.h:89
xAODBSignalFilter::m_B_pdgid
Gaudi::Property< int > m_B_pdgid
Definition: xAODBSignalFilter.h:73
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
GenBase::particleTable
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
Definition: GenBase.h:118
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAODBSignalFilter::m_localLVL2MuonCutEta
Gaudi::Property< double > m_localLVL2MuonCutEta
Definition: xAODBSignalFilter.h:54
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAODBSignalFilter::m_localLVL2ElectronCutEta
Gaudi::Property< double > m_localLVL2ElectronCutEta
Definition: xAODBSignalFilter.h:56
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAODBSignalFilter::m_localLVL1MuonCutEta
Gaudi::Property< double > m_localLVL1MuonCutEta
Definition: xAODBSignalFilter.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
isHadron
bool isHadron(const T &p)
Definition: AtlasPID.h:348
xAODBSignalFilter::m_localLVL2ElectronCutPT
Gaudi::Property< double > m_localLVL2ElectronCutPT
Definition: xAODBSignalFilter.h:55
GenFilter::m_nPass
int m_nPass
Definition: GenFilter.h:65
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:169
xAODBSignalFilter::PrintChild
void PrintChild(const xAOD::TruthParticle *child, const std::string &treeIDStr, const bool fromFinalB) const
Definition: xAODBSignalFilter.cxx:613
GenFilter::filterFinalize
virtual StatusCode filterFinalize()
Definition: GenFilter.h:47
xAODBSignalFilter::m_InvMass_PartId1
Gaudi::Property< int > m_InvMass_PartId1
Definition: xAODBSignalFilter.h:76
xAODBSignalFilter::m_cuts_f_mu_eta
Gaudi::Property< double > m_cuts_f_mu_eta
Definition: xAODBSignalFilter.h:62
xAODBSignalFilter::m_InvMass_switch
Gaudi::Property< bool > m_InvMass_switch
Definition: xAODBSignalFilter.h:75
xAODBSignalFilter::m_InvMass_PartId2
Gaudi::Property< int > m_InvMass_PartId2
Definition: xAODBSignalFilter.h:77
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
a
TList * a
Definition: liststreamerinfos.cxx:10
xAODBSignalFilter::LVL2_eMu_Trigger
bool LVL2_eMu_Trigger(const xAOD::TruthParticle *child) const
Definition: xAODBSignalFilter.cxx:369
columnar::empty
bool empty() const noexcept
Definition: ObjectRange.h:163
isCharged
bool isCharged(const T &p)
Definition: AtlasPID.h:993
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MC::isDecayed
bool isDecayed(const T &p)
Identify if the particle decayed.
Definition: HepMCHelpers.h:42
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
GenFilter::m_nFail
int m_nFail
Definition: GenFilter.h:66
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
test_pyathena.filterPassed
filterPassed
now, add a sequencer: it will only execute seqalg1 and 2 and never 3
Definition: test_pyathena.py:38
xAODBSignalFilter::m_cuts_f_e_on
Gaudi::Property< bool > m_cuts_f_e_on
Definition: xAODBSignalFilter.h:57
GenBase::GenBase
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: GenBase.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
xAODBSignalFilter::m_TotalInvMassMax
Gaudi::Property< double > m_TotalInvMassMax
Definition: xAODBSignalFilter.h:85
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
xAODBSignalFilter::m_localLVL1MuonCutPT
Gaudi::Property< double > m_localLVL1MuonCutPT
Definition: xAODBSignalFilter.h:51
GenBase::particleData
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
Definition: GenBase.h:126
xAODBSignalFilter::m_cuts_f_K0_pT
Gaudi::Property< double > m_cuts_f_K0_pT
Definition: xAODBSignalFilter.h:70
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:120
xAODBSignalFilter::m_cuts_f_gam_on
Gaudi::Property< bool > m_cuts_f_gam_on
Definition: xAODBSignalFilter.h:66
GenBase::initialize
virtual StatusCode initialize() override
Definition: GenBase.cxx:17
xAODBSignalFilter::m_truthPartContKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthPartContKey
Definition: xAODBSignalFilter.h:86
xAODBSignalFilter::m_rejectedTrigger
double m_rejectedTrigger
Definition: xAODBSignalFilter.h:92
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:202
xAODBSignalFilter::m_LVL2Counter
double m_LVL2Counter
Definition: xAODBSignalFilter.h:91
xAODBSignalFilter::m_cuts_f_mu_pT
Gaudi::Property< double > m_cuts_f_mu_pT
Definition: xAODBSignalFilter.h:61