 |
ATLAS Offline Software
|
#include <xAODBSignalFilter.h>
|
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 |
|
|
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...
|
|
|
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::TruthParticleContainer > | m_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 |
|
Definition at line 32 of file xAODBSignalFilter.h.
◆ StoreGateSvc_t
◆ 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.
78 ATH_MSG_ERROR(
"McEventCollection is empty during first event access");
79 return *(
events()->begin());
◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]
◆ cmTomm()
void GenBase::cmTomm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 10.
Definition at line 78 of file GenBase.cxx.
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);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ 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.
85 ATH_MSG_ERROR(
"Const McEventCollection is empty during first event access");
◆ events_const() [1/2]
◆ events_const() [2/2]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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.
32 return StatusCode::FAILURE;
35 ATH_MSG_WARNING(
"More than one event in current McEventCollection -- which is valid?");
51 sc = StatusCode::FAILURE;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ filterEvent()
StatusCode xAODBSignalFilter::filterEvent |
( |
| ) |
|
|
finaloverridevirtual |
Implements GenFilter.
Definition at line 38 of file xAODBSignalFilter.cxx.
42 ATH_MSG_INFO(
" >>> xAODBSignalFilter::FilterEvent <<< ");
51 ATH_MSG_ERROR(
" ==>> 'B_PDGCode = 0'! Please define the PDGid of the B-meson/hadron signal!");
53 return StatusCode::FAILURE;
58 CHECK(xTruthParticleContainer.isValid());
60 bool acceptEvent =
true;
61 unsigned int nPart = xTruthParticleContainer->size();
64 bool LVL1Passed =
false;
72 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
87 bool LVL2Passed =
false;
91 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
131 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
142 bool SignalPassedCuts =
false;
143 if (LVL1Passed && LVL2Passed)
146 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
148 const int particleID =
part->pdgId();
150 bool motherIsB =
false;
151 bool newBChain =
false;
161 for(
size_t thisParent_id=0; thisParent_id <
part->prodVtx()->nIncomingParticles(); thisParent_id++)
163 auto parent =
part->prodVtx()->incomingParticle(thisParent_id);
164 int parentID =
parent->pdgId();
185 const HepPDT::ParticleData *HadronData =
particleData(particleID);
186 std::string HadronName =
"unknown particle";
189 HadronName = HadronData->name();
191 HadronName =
"anti - " + HadronName;
194 ATH_MSG_DEBUG(
" ------------------------------------------ ");
195 ATH_MSG_DEBUG(
" *** xAODBSignalFilter.cxx: B-signal found *** ");
196 ATH_MSG_DEBUG(
" ------------------------------------------ ");
204 ATH_MSG_DEBUG(
" *** KINEMATIC CUTS ON PARTICLES ACTIVATED *** ");
211 bool isSignal =
false;
212 bool havePassedCuts =
true;
213 TLorentzVector CandPart1, CandPart2, total_4mom;
215 FindAllChildren(
part,
"",
false, isSignal, havePassedCuts, CandPart1, CandPart2,
false, total_4mom);
223 SignalPassedCuts = (isSignal && havePassedCuts);
229 if (SignalPassedCuts)
231 bool accept_mass =
false;
232 bool accept_total_mass =
false;
234 ATH_MSG_DEBUG(
" *** INVARIANT MASS CUTS ON PARTICLES ACTIVATED! *** ");
239 double invMass = (CandPart1 + CandPart2).M();
240 double invMass_total = total_4mom.M();
254 ATH_MSG_DEBUG(
" ==>> Event has NOT passed the mass filter!");
257 SignalPassedCuts = SignalPassedCuts && accept_mass;
261 ATH_MSG_DEBUG(
" -- Total invariant mass of the final-state particles = " << invMass_total <<
" MeV");
264 ATH_MSG_DEBUG(
" ==>> Event has passed the total mass filter!");
266 accept_total_mass =
true;
270 ATH_MSG_DEBUG(
" ==>> Event has NOT passed the total mass filter!");
273 SignalPassedCuts = SignalPassedCuts && accept_total_mass;
279 ATH_MSG_DEBUG(
" *** INVARIANT MASS CUTS ON PARTICLES NOT APPLIED (since the event is not a signal that passed cuts)! *** ");
285 ATH_MSG_DEBUG(
" *** INVARIANT MASS CUTS ON PARTICLES NOT ACTIVATED *** ");
291 SignalPassedCuts =
true;
293 ATH_MSG_DEBUG(
" *** KINEMATIC CUTS ON PARTICLES NOT ACTIVATED ==>> ACCEPT ALL EVENTS! *** ");
297 if (SignalPassedCuts)
301 if (SignalPassedCuts)
303 ATH_MSG_DEBUG(
" -->> All signal children have passed cuts on particles!");
307 ATH_MSG_DEBUG(
" -->> Signal children have NOT passed cuts on particles!");
318 if ((!LVL1Passed) || (!LVL2Passed))
326 acceptEvent = acceptEvent && SignalPassedCuts;
333 setFilterPassed(
false);
341 setFilterPassed(
true);
349 return StatusCode::SUCCESS;
◆ filterFinalize()
StatusCode xAODBSignalFilter::filterFinalize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from GenFilter.
Definition at line 633 of file xAODBSignalFilter.cxx.
636 ATH_MSG_ALWAYS(
" I===============================================================================================");
638 ATH_MSG_ALWAYS(
" I===============================================================================================");
642 ATH_MSG_ALWAYS(
" I Muon pT cut " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
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'
652 ATH_MSG_ALWAYS(
" I Muon pT cut " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
654 ATH_MSG_ALWAYS(
" I Muon pseudo-rapidity cut " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
661 ATH_MSG_ALWAYS(
" I Electron pseudo-rapidity cut " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I"
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'
671 ATH_MSG_ALWAYS(
" I Total no of input events " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
673 ATH_MSG_ALWAYS(
" I No of events rejected by trigger " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
675 ATH_MSG_ALWAYS(
" I No of events rejected in total " <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
'\t' <<
"I" <<
'\t'
678 ATH_MSG_ALWAYS(
" I To obtain correct cross section, multiply BX in PythiaB report by " <<
'\t' <<
'\t' <<
"I" <<
'\t'
681 ATH_MSG_ALWAYS(
" I To obtain correct cross section, multiply BX in PythiaB report by " <<
'\t' <<
'\t' <<
"I" <<
'\t'
686 ATH_MSG_ALWAYS(
" I=========================================== End of report =====================================");
688 return StatusCode::SUCCESS;
◆ filterInitialize()
StatusCode xAODBSignalFilter::filterInitialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ finalize()
StatusCode GenFilter::finalize |
( |
| ) |
|
|
inherited |
Definition at line 56 of file GenFilter.cxx.
59 return StatusCode::SUCCESS;
◆ FinalStatePassedCuts()
Definition at line 477 of file xAODBSignalFilter.cxx.
483 int pID = child->
pdgId();
484 double myPT = child->
pt();
485 double myEta = child->
eta();
502 ATH_MSG_DEBUG(
" ==>> Found an electron which passed the pT and eta cuts!");
512 ATH_MSG_DEBUG(
" ==>> The electron has NOT passed the pT and eta cuts!");
525 ATH_MSG_DEBUG(
" ==>> Found a muon which passed the pT and eta cuts!");
535 ATH_MSG_DEBUG(
" ==>> The muon has NOT passed the pT and eta cuts!");
548 ATH_MSG_DEBUG(
" ==>> Found a charged hadron which passed the pT and eta cuts!");
558 ATH_MSG_DEBUG(
" ==>> The charged hadron has NOT passed the pT and eta cuts!");
571 ATH_MSG_DEBUG(
" ==>> Found a gamma which passed the pT and eta cuts!");
581 ATH_MSG_DEBUG(
" ==>> The gamma has NOT passed the pT and eta cuts!");
588 if (std::abs(pID) == MC::K0)
594 ATH_MSG_DEBUG(
" ==>> Found a K0 which passed the pT and eta cuts!");
604 ATH_MSG_DEBUG(
" ==>> The K0 has NOT passed the pT and eta cuts!");
◆ 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.
387 int pID = mother->
pdgId();
391 bool hasChildGoodParent = fromFinalB && (fromSelectedB ||
m_B_pdgid == 0);
393 if (fromFinalB && hasChildGoodParent)
398 passedAllCuts = passedAllCuts && passedCut;
400 passedAllCuts = passedAllCuts && passedCut;
402 passedAllCuts = passedAllCuts && passedCut;
404 passedAllCuts = passedAllCuts && passedCut;
406 passedAllCuts = passedAllCuts && passedCut;
411 p1.SetPxPyPzE(mother->
px(), mother->
py(), mother->
pz(), mother->
e());
414 total_4mom = total_4mom +
p1;
419 p2.SetPxPyPzE(mother->
px(), mother->
py(), mother->
pz(), mother->
e());
422 total_4mom = total_4mom +
p2;
426 TLorentzVector current_4p;
427 current_4p.SetPxPyPzE(mother->
px(), mother->
py(), mother->
pz(), mother->
e());
428 total_4mom = total_4mom + current_4p;
438 ATH_MSG_DEBUG(
" Inconsistent entry in HepMC (status 2 particle not decayed), chain rejected!");
444 std::string childIDStr;
445 if (!(treeIDStr ==
""))
446 treeIDStr = treeIDStr +
".";
453 for(
size_t thisChild_id=0; thisChild_id < mother->
decayVtx()->nOutgoingParticles(); thisChild_id++)
456 pID = child->
pdgId();
463 for(
size_t thisChild_id=0; thisChild_id < mother->
decayVtx()->nOutgoingParticles(); thisChild_id++)
467 std::stringstream childCntSS;
468 childCntSS << childCnt;
469 childIDStr = treeIDStr + childCntSS.str();
◆ GenFilter()
◆ 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.
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());
◆ initialize()
StatusCode GenFilter::initialize |
( |
| ) |
|
|
virtualinherited |
◆ inputHandles()
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()
◆ LVL2_eMu_Trigger()
◆ MeVToGeV()
void GenBase::MeVToGeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1/1000.
Definition at line 68 of file GenBase.cxx.
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);
◆ mmTocm()
void GenBase::mmTocm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 1/10.
Definition at line 87 of file GenBase.cxx.
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);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nFailed()
int GenFilter::nFailed |
( |
| ) |
const |
|
inlineinherited |
◆ nNeeded()
int GenFilter::nNeeded |
( |
| ) |
const |
|
inlineinherited |
◆ nPassed()
int GenFilter::nPassed |
( |
| ) |
const |
|
inlineinherited |
◆ outputHandles()
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.
◆ particleTable()
const HepPDT::ParticleDataTable& GenBase::particleTable |
( |
| ) |
const |
|
inlineinherited |
Get a particle data table.
Definition at line 118 of file GenBase.h.
◆ partPropSvc()
Access the particle property service.
Definition at line 113 of file GenBase.h.
◆ pdt()
const HepPDT::ParticleDataTable& GenBase::pdt |
( |
| ) |
const |
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
◆ PrintChild()
Definition at line 613 of file xAODBSignalFilter.cxx.
616 int pID = child->
pdgId();
618 const HepPDT::ParticleData *pData =
particleData(std::abs(pID));
619 std::string pName =
"unknown particle";
622 pName = pData->name();
624 pName =
"anti - " + pName;
627 <<
"Child (" << pName
628 <<
") " << child <<
" , from final B = " << fromFinalB);
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
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 |
◆ updateVHKA()
◆ m_B_pdgid
Gaudi::Property<int> xAODBSignalFilter::m_B_pdgid {this, "B_PDGCode", 0} |
|
private |
◆ m_cuts_f_e_eta
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_e_eta {this, "Cuts_Final_e_eta", 2.5} |
|
private |
◆ m_cuts_f_e_on
Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_e_on {this, "Cuts_Final_e_switch", false} |
|
private |
◆ m_cuts_f_e_pT
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_e_pT {this, "Cuts_Final_e_pT", 0.} |
|
private |
◆ m_cuts_f_gam_eta
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_gam_eta {this, "Cuts_Final_gamma_eta", 102.5} |
|
private |
◆ m_cuts_f_gam_on
Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_gam_on {this, "Cuts_Final_gamma_switch", false} |
|
private |
◆ m_cuts_f_gam_pT
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_gam_pT {this, "Cuts_Final_gamma_pT", 0.} |
|
private |
◆ m_cuts_f_had_eta
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_had_eta {this, "Cuts_Final_hadrons_eta", 102.5} |
|
private |
◆ m_cuts_f_had_on
Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_had_on {this, "Cuts_Final_hadrons_switch", false} |
|
private |
◆ m_cuts_f_had_pT
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_had_pT {this, "Cuts_Final_hadrons_pT", 0.} |
|
private |
◆ m_cuts_f_K0_eta
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_K0_eta {this, "Cuts_Final_K0_eta", 102.5} |
|
private |
◆ m_cuts_f_K0_on
Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_K0_on {this, "Cuts_Final_K0_switch", false} |
|
private |
◆ m_cuts_f_K0_pT
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_K0_pT {this, "Cuts_Final_K0_pT", 0.} |
|
private |
◆ m_cuts_f_mu_eta
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_mu_eta {this, "Cuts_Final_mu_eta", 102.5} |
|
private |
◆ m_cuts_f_mu_on
Gaudi::Property<bool> xAODBSignalFilter::m_cuts_f_mu_on {this, "Cuts_Final_mu_switch", false} |
|
private |
◆ m_cuts_f_mu_pT
Gaudi::Property<double> xAODBSignalFilter::m_cuts_f_mu_pT {this, "Cuts_Final_mu_pT", 0.} |
|
private |
◆ m_detStore
◆ m_EventCnt
int xAODBSignalFilter::m_EventCnt {} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_InvMass_PartFakeMass1
Gaudi::Property<double> xAODBSignalFilter::m_InvMass_PartFakeMass1 {this, "InvMass_PartFakeMass1", -1.} |
|
private |
◆ m_InvMass_PartFakeMass2
Gaudi::Property<double> xAODBSignalFilter::m_InvMass_PartFakeMass2 {this, "InvMass_PartFakeMass2", -1.} |
|
private |
◆ m_InvMass_PartId1
Gaudi::Property<int> xAODBSignalFilter::m_InvMass_PartId1 {this, "InvMass_PartId1", 13} |
|
private |
◆ m_InvMass_PartId2
Gaudi::Property<int> xAODBSignalFilter::m_InvMass_PartId2 {this, "InvMass_PartId2", -13} |
|
private |
◆ m_InvMass_switch
Gaudi::Property<bool> xAODBSignalFilter::m_InvMass_switch {this, "InvMass_switch", false} |
|
private |
◆ m_InvMassMax
Gaudi::Property<double> xAODBSignalFilter::m_InvMassMax {this, "InvMassMax", 14000000.0} |
|
private |
◆ m_InvMassMin
Gaudi::Property<double> xAODBSignalFilter::m_InvMassMin {this, "InvMassMin", 0.0} |
|
private |
◆ m_localLVL1MuonCutEta
Gaudi::Property<double> xAODBSignalFilter::m_localLVL1MuonCutEta {this, "LVL1MuonCutEta", 102.5} |
|
private |
◆ m_localLVL1MuonCutOn
Gaudi::Property<bool> xAODBSignalFilter::m_localLVL1MuonCutOn {this, "LVL1MuonCutOn", false} |
|
private |
◆ m_localLVL1MuonCutPT
Gaudi::Property<double> xAODBSignalFilter::m_localLVL1MuonCutPT {this, "LVL1MuonCutPT", 0.0} |
|
private |
◆ m_localLVL2ElectronCutEta
Gaudi::Property<double> xAODBSignalFilter::m_localLVL2ElectronCutEta {this, "LVL2ElectronCutEta", 102.5} |
|
private |
◆ m_localLVL2ElectronCutOn
Gaudi::Property<bool> xAODBSignalFilter::m_localLVL2ElectronCutOn {this, "LVL2ElectronCutOn", false} |
|
private |
◆ m_localLVL2ElectronCutPT
Gaudi::Property<double> xAODBSignalFilter::m_localLVL2ElectronCutPT {this, "LVL2ElectronCutPT", 0.0} |
|
private |
◆ m_localLVL2MuonCutEta
Gaudi::Property<double> xAODBSignalFilter::m_localLVL2MuonCutEta {this, "LVL2MuonCutEta", 102.5} |
|
private |
◆ m_localLVL2MuonCutOn
Gaudi::Property<bool> xAODBSignalFilter::m_localLVL2MuonCutOn {this, "LVL2MuonCutOn", false} |
|
private |
◆ m_localLVL2MuonCutPT
Gaudi::Property<double> xAODBSignalFilter::m_localLVL2MuonCutPT {this, "LVL2MuonCutPT", 0.0} |
|
private |
◆ m_LVL1Counter
double xAODBSignalFilter::m_LVL1Counter {} |
|
private |
◆ m_LVL2Counter
double xAODBSignalFilter::m_LVL2Counter {} |
|
private |
◆ 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
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
◆ m_nNeeded
◆ m_nPass
◆ 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 |
◆ m_rejectedTrigger
double xAODBSignalFilter::m_rejectedTrigger {} |
|
private |
◆ m_TotalInvMass_switch
Gaudi::Property<bool> xAODBSignalFilter::m_TotalInvMass_switch {this, "TotalInvMass_switch", false} |
|
private |
◆ m_TotalInvMassMax
Gaudi::Property<double> xAODBSignalFilter::m_TotalInvMassMax {this, "TotalInvMassMax", 14000000.0} |
|
private |
◆ m_TotalInvMassMin
Gaudi::Property<double> xAODBSignalFilter::m_TotalInvMassMin {this, "TotalInvMassMin", 0.0} |
|
private |
◆ m_truthPartContKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< double > m_TotalInvMassMin
bool test_cuts(const double myPT, const double testPT, const double myEta, const double testEta) const
bool isBottomMeson(const T &p)
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
bool isBottomBaryon(const T &p)
Gaudi::Property< bool > m_localLVL2MuonCutOn
const_pointer_type cptr()
Dereference the pointer.
Gaudi::Property< double > m_cuts_f_e_eta
Gaudi::Property< double > m_cuts_f_e_pT
Gaudi::Property< bool > m_TotalInvMass_switch
float pz() const
The z component of the particle's momentum.
Gaudi::Property< bool > m_cuts_f_K0_on
Gaudi::Property< double > m_InvMass_PartFakeMass2
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Property< double > m_InvMassMax
Gaudi::Property< double > m_cuts_f_had_eta
Gaudi::Property< bool > m_cuts_f_mu_on
StatusCode accept(const xAOD::Muon *mu)
Gaudi::Property< double > m_cuts_f_gam_pT
float px() const
The x component of the particle's momentum.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual StatusCode filterEvent()=0
bool LVL1_Mu_Trigger(const xAOD::TruthParticle *child) const
float py() const
The y component of the particle's momentum.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Gaudi::Property< double > m_cuts_f_had_pT
Gaudi::Property< double > m_localLVL2MuonCutPT
virtual StatusCode filterInitialize()
bool isSMQuark(const T &p)
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
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 isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Gaudi::Property< bool > m_cuts_f_had_on
bool FinalStatePassedCuts(const xAOD::TruthParticle *child) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
Gaudi::Property< double > m_cuts_f_gam_eta
virtual double e() const override final
The total energy of the particle.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Gaudi::Property< double > m_InvMassMin
Gaudi::Property< double > m_InvMass_PartFakeMass1
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Class describing a truth particle in the MC record.
Gaudi::Property< bool > m_localLVL2ElectronCutOn
#define ATH_MSG_ALWAYS(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_localLVL1MuonCutOn
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Gaudi::Property< double > m_cuts_f_K0_eta
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Gaudi::Property< int > m_B_pdgid
virtual void renounce()=0
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< double > m_localLVL2MuonCutEta
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
Gaudi::Property< double > m_localLVL2ElectronCutEta
Gaudi::Property< double > m_localLVL1MuonCutEta
bool isHadron(const T &p)
Gaudi::Property< double > m_localLVL2ElectronCutPT
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void PrintChild(const xAOD::TruthParticle *child, const std::string &treeIDStr, const bool fromFinalB) const
virtual StatusCode filterFinalize()
Gaudi::Property< int > m_InvMass_PartId1
Gaudi::Property< double > m_cuts_f_mu_eta
Gaudi::Property< bool > m_InvMass_switch
Gaudi::Property< int > m_InvMass_PartId2
DataObjIDColl m_extendedExtraObjects
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool LVL2_eMu_Trigger(const xAOD::TruthParticle *child) const
bool empty() const noexcept
bool isCharged(const T &p)
#define ATH_MSG_WARNING(x)
bool isDecayed(const T &p)
Identify if the particle decayed.
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
filterPassed
now, add a sequencer: it will only execute seqalg1 and 2 and never 3
Gaudi::Property< bool > m_cuts_f_e_on
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Property< double > m_TotalInvMassMax
int pdgId() const
PDG ID code.
Gaudi::Property< double > m_localLVL1MuonCutPT
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
Gaudi::Property< double > m_cuts_f_K0_pT
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Gaudi::Property< bool > m_cuts_f_gam_on
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthPartContKey
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Gaudi::Property< double > m_cuts_f_mu_pT