![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Work around MCTruthClassifier brain-damage.
More...
#include <D3PDMCTruthClassifier.h>
|
| D3PDMCTruthClassifier (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Gaudi tool constructor. More...
|
|
virtual StatusCode | initialize () |
| Standard Gaudi initialize method. More...
|
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *el) |
| Run the classifier for an electron. More...
|
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *el) |
| Run the classifier for a photon. More...
|
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Muon *mu) |
| Run the classifier for a muon. More...
|
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (HepMC::ConstGenParticlePtr, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Muon *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::CaloCluster *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Jet *, bool DR, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual StatusCode | finalize () override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (HepMC::ConstGenParticlePtr, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Electron *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Photon *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Muon *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::CaloCluster *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | particleTruthClassifier (const xAOD::Jet *, bool DR, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > | checkOrigOfBkgElec (const xAOD::TruthParticle *thePart, MCTruthPartClassifier::Info *info=nullptr) const override |
|
virtual const xAOD::TruthParticle * | getGenPart (const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override |
|
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 |
|
|
bool | get_tptruth_name (const std::string &tp_name, std::string &tptruth_name) |
| Try to find a TrackParticleTruthCollection pointing at TP_NAME. More...
|
|
void | getProperty1 (const std::string &pname, std::string &value) |
| Helper to retrieve the value of a Gaudi property. More...
|
|
void | setProperty1 (const std::string &pname, const std::string &value) |
| Helper to set the value of a Gaudi property. More...
|
|
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 |
|
const xAOD::TruthParticle * | egammaClusMatch (const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) 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...
|
|
|
ServiceHandle< StoreGateSvc > | m_sg |
| The StoreGate service. 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 |
|
Work around MCTruthClassifier brain-damage.
This avoids having to specify the container names during configuration.
MCTruthClassifier requires specifying, at configuration time, the names of the TrackParticleContainer and TrackParticleTruthCollection objects to use for the mapping. This is painful in for electrons in the case where one may have several different track containers.
What we do to make this easier is to search through SG to find a truth collection that points at the TrackParticleContainer that contains the tracks for the electron we're looking at.
Definition at line 41 of file D3PDMCTruthClassifier.h.
◆ StoreGateSvc_t
◆ D3PDMCTruthClassifier()
D3PD::D3PDMCTruthClassifier::D3PDMCTruthClassifier |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ checkOrigOfBkgElec()
Implements IMCTruthClassifier.
Definition at line 1476 of file MCTruthClassifierGen.cxx.
1480 std::pair<ParticleType, ParticleOrigin>
part;
1483 if (theEle ==
nullptr)
return part;
1487 if (!truthParticleContainerReadHandle.isValid()) {
1488 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
1492 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() <<
" has valid ReadHandle ");
1505 if (theMotherPart ==
nullptr || theMotherPart == thePart)
break;
1506 thePart = theMotherPart;
1531 info->bkgElecMother = thePart;
◆ 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);
◆ 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.
◆ 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.
◆ 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 230 of file MCTruthClassifierGen.cxx.
251 int numOfParents = -1;
253 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfElectron:: electron has more than one mother ");
256 if (
info)
info->setMotherProperties(mother);
260 int motherPDG = mother->
pdgId();
261 if (
info)
info->setMotherProperties(mother);
264 bool samePart =
false;
266 if (!theDaug)
continue;
275 if ((abs(motherPDG) == 13 || abs(motherPDG) == 15 || abs(motherPDG) == 24) && mothOriVert !=
nullptr && !samePart) {
291 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
292 parent_endVtx = MotherParent->decayVtx();
294 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
295 MotherParent = mother;
299 if (MotherParent) pPDG = MotherParent->
pdgId();
301 if (mother == MotherParent)
break;
302 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24) mother = MotherParent;
304 }
while ((abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24));
306 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24 || abs(pPDG) == 23 || abs(pPDG) == 25 ||
307 abs(pPDG) == 35 || abs(pPDG) == 36 || abs(pPDG) == 37 || abs(pPDG) == 32 || abs(pPDG) == 33 ||
308 abs(pPDG) == 34 || abs(pPDG) == 6 || abs(pPDG) == 9900024 || abs(pPDG) == 9900012 || abs(pPDG) == 9900014 ||
309 abs(pPDG) == 9900016 || (abs(pPDG) < 2000040 && abs(pPDG) > 1000001))
310 mother = MotherParent;
313 motherPDG = mother->
pdgId();
319 if (
info)
info->setMotherProperties(mother);
337 if (!theDaug)
continue;
338 int DaugType = theDaug->pdgId();
339 if (abs(DaugType) < 7) NumOfquark++;
340 if (abs(DaugType) == 21) NumOfgluon++;
341 if (abs(DaugType) == 12) NumOfElNeut++;
342 if (abs(DaugType) == 14) NumOfMuNeut++;
343 if (DaugType == 22) NumOfPhot++;
344 if (DaugType == 11) NumOfEl++;
345 if (DaugType == -11) NumOfPos++;
346 if (DaugType == 13) NumOfMuMin++;
347 if (DaugType == -13) NumOfMuPl++;
348 if (abs(DaugType) == 15) NumOfTau++;
349 if (abs(DaugType) == 16) NumOfTauNeut++;
350 if (abs(DaugType) == 42) NumOfLQ++;
352 if (numOfParents == 1 &&
353 (motherPDG == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 13 || abs(motherPDG) == 211) &&
354 (DaugType > 1000000000 || DaugType == 0 || DaugType == 2212 || DaugType == 2112 || abs(DaugType) == 211 ||
355 abs(DaugType) == 111))
359 if (motherPDG == 22 && mothOriVert !=
nullptr) {
360 for (
const auto& theMother: mothOriVert->
particles_in()) {
361 if (!theMother)
continue;
363 info->photonMother = theMother;
364 info->photonMotherStatus = theMother->status();
366 info->photonMotherPDG = theMother->pdgId();
370 if ((motherPDG == 22 && numOfDaug == 2 && NumOfEl == 1 && NumOfPos == 1) || (motherPDG == 22 && numOfDaug == 1 && (NumOfEl == 1 || NumOfPos == 1)))
return PhotonConv;
373 if ((numOfParents == 1 && (abs(motherPDG) == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 15)) && numOfDaug > 1 && NumOfNucFr != 0)
return ElMagProc;
375 if (numOfParents == 1 && abs(motherPDG) == 211 && numOfDaug > 2 && NumOfNucFr != 0)
return ElMagProc;
378 if (motherPDG == 22 && numOfDaug > 4 && NumOfNucFr != 0)
return ElMagProc;
381 if (abs(motherPDG) == 11 && numOfDaug == 2 && NumOfEl == 1 && NumOfPos == 1)
return ElMagProc;
384 if (motherPDG == 11 && numOfDaug == 2 && NumOfEl == 2 && NumOfPos == 0)
return ElMagProc;
387 if (motherPDG == -11 && numOfDaug == 2 && NumOfEl == 0 && NumOfPos == 2)
return ElMagProc;
390 if (abs(motherPDG) == 11 && !
MC::isDecayed(mother) && motherPDG == thePriPart->
pdgId() && numOfDaug == 1 && !samePart)
return ElMagProc;
394 if (numOfDaug == 2 && (NumOfEl == 1 || NumOfPos == 1) && abs(motherPDG) != 11 && samePart)
return ElMagProc;
396 if ((motherPDG == 111 && numOfDaug == 3 && NumOfPhot == 1 && NumOfEl == 1 && NumOfPos == 1) ||
397 (motherPDG == 111 && numOfDaug == 4 && NumOfPhot == 0 && NumOfEl == 2 && NumOfPos == 2))
401 if (abs(motherPDG) < 7 && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && NumOfElNeut == 1)
return QuarkWeakDec;
403 if (abs(motherPDG) == 13 && NumOfNucFr != 0)
return ElMagProc;
405 if (abs(motherPDG) == 6)
return top;
414 }
while (
MC::isW(ptrPart) && prodVert !=
nullptr);
417 if (abs(ptrPart->
pdgId()) == 9900012)
return NuREle;
418 if (abs(ptrPart->
pdgId()) == 9900014)
return NuRMu;
419 if (abs(ptrPart->
pdgId()) == 9900016)
return NuRTau;
427 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
431 if (theMother !=
nullptr && abs(theMother->
pdgId()) == 11 &&
MC::isDecayed(theMother)) thePartToCheck = theMother;
433 bool isZboson =
false;
434 bool isWboson =
false;
435 bool skipnext =
false;
437 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ++ipOut) {
439 if (!theDaug)
continue;
441 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
443 if (theNextDaug !=
nullptr)
break;
445 if (!theNextDaug)
continue;
451 if (abs(theDaug->
pdgId()) == 11 && abs(theNextDaug->
pdgId()) == 11) {
453 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
458 }
else if (abs(theDaug->
pdgId()) == 11 && abs(theNextDaug->
pdgId()) == 12) {
460 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
467 if (isWboson)
return WBoson;
468 if (isZboson)
return ZBoson;
470 if (numOfParents == 2) {
474 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfEl == 1 && NumOfPos == 1)
return ZBoson;
477 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfElNeut == 1)
return WBoson;
480 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 && (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
484 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 && (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
489 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
490 int NumOfEleLoop = 0;
491 int NumOfLepLoop = 0;
492 int NumOfEleNeuLoop = 0;
495 for (
const auto *
const pin: partOriVert->
particles_in()) {
499 if (std::abs(pin->pdgId()) == 12) NumOfEleNeuLoop++;
503 if (NumOfEleLoop == 2 && NumOfEleNeuLoop == 0)
return ZBoson;
504 if (NumOfEleLoop == 1 && NumOfEleNeuLoop == 1)
return WBoson;
505 if ((NumOfEleLoop == 4 && NumOfEleNeuLoop == 0) || (NumOfEleLoop == 3 && NumOfEleNeuLoop == 1) ||
506 (NumOfEleLoop == 2 && NumOfEleNeuLoop == 2))
508 if (NumOfLepLoop == 4)
return DiBoson;
513 if (abs(motherPDG) == 25)
return Higgs;
515 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
517 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
519 if (abs(motherPDG) == 13)
return Mu;
520 if (abs(motherPDG) == 15) {
526 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
527 if (abs(motherPDG) == 9900012)
return NuREle;
528 if (abs(motherPDG) == 9900014)
return NuRMu;
529 if (abs(motherPDG) == 9900016)
return NuRTau;
530 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfMuon()
Definition at line 539 of file MCTruthClassifierGen.cxx.
561 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfMuon:: muon has more than one mother ");
564 if (
info)
info->setMotherProperties(mother);
570 int motherPDG = mother->
pdgId();
572 if ((
MC::isTau(motherPDG)||
MC::isW(motherPDG)) && mothOriVert !=
nullptr) {
589 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
590 parent_endVtx = MotherParent->decayVtx();
593 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
594 MotherParent = mother;
599 if (mother == MotherParent) {
604 pPDG = MotherParent->
pdgId();
605 if (abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24) {
606 mother = MotherParent;
607 if (
info)
info->setMotherProperties(mother);
610 }
while ((abs(pPDG) == 13 || abs(pPDG) == 15 || abs(pPDG) == 24));
612 if (abs(pPDG) == 15 || abs(pPDG) == 24 || abs(pPDG) == 23 || abs(pPDG) == 25 || abs(pPDG) == 35 ||
613 abs(pPDG) == 36 || abs(pPDG) == 37 || abs(pPDG) == 32 || abs(pPDG) == 33 || abs(pPDG) == 34 || abs(pPDG) == 6 ||
614 abs(pPDG) == 9900024 || abs(pPDG) == 9900012 || abs(pPDG) == 9900014 || abs(pPDG) == 9900016 ||
615 (abs(pPDG) < 2000040 && abs(pPDG) > 1000001)) {
616 if (
info)
info->setMotherProperties(mother);
620 motherPDG = mother->
pdgId();
626 if (
info)
info->setMotherProperties(mother);
627 auto DP = DecayProducts(partOriVert);
628 int NumOfPhot = DP.pd(22);
629 int NumOfEl = DP.pd(11);
630 int NumOfPos = DP.pd(-11);
631 int NumOfElNeut = DP.apd(12);
632 int NumOfMuNeut = DP.apd(14);
633 int NumOfLQ = DP.apd(42);
634 int NumOfquark = DP.apd({1,2,3,4,5,6});
635 int NumOfgluon = DP.apd(21);
636 int NumOfMuPl = DP.pd(-13);
637 int NumOfMuMin = DP.pd(13);
638 int NumOfTau = DP.apd(15);
639 int NumOfTauNeut = DP.apd(16);
640 if (std::abs(motherPDG) == 211 && numOfDaug == 2 && NumOfMuNeut == 1)
return PionDecay;
641 if (std::abs(motherPDG) == 321 && numOfDaug == 2 && NumOfMuNeut == 1)
return KaonDecay;
648 if (std::abs(motherPDG) == 6)
return top;
650 if (abs(motherPDG) < 7 && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && NumOfMuNeut == 1)
return QuarkWeakDec;
658 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
662 if (abs(itrP->
pdgId()) == 9900014)
return NuRMu;
669 if (motherPDG == 22 && numOfDaug == 2 && NumOfMuMin == 1 && NumOfMuPl == 1)
return PhotonConv;
674 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
675 bool isZboson =
false;
676 bool isWboson =
false;
677 bool skipnext =
false;
678 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
684 if (!theDaug)
continue;
686 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
688 if (theNextDaug !=
nullptr)
break;
690 if (!theNextDaug)
continue;
691 if (abs(theDaug->
pdgId()) == 13 && abs(theNextDaug->
pdgId()) == 13) {
693 if (thePriPart == theDaug || thePriPart == theNextDaug) {
698 }
else if (abs(theDaug->
pdgId()) == 13 && abs(theNextDaug->
pdgId()) == 14) {
700 if (thePriPart == theDaug || thePriPart == theNextDaug) {
707 if (isWboson)
return WBoson;
708 if (isZboson)
return ZBoson;
710 if (numOfParents == 2 ) {
714 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfMuPl == 1 && NumOfMuMin == 1)
return ZBoson;
718 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfMuPl == 1 || NumOfMuMin == 1) && NumOfMuNeut == 1)
return WBoson;
721 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 &&
722 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
726 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
727 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
732 if (partOriVert == mothOriVert) {
734 int NumOfMuNeuLoop = 0;
735 int NumOfLepLoop = 0;
741 if (std::abs(
pout->pdg_id()) == 13) NumOfMuLoop++;
742 if (std::abs(
pout->pdg_id()) == 14) NumOfMuNeuLoop++;
747 if (NumOfMuLoop == 2 && NumOfMuNeuLoop == 0)
return ZBoson;
748 if (NumOfMuLoop == 1 && NumOfMuNeuLoop == 1)
return WBoson;
749 if ((NumOfMuLoop == 4 && NumOfMuNeuLoop == 0) || (NumOfMuLoop == 3 && NumOfMuNeuLoop == 1) || (NumOfMuLoop == 2 && NumOfMuNeuLoop == 2))
return DiBoson;
750 if (NumOfLepLoop == 4)
return DiBoson;
755 if (abs(motherPDG) == 25)
return Higgs;
757 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
759 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
761 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
762 if (abs(motherPDG) == 9900012)
return NuREle;
763 if (abs(motherPDG) == 9900014)
return NuRMu;
764 if (abs(motherPDG) == 9900016)
return NuRTau;
765 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfNeutrino()
Definition at line 1216 of file MCTruthClassifierGen.cxx.
1224 int nuFlav = abs(thePart->
pdgId());
1238 int numOfParents = -1;
1240 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfNeutrino:: neutrino has more than one mother ");
1245 int motherPDG = mother->
pdgId();
1249 bool samePart =
false;
1252 if ((abs(motherPDG) == nuFlav || abs(motherPDG) == 15 ||
MC::isW(motherPDG)) && mothOriVert !=
nullptr &&
1264 mother_endVtx = mother->
decayVtx();
1269 parent_prdVtx = MotherParent->hasProdVtx() ? MotherParent->prodVtx() :
nullptr;
1270 parent_endVtx = MotherParent->decayVtx();
1272 if (mother_endVtx == parent_prdVtx && mother_prdVtx == parent_endVtx) {
1273 MotherParent = mother;
1278 pPDG = MotherParent->
pdgId();
1281 if (mother == MotherParent) {
1284 if (abs(pPDG) == nuFlav || abs(pPDG) == 15 || abs(pPDG) == 24 ) {
1285 mother = MotherParent;
1286 if (
info)
info->setMotherProperties(mother);
1289 }
while ((std::abs(pPDG) == nuFlav || std::abs(pPDG) == 15 || std::abs(pPDG) == 24));
1291 if (std::abs(pPDG) == nuFlav || std::abs(pPDG) == 15 || std::abs(pPDG) == 24 || std::abs(pPDG) == 23 || std::abs(pPDG) == 25 ||
1292 std::abs(pPDG) == 35 || std::abs(pPDG) == 36 || std::abs(pPDG) == 37 || std::abs(pPDG) == 32 || std::abs(pPDG) == 33 ||
1293 std::abs(pPDG) == 34 || std::abs(pPDG) == 6 || std::abs(pPDG) == 9900024 || std::abs(pPDG) == 9900012 || std::abs(pPDG) == 9900014 ||
1294 std::abs(pPDG) == 9900016 || (std::abs(pPDG) < 2000040 && std::abs(pPDG) > 1000001)) {
1295 mother = MotherParent;
1296 if (
info)
info->setMotherProperties(mother);
1302 motherPDG = mother->
pdgId();
1308 if (
info)
info->setMotherProperties(mother);
1316 int NumOfTauNeut(0);
1323 if (!theDaug)
continue;
1324 int DaugType = theDaug->pdgId();
1325 if (abs(DaugType) < 7) NumOfquark++;
1326 if (abs(DaugType) == 21) NumOfgluon++;
1327 if (abs(DaugType) == 12) NumOfElNeut++;
1328 if (std::abs(DaugType) == 14) NumOfMuNeut++;
1329 if (std::abs(DaugType) == 16) NumOfTauNeut++;
1330 if (DaugType == 22) NumOfPhot++;
1331 if (std::abs(DaugType) == 11) NumOfEl++;
1332 if (std::abs(DaugType) == 13) NumOfMu++;
1333 if (std::abs(DaugType) == 15) NumOfTau++;
1334 if (std::abs(DaugType) == 42) NumOfLQ++;
1339 if (
MC::isQuark(motherPDG) && numOfParents == 1 && numOfDaug == 3 && NumOfquark == 1 && (NumOfEl == 1 || NumOfMu == 1 || NumOfTau == 1))
return QuarkWeakDec;
1340 if (std::abs(motherPDG) == 6)
return top;
1348 }
while (
MC::isW(ptrPart) && prodVert !=
nullptr);
1351 if (abs(ptrPart->
pdgId()) == 9900012)
return NuREle;
1352 if (abs(ptrPart->
pdgId()) == 9900014)
return NuRMu;
1353 if (abs(ptrPart->
pdgId()) == 9900016)
return NuRTau;
1363 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
1368 if (abs(theMother->
pdgId()) == 11 &&
MC::isDecayed(theMother)) thePartToCheck = theMother;
1369 bool isZboson =
false;
1370 bool isWboson =
false;
1371 bool skipnext =
false;
1373 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ++ipOut) {
1375 if (!theDaug)
continue;
1377 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
1379 if (theNextDaug !=
nullptr)
break;
1381 if (!theNextDaug)
continue;
1388 int apdgID1 = abs(theDaug->
pdgId());
1389 int apdgID2 = abs(theNextDaug->
pdgId());
1390 if ((apdgID1 == 12 && apdgID2 == 12) || (apdgID1 == 14 && apdgID2 == 14) || (apdgID1 == 16 && apdgID2 == 16)) {
1392 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
1397 }
else if ((apdgID1 == 11 && apdgID2 == 12) || (apdgID1 == 14 && apdgID2 == 14) ||
1398 (apdgID1 == 16 && apdgID2 == 16)) {
1400 if (thePartToCheck == theDaug || thePartToCheck == theNextDaug) {
1407 if (isWboson)
return WBoson;
1408 if (isZboson)
return ZBoson;
1411 if (numOfParents == 2) {
1415 if ( (numOfDaug - NumOfquark - NumOfgluon) == 2 && (NumOfElNeut == 2 || NumOfMuNeut == 2 || NumOfTauNeut == 2))
return ZBoson;
1418 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && ((NumOfEl == 1 && NumOfElNeut == 1) || (NumOfMu == 1 && NumOfMuNeut == 1) || (NumOfTau == 1 && NumOfTauNeut == 1)))
return WBoson;
1421 if ( (numOfDaug - NumOfquark - NumOfgluon) == 4 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
1425 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
1430 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
1431 int NumOfLepLoop = 0;
1432 int NumOfNeuLoop = 0;
1434 if (!
pout)
continue;
1435 for (
const auto *
const pin: partOriVert->
particles_in()) {
1438 int apdgid = abs(
pout->pdgId());
1439 if (apdgid == 12 || apdgid == 14 || apdgid == 16) NumOfNeuLoop++;
1440 if (apdgid == 11 || apdgid == 13 || apdgid == 15) NumOfLepLoop++;
1443 if (NumOfNeuLoop == 2 && NumOfLepLoop == 0)
return ZBoson;
1444 if (NumOfNeuLoop == 1 && NumOfLepLoop == 1)
return WBoson;
1445 if (NumOfNeuLoop + NumOfLepLoop == 4)
return DiBoson;
1450 if (abs(motherPDG) == 25)
return Higgs;
1451 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
1452 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
1454 if (abs(motherPDG) == 15) {
1460 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
1461 if (abs(motherPDG) == 9900012)
return NuREle;
1462 if (abs(motherPDG) == 9900014)
return NuRMu;
1463 if (abs(motherPDG) == 9900016)
return NuRTau;
1464 if (abs(motherPDG) == 42 || NumOfLQ != 0)
return LQ;
◆ defOrigOfPhoton()
Definition at line 952 of file MCTruthClassifierGen.cxx.
965 info->resetMotherProperties();
966 info->photonMother =
nullptr;
967 info->photonMotherBarcode = 0;
968 info->photonMotherPDG = 0;
969 info->photonMotherStatus = 0;
987 if (
info)
info->setMotherProperties(mother);
989 int motherPDG = mother->
pdgId();
991 int motherStatus = mother->
status();
992 if (
info)
info->setMotherProperties(mother);
1006 long NumOfPartons(0);
1009 if (!
pout)
continue;
1010 DaugType =
pout->pdg_id();
1011 if (numOfParents == 1 && (motherPDG == 22 || abs(motherPDG) == 11 || abs(motherPDG) == 211) &&
1012 (DaugType > 1000000000 || DaugType == 0 || DaugType == 2212 || DaugType == 2112))
1014 if (DaugType == 22) NumOfPht++;
1015 if (DaugType == 11) NumOfEl++;
1016 if (DaugType == -11) NumOfPos++;
1017 if (abs(DaugType) == 13) NumOfMu++;
1018 if (abs(DaugType) == 15) NumOfTau++;
1019 if (abs(DaugType) == 42) NumOfLQ++;
1020 if (abs(DaugType) == 11 || abs(DaugType) == 13 || abs(DaugType) == 15) NumOfLep++;
1021 if (abs(DaugType) == 12 || abs(DaugType) == 14 || abs(DaugType) == 16) NumOfNeut++;
1022 if (abs(DaugType) < 11 || (abs(DaugType) > 16 && abs(DaugType) < 43 && abs(DaugType) != 22)) NumOfPartons++;
1023 if (DaugType == motherPDG) {
1028 bool foundISR =
false;
1029 bool foundFSR =
false;
1031 if (numOfParents == 1 && numOfDaug == 2 && abs(motherPDG) == 11 && NumOfPht == 2)
return ElMagProc;
1034 if (numOfParents == 1 && numOfDaug == 2 && (abs(motherPDG) == 11 || abs(motherPDG) == 13 || abs(motherPDG) == 15) &&
1045 PartPDG = abs(pin->pdgId());
1046 prodVert = pin->prodVtx();
1047 if (PartPDG == 23 || PartPDG == 24 || PartPDG == 25) foundFSR =
true;
1054 }
while (prodVert !=
nullptr && abs(motherPDG) == PartPDG);
1064 if ((numOfParents == 1 && (abs(motherPDG) == 22 || abs(motherPDG) == 11) && numOfDaug > 2 && NumOfNucFr != 0) ||
1065 (numOfParents == 1 && abs(motherPDG) == 211 && numOfDaug > 10 && NumOfNucFr != 0) ||
1066 (numOfParents == 1 && motherPDG == 22 && numOfDaug > 10 && motherStatus == 1) ||
1067 (numOfParents == 1 && motherPDG > 1000000000))
1073 if (numOfParents == 1 && motherStatus == 3)
return (foundISR)?
ISRPhot:
UndrPhot;
1077 if (numOfParents == 1 && (abs(motherPDG) < 7 || motherPDG == 21) &&
1078 (numOfDaug != NumOfPht + NumOfPartons ||
1079 (motherStatus != 62 && motherStatus != 52 && motherStatus != 21 && motherStatus != 22))) {
1081 if (!
pout)
continue;
1082 if (motherPDG !=
pout->pdgId())
continue;
1084 if (!Vrtx)
continue;
1097 if (numOfParents == 2 && ((abs(motherPDG) == 11 && NumOfEl == 1 && NumOfPos == 1) || (abs(motherPDG) == 13 && NumOfMu == 2) || (abs(motherPDG) == 15 && NumOfTau == 2))) {
1101 if (numOfParents == 2 && NumOfLep == 1 && NumOfNeut == 1 && (abs(motherPDG) == 11 || abs(motherPDG) == 12))
return FSRPhot;
1104 if (abs(motherPDG) == 11 && numOfParents == 1 && numOfDaug == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfPht == 1 &&
1109 if (
MC::isZ(motherPDG) && ((NumOfEl + NumOfPos == 2 || NumOfEl + NumOfPos == 4) || (NumOfMu == 2 || NumOfMu == 4) || (NumOfTau == 2 || NumOfTau == 4)) && NumOfPht > 0)
return FSRPhot;
1111 if (NumOfPht > 0 && (abs(motherPDG) == 9900024 || abs(motherPDG) == 9900012 || abs(motherPDG) == 9900014 || abs(motherPDG) == 9900016))
return FSRPhot;
1113 if (numOfParents == 2 && NumOfLQ == 1)
return FSRPhot;
1120 if (NumOfLep == 1 && NumOfNeut == 1 && numOfDaug == NumOfLep + NumOfNeut + NumOfPht)
return FSRPhot;
1128 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
1133 if ( abs(itrP->
pdgId()) == 9900012)
return NuREle;
1134 if ( abs(itrP->
pdgId()) == 9900014)
return NuRMu;
1135 if ( abs(itrP->
pdgId()) == 9900016)
return NuRTau;
1142 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
1143 bool isZboson =
false;
1144 bool isWboson =
false;
1145 bool skipnext =
false;
1146 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
1152 if (!theDaug)
continue;
1154 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
1156 if (theNextDaug !=
nullptr)
break;
1158 if (!theNextDaug)
continue;
1159 if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 15) {
1161 if (thePriPart == theDaug || thePriPart == theNextDaug) {
1166 }
else if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 16) {
1168 if (thePriPart == theDaug || thePriPart == theNextDaug) {
1175 if (isWboson)
return WBoson;
1176 if (isZboson)
return ZBoson;
1180 if (numOfParents == 4 && (numOfDaug - NumOfPht) == 4 && (NumOfLep + NumOfNeut == 4)) {
1187 if (partOriVert == mothOriVert && partOriVert !=
nullptr) {
1188 int NumOfPhtLoop = 0;
1190 if (!
pout)
continue;
1191 for (
const auto *
const pin: partOriVert->
particles_in()) {
1199 if (abs(motherPDG) == 25)
return Higgs;
1200 if (abs(motherPDG) == 111)
return PiZero;
1201 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
1202 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34 || abs(motherPDG) == 5100039 )
return HeavyBoson;
1208 if ((motherStatus == 62 || motherStatus == 52 || motherStatus == 21 || motherStatus == 22) &&
MC::isStable(thePriPart) && NumOfPht == 1 && numOfDaug == (NumOfPht + NumOfPartons))
return PromptPhot;
◆ defOrigOfTau()
Definition at line 775 of file MCTruthClassifierGen.cxx.
796 if (numOfParents > 1)
ATH_MSG_DEBUG(
"DefOrigOfTau:: tau has more than one mother ");
799 if (
info)
info->setMotherProperties(mother);
808 if (
MC::isW(motherPDG) && mothOriVert !=
nullptr) {
813 pPDG = MotherParent->pdgId();
814 if (abs(pPDG) == 6) {
815 mother = MotherParent;
816 if (
info)
info->setMotherProperties(mother);
821 motherPDG = mother->
pdgId();
822 if (
info)
info->setMotherProperties(mother);
828 auto DP = DecayProducts(partOriVert);
829 int numOfDaug = DP.size();
830 int NumOfPhot = DP.pd(22);
831 int NumOfEl = DP.pd(11);
832 int NumOfPos = DP.pd(-11);
833 int NumOfElNeut = DP.apd(12);
834 int NumOfMuNeut = DP.apd(14);
836 int NumOfquark = DP.apd({1,2,3,4,5,6});
837 int NumOfgluon = DP.apd(21);
838 int NumOfMuPl = DP.pd(-13);
839 int NumOfMuMin = DP.pd(13);
840 int NumOfTau = DP.apd(15);
841 int NumOfTauNeut = DP.pd(16);
843 if (abs(motherPDG) == 6)
return top;
850 }
while (
MC::isW(itrP) && prodVert !=
nullptr);
854 if (abs(itrP->
pdgId()) == 9900014)
return NuRMu;
861 if (numOfParents == 1 && numOfDaug > 4 && (abs(motherPDG) < 7 || motherPDG == 21)) {
862 bool isZboson =
false;
863 bool isWboson =
false;
864 bool skipnext =
false;
865 for (
unsigned int ipOut = 0; ipOut + 1 < partOriVert->
nOutgoingParticles(); ipOut++) {
871 if (!theDaug)
continue;
873 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partOriVert->
nOutgoingParticles(); ipOut1++) {
875 if (theNextDaug !=
nullptr)
break;
880 if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 15) {
882 if (thePriPart == theDaug || thePriPart == theNextDaug) {
887 }
else if (abs(theDaug->
pdgId()) == 15 && abs(theNextDaug->
pdgId()) == 16) {
889 if (thePriPart == theDaug || thePriPart == theNextDaug) {
896 if (isWboson)
return WBoson;
897 if (isZboson)
return ZBoson;
899 if (numOfParents == 2 ) {
906 if ((numOfDaug - NumOfquark - NumOfgluon) == 2 && NumOfTau == 1 && NumOfTauNeut == 1)
return WBoson;
909 if ((numOfDaug - NumOfquark - NumOfgluon) == 4 &&
910 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
914 if ((numOfDaug - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
915 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
919 if (partOriVert == mothOriVert) {
920 int NumOfTauLoop = 0;
921 int NumOfTauNeuLoop = 0;
922 int NumOfLepLoop = 0;
925 for (
const auto *
const pin: partOriVert->
particles_in()) {
928 if (std::abs(
pout->pdgId()) == 15) NumOfTauLoop++;
929 if (std::abs(
pout->pdgId()) == 16) NumOfTauNeuLoop++;
933 if (NumOfTauLoop == 2 && NumOfTauNeuLoop == 0)
return ZBoson;
934 if (NumOfTauLoop == 1 && NumOfTauNeuLoop == 1)
return WBoson;
935 if ((NumOfTauLoop == 4 && NumOfTauNeuLoop == 0) || (NumOfTauLoop == 3 && NumOfTauNeuLoop == 1) || (NumOfTauLoop == 2 && NumOfTauNeuLoop == 2))
return DiBoson;
936 if (NumOfLepLoop == 4)
return DiBoson;
939 if (abs(motherPDG) == 25)
return Higgs;
940 if (abs(motherPDG) == 35 || abs(motherPDG) == 36 || abs(motherPDG) == 37)
return HiggsMSSM;
941 if (abs(motherPDG) == 32 || abs(motherPDG) == 33 || abs(motherPDG) == 34)
return HeavyBoson;
942 if (abs(motherPDG) == 9900024)
return WBosonLRSM;
943 if (abs(motherPDG) == 9900016)
return NuRTau;
946 if (abs(motherPDG) == 443)
return JPsi;
◆ detEta()
double MCTruthClassifier::detEta |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
inlineprivateinherited |
◆ detPhi()
double MCTruthClassifier::detPhi |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
inlineprivateinherited |
◆ detStore()
◆ egammaClusMatch()
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::find_matching(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::find_matching(truthParticleContainerReadHandle.ptr(), theEgamma);
157 if (
info)
info->deltaRMatch = LeadingPhtdR;
158 }
else if (theLeadingPartInCone !=
nullptr) {
159 theMatchPart =
MC::find_matching(truthParticleContainerReadHandle.ptr(),theLeadingPartInCone);
160 if (
info)
info->deltaRMatch = LeadingPartdR;
161 }
else if (theBestPartOutCone !=
nullptr) {
162 theMatchPart =
MC::find_matching(truthParticleContainerReadHandle.ptr(),theBestPartOutCone);
163 if (
info)
info->deltaRMatch = BestPartdR;
164 }
else if (isFwrdEle && theBestPartdR !=
nullptr) {
165 theMatchPart =
MC::find_matching(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::find_matching(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::find_matching(truthParticleContainerReadHandle.ptr(),theEgamma);
223 if (
info)
info->deltaRMatch = LeadingPhtdR;
224 }
else if (theLeadingPartInCone !=
nullptr) {
225 theMatchPart =
MC::find_matching(truthParticleContainerReadHandle.ptr(),theLeadingPartInCone);
226 if (
info)
info->deltaRMatch = LeadingPartdR;
227 }
else if (theBestPartOutCone !=
nullptr) {
228 theMatchPart =
MC::find_matching(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
◆ finalize()
virtual StatusCode MCTruthClassifier::finalize |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ 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;
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();
◆ get_tptruth_name()
bool D3PD::D3PDMCTruthClassifier::get_tptruth_name |
( |
const std::string & |
tp_name, |
|
|
std::string & |
tptruth_name |
|
) |
| |
|
private |
Try to find a TrackParticleTruthCollection pointing at TP_NAME.
- Parameters
-
- Returns
- True if we found a good truth collection.
Definition at line 174 of file D3PDMCTruthClassifier.cxx.
179 std::vector<std::string>
keys;
182 for (
size_t i = 0;
i <
keys.size();
i++) {
184 if (
m_sg->retrieve (tptc,
keys[
i]).isFailure() || !tptc)
190 tptruth_name =
keys[
i];
192 std::string target_tp_name;
195 target_tp_name =
"TrackParticleCandidate";
202 if (tp_name == target_tp_name)
◆ 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() && theDaugt->pdgId() != 22) 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
124 return evtStore()->event()->getKey( ptr );
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
111 return evtStore()->event()->getName( ptr );
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.
◆ getProperty1()
void D3PD::D3PDMCTruthClassifier::getProperty1 |
( |
const std::string & |
pname, |
|
|
std::string & |
value |
|
) |
| |
|
private |
Helper to retrieve the value of a Gaudi property.
- Parameters
-
pname | The name of the property. param value[out] The value of the property. |
Definition at line 214 of file D3PDMCTruthClassifier.cxx.
◆ initialize()
StatusCode D3PD::D3PDMCTruthClassifier::initialize |
( |
| ) |
|
|
virtual |
◆ 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/21]
Definition at line 144 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/21]
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() [3/21]
Definition at line 165 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() [4/21]
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() [5/21]
Definition at line 156 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() [6/21]
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() [7/21]
Run the classifier for an electron.
- Parameters
-
Definition at line 65 of file D3PDMCTruthClassifier.cxx.
69 bool got_names =
false;
70 std::string tp_truth_name, tp_name;
71 if (
el->trackParticleLink().isValid()) {
72 tp_name =
el->trackParticleLink().dataID();
78 std::string old_tp_truth_name, old_tp_name;
80 getProperty1 (
"TrackParticleTruthCollection", old_tp_truth_name);
81 getProperty1 (
"TrackParticleContainerName", old_tp_name);
82 setProperty1 (
"TrackParticleTruthCollection", tp_truth_name);
93 setProperty1 (
"TrackParticleTruthCollection", old_tp_truth_name);
94 setProperty1 (
"TrackParticleContainerName", old_tp_name);
◆ particleTruthClassifier() [8/21]
Definition at line 168 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) {
152 if (thePart->status() == 3)
continue;
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() [9/21]
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) {
152 if (thePart->status() == 3)
continue;
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() [10/21]
Definition at line 162 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() [11/21]
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() [12/21]
Run the classifier for a muon.
This function is here to avoid a problem on the mc12 validation samples.
- Parameters
-
Definition at line 155 of file D3PDMCTruthClassifier.cxx.
158 if(
mu->muonType() == xAOD::Muon::SiliconAssociatedForwardMuon ) {
◆ particleTruthClassifier() [13/21]
Definition at line 159 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() [14/21]
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() [15/21]
Run the classifier for a photon.
- Parameters
-
Definition at line 107 of file D3PDMCTruthClassifier.cxx.
111 bool got_names =
false;
112 std::string tp_truth_name, tp_name;
116 for (
auto trklink :
links) {
117 if (trklink.isValid()) {
118 tp_name = trklink.dataID();
120 if (got_names)
break;
127 std::string old_tp_truth_name, old_tp_name;
129 getProperty1 (
"TrackParticleTruthCollection", old_tp_truth_name);
130 getProperty1 (
"TrackParticleContainerName", old_tp_name);
131 setProperty1 (
"TrackParticleTruthCollection", tp_truth_name);
142 setProperty1 (
"TrackParticleTruthCollection", old_tp_truth_name);
143 setProperty1 (
"TrackParticleContainerName", old_tp_name);
◆ particleTruthClassifier() [16/21]
Definition at line 153 of file MCRecoToTruth.cxx.
18 if (!genPart)
return std::make_pair(parttype, partorig);
◆ particleTruthClassifier() [17/21]
◆ particleTruthClassifier() [18/21]
Definition at line 136 of file MCTruthClassifierGen.cxx.
84 return std::make_pair(partType, partOrig);
87 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
90 info->genPart = thePart;
94 if (!truthParticleContainerReadHandle.isValid()) {
95 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
96 return std::make_pair(partType, partOrig);
99 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() <<
" has valid ReadHandle ");
111 if (endVert !=
nullptr) {
129 if (abs(thePart->pdg_id()) > 1000000000)
return std::make_pair(
NuclFrag, partOrig);
134 const xAOD::TruthVertex* partOriVert = thePart->hasProdVtx() ? thePart->prodVtx() :
nullptr;
137 if (partOriVert !=
nullptr) {
140 int motherStatus = theMoth?theMoth->status():0;
141 int motherPDG = theMoth?theMoth->pdg_id():0;
142 info->setMotherProperties(theMoth);
159 if (!partOriVert &&
MC::isTau(thePart)) {
161 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
173 return std::make_pair(
Neutrino, partOrig);
179 if (isPartHadr)
return std::make_pair(
Hadron, partOrig);
185 return std::make_pair(IsoElectron,
SingleElec);
212 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
225 return std::make_pair(partType, partOrig);
◆ particleTruthClassifier() [19/21]
Implements IMCTruthClassifier.
Definition at line 77 of file MCTruthClassifierGen.cxx.
84 return std::make_pair(partType, partOrig);
87 const EventContext& ctx =
info ?
info->eventContext : Gaudi::Hive::currentContext();
90 info->genPart = thePart;
94 if (!truthParticleContainerReadHandle.isValid()) {
95 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
96 return std::make_pair(partType, partOrig);
99 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() <<
" has valid ReadHandle ");
111 if (endVert !=
nullptr) {
129 if (abs(thePart->
pdg_id()) > 1000000000)
return std::make_pair(
NuclFrag, partOrig);
137 if (partOriVert !=
nullptr) {
140 int motherStatus = theMoth?theMoth->status():0;
141 int motherPDG = theMoth?theMoth->pdg_id():0;
142 info->setMotherProperties(theMoth);
159 if (!partOriVert &&
MC::isTau(thePart)) {
161 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
173 return std::make_pair(
Neutrino, partOrig);
179 if (isPartHadr)
return std::make_pair(
Hadron, partOrig);
212 partOrig =
defOrigOfTau(truthParticleContainerReadHandle.ptr(), thePart, motherPDG,
info);
225 return std::make_pair(partType, partOrig);
◆ particleTruthClassifier() [20/21]
Definition at line 147 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);
57 for (
const auto *
const entry : *truthParticleLinkVecReadHandle) {
61 if (!theGenPart || !truthParticle ||
62 theGenPart->pdg_id() != truthParticle->
pdgId() ||
63 theGenPart->status() != truthParticle->
status() ||
66 "HepMC::GenParticle and xAOD::TruthParticle do not match");
67 return std::make_pair(partType, partOrig);
72 return std::make_pair(partType, partOrig);
◆ particleTruthClassifier() [21/21]
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);
57 for (
const auto *
const entry : *truthParticleLinkVecReadHandle) {
61 if (!theGenPart || !truthParticle ||
62 theGenPart->pdg_id() != truthParticle->
pdgId() ||
63 theGenPart->status() != truthParticle->
status() ||
66 "HepMC::GenParticle and xAOD::TruthParticle do not match");
67 return std::make_pair(partType, partOrig);
72 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, top::TopObjectSelection, 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, top::TopObjectSelection, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ renounce()
◆ renounceArray()
◆ setProperty1()
void D3PD::D3PDMCTruthClassifier::setProperty1 |
( |
const std::string & |
pname, |
|
|
const std::string & |
value |
|
) |
| |
|
private |
Helper to set the value of a Gaudi property.
- Parameters
-
pname | The name of the property. param value The new value of the property. |
Definition at line 228 of file D3PDMCTruthClassifier.cxx.
◆ 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 |
|
privateinherited |
◆ m_deltaRMatchCut
float MCTruthClassifier::m_deltaRMatchCut |
|
privateinherited |
◆ m_detStore
◆ m_evtStore
◆ m_FwdElectronTruthExtrEtaCut
float MCTruthClassifier::m_FwdElectronTruthExtrEtaCut |
|
privateinherited |
◆ m_FwdElectronTruthExtrEtaWindowCut
float MCTruthClassifier::m_FwdElectronTruthExtrEtaWindowCut |
|
privateinherited |
◆ m_FwdElectronUseG4Sel
bool MCTruthClassifier::m_FwdElectronUseG4Sel |
|
privateinherited |
◆ m_fwrdEledRtoTrCut
float MCTruthClassifier::m_fwrdEledRtoTrCut |
|
privateinherited |
◆ m_inclG4part
bool MCTruthClassifier::m_inclG4part |
|
privateinherited |
◆ m_jetPartDRMatch
float MCTruthClassifier::m_jetPartDRMatch |
|
privateinherited |
◆ m_NumOfSiHitsCut
int MCTruthClassifier::m_NumOfSiHitsCut |
|
privateinherited |
◆ m_partExtrConeEta
float MCTruthClassifier::m_partExtrConeEta |
|
privateinherited |
◆ m_partExtrConePhi
float MCTruthClassifier::m_partExtrConePhi |
|
privateinherited |
◆ m_phtClasConeEta
float MCTruthClassifier::m_phtClasConeEta |
|
privateinherited |
◆ m_phtClasConePhi
float MCTruthClassifier::m_phtClasConePhi |
|
privateinherited |
◆ m_phtdRtoTrCut
float MCTruthClassifier::m_phtdRtoTrCut |
|
privateinherited |
◆ m_pTChargePartCut
float MCTruthClassifier::m_pTChargePartCut |
|
privateinherited |
◆ m_pTNeutralPartCut
float MCTruthClassifier::m_pTNeutralPartCut |
|
privateinherited |
◆ m_ROICone
bool MCTruthClassifier::m_ROICone |
|
privateinherited |
◆ m_sg
◆ m_truthInConeTool
◆ m_truthLinkVecReadHandleKey
◆ m_truthParticleContainerKey
◆ m_useCaching
bool MCTruthClassifier::m_useCaching |
|
privateinherited |
◆ 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)
void getProperty1(const std::string &pname, std::string &value)
Helper to retrieve the value of a Gaudi property.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
def pout(output, newline=True)
#define REPORT_ERROR(SC)
Report an error.
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.
Helper class to provide type-safe access to aux data.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
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
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
void findAllJetMothers(T thePart, std::set< T > &allJetMothers)
Function to find all ancestors of the particle.
const ID_type & dataID() const
Get the key that we reference, as a string.
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
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::Electron *el)
Run the classifier for an electron.
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.
int pdg_id() const
PDG ID code.
T find_matching(C TruthTES, T bcin)
Function to find a particle in container.
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)
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.
DataLink< Rec::TrackParticleContainer > trackParticleContainerLink() const
float m_FwdElectronTruthExtrEtaCut
bool isHardScatVrtx(T pVert)
Function to classify the vertex as hard scattering vertex.
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.
constexpr int SPECIALSTATUS
Constant that the meaning of which is currently lost, to be recovered...
void setProperty1(const std::string &pname, const std::string &value)
Helper to set the value of a Gaudi property.
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
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthLinkVecReadHandleKey
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
Type for the associated track particles.
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)
bool isValid() const
Test to see if the link is dereferencable.
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
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.
ServiceHandle< StoreGateSvc > m_sg
The StoreGate service.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
virtual const xAOD::TruthParticle * getGenPart(const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override
Class describing a truth vertex in the MC record.
ParticleOutCome defOutComeOfElectron(T thePart)
bool get_tptruth_name(const std::string &tp_name, std::string &tptruth_name)
Try to find a TrackParticleTruthCollection pointing at TP_NAME.
bool isDefault() const
Test to see if we're in the default state.
bool isHadron(const T &p)
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
const xAOD::TruthParticle * egammaClusMatch(const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const
MCTruthClassifier(const std::string &type)
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)
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 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)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
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
void findParticleDaughters(T thePart, std::set< T > &daughters)
Function to get the particle stable MC daughters.
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
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 .)
MCTruthPartClassifier::ParticleOrigin defOrigOfPhoton(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
double detPhi(double x, double y) const
T getMother(T thePart)
Function to get a mother of particle. MCTruthClassifier legacy.