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

#include <BSignalFilter.h>

Inheritance diagram for BSignalFilter:
Collaboration diagram for BSignalFilter:

Public Member Functions

 BSignalFilter (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode filterFinalize ()
 
virtual StatusCode filterEvent ()
 
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 > &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 HepMC::ConstGenParticlePtr &mother, std::string treeIDStr, bool fromFinalB, bool &foundSignal, bool &passedAllCuts, TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB, TLorentzVector &total_4mom) const
 
bool FinalStatePassedCuts (const HepMC::ConstGenParticlePtr &child) const
 
bool test_cuts (const double myPT, const double testPT, const double myEta, const double testEta) const
 
bool LVL1_Mu_Trigger (const HepMC::ConstGenParticlePtr &child) const
 
bool LVL2_eMu_Trigger (const HepMC::ConstGenParticlePtr &child) const
 
void PrintChild (const HepMC::ConstGenParticlePtr &child, const std::string &treeIDStr, const bool fromFinalB) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

bool m_cuts_f_e_on
 
bool m_cuts_f_mu_on
 
bool m_cuts_f_had_on
 
bool m_cuts_f_gam_on
 
bool m_cuts_f_K0_on
 
bool m_localLVL1MuonCutOn
 
bool m_localLVL2MuonCutOn
 
bool m_localLVL2ElectronCutOn
 
bool m_InvMass_switch
 
bool m_TotalInvMass_switch
 
double m_cuts_f_e_pT
 
double m_cuts_f_mu_pT
 
double m_cuts_f_had_pT
 
double m_cuts_f_gam_pT
 
double m_cuts_f_K0_pT
 
double m_cuts_f_e_eta
 
double m_cuts_f_mu_eta
 
double m_cuts_f_had_eta
 
double m_cuts_f_gam_eta
 
double m_cuts_f_K0_eta
 
double m_localLVL1MuonCutPT
 
double m_localLVL1MuonCutEta
 
double m_localLVL2MuonCutPT
 
double m_localLVL2MuonCutEta
 
double m_localLVL2ElectronCutPT
 
double m_localLVL2ElectronCutEta
 
double m_LVL1Counter
 
double m_LVL2Counter
 
double m_rejectedTrigger
 
double m_rejectedAll
 
int m_B_pdgid
 
int m_InvMass_PartId1
 
int m_InvMass_PartId2
 
double m_InvMass_PartFakeMass1
 
double m_InvMass_PartFakeMass2
 
double m_InvMassMin
 
double m_InvMassMax
 
double m_TotalInvMassMin
 
double m_TotalInvMassMax
 
int m_EventCnt
 
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 28 of file BSignalFilter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BSignalFilter()

BSignalFilter::BSignalFilter ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 33 of file BSignalFilter.cxx.

33  :
34  GenFilter(name, pSvcLocator)
35 {
36  // ** Declare the algorithm's properties **
37  declareProperty("LVL1MuonCutOn" , m_localLVL1MuonCutOn = false );
38  declareProperty("LVL2MuonCutOn" , m_localLVL2MuonCutOn = false );
39  declareProperty("LVL2ElectronCutOn" , m_localLVL2ElectronCutOn = false);
40  declareProperty("LVL1MuonCutPT" , m_localLVL1MuonCutPT = 0.0 );
41  declareProperty("LVL1MuonCutEta" , m_localLVL1MuonCutEta = 102.5 );
42  declareProperty("LVL2MuonCutPT" , m_localLVL2MuonCutPT = 0.0 );
43  declareProperty("LVL2MuonCutEta" , m_localLVL2MuonCutEta = 102.5 );
44  declareProperty("LVL2ElectronCutPT" , m_localLVL2ElectronCutPT = 0.0 );
45  declareProperty("LVL2ElectronCutEta" , m_localLVL2ElectronCutEta = 102.5);
46  declareProperty("Cuts_Final_e_switch" , m_cuts_f_e_on = false );
47  declareProperty("Cuts_Final_e_pT" , m_cuts_f_e_pT = 0. );
48  declareProperty("Cuts_Final_e_eta" , m_cuts_f_e_eta = 2.5 );
49  declareProperty("Cuts_Final_mu_switch" , m_cuts_f_mu_on = false );
50  declareProperty("Cuts_Final_mu_pT" , m_cuts_f_mu_pT = 0. );
51  declareProperty("Cuts_Final_mu_eta" , m_cuts_f_mu_eta = 102.5 );
52  declareProperty("Cuts_Final_hadrons_switch", m_cuts_f_had_on = false );
53  declareProperty("Cuts_Final_hadrons_pT" , m_cuts_f_had_pT = 0. );
54  declareProperty("Cuts_Final_hadrons_eta" , m_cuts_f_had_eta = 102.5 );
55  declareProperty("Cuts_Final_gamma_switch" , m_cuts_f_gam_on = false );
56  declareProperty("Cuts_Final_gamma_pT" , m_cuts_f_gam_pT = 0. );
57  declareProperty("Cuts_Final_gamma_eta" , m_cuts_f_gam_eta = 102.5 );
58  declareProperty("Cuts_Final_K0_switch" , m_cuts_f_K0_on = false );
59  declareProperty("Cuts_Final_K0_pT" , m_cuts_f_K0_pT = 0. );
60  declareProperty("Cuts_Final_K0_eta" , m_cuts_f_K0_eta = 102.5 );
61  //
62  // ** Declare the signal B-meson/hadron PDGid
63  declareProperty("B_PDGCode" ,m_B_pdgid = 0);
64  //
65  // ** Declare properties for mass filter **
66  declareProperty("InvMass_switch" , m_InvMass_switch = false );
67  declareProperty("InvMass_PartId1" , m_InvMass_PartId1 = 13 );
68  declareProperty("InvMass_PartId2" , m_InvMass_PartId2 = -m_InvMass_PartId1 );
69  declareProperty("InvMass_PartFakeMass1", m_InvMass_PartFakeMass1 = -1. );
70  declareProperty("InvMass_PartFakeMass2", m_InvMass_PartFakeMass2 = -1. );
71  declareProperty("InvMassMin" , m_InvMassMin = 0.0 );
72  declareProperty("InvMassMax" , m_InvMassMax = 14000000.0 );
73  declareProperty("TotalInvMass_switch" , m_TotalInvMass_switch = false );
74  declareProperty("TotalInvMassMin" , m_TotalInvMassMin = 0.0 );
75  declareProperty("TotalInvMassMax" , m_TotalInvMassMax = 14000000.0 );
76 
77  // ** Initialise event counter **
78  m_EventCnt = 0;
79  m_LVL1Counter = 0;
80  m_LVL2Counter = 0;
82  m_rejectedAll = 0;
83 
84 }

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 > &  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 > &  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 > &  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 > &  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 > &  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 BSignalFilter::filterEvent ( )
virtual

Implements GenFilter.

Definition at line 87 of file BSignalFilter.cxx.

88 {
89  ATH_MSG_INFO("");
90  ATH_MSG_INFO(" ---------------------------------- ");
91  ATH_MSG_INFO(" >>> BSignalFilter::FilterEvent <<< ");
92  ATH_MSG_INFO(" ---------------------------------- ");
93  ATH_MSG_INFO("");
94 
95  // ** Return ERROR and exit if the user has not selected the PDGid of the B-meson/hadron signal **
97  if (m_B_pdgid==0)
98  {
99  ATH_MSG_ERROR("");
100  ATH_MSG_ERROR(" ==>> 'B_PDGCode = 0'! Please define the PDGid of the B-meson/hadron signal!");
101  ATH_MSG_ERROR("");
102  return StatusCode::FAILURE;
103  }
104 
105  // ** Begin iterating over McEventCollection **
107  for( itr = events()->begin(); itr != events()->end(); ++itr )
108  {
109  m_EventCnt++;
110  bool acceptEvent = true;
111  const HepMC::GenEvent* genEvt = (*itr);
112 
113  // ** Check HepMC for particles activating LVL1 trigger, if that is what user wishes **
114  //
115  bool LVL1Passed = false;
116  HepMC::ConstGenParticlePtr LVL1Muon = nullptr;
117  //
118  if ( m_localLVL1MuonCutOn ) {
119  for(const auto& part: *genEvt){
120  bool LVL1Result = LVL1_Mu_Trigger( part );
121  if ( LVL1Result )
122  {
123  LVL1Passed = true;
124  LVL1Muon = part; // Remember the muon for LVL2 testing
125  break;
126  }
127  }
128  }
129 
130  // ** Check HepMC for particles activating LVL2 trigger, if that is what user wishes **
131  //
132  bool LVL2Passed = false;
133  //
134  if ( LVL1Passed && (m_localLVL2MuonCutOn || m_localLVL2ElectronCutOn) )
135  {
136  for(const auto& part: *genEvt)
137  {
138  bool LVL2Result = LVL2_eMu_Trigger( part );
139  if ( LVL2Result )
140  {
141  if ( part != LVL1Muon ) // Check the particle triggering LVL2 isn't
142  LVL2Passed = true; // the muon that triggered LVL1 --> Artificial,
143  // since, effectively, LVL2 trigger is not applied.
144  // This is needed to "trigger" the 2nd muon!
145  }
146  }
147  }
148 
149  // ** Flag event as passing LVL1 if it has passed **
150  //cy of both versions of the filter and go
151  if ( m_localLVL1MuonCutOn && LVL1Passed )
152  {
153  ATH_MSG_DEBUG(" LVL1 Trigger activated for event " << m_EventCnt);
154  m_LVL1Counter++;
155  }
156  // ** Flag event as passing LVL2 if it has passed **
157  //
158  if ( (m_localLVL2MuonCutOn || m_localLVL2ElectronCutOn) && LVL2Passed )
159  {
160  ATH_MSG_DEBUG(" LVL2 Trigger activated for event " << m_EventCnt);
161  m_LVL2Counter++;
162  }
163 
164  // ** If user hasn't requested triggers then set everything to true so nothing is thrown away **
165  //
166  if ( !m_localLVL1MuonCutOn )
167  {
168  LVL1Passed = true;
169  LVL2Passed = true;
170  }
171  if ( !m_localLVL2MuonCutOn && !m_localLVL2ElectronCutOn ) LVL2Passed = true;
172 
173  // ** Reject event if an undecayed quark is found **
174  //
175  for(const auto& part: *genEvt)
176  {
177  if ( std::abs(part->pdg_id()) <= 6 && MC::isStable(part) )
178  {
179  acceptEvent = false;
180  ATH_MSG_WARNING(" Undecayed quark "<< part);
181  }
182  }
183 
184  // ** Look for signal events **
185  //
186  bool SignalPassedCuts=false;
187  if ( LVL1Passed && LVL2Passed )
188  {
189  // ** Loop on all particles **
190  for(const auto& part: *genEvt)
191  {
192  const int particleID = part->pdg_id();
193  //
194  bool motherIsB = false;
195  bool newBChain = false;
196 
197  if( ( MC::isBottomMeson(particleID) || MC::isBottomBaryon(particleID) ) && MC::isPhysical(part) ){
198  // ** Reject whole event if any of B-hadrons in the event is not decayed **
199  if( MC::isStable(part)) { acceptEvent = false; }
200 
201 #ifdef HEPMC3
202  auto firstParent = part->production_vertex()->particles_in().begin();
203  auto lastParent = part->production_vertex()->particles_in().end();
204 #else
205  auto firstParent = part->production_vertex()->particles_begin(HepMC::parents);
206  auto lastParent = part->production_vertex()->particles_end(HepMC::parents);
207 #endif
208  for (auto thisParent = firstParent; thisParent != lastParent; ++thisParent ) {
209  if (MC::isBottomMeson(*thisParent) || MC::isBottomBaryon(*thisParent) ) motherIsB = true;
210  }
211  if( motherIsB ){
212  newBChain = false; // Since the chain is not new
213  }else{
214  newBChain = true;
215  }
216  }
217  else{ newBChain = false; } // Since particle is not b
218 
219  // ** New B-signal found, output message and find whole decay tree **
220  if( newBChain )
221  {
222  const HepPDT::ParticleData* HadronData = particleData(particleID);
223  std::string HadronName = "unknown particle";
224  if (HadronData){
225  HadronName = HadronData->name();
226  if (particleID < 0) HadronName = "anti - " + HadronName;
227  }
228  ATH_MSG_DEBUG("");
229  ATH_MSG_DEBUG(" ------------------------------------------ ");
230  ATH_MSG_DEBUG(" *** BSignalFilter.cxx: B-signal found *** ");
231  ATH_MSG_DEBUG(" ------------------------------------------ ");
232  ATH_MSG_DEBUG("");
233  ATH_MSG_DEBUG(" Event " << m_EventCnt << " --> B-hadron/B-meson (" << HadronName << ") " << part);
234  ATH_MSG_DEBUG("");
235 
236  // ** Looping on all children checking if they have passed the selection cuts defined by the user **
239  {
240  ATH_MSG_DEBUG(" *** KINEMATIC CUTS ON PARTICLES ACTIVATED *** ");
241  ATH_MSG_DEBUG("");
242  ATH_MSG_DEBUG(" --------------------------------- ");
243  ATH_MSG_DEBUG(" Started looping on all children ");
244  ATH_MSG_DEBUG(" --------------------------------- ");
245  ATH_MSG_DEBUG("");
246  //
247  bool isSignal=false;
248  bool havePassedCuts=true;
249  TLorentzVector CandPart1, CandPart2, total_4mom;
250  //
251  FindAllChildren(part,"",false,isSignal,havePassedCuts,CandPart1,CandPart2,false,total_4mom);
252  //
253  ATH_MSG_DEBUG("");
254  ATH_MSG_DEBUG(" ------------------------------- ");
255  ATH_MSG_DEBUG(" Ended looping on all children ");
256  ATH_MSG_DEBUG(" ------------------------------- ");
257  ATH_MSG_DEBUG("");
258 
259  SignalPassedCuts = ( isSignal && havePassedCuts );
260 
261  // ** If signal event is found and InvMass_switch = true, check if the selected
262  // couple of particles has an invariant mass within the range set by the user **
263  if ( m_InvMass_switch )
264  {
265  if ( SignalPassedCuts )
266  {
267  bool accept_mass = false;
268  bool accept_total_mass = false;
269  ATH_MSG_DEBUG("");
270  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES ACTIVATED! *** ");
271  ATH_MSG_DEBUG("");
272  if (m_InvMass_switch ) ATH_MSG_DEBUG(" -- Mass cuts -->> " << m_InvMassMin << " < mass < " << m_InvMassMax << " MeV");
273  //
274  double invMass = ( CandPart1 + CandPart2 ).M();
275  double invMass_total = total_4mom.M();
276  //
277 
278  if ( m_InvMass_switch )
279  {
280  ATH_MSG_DEBUG(" -- Invariant mass of the couple of particles = " << invMass << " MeV");
282  {
283  ATH_MSG_DEBUG(" ==>> Event has passed the mass filter!");
284  ATH_MSG_DEBUG("");
285  accept_mass = true;
286  }else
287  {
288  ATH_MSG_DEBUG(" ==>> Event has NOT passed the mass filter!");
289  ATH_MSG_DEBUG("");
290  }
291  SignalPassedCuts = SignalPassedCuts && accept_mass;
292  }
293  if ( m_TotalInvMass_switch )
294  {
295  ATH_MSG_DEBUG(" -- Total invariant mass of the final-state particles = " << invMass_total << " MeV");
296  if ( m_TotalInvMassMin < invMass_total && invMass_total < m_TotalInvMassMax )
297  {
298  ATH_MSG_DEBUG(" ==>> Event has passed the total mass filter!");
299  ATH_MSG_DEBUG("");
300  accept_total_mass = true;
301  } else {
302  ATH_MSG_DEBUG(" ==>> Event has NOT passed the total mass filter!");
303  ATH_MSG_DEBUG("");
304  }
305  SignalPassedCuts = SignalPassedCuts && accept_total_mass;
306  }
307  }else{
308  ATH_MSG_DEBUG("");
309  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES NOT APPLIED (since the event is not a signal that passed cuts)! *** ");
310  ATH_MSG_DEBUG("");
311  }
312  }else{
313  ATH_MSG_DEBUG(" *** INVARIANT MASS CUTS ON PARTICLES NOT ACTIVATED *** ");
314  ATH_MSG_DEBUG("");
315  }
316  }else{
317  SignalPassedCuts = true;
318  //
319  ATH_MSG_DEBUG(" *** KINEMATIC CUTS ON PARTICLES NOT ACTIVATED ==>> ACCEPT ALL EVENTS! *** ");
320  ATH_MSG_DEBUG("");
321  }
322  } // End newBChain
323  if ( SignalPassedCuts ) break; // We have found the signal, we do not need to look for other particles
324  } // End particle iteration
325 
326  if ( SignalPassedCuts )
327  {
328  ATH_MSG_DEBUG(" -->> All signal children have passed cuts on particles!");
329  }else{
330  ATH_MSG_DEBUG(" -->> Signal children have NOT passed cuts on particles!");
331  }
332  } // end of LVL1/LVL2 selection
333  else{
334  ATH_MSG_DEBUG("");
335  ATH_MSG_DEBUG(" -->> Event has NOT passed the trigger!");
336  }
337  // ** Reject event if it has not passed triggers **
338  // --> If not requested by user these flags will be set
339  // to true so there will be no erroneous rejection
340  if ( (!LVL1Passed) || (!LVL2Passed) ){
342  acceptEvent = false;
343  }
344 
345  // ** Check if all conditions are true **
346  // --> Accept the event if acceptEvent is true and the event is a signal event
347  acceptEvent = acceptEvent && SignalPassedCuts;
348 
349  // ** Print whether the event has passed or not **
350  //
351  ATH_MSG_DEBUG("");
352  if( !acceptEvent )
353  {
354  setFilterPassed(false);
355  m_rejectedAll++;
356  ATH_MSG_DEBUG(" ==========================");
357  ATH_MSG_DEBUG(" Event REJECTED by Filter ");
358  ATH_MSG_DEBUG(" ==========================");
359  }else
360  {
361  setFilterPassed(true);
362  ATH_MSG_DEBUG(" ==========================");
363  ATH_MSG_DEBUG(" Event ACCEPTED by Filter ");
364  ATH_MSG_DEBUG(" ==========================");
365  }
366  ATH_MSG_DEBUG("");
367 
368  } // End event iteration
369  // End of execution for each event
370  return StatusCode::SUCCESS;
371 }

◆ filterFinalize()

StatusCode BSignalFilter::filterFinalize ( )
virtual

Reimplemented from GenFilter.

Definition at line 649 of file BSignalFilter.cxx.

650 {
651  double total = m_EventCnt;
652  ATH_MSG_ALWAYS(" I===============================================================================================");
653  ATH_MSG_ALWAYS(" I BSignalFilter Summary Report ");
654  ATH_MSG_ALWAYS(" I===============================================================================================");
656  {
657  ATH_MSG_ALWAYS(" I LVL1 muon trigger report:");
658  ATH_MSG_ALWAYS(" I Muon pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
659  << m_localLVL1MuonCutPT << " MeV ");
660  ATH_MSG_ALWAYS(" I Muon pseudo-rapidity cut" << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
662  ATH_MSG_ALWAYS(" I No of events containing at least " << '\t' << '\t' << '\t' << '\t' << '\t' << "I");
663  ATH_MSG_ALWAYS(" I one particle satisfying these cuts " << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
664  << m_LVL1Counter);
666  {
667  ATH_MSG_ALWAYS(" I LVL2 muon trigger report:");
668  ATH_MSG_ALWAYS(" I Muon pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
669  << m_localLVL2MuonCutPT << " MeV ");
670  ATH_MSG_ALWAYS(" I Muon pseudo-rapidity cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << "I" << '\t'
672  }
674  {
675  ATH_MSG_ALWAYS(" I LVL2 electron trigger report:");
676  ATH_MSG_ALWAYS(" I Electron pT cut " << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' << '\t' <<
677  " I" << '\t' << m_localLVL2ElectronCutPT << " MeV ");
678  ATH_MSG_ALWAYS(" I Electron pseudo-rapidity cut " << '\t' << '\t' << '\t' << '\t' << '\t' << "I"
679  << '\t' << m_localLVL2ElectronCutEta);
680  }
682  {
683  ATH_MSG_ALWAYS(" I No of events containing at least one muon satisfying LVL1 cut" << '\t' << "I");
684  ATH_MSG_ALWAYS(" I and at least one separate particle passing these LVL2 cuts " << '\t' << '\t' << "I" << '\t'
685  << m_LVL2Counter);
686  }
687  }
688  ATH_MSG_ALWAYS(" I Total no of input events " << '\t'<< '\t'<< '\t'<< '\t'<< '\t'<< '\t'<< '\t' << "I" << '\t'
689  << total);
690  ATH_MSG_ALWAYS(" I No of events rejected by trigger " << '\t' << '\t'<< '\t'<< '\t'<< '\t'<< '\t'<< '\t' << "I" << '\t'
691  << m_rejectedTrigger);
692  ATH_MSG_ALWAYS(" I No of events rejected in total " << '\t' << '\t'<< '\t'<< '\t'<< '\t'<< '\t'<< '\t' << "I" << '\t'
693  << m_rejectedAll);
695  ATH_MSG_ALWAYS(" I To obtain correct cross section, multiply BX in PythiaB report by " << '\t' << '\t' << "I" << '\t'
696  << m_LVL1Counter / total);
698  ATH_MSG_ALWAYS(" I To obtain correct cross section, multiply BX in PythiaB report by " << '\t' << '\t' << "I" << '\t'
699  << m_LVL2Counter / total);
701  ATH_MSG_ALWAYS(" I No trigger requests made");
702  //
703  ATH_MSG_ALWAYS(" I=========================================== End of report =====================================");
704 
705  return StatusCode::SUCCESS;
706 }

◆ filterInitialize()

virtual StatusCode GenFilter::filterInitialize ( )
inlinevirtualinherited

◆ 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 BSignalFilter::FinalStatePassedCuts ( const HepMC::ConstGenParticlePtr child) const
private

Definition at line 498 of file BSignalFilter.cxx.

499 {
500  bool accept = true;
501 
502  // ** Look if children has passed the cuts **
503  //
504  int pID = child->pdg_id();
505  double myPT = child->momentum().perp();
506  double myEta = child->momentum().pseudoRapidity();
507 
508  ATH_MSG_DEBUG("");
509  ATH_MSG_DEBUG(" ** Found a child with: ");
510  ATH_MSG_DEBUG(" - id = " << pID );
511  ATH_MSG_DEBUG(" - pT = " << myPT << " MeV");
512  ATH_MSG_DEBUG(" - eta = " << myEta );
513  ATH_MSG_DEBUG("");
514 
515  if ( m_cuts_f_e_on )
516  {
517  if ( std::abs(pID) == 11 )
518  {
519  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the electron --> ( " << m_cuts_f_e_pT
520  << " , " << m_cuts_f_e_eta << " )");
521  if ( test_cuts( myPT, m_cuts_f_e_pT, myEta, m_cuts_f_e_eta) )
522  {
523  ATH_MSG_DEBUG(" ==>> Found an electron which passed the pT and eta cuts!");
524  ATH_MSG_DEBUG(" - Electron: pT = " << myPT << " MeV");
525  ATH_MSG_DEBUG(" - Electron: eta = " << myEta);
526  ATH_MSG_DEBUG("");
527  ATH_MSG_DEBUG(" ==>> Accepted the electron!");
528  ATH_MSG_DEBUG("");
529  }else
530  {
531  accept = false;
532  ATH_MSG_DEBUG(" ==>> The electron has NOT passed the pT and eta cuts!");
533  ATH_MSG_DEBUG("");
534  }
535  }
536  }
537  if ( m_cuts_f_mu_on )
538  {
539  if ( std::abs(pID) == 13 )
540  {
541  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the muon --> ( " << m_cuts_f_mu_pT
542  << " , " << m_cuts_f_mu_eta << " )");
543  if ( test_cuts( myPT, m_cuts_f_mu_pT, myEta, m_cuts_f_mu_eta) )
544  {
545  ATH_MSG_DEBUG(" ==>> Found a muon which passed the pT and eta cuts!");
546  ATH_MSG_DEBUG(" - Muon: pT = " << myPT << " MeV");
547  ATH_MSG_DEBUG(" - Muon: eta = " << myEta);
548  ATH_MSG_DEBUG("");
549  ATH_MSG_DEBUG(" ==>> Accepted the muon!");
550  ATH_MSG_DEBUG("");
551  }else
552  {
553  accept = false;
554  ATH_MSG_DEBUG(" ==>> The muon has NOT passed the pT and eta cuts!");
555  ATH_MSG_DEBUG("");
556  }
557  }
558  }
559  if ( m_cuts_f_had_on )
560  {
561  if ( MC::isHadron(pID) && MC::isCharged(pID))
562  {
563  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the charged hadron --> ( " << m_cuts_f_had_pT
564  << " , " << m_cuts_f_had_eta << " )");
565  if ( test_cuts( myPT, m_cuts_f_had_pT, myEta, m_cuts_f_had_eta) )
566  {
567  ATH_MSG_DEBUG(" ==>> Found a charged hadron which passed the pT and eta cuts!");
568  ATH_MSG_DEBUG(" - Charged hadron: pT = " << myPT << " MeV");
569  ATH_MSG_DEBUG(" - Charged hadron: eta = " << myEta);
570  ATH_MSG_DEBUG("");
571  ATH_MSG_DEBUG(" ==>> Accepted the charged hadron!");
572  ATH_MSG_DEBUG("");
573  }else
574  {
575  accept = false;
576  ATH_MSG_DEBUG(" ==>> The charged hadron has NOT passed the pT and eta cuts!");
577  ATH_MSG_DEBUG("");
578  }
579  }
580  }
581  if ( m_cuts_f_gam_on )
582  {
583  if ( std::abs(pID) == 22 )
584  {
585  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the gamma --> ( " << m_cuts_f_gam_pT
586  << " , " << m_cuts_f_gam_eta << " )");
587  if ( test_cuts( myPT, m_cuts_f_gam_pT, myEta, m_cuts_f_gam_eta) )
588  {
589  ATH_MSG_DEBUG(" ==>> Found a gamma which passed the pT and eta cuts!");
590  ATH_MSG_DEBUG(" - Gamma: pT = " << myPT << " MeV");
591  ATH_MSG_DEBUG(" - Gamma: eta = " << myEta);
592  ATH_MSG_DEBUG("");
593  ATH_MSG_DEBUG(" ==>> Accepted the gamma!");
594  ATH_MSG_DEBUG("");
595  }else
596  {
597  accept = false;
598  ATH_MSG_DEBUG(" ==>> The gamma has NOT passed the pT and eta cuts!");
599  ATH_MSG_DEBUG("");
600  }
601  }
602  }
603  if ( m_cuts_f_K0_on )
604  {
605  if ( std::abs(pID) == 311 )
606  {
607  ATH_MSG_DEBUG(" ** ( pT , eta ) cuts applied on the K0 --> ( " << m_cuts_f_K0_pT
608  << " , " << m_cuts_f_K0_eta << " )");
609  if ( test_cuts( myPT, m_cuts_f_K0_pT, myEta, m_cuts_f_K0_eta) )
610  {
611  ATH_MSG_DEBUG(" ==>> Found a K0 which passed the pT and eta cuts!");
612  ATH_MSG_DEBUG(" - K0: pT = " << myPT << " MeV");
613  ATH_MSG_DEBUG(" - K0: eta = " << myEta);
614  ATH_MSG_DEBUG("");
615  ATH_MSG_DEBUG(" ==>> Accepted the K0!");
616  ATH_MSG_DEBUG("");
617  }else
618  {
619  accept = false;
620  ATH_MSG_DEBUG(" ==>> The K0 has NOT passed the pT and eta cuts!");
621  ATH_MSG_DEBUG("");
622  }
623  }
624  }
625 
626  return accept;
627 
628 }

◆ FindAllChildren()

void BSignalFilter::FindAllChildren ( const HepMC::ConstGenParticlePtr mother,
std::string  treeIDStr,
bool  fromFinalB,
bool &  foundSignal,
bool &  passedAllCuts,
TLorentzVector &  p1,
TLorentzVector &  p2,
bool  fromSelectedB,
TLorentzVector &  total_4mom 
) const
private

Definition at line 411 of file BSignalFilter.cxx.

414 {
415  int pID = mother->pdg_id();
416  //
417  if ( !(mother->end_vertex()) && MC::isStable(mother) ) // i.e. this is a final state
418  {
419  bool hasChildGoodParent = fromFinalB && (fromSelectedB || m_B_pdgid==0);
420  //
421  if( fromFinalB && hasChildGoodParent )
422  {
423  foundSignal=true;
424  bool passedCut = FinalStatePassedCuts(mother); // X = X && ... in case of multiple particles (e.g. KK)
425  if ( m_cuts_f_e_on && std::abs(pID)==11 ) passedAllCuts = passedAllCuts && passedCut;
426  if ( m_cuts_f_mu_on && std::abs(pID)==13 ) passedAllCuts = passedAllCuts && passedCut;
427  if ( m_cuts_f_had_on && MC::isHadron(pID) && MC::isCharged(pID) ) passedAllCuts = passedAllCuts && passedCut;
428  if ( m_cuts_f_gam_on && std::abs(pID)==22 ) passedAllCuts = passedAllCuts && passedCut;
429  if ( m_cuts_f_K0_on && std::abs(pID)==311 ) passedAllCuts = passedAllCuts && passedCut;
430  //
432  {
433  if (m_InvMass_PartFakeMass1 < 0.) p1.SetPxPyPzE(mother->momentum().x(),mother->momentum().y(),mother->momentum().z(),mother->momentum().e() );
434  else p1.SetXYZM(mother->momentum().x(),mother->momentum().y(),mother->momentum().z(),m_InvMass_PartFakeMass1);
435  total_4mom = total_4mom + p1;
436  } else if ( (m_InvMass_switch || m_TotalInvMass_switch) && m_InvMass_PartId2==pID ) {
437  if (m_InvMass_PartFakeMass2 < 0.) p2.SetPxPyPzE(mother->momentum().x(),mother->momentum().y(),mother->momentum().z(),mother->momentum().e() );
438  else p2.SetXYZM(mother->momentum().x(),mother->momentum().y(),mother->momentum().z(),m_InvMass_PartFakeMass2);
439  total_4mom = total_4mom + p2;
440  } else if (m_TotalInvMass_switch) {
441  TLorentzVector current_4p;
442  current_4p.SetPxPyPzE(mother->momentum().x(),mother->momentum().y(),mother->momentum().z(),mother->momentum().e());
443  total_4mom = total_4mom + current_4p;
444  }
445  }
446  return;
447  }
448  else{
449  if ( !(mother->end_vertex()) ) // i.e. something is wrong in HepMC
450  {
451  if (MC::isDecayed(mother))
452  ATH_MSG_DEBUG(" Inconsistent entry in HepMC (status 2 particle not decayed), chain rejected!");
453  return;
454  }
455  }
456 #ifdef HEPMC3
457  auto firstChild = mother->end_vertex()->particles_out().begin();
458  auto lastChild = mother->end_vertex()->particles_out().end();
459 #else
460  auto firstChild = mother->end_vertex()->particles_begin(HepMC::children);
461  auto lastChild = mother->end_vertex()->particles_end(HepMC::children);
462 #endif
463 
464  int childCnt = 0;
465  std::string childIDStr;
466  if( !( treeIDStr=="" ) ) treeIDStr = treeIDStr + ".";
467 
468  // ** Find out whether particle is child of final (non-excited) B, used for cuts **
469  if( (!fromFinalB) && (MC::isBottomMeson(pID) || MC::isBottomBaryon(pID)) )
470  {
471  fromFinalB = true;
472  int pID{};
473  for (auto thisChild = firstChild; thisChild != lastChild; ++thisChild)
474  {
475  pID = (*thisChild)->pdg_id();
476  if( MC::isBottomMeson(pID) || MC::isBottomBaryon(pID) ) fromFinalB = false;
477  }
478  }
479 
480  // ** Main loop: iterate over all children, call method recursively.
481  //Note: Iterators changed between HEPMC2 and HEPMC3; the previous version
482  //was a custom iterator which could be incremented indefinitely, always returning
483  //'end' when necessary. In HEPMC3, these are standard library iterators
484  for (auto thisChild = firstChild; thisChild != lastChild; ++thisChild)
485  {
486  childCnt++;
487  std::stringstream childCntSS; childCntSS << childCnt;
488  childIDStr = treeIDStr + childCntSS.str();
489  PrintChild( (*thisChild), childIDStr, fromFinalB );
490  FindAllChildren( (*thisChild),childIDStr,fromFinalB,foundSignal,passedAllCuts,p1,p2,(pID==m_B_pdgid) || fromSelectedB,total_4mom);
491  }
492 
493  return;
494 
495 }

◆ 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 BSignalFilter::LVL1_Mu_Trigger ( const HepMC::ConstGenParticlePtr child) const
private

Definition at line 380 of file BSignalFilter.cxx.

381 {
382  bool accept = false;
383  int pID = child->pdg_id();
384  double myPT = child->momentum().perp();
385  double myEta = child->momentum().pseudoRapidity();
386 
387  if ( (std::abs(pID) == 13) && m_localLVL1MuonCutOn )
389 
390  return accept;
391 
392 }

◆ LVL2_eMu_Trigger()

bool BSignalFilter::LVL2_eMu_Trigger ( const HepMC::ConstGenParticlePtr child) const
private

Definition at line 395 of file BSignalFilter.cxx.

396 {
397  bool accept = false;
398  int pID = child->pdg_id();
399  double myPT = child->momentum().perp();
400  double myEta = child->momentum().pseudoRapidity();
401 
402  if ( (std::abs(pID) == 11) && m_localLVL2ElectronCutOn )
404  if ( (std::abs(pID) == 13) && m_localLVL2MuonCutOn )
406 
407  return accept;
408 }

◆ 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 BSignalFilter::PrintChild ( const HepMC::ConstGenParticlePtr child,
const std::string &  treeIDStr,
const bool  fromFinalB 
) const
private

Definition at line 631 of file BSignalFilter.cxx.

633 {
634  int pID = child->pdg_id();
635  // ** Find name **
636  const HepPDT::ParticleData* pData = particleData(std::abs(pID));
637  std::string pName = "unknown particle";
638  if (pData){
639  pName = pData->name();
640  if (pID < 0) pName = "anti - " + pName;
641  }
642  ATH_MSG_DEBUG(" " << treeIDStr << " " << "Child (" << pName
643  << ") " << child<<" , from final B = " << fromFinalB);
644 
645  return;
646 }

◆ 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 BSignalFilter::test_cuts ( const double  myPT,
const double  testPT,
const double  myEta,
const double  testEta 
) const
private

Definition at line 374 of file BSignalFilter.cxx.

375 {
376  return ( (myPT >= testPT) && (std::abs(myEta) <= testEta) );
377 }

◆ 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

int BSignalFilter::m_B_pdgid
private

Definition at line 59 of file BSignalFilter.h.

◆ m_cuts_f_e_eta

double BSignalFilter::m_cuts_f_e_eta
private

Definition at line 50 of file BSignalFilter.h.

◆ m_cuts_f_e_on

bool BSignalFilter::m_cuts_f_e_on
private

Definition at line 43 of file BSignalFilter.h.

◆ m_cuts_f_e_pT

double BSignalFilter::m_cuts_f_e_pT
private

Definition at line 48 of file BSignalFilter.h.

◆ m_cuts_f_gam_eta

double BSignalFilter::m_cuts_f_gam_eta
private

Definition at line 51 of file BSignalFilter.h.

◆ m_cuts_f_gam_on

bool BSignalFilter::m_cuts_f_gam_on
private

Definition at line 44 of file BSignalFilter.h.

◆ m_cuts_f_gam_pT

double BSignalFilter::m_cuts_f_gam_pT
private

Definition at line 49 of file BSignalFilter.h.

◆ m_cuts_f_had_eta

double BSignalFilter::m_cuts_f_had_eta
private

Definition at line 50 of file BSignalFilter.h.

◆ m_cuts_f_had_on

bool BSignalFilter::m_cuts_f_had_on
private

Definition at line 43 of file BSignalFilter.h.

◆ m_cuts_f_had_pT

double BSignalFilter::m_cuts_f_had_pT
private

Definition at line 48 of file BSignalFilter.h.

◆ m_cuts_f_K0_eta

double BSignalFilter::m_cuts_f_K0_eta
private

Definition at line 51 of file BSignalFilter.h.

◆ m_cuts_f_K0_on

bool BSignalFilter::m_cuts_f_K0_on
private

Definition at line 44 of file BSignalFilter.h.

◆ m_cuts_f_K0_pT

double BSignalFilter::m_cuts_f_K0_pT
private

Definition at line 49 of file BSignalFilter.h.

◆ m_cuts_f_mu_eta

double BSignalFilter::m_cuts_f_mu_eta
private

Definition at line 50 of file BSignalFilter.h.

◆ m_cuts_f_mu_on

bool BSignalFilter::m_cuts_f_mu_on
private

Definition at line 43 of file BSignalFilter.h.

◆ m_cuts_f_mu_pT

double BSignalFilter::m_cuts_f_mu_pT
private

Definition at line 48 of file BSignalFilter.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 BSignalFilter::m_EventCnt
private

Definition at line 65 of file BSignalFilter.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

double BSignalFilter::m_InvMass_PartFakeMass1
private

Definition at line 61 of file BSignalFilter.h.

◆ m_InvMass_PartFakeMass2

double BSignalFilter::m_InvMass_PartFakeMass2
private

Definition at line 61 of file BSignalFilter.h.

◆ m_InvMass_PartId1

int BSignalFilter::m_InvMass_PartId1
private

Definition at line 60 of file BSignalFilter.h.

◆ m_InvMass_PartId2

int BSignalFilter::m_InvMass_PartId2
private

Definition at line 60 of file BSignalFilter.h.

◆ m_InvMass_switch

bool BSignalFilter::m_InvMass_switch
private

Definition at line 47 of file BSignalFilter.h.

◆ m_InvMassMax

double BSignalFilter::m_InvMassMax
private

Definition at line 62 of file BSignalFilter.h.

◆ m_InvMassMin

double BSignalFilter::m_InvMassMin
private

Definition at line 62 of file BSignalFilter.h.

◆ m_localLVL1MuonCutEta

double BSignalFilter::m_localLVL1MuonCutEta
private

Definition at line 52 of file BSignalFilter.h.

◆ m_localLVL1MuonCutOn

bool BSignalFilter::m_localLVL1MuonCutOn
private

Definition at line 45 of file BSignalFilter.h.

◆ m_localLVL1MuonCutPT

double BSignalFilter::m_localLVL1MuonCutPT
private

Definition at line 52 of file BSignalFilter.h.

◆ m_localLVL2ElectronCutEta

double BSignalFilter::m_localLVL2ElectronCutEta
private

Definition at line 54 of file BSignalFilter.h.

◆ m_localLVL2ElectronCutOn

bool BSignalFilter::m_localLVL2ElectronCutOn
private

Definition at line 46 of file BSignalFilter.h.

◆ m_localLVL2ElectronCutPT

double BSignalFilter::m_localLVL2ElectronCutPT
private

Definition at line 53 of file BSignalFilter.h.

◆ m_localLVL2MuonCutEta

double BSignalFilter::m_localLVL2MuonCutEta
private

Definition at line 53 of file BSignalFilter.h.

◆ m_localLVL2MuonCutOn

bool BSignalFilter::m_localLVL2MuonCutOn
private

Definition at line 45 of file BSignalFilter.h.

◆ m_localLVL2MuonCutPT

double BSignalFilter::m_localLVL2MuonCutPT
private

Definition at line 52 of file BSignalFilter.h.

◆ m_LVL1Counter

double BSignalFilter::m_LVL1Counter
private

Definition at line 55 of file BSignalFilter.h.

◆ m_LVL2Counter

double BSignalFilter::m_LVL2Counter
private

Definition at line 56 of file BSignalFilter.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 BSignalFilter::m_rejectedAll
private

Definition at line 58 of file BSignalFilter.h.

◆ m_rejectedTrigger

double BSignalFilter::m_rejectedTrigger
private

Definition at line 57 of file BSignalFilter.h.

◆ m_TotalInvMass_switch

bool BSignalFilter::m_TotalInvMass_switch
private

Definition at line 47 of file BSignalFilter.h.

◆ m_TotalInvMassMax

double BSignalFilter::m_TotalInvMassMax
private

Definition at line 63 of file BSignalFilter.h.

◆ m_TotalInvMassMin

double BSignalFilter::m_TotalInvMassMin
private

Definition at line 63 of file BSignalFilter.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
BSignalFilter::m_cuts_f_mu_pT
double m_cuts_f_mu_pT
Definition: BSignalFilter.h:48
isBottomMeson
bool isBottomMeson(const T &p)
Definition: AtlasPID.h:687
BSignalFilter::m_TotalInvMassMax
double m_TotalInvMassMax
Definition: BSignalFilter.h:63
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
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:703
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
BSignalFilter::m_InvMass_switch
bool m_InvMass_switch
Definition: BSignalFilter.h:47
BSignalFilter::PrintChild
void PrintChild(const HepMC::ConstGenParticlePtr &child, const std::string &treeIDStr, const bool fromFinalB) const
Definition: BSignalFilter.cxx:631
GenBase::events_const
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition: GenBase.h:96
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
python.DecayParser.parents
parents
print ("==> buf:",buf)
Definition: DecayParser.py:31
BSignalFilter::m_InvMass_PartFakeMass2
double m_InvMass_PartFakeMass2
Definition: BSignalFilter.h:61
BSignalFilter::m_TotalInvMassMin
double m_TotalInvMassMin
Definition: BSignalFilter.h:63
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
BSignalFilter::m_cuts_f_had_pT
double m_cuts_f_had_pT
Definition: BSignalFilter.h:48
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
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
BSignalFilter::m_localLVL2ElectronCutOn
bool m_localLVL2ElectronCutOn
Definition: BSignalFilter.h:46
BSignalFilter::m_localLVL1MuonCutOn
bool m_localLVL1MuonCutOn
Definition: BSignalFilter.h:45
BSignalFilter::m_localLVL2MuonCutPT
double m_localLVL2MuonCutPT
Definition: BSignalFilter.h:52
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
BSignalFilter::FinalStatePassedCuts
bool FinalStatePassedCuts(const HepMC::ConstGenParticlePtr &child) const
Definition: BSignalFilter.cxx:498
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
BSignalFilter::m_localLVL2MuonCutOn
bool m_localLVL2MuonCutOn
Definition: BSignalFilter.h:45
BSignalFilter::m_TotalInvMass_switch
bool m_TotalInvMass_switch
Definition: BSignalFilter.h:47
BSignalFilter::m_InvMass_PartFakeMass1
double m_InvMass_PartFakeMass1
Definition: BSignalFilter.h:61
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
GenFilter::filterInitialize
virtual StatusCode filterInitialize()
Definition: GenFilter.h:45
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
BSignalFilter::test_cuts
bool test_cuts(const double myPT, const double testPT, const double myEta, const double testEta) const
Definition: BSignalFilter.cxx:374
BSignalFilter::m_cuts_f_had_on
bool m_cuts_f_had_on
Definition: BSignalFilter.h:43
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
BSignalFilter::m_EventCnt
int m_EventCnt
Definition: BSignalFilter.h:65
BSignalFilter::LVL2_eMu_Trigger
bool LVL2_eMu_Trigger(const HepMC::ConstGenParticlePtr &child) const
Definition: BSignalFilter.cxx:395
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
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
BSignalFilter::m_rejectedTrigger
double m_rejectedTrigger
Definition: BSignalFilter.h:57
BSignalFilter::m_localLVL2MuonCutEta
double m_localLVL2MuonCutEta
Definition: BSignalFilter.h:53
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
BSignalFilter::m_cuts_f_e_pT
double m_cuts_f_e_pT
Definition: BSignalFilter.h:48
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
BSignalFilter::m_localLVL2ElectronCutEta
double m_localLVL2ElectronCutEta
Definition: BSignalFilter.h:54
BSignalFilter::m_localLVL1MuonCutEta
double m_localLVL1MuonCutEta
Definition: BSignalFilter.h:52
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
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
BSignalFilter::m_cuts_f_e_eta
double m_cuts_f_e_eta
Definition: BSignalFilter.h:50
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
BSignalFilter::m_InvMass_PartId2
int m_InvMass_PartId2
Definition: BSignalFilter.h:60
BSignalFilter::m_cuts_f_had_eta
double m_cuts_f_had_eta
Definition: BSignalFilter.h:50
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
BSignalFilter::m_cuts_f_e_on
bool m_cuts_f_e_on
Definition: BSignalFilter.h:43
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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
BSignalFilter::m_cuts_f_gam_eta
double m_cuts_f_gam_eta
Definition: BSignalFilter.h:51
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
BSignalFilter::m_rejectedAll
double m_rejectedAll
Definition: BSignalFilter.h:58
BSignalFilter::m_localLVL1MuonCutPT
double m_localLVL1MuonCutPT
Definition: BSignalFilter.h:52
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
BSignalFilter::m_cuts_f_K0_pT
double m_cuts_f_K0_pT
Definition: BSignalFilter.h:49
BSignalFilter::m_LVL2Counter
double m_LVL2Counter
Definition: BSignalFilter.h:56
isHadron
bool isHadron(const T &p)
Definition: AtlasPID.h:300
BSignalFilter::m_cuts_f_gam_pT
double m_cuts_f_gam_pT
Definition: BSignalFilter.h:49
BSignalFilter::m_cuts_f_K0_eta
double m_cuts_f_K0_eta
Definition: BSignalFilter.h:51
GenFilter::m_nPass
int m_nPass
Definition: GenFilter.h:65
GenFilter::filterFinalize
virtual StatusCode filterFinalize()
Definition: GenFilter.h:47
BSignalFilter::m_cuts_f_gam_on
bool m_cuts_f_gam_on
Definition: BSignalFilter.h:44
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
BSignalFilter::m_cuts_f_K0_on
bool m_cuts_f_K0_on
Definition: BSignalFilter.h:44
a
TList * a
Definition: liststreamerinfos.cxx:10
isCharged
bool isCharged(const T &p)
Definition: AtlasPID.h:763
h
BSignalFilter::m_B_pdgid
int m_B_pdgid
Definition: BSignalFilter.h:59
BSignalFilter::FindAllChildren
void FindAllChildren(const HepMC::ConstGenParticlePtr &mother, std::string treeIDStr, bool fromFinalB, bool &foundSignal, bool &passedAllCuts, TLorentzVector &p1, TLorentzVector &p2, bool fromSelectedB, TLorentzVector &total_4mom) const
Definition: BSignalFilter.cxx:411
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
BSignalFilter::m_localLVL2ElectronCutPT
double m_localLVL2ElectronCutPT
Definition: BSignalFilter.h:53
MC::isDecayed
bool isDecayed(const T &p)
Identify if the particle decayed.
Definition: HepMCHelpers.h:42
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
BSignalFilter::m_InvMassMin
double m_InvMassMin
Definition: BSignalFilter.h:62
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.DecayParser.children
children
Definition: DecayParser.py:32
GenFilter::m_nFail
int m_nFail
Definition: GenFilter.h:66
test_pyathena.filterPassed
filterPassed
now, add a sequencer: it will only execute seqalg1 and 2 and never 3
Definition: test_pyathena.py:38
GenFilter::GenFilter
GenFilter(const std::string &name, ISvcLocator *pSvcLocator)
Definition: GenFilter.cxx:8
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
BSignalFilter::m_cuts_f_mu_on
bool m_cuts_f_mu_on
Definition: BSignalFilter.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
BSignalFilter::m_cuts_f_mu_eta
double m_cuts_f_mu_eta
Definition: BSignalFilter.h:50
GenBase::particleData
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
Definition: GenBase.h:126
BSignalFilter::m_LVL1Counter
double m_LVL1Counter
Definition: BSignalFilter.h:55
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
GenBase::initialize
virtual StatusCode initialize() override
Definition: GenBase.cxx:17
BSignalFilter::m_InvMass_PartId1
int m_InvMass_PartId1
Definition: BSignalFilter.h:60
BSignalFilter::m_InvMassMax
double m_InvMassMax
Definition: BSignalFilter.h:62
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 >
BSignalFilter::LVL1_Mu_Trigger
bool LVL1_Mu_Trigger(const HepMC::ConstGenParticlePtr &child) const
Definition: BSignalFilter.cxx:380