|
ATLAS Offline Software
|
#include <MCTruthClassifier.h>
|
| MCTruthClassifier (const std::string &type) |
|
virtual | ~MCTruthClassifier ()=default |
|
virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. More...
|
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (HepMC::ConstGenParticlePtr, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual const xAOD::TruthParticle * | getGenPart (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual const xAOD::TruthParticle * | egammaClusMatch (const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Muon *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::CaloCluster *, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Jet *, bool DR, MCTruthPartClassifier::Info *info=nullptr) const override final |
|
virtual void | print () const =0 |
| Print the state of the tool. More...
|
|
virtual void | print () const |
| Print the state of the tool. 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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
|
double | detEta (double x, double y) const |
|
double | detPhi (double x, double y) const |
|
MCTruthPartClassifier::ParticleOrigin | defOrigOfElectron (const xAOD::TruthParticleContainer *xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const |
|
MCTruthPartClassifier::ParticleOrigin | defOrigOfMuon (const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const |
|
MCTruthPartClassifier::ParticleOrigin | defOrigOfTau (const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info *info) const |
|
MCTruthPartClassifier::ParticleOrigin | defOrigOfPhoton (const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const |
|
MCTruthPartClassifier::ParticleOrigin | defOrigOfNeutrino (const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const |
|
bool | genPartToCalo (const EventContext &ctx, const xAOD::CaloCluster *clus, const xAOD::TruthParticle *thePart, bool isFwrdEle, double &dRmatch, bool &isNarrowCone, const CaloDetDescrManager &caloDDMgr) const |
|
double | fracParticleInJet (const xAOD::TruthParticle *, const xAOD::Jet *, bool DR, bool nparts) const |
|
void | findJetConstituents (const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) 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...
|
|
|
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_truthParticleContainerKey {this,"xAODTruthParticleContainerName","TruthParticles","ReadHandleKey for xAOD::TruthParticleContainer"} |
|
ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtensionTool {this,"ParticleCaloExtensionTool",""} |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager",""} |
|
ToolHandle< xAOD::ITruthParticlesInConeTool > | m_truthInConeTool {this,"TruthInConeTool","xAOD::TruthParticlesInConeTool/TruthParticlesInConeTool"} |
|
bool | m_FwdElectronUseG4Sel |
|
float | m_FwdElectronTruthExtrEtaCut |
|
float | m_FwdElectronTruthExtrEtaWindowCut |
|
float | m_partExtrConeEta |
|
float | m_partExtrConePhi |
|
bool | m_useCaching |
|
float | m_phtClasConePhi |
|
float | m_phtClasConeEta |
|
float | m_phtdRtoTrCut |
|
float | m_fwrdEledRtoTrCut |
|
bool | m_ROICone |
|
float | m_pTChargePartCut |
|
float | m_pTNeutralPartCut |
|
bool | m_inclG4part |
|
SG::ReadHandleKey< xAODTruthParticleLinkVector > | m_truthLinkVecReadHandleKey {this,"xAODTruthLinkVector","xAODTruthLinks", "ReadHandleKey for xAODTruthParticleLinkVector"} |
|
float | m_deltaRMatchCut |
|
float | m_deltaPhiMatchCut |
|
int | m_NumOfSiHitsCut |
|
float | m_jetPartDRMatch |
|
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 55 of file MCTruthClassifier.h.
◆ StoreGateSvc_t
◆ MCTruthClassifier()
MCTruthClassifier::MCTruthClassifier |
( |
const std::string & |
type | ) |
|
|
inline |
◆ ~MCTruthClassifier()
virtual MCTruthClassifier::~MCTruthClassifier |
( |
| ) |
|
|
virtualdefault |
◆ 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]
◆ defOrigOfElectron()
Definition at line 226 of file MCTruthClassifierGen.cxx.
247 int numOfParents = -1;
249 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfElectron:: electron has more than one mother ");
252 if (
info)
info->setMotherProperties(mother);
256 int motherPDG = mother->
pdgId();
257 if (
info)
info->setMotherProperties(mother);
260 bool samePart =
false;
262 if (!theDaug)
continue;
270 if ((abs(motherPDG) == 13 || abs(motherPDG) == 15 || abs(motherPDG) == 24) && mothOriVert !=
nullptr && !samePart) {
286 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
287 parent_endVtx = MotherParent->decayVtx();
289 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
290 MotherParent = mother;
294 if (MotherParent) pPDG = MotherParent->
pdgId();
296 if (mother == MotherParent)
break;
297 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24) mother = MotherParent;
299 }
while ((abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24));
301 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24 || abs(pPDG) == 23 || abs(pPDG) == 25 ||
302 abs(pPDG) == 35 || abs(pPDG) == 36 || abs(pPDG) == 37 || abs(pPDG) == 32 || abs(pPDG) == 33 ||
303 abs(pPDG) == 34 || abs(pPDG) == 6 || abs(pPDG) == 9900024 || abs(pPDG) == 9900012 || abs(pPDG) == 9900014 ||
304 abs(pPDG) == 9900016 || (abs(pPDG) < 2000040 && abs(pPDG) > 1000001))
305 mother = MotherParent;
308 motherPDG = mother->
pdgId();
314 if (
info)
info->setMotherProperties(mother);
332 if (!theDaug)
continue;
333 int DaugType = theDaug->pdgId();
334 if (abs(DaugType) < 7) NumOfquark++;
335 if (abs(DaugType) == 21) NumOfgluon++;
336 if (abs(DaugType) == 12) NumOfElNeut++;
337 if (abs(DaugType) == 14) NumOfMuNeut++;
338 if (DaugType == 22) NumOfPhot++;
339 if (DaugType == 11) NumOfEl++;
340 if (DaugType == -11) NumOfPos++;
341 if (DaugType == 13) NumOfMuMin++;
342 if (DaugType == -13) NumOfMuPl++;
343 if (abs(DaugType) == 15) NumOfTau++;
344 if (abs(DaugType) == 16) NumOfTauNeut++;
345 if (abs(DaugType) == 42) NumOfLQ++;
347 if (numOfParents == 1 &&
348 (motherPDG == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 13 || abs(motherPDG) == 211) &&
349 (DaugType > 1000000000 || DaugType == 0 || DaugType == 2212 || DaugType == 2112 || abs(DaugType) == 211 ||
350 abs(DaugType) == 111))
354 if (motherPDG == 22 && mothOriVert !=
nullptr) {
355 for (
const auto& theMother: mothOriVert->
particles_in()) {
356 if (!theMother)
continue;
358 info->photonMother = theMother;
362 if ((motherPDG == 22 && numOfDaug == 2 && NumOfEl == 1 && NumOfPos == 1) || (motherPDG == 22 && numOfDaug == 1 && (NumOfEl == 1 || NumOfPos == 1)))
return PhotonConv;
365 if ((numOfParents == 1 && (abs(motherPDG) == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 15)) && numOfDaug > 1 && NumOfNucFr != 0)
return ElMagProc;
367 if (numOfParents == 1 && abs(motherPDG) == 211 && numOfDaug > 2 && NumOfNucFr != 0)
return ElMagProc;
370 if (motherPDG == 22 && numOfDaug > 4 && NumOfNucFr != 0)
return ElMagProc;
373 if (abs(motherPDG) == 11 && numOfDaug == 2 && NumOfEl == 1 && NumOfPos == 1)
return ElMagProc;
376 if (motherPDG == 11 && numOfDaug == 2 && NumOfEl == 2 && NumOfPos == 0)
return ElMagProc;
379 if (motherPDG == -11 && numOfDaug == 2 && NumOfEl == 0 && NumOfPos == 2)
return ElMagProc;
382 if (abs(motherPDG) == 11 && !
MC::isDecayed(mother) && motherPDG == thePriPart->
pdgId() && numOfDaug == 1 && !samePart)
return ElMagProc;
386 if (numOfDaug == 2 && (NumOfEl == 1 || NumOfPos == 1) && abs(motherPDG) != 11 && samePart)
return ElMagProc;
388 if ((motherPDG == 111 && numOfDaug == 3 && NumOfPhot == 1 && NumOfEl == 1 && NumOfPos == 1) ||
389 (motherPDG == 111 && numOfDaug == 4 && NumOfPhot == 0 && NumOfEl == 2 && NumOfPos == 2))
393 if (abs(motherPDG) < 7 && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && NumOfElNeut == 1)
return QuarkWeakDec;
395 if (abs(motherPDG) == 13 && NumOfNucFr != 0)
return ElMagProc;
397 if (abs(motherPDG) == 6)
return top;
406 }
while (
MC::isW(ptrPart) && prodVert !=
nullptr);
409 if (abs(ptrPart->
pdgId()) == 9900012)
return NuREle;
410 if (abs(ptrPart->
pdgId()) == 9900014)
return NuRMu;
411 if (abs(ptrPart->
pdgId()) == 9900016)
return NuRTau;
419 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
423 if (theMother !=
nullptr && abs(theMother->
pdgId()) == 11 &&
MC::isDecayed(theMother)) thePartToCheck = theMother;
425 bool isZboson =
false;
426 bool isWboson =
false;
427 bool skipnext =
false;
429 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ++ipOut) {
431 if (!theDaug)
continue;
433 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
435 if (theNextDaug !=
nullptr)
break;
437 if (!theNextDaug)
continue;
443 if (abs(theDaug->
pdgId()) == 11 && abs(theNextDaug->
pdgId()) == 11) {
445 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
450 }
else if (abs(theDaug->
pdgId()) == 11 && abs(theNextDaug->
pdgId()) == 12) {
452 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
459 if (isWboson)
return WBoson;
460 if (isZboson)
return ZBoson;
462 if (numOfParents == 2) {
466 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfEl == 1 && NumOfPos == 1)
return ZBoson;
469 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfElNeut == 1)
return WBoson;
472 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 && (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
476 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 && (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
481 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
482 int NumOfEleLoop = 0;
483 int NumOfLepLoop = 0;
484 int NumOfEleNeuLoop = 0;
487 for (
const auto *
const pin: partOriVert->
particles_in()) {
491 if (std::abs(pin->pdgId()) == 12) NumOfEleNeuLoop++;
495 if (NumOfEleLoop == 2 && NumOfEleNeuLoop == 0)
return ZBoson;
496 if (NumOfEleLoop == 1 && NumOfEleNeuLoop == 1)
return WBoson;
497 if ((NumOfEleLoop == 4 && NumOfEleNeuLoop == 0) || (NumOfEleLoop == 3 && NumOfEleNeuLoop == 1) ||
498 (NumOfEleLoop == 2 && NumOfEleNeuLoop == 2))
500 if (NumOfLepLoop == 4)
return DiBoson;
505 if (abs(motherPDG) == 25)
return Higgs;
507 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
509 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
511 if (abs(motherPDG) == 13)
return Mu;
512 if (abs(motherPDG) == 15) {
518 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
519 if (abs(motherPDG) == 9900012)
return NuREle;
520 if (abs(motherPDG) == 9900014)
return NuRMu;
521 if (abs(motherPDG) == 9900016)
return NuRTau;
522 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfMuon()
Definition at line 531 of file MCTruthClassifierGen.cxx.
553 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfMuon:: muon has more than one mother ");
556 if (
info)
info->setMotherProperties(mother);
562 int motherPDG = mother->
pdgId();
564 if ((
MC::isTau(motherPDG)||
MC::isW(motherPDG)) && mothOriVert !=
nullptr) {
581 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
582 parent_endVtx = MotherParent->decayVtx();
585 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
586 MotherParent = mother;
591 if (mother == MotherParent) {
596 pPDG = MotherParent->
pdgId();
597 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24) {
598 mother = MotherParent;
599 if (
info)
info->setMotherProperties(mother);
602 }
while ((abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24));
604 if (abs(pPDG) == 15 || abs(pPDG) == 24 || abs(pPDG) == 23 || abs(pPDG) == 25 || abs(pPDG) == 35 ||
605 abs(pPDG) == 36 || abs(pPDG) == 37 || abs(pPDG) == 32 || abs(pPDG) == 33 || abs(pPDG) == 34 || abs(pPDG) == 6 ||
606 abs(pPDG) == 9900024 || abs(pPDG) == 9900012 || abs(pPDG) == 9900014 || abs(pPDG) == 9900016 ||
607 (abs(pPDG) < 2000040 && abs(pPDG) > 1000001)) {
608 if (
info)
info->setMotherProperties(mother);
612 motherPDG = mother->
pdgId();
618 if (
info)
info->setMotherProperties(mother);
619 auto DP = DecayProducts(partOriVert);
620 int NumOfPhot = DP.pd(22);
621 int NumOfEl = DP.pd(11);
622 int NumOfPos = DP.pd(-11);
623 int NumOfElNeut = DP.apd(12);
624 int NumOfMuNeut = DP.apd(14);
625 int NumOfLQ = DP.apd(42);
626 int NumOfquark = DP.apd({1,2,3,4,5,6});
627 int NumOfgluon = DP.apd(21);
628 int NumOfMuPl = DP.pd(-13);
629 int NumOfMuMin = DP.pd(13);
630 int NumOfTau = DP.apd(15);
631 int NumOfTauNeut = DP.apd(16);
632 if (std::abs(motherPDG) == 211 && numOfDaug == 2 && NumOfMuNeut == 1)
return PionDecay;
633 if (std::abs(motherPDG) == 321 && numOfDaug == 2 && NumOfMuNeut == 1)
return KaonDecay;
640 if (std::abs(motherPDG) == 6)
return top;
642 if (abs(motherPDG) < 7 && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && NumOfMuNeut == 1)
return QuarkWeakDec;
650 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
654 if (abs(itrP->
pdgId()) == 9900014)
return NuRMu;
661 if (motherPDG == 22 && numOfDaug == 2 && NumOfMuMin == 1 && NumOfMuPl == 1)
return PhotonConv;
666 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
667 bool isZboson =
false;
668 bool isWboson =
false;
669 bool skipnext =
false;
670 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
676 if (!theDaug)
continue;
678 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
680 if (theNextDaug !=
nullptr)
break;
682 if (!theNextDaug)
continue;
683 if (abs(theDaug->
pdgId()) == 13 && abs(theNextDaug->
pdgId()) == 13) {
685 if (thePriPart == theDaug || thePriPart == theNextDaug) {
690 }
else if (abs(theDaug->
pdgId()) == 13 && abs(theNextDaug->
pdgId()) == 14) {
692 if (thePriPart == theDaug || thePriPart == theNextDaug) {
699 if (isWboson)
return WBoson;
700 if (isZboson)
return ZBoson;
702 if (numOfParents == 2 ) {
706 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfMuPl == 1 && NumOfMuMin == 1)
return ZBoson;
710 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfMuPl == 1 || NumOfMuMin == 1) && NumOfMuNeut == 1)
return WBoson;
713 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 &&
714 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
718 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
719 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
724 if (partOriVert == mothOriVert) {
726 int NumOfMuNeuLoop = 0;
727 int NumOfLepLoop = 0;
733 if (std::abs(
pout->pdg_id()) == 13) NumOfMuLoop++;
734 if (std::abs(
pout->pdg_id()) == 14) NumOfMuNeuLoop++;
739 if (NumOfMuLoop == 2 && NumOfMuNeuLoop == 0)
return ZBoson;
740 if (NumOfMuLoop == 1 && NumOfMuNeuLoop == 1)
return WBoson;
741 if ((NumOfMuLoop == 4 && NumOfMuNeuLoop == 0) || (NumOfMuLoop == 3 && NumOfMuNeuLoop == 1) || (NumOfMuLoop == 2 && NumOfMuNeuLoop == 2))
return DiBoson;
742 if (NumOfLepLoop == 4)
return DiBoson;
747 if (abs(motherPDG) == 25)
return Higgs;
749 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
751 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
753 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
754 if (abs(motherPDG) == 9900012)
return NuREle;
755 if (abs(motherPDG) == 9900014)
return NuRMu;
756 if (abs(motherPDG) == 9900016)
return NuRTau;
757 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfNeutrino()
Definition at line 1203 of file MCTruthClassifierGen.cxx.
1211 int nuFlav = abs(thePart->
pdgId());
1225 int numOfParents = -1;
1227 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfNeutrino:: neutrino has more than one mother ");
1232 int motherPDG = mother->
pdgId();
1236 bool samePart =
false;
1239 if ((abs(motherPDG) == nuFlav || abs(motherPDG) == 15 ||
MC::isW(motherPDG)) && mothOriVert !=
nullptr &&
1251 mother_endVtx = mother->
decayVtx();
1256 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
1257 parent_endVtx = MotherParent->decayVtx();
1259 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
1260 MotherParent = mother;
1265 pPDG = MotherParent->
pdgId();
1268 if (mother == MotherParent) {
1271 if (abs(pPDG) == nuFlav || abs(pPDG) == 15 || abs(pPDG) == 24 ) {
1272 mother = MotherParent;
1273 if (
info)
info->setMotherProperties(mother);
1276 }
while ((std::abs(pPDG) == nuFlav || std::abs(pPDG) == 15 || std::abs(pPDG) == 24));
1278 if (std::abs(pPDG) == nuFlav || std::abs(pPDG) == 15 || std::abs(pPDG) == 24 || std::abs(pPDG) == 23 || std::abs(pPDG) == 25 ||
1279 std::abs(pPDG) == 35 || std::abs(pPDG) == 36 || std::abs(pPDG) == 37 || std::abs(pPDG) == 32 || std::abs(pPDG) == 33 ||
1280 std::abs(pPDG) == 34 || std::abs(pPDG) == 6 || std::abs(pPDG) == 9900024 || std::abs(pPDG) == 9900012 || std::abs(pPDG) == 9900014 ||
1281 std::abs(pPDG) == 9900016 || (std::abs(pPDG) < 2000040 && std::abs(pPDG) > 1000001)) {
1282 mother = MotherParent;
1283 if (
info)
info->setMotherProperties(mother);
1289 motherPDG = mother->
pdgId();
1295 if (
info)
info->setMotherProperties(mother);
1303 int NumOfTauNeut(0);
1310 if (!theDaug)
continue;
1311 int DaugType = theDaug->pdgId();
1312 if (abs(DaugType) < 7) NumOfquark++;
1313 if (abs(DaugType) == 21) NumOfgluon++;
1314 if (abs(DaugType) == 12) NumOfElNeut++;
1315 if (std::abs(DaugType) == 14) NumOfMuNeut++;
1316 if (std::abs(DaugType) == 16) NumOfTauNeut++;
1317 if (DaugType == 22) NumOfPhot++;
1318 if (std::abs(DaugType) == 11) NumOfEl++;
1319 if (std::abs(DaugType) == 13) NumOfMu++;
1320 if (std::abs(DaugType) == 15) NumOfTau++;
1321 if (std::abs(DaugType) == 42) NumOfLQ++;
1326 if (
MC::isQuark(motherPDG) && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && (NumOfEl == 1 || NumOfMu == 1 || NumOfTau == 1))
return QuarkWeakDec;
1327 if (std::abs(motherPDG) == 6)
return top;
1335 }
while (
MC::isW(ptrPart) && prodVert !=
nullptr);
1338 if (abs(ptrPart->
pdgId()) == 9900012)
return NuREle;
1339 if (abs(ptrPart->
pdgId()) == 9900014)
return NuRMu;
1340 if (abs(ptrPart->
pdgId()) == 9900016)
return NuRTau;
1350 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
1355 if (abs(theMother->
pdgId()) == 11 &&
MC::isDecayed(theMother)) thePartToCheck = theMother;
1356 bool isZboson =
false;
1357 bool isWboson =
false;
1358 bool skipnext =
false;
1360 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ++ipOut) {
1362 if (!theDaug)
continue;
1364 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
1366 if (theNextDaug !=
nullptr)
break;
1368 if (!theNextDaug)
continue;
1375 int apdgID1 = abs(theDaug->
pdgId());
1376 int apdgID2 = abs(theNextDaug->
pdgId());
1377 if ((apdgID1 == 12 && apdgID2 == 12) || (apdgID1 == 14 && apdgID2 == 14) || (apdgID1 == 16 && apdgID2 == 16)) {
1379 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
1384 }
else if ((apdgID1 == 11 && apdgID2 == 12) || (apdgID1 == 14 && apdgID2 == 14) ||
1385 (apdgID1 == 16 && apdgID2 == 16)) {
1387 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
1394 if (isWboson)
return WBoson;
1395 if (isZboson)
return ZBoson;
1398 if (numOfParents == 2) {
1402 if ( (numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfElNeut == 2 || NumOfMuNeut == 2 || NumOfTauNeut == 2))
return ZBoson;
1405 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && ((NumOfEl == 1 && NumOfElNeut == 1) || (NumOfMu == 1 && NumOfMuNeut == 1) || (NumOfTau == 1 && NumOfTauNeut == 1)))
return WBoson;
1408 if ( (numOfDaug - NumOfquark - NumOfgluon) == 4 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
1412 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
1417 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
1418 int NumOfLepLoop = 0;
1419 int NumOfNeuLoop = 0;
1421 if (!
pout)
continue;
1422 for (
const auto *
const pin: partOriVert->
particles_in()) {
1425 int apdgid = abs(
pout->pdgId());
1426 if (apdgid == 12 || apdgid == 14 || apdgid == 16) NumOfNeuLoop++;
1427 if (apdgid == 11 || apdgid == 13 || apdgid == 15) NumOfLepLoop++;
1430 if (NumOfNeuLoop == 2 && NumOfLepLoop == 0)
return ZBoson;
1431 if (NumOfNeuLoop == 1 && NumOfLepLoop == 1)
return WBoson;
1432 if (NumOfNeuLoop + NumOfLepLoop == 4)
return DiBoson;
1437 if (abs(motherPDG) == 25)
return Higgs;
1438 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
1439 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
1441 if (abs(motherPDG) == 15) {
1447 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
1448 if (abs(motherPDG) == 9900012)
return NuREle;
1449 if (abs(motherPDG) == 9900014)
return NuRMu;
1450 if (abs(motherPDG) == 9900016)
return NuRTau;
1451 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfPhoton()
Definition at line 944 of file MCTruthClassifierGen.cxx.
957 info->resetMotherProperties();
958 info->photonMother =
nullptr;
976 if (
info)
info->setMotherProperties(mother);
978 int motherPDG = mother->
pdgId();
980 if (
info)
info->setMotherProperties(mother);
994 long NumOfPartons(0);
998 DaugType =
pout->pdg_id();
999 if (numOfParents == 1 && (motherPDG == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 211) &&
1000 (DaugType > 1000000000 || DaugType == 0 || DaugType == 2212 || DaugType == 2112))
1002 if (DaugType == 22) NumOfPht++;
1003 if (DaugType == 11) NumOfEl++;
1004 if (DaugType == -11) NumOfPos++;
1005 if (abs(DaugType) == 13) NumOfMu++;
1006 if (abs(DaugType) == 15) NumOfTau++;
1007 if (abs(DaugType) == 42) NumOfLQ++;
1008 if (abs(DaugType) == 11 || abs(DaugType) == 13 || abs(DaugType) == 15) NumOfLep++;
1009 if (abs(DaugType) == 12 || abs(DaugType) == 14 || abs(DaugType) == 16) NumOfNeut++;
1010 if (abs(DaugType) < 11 || (abs(DaugType) > 16 && abs(DaugType) < 43 && abs(DaugType) != 22)) NumOfPartons++;
1011 if (DaugType == motherPDG) {
1016 bool foundISR =
false;
1017 bool foundFSR =
false;
1019 if (numOfParents == 1 && numOfDaug == 2 && abs(motherPDG) == 11 && NumOfPht == 2)
return ElMagProc;
1022 if (numOfParents == 1 && numOfDaug == 2 && (abs(motherPDG) == 11 || abs(motherPDG) == 13 || abs(motherPDG) == 15) &&
1033 PartPDG = abs(pin->pdgId());
1034 prodVert = pin->prodVtx();
1035 if (PartPDG == 23 || PartPDG == 24 || PartPDG == 25) foundFSR =
true;
1042 }
while (prodVert !=
nullptr && abs(motherPDG) == PartPDG);
1052 if ((numOfParents == 1 && (abs(motherPDG) == 22 || abs(motherPDG) == 11) && numOfDaug > 2 && NumOfNucFr != 0) ||
1053 (numOfParents == 1 && abs(motherPDG) == 211 && numOfDaug > 10 && NumOfNucFr != 0) ||
1054 (numOfParents == 1 && motherPDG == 22 && numOfDaug > 10 &&
MC::isStable(mother)) ||
1055 (numOfParents == 1 && motherPDG > 1000000000))
1065 if (numOfParents == 1 && (abs(motherPDG) < 7 || motherPDG == 21) &&
1068 if (!
pout)
continue;
1069 if (motherPDG !=
pout->pdgId())
continue;
1071 if (!Vrtx)
continue;
1084 if (numOfParents == 2 && ((abs(motherPDG) == 11 && NumOfEl == 1 && NumOfPos == 1) || (abs(motherPDG) == 13 && NumOfMu == 2) || (abs(motherPDG) == 15 && NumOfTau == 2))) {
1088 if (numOfParents == 2 && NumOfLep == 1 && NumOfNeut == 1 && (abs(motherPDG) == 11 || abs(motherPDG) == 12))
return FSRPhot;
1091 if (abs(motherPDG) == 11 && numOfParents == 1 && numOfDaug == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfPht == 1 &&
1096 if (
MC::isZ(motherPDG) && ((NumOfEl + NumOfPos == 2 || NumOfEl + NumOfPos == 4) || (NumOfMu == 2 || NumOfMu == 4) || (NumOfTau == 2 || NumOfTau == 4)) && NumOfPht > 0)
return FSRPhot;
1098 if (NumOfPht > 0 && (abs(motherPDG) == 9900024 || abs(motherPDG) == 9900012 || abs(motherPDG) == 9900014 || abs(motherPDG) == 9900016))
return FSRPhot;
1100 if (numOfParents == 2 && NumOfLQ == 1)
return FSRPhot;
1107 if (NumOfLep == 1 && NumOfNeut == 1 && numOfDaug == NumOfLep + NumOfNeut + NumOfPht)
return FSRPhot;
1115 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
1120 if ( abs(itrP->
pdgId()) == 9900012)
return NuREle;
1121 if ( abs(itrP->
pdgId()) == 9900014)
return NuRMu;
1122 if ( abs(itrP->
pdgId()) == 9900016)
return NuRTau;
1129 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
1130 bool isZboson =
false;
1131 bool isWboson =
false;
1132 bool skipnext =
false;
1133 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
1139 if (!theDaug)
continue;
1141 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
1143 if (theNextDaug !=
nullptr)
break;
1145 if (!theNextDaug)
continue;
1146 if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 15) {
1148 if (thePriPart == theDaug || thePriPart == theNextDaug) {
1153 }
else if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 16) {
1155 if (thePriPart == theDaug || thePriPart == theNextDaug) {
1162 if (isWboson)
return WBoson;
1163 if (isZboson)
return ZBoson;
1167 if (numOfParents == 4 && (numOfDaug - NumOfPht) == 4 && (NumOfLep + NumOfNeut == 4)) {
1174 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
1175 int NumOfPhtLoop = 0;
1177 if (!
pout)
continue;
1178 for (
const auto *
const pin: partOriVert->
particles_in()) {
1186 if (abs(motherPDG) == 25)
return Higgs;
1187 if (abs(motherPDG) == 111)
return PiZero;
1188 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
1189 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34 || abs(motherPDG) == 5100039 )
return HeavyBoson;
◆ defOrigOfTau()
Definition at line 767 of file MCTruthClassifierGen.cxx.
788 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfTau:: tau has more than one mother ");
791 if (
info)
info->setMotherProperties(mother);
800 if (
MC::isW(motherPDG) && mothOriVert !=
nullptr) {
805 pPDG = MotherParent->pdgId();
806 if (abs(pPDG) == 6) {
807 mother = MotherParent;
808 if (
info)
info->setMotherProperties(mother);
813 motherPDG = mother->
pdgId();
814 if (
info)
info->setMotherProperties(mother);
820 auto DP = DecayProducts(partOriVert);
821 int numOfDaug = DP.size();
822 int NumOfPhot = DP.pd(22);
823 int NumOfEl = DP.pd(11);
824 int NumOfPos = DP.pd(-11);
825 int NumOfElNeut = DP.apd(12);
826 int NumOfMuNeut = DP.apd(14);
828 int NumOfquark = DP.apd({1,2,3,4,5,6});
829 int NumOfgluon = DP.apd(21);
830 int NumOfMuPl = DP.pd(-13);
831 int NumOfMuMin = DP.pd(13);
832 int NumOfTau = DP.apd(15);
833 int NumOfTauNeut = DP.pd(16);
835 if (abs(motherPDG) == 6)
return top;
842 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
846 if (abs(itrP->
pdgId()) == 9900014)
return NuRMu;
853 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
854 bool isZboson =
false;
855 bool isWboson =
false;
856 bool skipnext =
false;
857 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
863 if (!theDaug)
continue;
865 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
867 if (theNextDaug !=
nullptr)
break;
872 if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 15) {
874 if (thePriPart == theDaug || thePriPart == theNextDaug) {
879 }
else if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 16) {
881 if (thePriPart == theDaug || thePriPart == theNextDaug) {
888 if (isWboson)
return WBoson;
889 if (isZboson)
return ZBoson;
891 if (numOfParents == 2 ) {
898 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfTau == 1 && NumOfTauNeut == 1)
return WBoson;
901 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 &&
902 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
906 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
907 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
911 if (partOriVert == mothOriVert) {
912 int NumOfTauLoop = 0;
913 int NumOfTauNeuLoop = 0;
914 int NumOfLepLoop = 0;
917 for (
const auto *
const pin: partOriVert->
particles_in()) {
920 if (std::abs(
pout->pdgId()) == 15) NumOfTauLoop++;
921 if (std::abs(
pout->pdgId()) == 16) NumOfTauNeuLoop++;
925 if (NumOfTauLoop == 2 && NumOfTauNeuLoop == 0)
return ZBoson;
926 if (NumOfTauLoop == 1 && NumOfTauNeuLoop == 1)
return WBoson;
927 if ((NumOfTauLoop == 4 && NumOfTauNeuLoop == 0) || (NumOfTauLoop == 3 && NumOfTauNeuLoop == 1) || (NumOfTauLoop == 2 && NumOfTauNeuLoop == 2))
return DiBoson;
928 if (NumOfLepLoop == 4)
return DiBoson;
931 if (abs(motherPDG) == 25)
return Higgs;
932 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
933 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
934 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
935 if (abs(motherPDG) == 9900016)
return NuRTau;
938 if (abs(motherPDG) == 443)
return JPsi;
◆ detEta()
double MCTruthClassifier::detEta |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
inlineprivate |
◆ detPhi()
double MCTruthClassifier::detPhi |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
inlineprivate |
◆ detStore()
◆ egammaClusMatch()
Implements IMCTruthClassifier.
Definition at line 44 of file MCTruthClassifierAthena.cxx.
48 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
52 if (!truthParticleContainerReadHandle.isValid()) {
53 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
58 if (!caloMgrHandle.isValid()) {
68 double LeadingPhtPT(0);
69 double LeadingPartPT(0);
70 double LeadingPhtdR(999.);
71 double LeadingPartdR(999.);
72 double BestPartdR(999.);
73 double etaClus = clus->
etaBE(2);
74 double phiClus = clus->
phiBE(2);
76 etaClus = clus->
eta();
79 phiClus = clus->
phi();
81 std::vector<const xAOD::TruthParticle*> tps;
87 for (
const auto*
const thePart : tps) {
92 long iParticlePDG = thePart->
pdgId();
94 if (std::abs(iParticlePDG) == 12 || std::abs(iParticlePDG) == 14 || std::abs(iParticlePDG) == 16)
continue;
96 double q = thePart?thePart->charge():0.0;
107 (((etaClus < 0) - (thePart->eta() < 0) != 0)
116 bool isNCone =
false;
117 bool isExt =
genPartToCalo(ctx, clus, thePart, isFwrdEle, dR, isNCone, *caloDDMgr);
118 if (!isExt)
continue;
119 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(), thePart);
121 info->egPartPtr.push_back(thePart);
122 info->egPartdR.push_back(dR);
129 if ((iParticlePDG == 22 || std::abs(iParticlePDG) == 11) && isNCone &&
pt > LeadingPhtPT) {
136 if ((iParticlePDG != 22 && std::abs(iParticlePDG) != 11) && isNCone &&
pt > LeadingPartPT) {
137 theLeadingPartInCone = thePart;
143 if (!isNCone && dR < BestPartdR) {
144 theBestPartOutCone = thePart;
148 if (dR < BestPartdR) {
149 theBestPartdR = thePart;
155 if (theEgamma !=
nullptr) {
156 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(), theEgamma);
157 if (
info)
info->deltaRMatch = LeadingPhtdR;
158 }
else if (theLeadingPartInCone !=
nullptr) {
159 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theLeadingPartInCone);
160 if (
info)
info->deltaRMatch = LeadingPartdR;
161 }
else if (theBestPartOutCone !=
nullptr) {
162 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theBestPartOutCone);
163 if (
info)
info->deltaRMatch = BestPartdR;
164 }
else if (isFwrdEle && theBestPartdR !=
nullptr) {
165 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theBestPartdR );
166 if (
info)
info->deltaRMatch = BestPartdR;
168 theMatchPart =
nullptr;
170 if (isFwrdEle || theMatchPart !=
nullptr || !
m_inclG4part)
return theMatchPart;
173 for (
const auto*
const thePart : tps) {
176 long iParticlePDG = thePart->
pdgId();
178 if (std::abs(iParticlePDG) == 12 || std::abs(iParticlePDG) == 14 || std::abs(iParticlePDG) == 16)
continue;
179 if (thePart->decayVtx() !=
nullptr)
continue;
183 double q = thePart->charge();
189 bool isNCone =
false;
190 bool isExt =
genPartToCalo(ctx, clus, thePart, isFwrdEle, dR, isNCone, *caloDDMgr);
191 if (!isExt)
continue;
193 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),thePart);
195 info->egPartPtr.push_back(thePart);
196 info->egPartdR.push_back(dR);
201 if ((iParticlePDG == 22 || std::abs(iParticlePDG) == 11) && isNCone &&
pt > LeadingPhtPT) {
208 if ((iParticlePDG != 22 && std::abs(iParticlePDG) != 11) && isNCone &&
pt > LeadingPartPT) {
209 theLeadingPartInCone = thePart;
215 if (!isNCone && dR < BestPartdR) {
216 theBestPartOutCone = thePart;
221 if (theEgamma !=
nullptr) {
222 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theEgamma);
223 if (
info)
info->deltaRMatch = LeadingPhtdR;
224 }
else if (theLeadingPartInCone !=
nullptr) {
225 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theLeadingPartInCone);
226 if (
info)
info->deltaRMatch = LeadingPartdR;
227 }
else if (theBestPartOutCone !=
nullptr) {
228 theMatchPart =
MC::findMatching(truthParticleContainerReadHandle.ptr(),theBestPartOutCone);
229 if (
info)
info->deltaRMatch = BestPartdR;
231 theMatchPart =
nullptr;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ findJetConstituents()
Definition at line 273 of file MCRecoToTruth.cxx.
282 if (!truthParticleContainerReadHandle.isValid()) {
283 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
286 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() <<
" has valid ReadHandle ");
288 for (
const auto *
const thePart : *truthParticleContainerReadHandle) {
291 constituents.insert(thePart);
297 for (
const auto *particle0 :
vec) {
300 constituents.insert(thePart);
◆ fracParticleInJet()
Definition at line 305 of file MCRecoToTruth.cxx.
307 std::set<const xAOD::TruthParticle*> constituents;
308 std::set<const xAOD::TruthParticle*> daughters;
309 std::set<const xAOD::TruthParticle*>
intersect;
313 if (daughters.empty()) daughters.insert(thePart);
321 if (nparts)
return 1.0*
intersect.size() / daughters.size();
324 for (
const auto *daughter : daughters) {
tot += daughter->pt();}
◆ genPartToCalo()
Definition at line 237 of file MCTruthClassifierAthena.cxx.
246 isNarrowCone =
false;
247 if (thePart ==
nullptr)
return false;
248 double phiClus = clus->
phiBE(2);
249 double etaClus = clus->
etaBE(2);
250 if (etaClus < -900) {
251 etaClus = clus->
eta();
253 if (phiClus < -900) {
254 phiClus = clus->
phi();
257 if (isFwrdEle || (etaClus == 0. && phiClus == 0.)) {
258 phiClus = clus->
phi();
259 etaClus = clus->
eta();
271 }
else if (isFwrdEle && clus->
inEndcap()) {
277 std::unique_ptr<Trk::CurvilinearParameters>
params = extractParamFromTruth(*thePart);
278 if (!
params)
return false;
280 std::vector<CaloSampling::CaloSample> samples = {
sample };
282 bool extensionOK = (!extension.empty());
284 ATH_MSG_WARNING(
"extrapolation of Truth Particle with eta " << thePart->
eta() <<
" , charge " << thePart->
charge() <<
" , Pt " << thePart->
pt() <<
" to calo failed");
287 double etaCalo = extension[0].second->position().eta();
288 double phiCalo = extension[0].second->position().phi();
◆ getGenPart()
Implements IMCTruthClassifier.
Definition at line 181 of file MCRecoToTruth.cxx.
185 if (!trk)
return nullptr;
187 info->deltaRMatch = -999.;
188 info->deltaPhi = -999.;
189 info->probTrkToTruth = 0;
190 info->numOfSiHits = 0;
198 if (!tPL.isAvailable(*trk)) {
199 ATH_MSG_DEBUG(
"Track particle is not associated to truth particle");
203 const auto& truthLink = tPL(*trk);
204 if (!truthLink.isValid()) {
210 if (!theGenParticle) {
217 if (tMP.isAvailable(*trk)) {
218 info->probTrkToTruth = tMP(*trk);
228 if (
MC::isDecayed(theGenParticle) && (std::abs(theGenParticle->
pdgId()) == 11 || std::abs(theGenParticle->
pdgId()) == 13)) {
232 if (EndVrtx !=
nullptr) {
235 theGenPartTmp =
nullptr;
237 if (!theDaugt)
continue;
238 if (theDaugt->pdgId() == theGenParticle->
pdgId()) theGenPartTmp = theDaugt;
239 if (theDaugt->pdgId() != theGenParticle->
pdgId() && !
MC::isPhoton(theDaugt)) theGenPartTmp =
nullptr;
246 EndVrtx = theGenPartTmp ? theGenPartTmp->decayVtx() :
nullptr;
247 }
while (theGenPartTmp && theGenPartTmp->pdgId() == theGenParticle->
pdgId() &&
MC::isDecayed(theGenPartTmp) && EndVrtx !=
nullptr);
249 if (theGenPartTmp && theGenPartTmp->pdgId() == theGenParticle->
pdgId()) theGenParticle = theGenPartTmp;
256 uint8_t NumOfSiHits = NumOfSCTHits + NumOfPixHits;
259 float deteta =
detEta(theGenParticle->
eta(), trk->
eta());
260 float deltaRMatch = std::hypot(
deltaPhi, deteta);
262 (NumOfSiHits <= m_NumOfSiHitsCut && deltaPhi >
m_deltaPhiMatchCut)) theGenParticle =
nullptr;
265 info->deltaRMatch = deltaRMatch;
267 info->numOfSiHits = NumOfSiHits;
270 return (theGenParticle);
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
virtual StatusCode MCTruthClassifier::initialize |
( |
| ) |
|
|
inlineoverridevirtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from asg::AsgTool.
Reimplemented in D3PD::D3PDMCTruthClassifier.
Definition at line 101 of file MCTruthClassifier.h.
121 return StatusCode::SUCCESS;
123 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
126 #ifndef XAOD_ANALYSIS
127 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
◆ 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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ 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.
◆ particleTruthClassifier() [1/9]
Implements IMCTruthClassifier.
Definition at line 26 of file MCTruthClassifierGen.cxx.
28 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
30 if (!truthParticleLinkVecReadHandle.isValid()) {
31 ATH_MSG_WARNING(
" Invalid ReadHandle for xAODTruthParticleLinkVector with key: " << truthParticleLinkVecReadHandle.key());
◆ particleTruthClassifier() [2/9]
Implements IMCTruthClassifier.
Definition at line 114 of file MCRecoToTruth.cxx.
116 ATH_MSG_DEBUG(
"Executing egamma photon Classifier with cluster Input");
119 if (!clus)
return std::make_pair(parttype, partorig);
120 if (std::fabs(clus->
eta()) > 10.0 || std::fabs(clus->
phi()) >
M_PI || (clus->
et()) <= 0.)
return std::make_pair(parttype, partorig);
122 #ifndef XAOD_ANALYSIS // Fwd electron available only in Athena
125 ATH_MSG_WARNING(
"Cluster Classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
127 if (!genPart)
return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [3/9]
Implements IMCTruthClassifier.
Definition at line 24 of file MCRecoToTruth.cxx.
35 return std::make_pair(parttype, partorig);
39 #ifndef XAOD_ANALYSIS // cluster matching available only in Athena
43 ATH_MSG_WARNING(
"Forward Electron classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
48 if (!genPart)
return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [4/9]
Implements IMCTruthClassifier.
Definition at line 134 of file MCRecoToTruth.cxx.
140 std::set<const xAOD::TruthParticle*> allJetMothers;
141 std::set<const xAOD::TruthParticle*> constituents;
142 if (!
jet)
return std::make_pair(parttype, partorig);
143 allJetMothers.clear();
144 constituents.clear();
149 for (
const auto& thePart: constituents) {
155 if (tempparttype !=
Hadron)
continue;
163 if (parttype !=
BJet) parttype =
CJet;
167 if (parttype !=
BJet && parttype !=
CJet) parttype =
LJet;
174 allJetMothers.clear();
175 constituents.clear();
177 return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [5/9]
Implements IMCTruthClassifier.
Definition at line 93 of file MCRecoToTruth.cxx.
99 if (
mu->primaryTrackParticleLink().isValid()) trkPtr = *
mu->primaryTrackParticleLink();
100 else if (
mu->combinedTrackParticleLink().isValid()) trkPtr = *
mu->combinedTrackParticleLink();
101 else if (
mu->inDetTrackParticleLink().isValid()) trkPtr = *
mu->combinedTrackParticleLink();
102 else if (
mu->muonSpectrometerTrackParticleLink().isValid()) trkPtr = *
mu->muonSpectrometerTrackParticleLink();
104 if (!trkPtr)
return std::make_pair(parttype, partorig);
107 if (!genPart)
return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [6/9]
Implements IMCTruthClassifier.
Definition at line 54 of file MCRecoToTruth.cxx.
60 if (!clus)
return std::make_pair(parttype, partorig);
61 if (std::fabs(clus->
eta()) > 10.0 || std::fabs(clus->
phi()) > 6.28 || (clus->
et()) <= 0.)
return std::make_pair(parttype, partorig);
64 if (VxCvPtr !=
nullptr) {
66 if (itrk > 1)
continue;
68 if (!trkPtr)
continue;
72 info->cnvPhotTrkPtr.push_back(trkPtr);
73 info->cnvPhotTrkToTruthPart.push_back(thePart);
74 info->cnvPhotPartType.push_back(classif.first);
75 info->cnvPhotPartOrig.push_back(classif.second);
81 #ifndef XAOD_ANALYSIS // Fwd electron available only in Athena
84 ATH_MSG_WARNING(
"Photon Classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
86 if (!genPart)
return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [7/9]
◆ particleTruthClassifier() [8/9]
Implements IMCTruthClassifier.
Definition at line 75 of file MCTruthClassifierGen.cxx.
82 return std::make_pair(partType, partOrig);
85 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
88 info->genPart = thePart;
92 if (!truthParticleContainerReadHandle.isValid()) {
93 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
94 return std::make_pair(partType, partOrig);
97 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() <<
" has valid ReadHandle ");
108 if (endVert !=
nullptr) {
126 if (abs(thePart->
pdg_id()) > 1000000000)
return std::make_pair(
NuclFrag, partOrig);
134 if (partOriVert !=
nullptr) {
137 int motherPDG = theMoth?theMoth->pdg_id():0;
138 info->setMotherProperties(theMoth);
155 if (!partOriVert &&
MC::isTau(thePart)) {
157 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
169 return std::make_pair(
Neutrino, partOrig);
175 if (isPartHadr)
return std::make_pair(
Hadron, partOrig);
208 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
221 return std::make_pair(partType, partOrig);
◆ particleTruthClassifier() [9/9]
Implements IMCTruthClassifier.
Definition at line 42 of file MCTruthClassifierGen.cxx.
46 if (!theGenPart)
return std::make_pair(partType, partOrig);
49 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
52 if (!truthParticleLinkVecReadHandle.isValid()) {
53 ATH_MSG_WARNING(
" Invalid ReadHandle for xAODTruthParticleLinkVector with key: " << truthParticleLinkVecReadHandle.key());
54 return std::make_pair(partType, partOrig);
56 for (
const auto *
const entry : *truthParticleLinkVecReadHandle) {
59 if (!theGenPart || !truthParticle ||
60 theGenPart->pdg_id() != truthParticle->
pdgId() ||
61 theGenPart->status() != truthParticle->
status() ||
64 "HepMC::GenParticle and xAOD::TruthParticle do not match");
65 return std::make_pair(partType, partOrig);
70 return std::make_pair(partType, partOrig);
◆ print() [1/2]
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_caloExtensionTool
◆ m_caloMgrKey
◆ m_deltaPhiMatchCut
float MCTruthClassifier::m_deltaPhiMatchCut |
|
private |
◆ m_deltaRMatchCut
float MCTruthClassifier::m_deltaRMatchCut |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_FwdElectronTruthExtrEtaCut
float MCTruthClassifier::m_FwdElectronTruthExtrEtaCut |
|
private |
◆ m_FwdElectronTruthExtrEtaWindowCut
float MCTruthClassifier::m_FwdElectronTruthExtrEtaWindowCut |
|
private |
◆ m_FwdElectronUseG4Sel
bool MCTruthClassifier::m_FwdElectronUseG4Sel |
|
private |
◆ m_fwrdEledRtoTrCut
float MCTruthClassifier::m_fwrdEledRtoTrCut |
|
private |
◆ m_inclG4part
bool MCTruthClassifier::m_inclG4part |
|
private |
◆ m_jetPartDRMatch
float MCTruthClassifier::m_jetPartDRMatch |
|
private |
◆ m_NumOfSiHitsCut
int MCTruthClassifier::m_NumOfSiHitsCut |
|
private |
◆ m_partExtrConeEta
float MCTruthClassifier::m_partExtrConeEta |
|
private |
◆ m_partExtrConePhi
float MCTruthClassifier::m_partExtrConePhi |
|
private |
◆ m_phtClasConeEta
float MCTruthClassifier::m_phtClasConeEta |
|
private |
◆ m_phtClasConePhi
float MCTruthClassifier::m_phtClasConePhi |
|
private |
◆ m_phtdRtoTrCut
float MCTruthClassifier::m_phtdRtoTrCut |
|
private |
◆ m_pTChargePartCut
float MCTruthClassifier::m_pTChargePartCut |
|
private |
◆ m_pTNeutralPartCut
float MCTruthClassifier::m_pTNeutralPartCut |
|
private |
◆ m_ROICone
bool MCTruthClassifier::m_ROICone |
|
private |
◆ m_truthInConeTool
◆ m_truthLinkVecReadHandleKey
◆ m_truthParticleContainerKey
◆ m_useCaching
bool MCTruthClassifier::m_useCaching |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
MCTruthPartClassifier::ParticleOrigin defOrigOfNeutrino(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
size_t nOutgoingParticles() const
Get the number of outgoing particles.
ParticleOutCome defOutComeOfMuon(T thePart)
ParticleType defTypeOfPhoton(ParticleOrigin PhotOrig)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
def pout(output, newline=True)
bool is_same_vertex(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same vertex.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
float m_FwdElectronTruthExtrEtaWindowCut
std::vector< const TruthParticle * > particles_in() const
Get the incoming particles.
void findParticleAncestors(T thePart, std::set< T > &allancestors)
Function to find all ancestors of the particle.
Helper class to provide type-safe access to aux data.
void findJetConstituents(const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) const
ParticleOutCome defOutComeOfTau(T thePart)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
std::vector< size_t > vec
ParticleType defTypeOfElectron(ParticleOrigin EleOrig, bool isPrompt)
MCTruthPartClassifier::ParticleOrigin defOrigOfElectron(const xAOD::TruthParticleContainer *xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool const RAWDATA *ch2 const
int pdg_id() const
PDG ID code.
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
bool isValid() const
Test to see if the link can be dereferenced.
bool isSMLepton(const T &p)
virtual void setOwner(IDataHandleHolder *o)=0
ParticleType defTypeOfMuon(ParticleOrigin MuOrig, bool isPrompt)
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to dot...
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
float m_FwdElectronTruthExtrEtaCut
bool is_same_generator_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same generated particle.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
virtual double eta() const
The pseudorapidity ( ) of the particle.
ElementLink< xAOD::TruthParticleContainer > TruthLink_t
T findMatching(C TruthContainer, T p)
Function to find a particle in container.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
bool hasProdVtx() const
Check for a production vertex on this particle.
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
virtual const xAOD::TruthParticle * egammaClusMatch(const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const override final
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthLinkVecReadHandleKey
void findParticleStableDescendants(T thePart, std::set< T > &allstabledescendants)
Function to get the particle stable MC daughters.
T findMother(T thePart)
Function to get a mother of particle. MCTruthClassifier legacy.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
ParticleType defTypeOfHadron(int pdg)
bool genPartToCalo(const EventContext &ctx, const xAOD::CaloCluster *clus, const xAOD::TruthParticle *thePart, bool isFwrdEle, double &dRmatch, bool &isNarrowCone, const CaloDetDescrManager &caloDDMgr) const
bool isConditionA(const T &p)
To be understood.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Class describing a truth vertex in the MC record.
ParticleOutCome defOutComeOfElectron(T thePart)
bool isHadron(const T &p)
StatusCode initialize(bool used=true)
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
MCTruthPartClassifier::ParticleOrigin defOrigOfMuon(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
int status() const
Status code.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
float eSample(const CaloSample sampling) const
Class describing a Vertex.
This class provides the client interface for accessing the detector description information common to...
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
#define ATH_MSG_WARNING(x)
size_t nIncomingParticles() const
Get the number of incoming particles.
bool isDecayed(const T &p)
Identify if the particle decayed.
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
bool isBeam(const T &p)
Identify if the particle is beam particle.
ParticleOrigin convHadronTypeToOrig(ParticleType pType, int motherPDG)
ParticleOrigin defJetOrig(const T &allJetMothers)
MCTruthPartClassifier::ParticleOrigin defOrigOfTau(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info *info) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
ParticleType defTypeOfTau(ParticleOrigin TauOrig)
A vector of jet constituents at the scale used during jet finding.
ToolHandle< xAOD::ITruthParticlesInConeTool > m_truthInConeTool
ParticleOutCome defOutComeOfPhoton(T thePart)
Class describing a TrackParticle.
int pdgId() const
PDG ID code.
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final
bool m_FwdElectronUseG4Sel
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
double detEta(double x, double y) const
double charge() const
Physical charge.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
bool isHardScatteringVertex(T pVert)
Function to classify the vertex as hard scattering vertex.
MCTruthPartClassifier::ParticleOrigin defOrigOfPhoton(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
double detPhi(double x, double y) const
virtual const xAOD::TruthParticle * getGenPart(const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final