24std::pair<ParticleType, ParticleOrigin>
27 const EventContext& ctx = info ? info->eventContext : Gaudi::Hive::currentContext();
29 if (!truthParticleLinkVecReadHandle.
isValid()) {
30 ATH_MSG_WARNING(
" Invalid ReadHandle for xAODTruthParticleLinkVector with key: " << truthParticleLinkVecReadHandle.
key());
41std::pair<ParticleType, ParticleOrigin>
51 return std::make_pair(partType, partOrig);
53 info.genPart = thePart;
57 if (!truthParticleContainerReadHandle.
isValid()) {
58 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.
key());
59 return std::make_pair(partType, partOrig);
62 ATH_MSG_DEBUG(
"xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.
key() <<
" has valid ReadHandle ");
102 const int parentPDG = parent?parent->pdg_id():0;
103 info.setMotherProperties(parent);
120 if (!partProdVtx &&
MC::isTau(thePart)) {
122 partOrig =
defOrigOfTau(*truthParticleContainerReadHandle, thePart, parentPDG, info);
134 return std::make_pair(
Neutrino, partOrig);
140 if (isPartHadr)
return std::make_pair(
Hadron, partOrig);
173 partOrig =
defOrigOfTau(*truthParticleContainerReadHandle, thePart, parentPDG, info);
186 return std::make_pair(partType, partOrig);
193 const int parentPDG = parent->pdgId();
195 if (!aChild)
continue;
224 parent_prdVtx = parent->hasProdVtx() ? parent->prodVtx() :
nullptr;
225 parent_endVtx = parent->decayVtx();
229 return (child_endVtx == parent_prdVtx && child_prdVtx == parent_endVtx);
237 const xAOD::TruthVertex* parentOrigVtx = parent->hasProdVtx() ? parent->prodVtx() :
nullptr;
268 info.setMotherProperties(ancestor);
284 if (ancestor == ancestorParent) {
break; }
286 ancestorParent = ancestor;
291 if (ancestorParent) {
292 pPDG = ancestorParent->
pdgId();
294 ancestor = ancestorParent;
303 ancestor = ancestorParent;
307 info.setMotherProperties(ancestor);
308 const int ancestorPDG = ancestor->
pdgId();
315 auto DP = DecayProducts(partProdVtx);
320 const int NumOfgluon = DP.apd(
MC::GLUON);
321 const int NumOfElNeut = DP.apd(
MC::NU_E);
323 const int NumOfMuPl = DP.pd(-
MC::MUON);
324 const int NumOfMuMin = DP.pd(
MC::MUON);
325 const int NumOfMuNeut = DP.apd(
MC::NU_MU);
326 const int NumOfTau = DP.apd(
MC::TAU);
333 if (!aChild)
continue;
334 const int childPDG = aChild->pdgId();
336 if (possibleNuclearFragment &&
345 for (
const auto& photonParent: ancestorProdVtx->
particles_in()) {
346 if (!photonParent)
continue;
347 info.photonMother = photonParent;
351 if ((
MC::isPhoton(ancestorPDG) && numberOfChildren == 2 && NumOfEl == 1 && NumOfPos == 1) || (
MC::isPhoton(ancestorPDG) && numberOfChildren == 1 && (NumOfEl == 1 || NumOfPos == 1)))
return PhotonConv;
356 if (numOfParents == 1 && std::abs(ancestorPDG) ==
MC::PIPLUS && numberOfChildren > 2 && NumOfNucFr != 0)
return ElMagProc;
365 if (ancestorPDG ==
MC::ELECTRON && numberOfChildren == 2 && NumOfEl == 2 && NumOfPos == 0)
return ElMagProc;
368 if (ancestorPDG ==
MC::POSITRON && numberOfChildren == 2 && NumOfEl == 0 && NumOfPos == 2)
return ElMagProc;
375 if (numberOfChildren == 2 && (NumOfEl == 1 || NumOfPos == 1) && !
MC::isElectron(ancestorPDG) && samePart)
return ElMagProc;
377 if ((ancestorPDG ==
MC::PI0 && numberOfChildren == 3 && NumOfPhot == 1 && NumOfEl == 1 && NumOfPos == 1) ||
378 (ancestorPDG ==
MC::PI0 && numberOfChildren == 4 && NumOfPhot == 0 && NumOfEl == 2 && NumOfPos == 2))
382 if (
MC::isSMQuark(ancestorPDG) && numOfParents == 1 && numberOfChildren == 3 && NumOfquark == 1 && NumOfElNeut == 1)
return QuarkWeakDec;
395 }
while (
MC::isW(ptrPart) && prodVert);
414 bool isZboson =
false;
415 bool isWboson =
false;
416 bool skipnext =
false;
418 for (
unsigned int ipOut = 0; ipOut + 1 < partProdVtx->
nOutgoingParticles(); ++ipOut) {
420 if (!aChild)
continue;
422 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partProdVtx->
nOutgoingParticles(); ipOut1++) {
424 if (theNextChild)
break;
426 if (!theNextChild)
continue;
434 if (thePartToCheck == aChild || thePartToCheck == theNextChild) {
441 if (thePartToCheck == aChild || thePartToCheck == theNextChild) {
448 if (isWboson)
return WBoson;
449 if (isZboson)
return ZBoson;
451 if (numOfParents == 2) {
453 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && NumOfEl == 1 && NumOfPos == 1)
return ZBoson;
456 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfElNeut == 1)
return WBoson;
461 if ((numberOfChildren - NumOfquark - NumOfgluon) == 4 &&
462 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
466 if ((numberOfChildren - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
467 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
472 if (partProdVtx == ancestorProdVtx) {
473 int NumOfEleLoop = 0;
474 int NumOfLepLoop = 0;
475 int NumOfEleNeuLoop = 0;
478 for (
const auto *
const pin: partProdVtx->
particles_in()) {
482 if (std::abs(pout->pdgId()) ==
MC::NU_E) NumOfEleNeuLoop++;
487 if (NumOfEleLoop == 2 && NumOfEleNeuLoop == 0)
return ZBoson;
488 if (NumOfEleLoop == 1 && NumOfEleNeuLoop == 1)
return WBoson;
489 if ((NumOfEleLoop == 4 && NumOfEleNeuLoop == 0) || (NumOfEleLoop == 3 && NumOfEleNeuLoop == 1) ||
490 (NumOfEleLoop == 2 && NumOfEleNeuLoop == 2))
return DiBoson;
491 if (NumOfLepLoop == 4)
return DiBoson;
544 info.setMotherProperties(ancestor);
557 if (ancestor == ancestorParent) {
break; }
559 ancestorParent = ancestor;
564 if (ancestorParent) {
565 pPDG = ancestorParent->
pdgId();
568 ancestor = ancestorParent;
577 ancestor = ancestorParent;
581 info.setMotherProperties(ancestor);
582 const int ancestorPDG = ancestor->
pdgId();
589 auto DP = DecayProducts(partProdVtx);
593 const int NumOfElNeut = DP.apd(
MC::NU_E);
594 const int NumOfMuNeut = DP.apd(
MC::NU_MU);
597 const int NumOfgluon = DP.apd(
MC::GLUON);
598 const int NumOfMuPl = DP.pd(-
MC::MUON);
599 const int NumOfMuMin = DP.pd(
MC::MUON);
600 const int NumOfTau = DP.apd(
MC::TAU);
604 if (std::abs(ancestorPDG) ==
MC::PIPLUS && numberOfChildren == 2 && NumOfMuNeut == 1)
return PionDecay;
605 if (std::abs(ancestorPDG) ==
MC::KPLUS && numberOfChildren == 2 && NumOfMuNeut == 1)
return KaonDecay;
614 if (
MC::isSMQuark(ancestorPDG) && numOfParents == 1 && numberOfChildren == 3 && NumOfquark == 1 && NumOfMuNeut == 1)
return QuarkWeakDec;
622 }
while (
MC::isW(itrP) && prodVert);
633 if (
MC::isPhoton(ancestorPDG) && numberOfChildren == 2 && NumOfMuMin == 1 && NumOfMuPl == 1)
return PhotonConv;
638 bool isZboson =
false;
639 bool isWboson =
false;
640 bool skipnext =
false;
641 for (
unsigned int ipOut = 0; ipOut + 1 < partProdVtx->
nOutgoingParticles(); ipOut++) {
647 if (!aChild)
continue;
649 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partProdVtx->
nOutgoingParticles(); ipOut1++) {
651 if (theNextChild)
break;
653 if (!theNextChild)
continue;
656 if (thePriPart == aChild || thePriPart == theNextChild) {
663 if (thePriPart == aChild || thePriPart == theNextChild) {
670 if (isWboson)
return WBoson;
671 if (isZboson)
return ZBoson;
673 if (numOfParents == 2 ) {
675 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && NumOfMuPl == 1 && NumOfMuMin == 1)
return ZBoson;
679 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && (NumOfMuPl == 1 || NumOfMuMin == 1) && NumOfMuNeut == 1)
return WBoson;
684 if ((numberOfChildren - NumOfquark - NumOfgluon) == 4 &&
685 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
689 if ((numberOfChildren - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
690 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
695 if (partProdVtx == ancestorProdVtx) {
697 int NumOfMuNeuLoop = 0;
698 int NumOfLepLoop = 0;
705 if (std::abs(pout->pdg_id()) ==
MC::NU_MU) NumOfMuNeuLoop++;
711 if (NumOfMuLoop == 2 && NumOfMuNeuLoop == 0)
return ZBoson;
712 if (NumOfMuLoop == 1 && NumOfMuNeuLoop == 1)
return WBoson;
713 if ((NumOfMuLoop == 4 && NumOfMuNeuLoop == 0) || (NumOfMuLoop == 3 && NumOfMuNeuLoop == 1) ||
714 (NumOfMuLoop == 2 && NumOfMuNeuLoop == 2))
return DiBoson;
715 if (NumOfLepLoop == 4)
return DiBoson;
762 info.setMotherProperties(ancestor);
772 ancestor = ancestorParent;
776 const int ancestorPDG = ancestor->
pdgId();
777 info.setMotherProperties(ancestor);
784 auto DP = DecayProducts(partProdVtx);
785 const int numberOfChildren = DP.size();
789 const int NumOfElNeut = DP.apd(
MC::NU_E);
790 const int NumOfMuNeut = DP.apd(
MC::NU_MU);
793 const int NumOfgluon = DP.apd(
MC::GLUON);
794 const int NumOfMuPl = DP.pd(-
MC::MUON);
795 const int NumOfMuMin = DP.pd(
MC::MUON);
796 const int NumOfTau = DP.apd(
MC::TAU);
807 }
while (
MC::isW(itrP) && prodVert);
819 bool isZboson =
false;
820 bool isWboson =
false;
821 bool skipnext =
false;
822 for (
unsigned int ipOut = 0; ipOut + 1 < partProdVtx->
nOutgoingParticles(); ipOut++) {
828 if (!aChild)
continue;
830 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partProdVtx->
nOutgoingParticles(); ipOut1++) {
832 if (theNextChild)
break;
839 if (thePriPart == aChild || thePriPart == theNextChild) {
846 if (thePriPart == aChild || thePriPart == theNextChild) {
853 if (isWboson)
return WBoson;
854 if (isZboson)
return ZBoson;
856 if (numOfParents == 2 ) {
863 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && NumOfTau == 1 && NumOfTauNeut == 1)
return WBoson;
866 if ((numberOfChildren - NumOfquark - NumOfgluon) == 4 &&
867 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
871 if ((numberOfChildren - NumOfquark - NumOfgluon - NumOfPhot) == 6 &&
872 (NumOfEl + NumOfPos + NumOfMuPl + NumOfMuMin + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
877 if (partProdVtx == ancestorProdVtx) {
878 int NumOfTauLoop = 0;
879 int NumOfTauNeuLoop = 0;
880 int NumOfLepLoop = 0;
881 for (
const auto *
const pout: partProdVtx->
particles_out()) {
883 for (
const auto *
const pin: partProdVtx->
particles_in()) {
887 if (std::abs(pout->pdgId()) ==
MC::NU_TAU) NumOfTauNeuLoop++;
892 if (NumOfTauLoop == 2 && NumOfTauNeuLoop == 0)
return ZBoson;
893 if (NumOfTauLoop == 1 && NumOfTauNeuLoop == 1)
return WBoson;
894 if ((NumOfTauLoop == 4 && NumOfTauNeuLoop == 0) || (NumOfTauLoop == 3 && NumOfTauNeuLoop == 1) || (NumOfTauLoop == 2 && NumOfTauNeuLoop == 2))
return DiBoson;
895 if (NumOfLepLoop == 4)
return DiBoson;
922 info.resetMotherProperties();
923 info.photonMother =
nullptr;
941 info.setMotherProperties(ancestor);
944 int ancestorPDG = ancestor->
pdgId();
954 auto DP = DecayProducts(partProdVtx);
957 const int NumOfMu = DP.apd(
MC::MUON);
958 const int NumOfTau = DP.apd(
MC::TAU);
960 const int NumOfLep = NumOfEl + NumOfPos + NumOfMu + NumOfTau;
971 childPDG = pout->pdg_id();
972 if (possibleNuclearFragment &&
984 if (childPDG == ancestorPDG) {
990 bool foundISR =
false;
991 bool foundFSR =
false;
993 if (numOfParents == 1 && numberOfChildren == 2 &&
MC::isElectron(ancestorPDG) && NumOfPht == 2)
return ElMagProc;
1007 PartPDG = std::abs(pin->pdgId());
1008 prodVert = pin->prodVtx();
1016 }
while (prodVert && std::abs(ancestorPDG) == PartPDG);
1026 if ((numOfParents == 1 && (
MC::isPhoton(ancestorPDG) ||
MC::isElectron(ancestorPDG)) && numberOfChildren > 2 && NumOfNucFr != 0) ||
1027 (numOfParents == 1 && std::abs(ancestorPDG) ==
MC::PIPLUS && numberOfChildren > 10 && NumOfNucFr != 0) ||
1032 if (
MC::isMuon(ancestorPDG) && NumOfMu == 0)
return Mu;
1042 if (!pout)
continue;
1043 if (ancestorPDG != pout->pdgId())
continue;
1045 if (!Vrtx)
continue;
1058 if (numOfParents == 2 && ((
MC::isElectron(ancestorPDG) && NumOfEl == 1 && NumOfPos == 1) || (
MC::isMuon(ancestorPDG) && NumOfMu == 2) || (
MC::isTau(ancestorPDG) && NumOfTau == 2))) {
1062 if (numOfParents == 2 && NumOfLep == 1 && NumOfNeut == 1 && (
MC::isElectron(ancestorPDG) || std::abs(ancestorPDG) ==
MC::NU_E))
return FSRPhot;
1065 if (
MC::isElectron(ancestorPDG) && numOfParents == 1 && numberOfChildren == 2 && (NumOfEl == 1 || NumOfPos == 1) && NumOfPht == 1 &&
1070 if (
MC::isZ(ancestorPDG) && ((NumOfEl + NumOfPos == 2 || NumOfEl + NumOfPos == 4) || (NumOfMu == 2 || NumOfMu == 4) || (NumOfTau == 2 || NumOfTau == 4)) && NumOfPht > 0)
return FSRPhot;
1074 if (numOfParents == 2 && NumOfLQ == 1)
return FSRPhot;
1081 if (NumOfLep == 1 && NumOfNeut == 1 && numberOfChildren == NumOfLep + NumOfNeut + NumOfPht)
return FSRPhot;
1089 }
while (
MC::isW(itrP) && prodVert);
1104 bool isZboson =
false;
1105 bool isWboson =
false;
1106 bool skipnext =
false;
1107 for (
unsigned int ipOut = 0; ipOut + 1 < partProdVtx->
nOutgoingParticles(); ipOut++) {
1113 if (!aChild)
continue;
1115 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partProdVtx->
nOutgoingParticles(); ipOut1++) {
1117 if (theNextChild)
break;
1119 if (!theNextChild)
continue;
1122 if (thePriPart == aChild || thePriPart == theNextChild) {
1129 if (thePriPart == aChild || thePriPart == theNextChild) {
1136 if (isWboson)
return WBoson;
1137 if (isZboson)
return ZBoson;
1141 if (numOfParents == 4 && (numberOfChildren - NumOfPht) == 4 && (NumOfLep + NumOfNeut == 4)) {
1148 if (partProdVtx == ancestorProdVtx) {
1149 for (
const auto *
const pout: partProdVtx->
particles_out()) {
1150 if (!pout)
continue;
1151 for (
const auto *
const pin: partProdVtx->
particles_in()) {
1184 const int nuFlav = std::abs(thePart->
pdgId());
1199 info.setMotherProperties(ancestor);
1216 ancestorParent = ancestor;
1220 if (ancestorParent) {
1221 pPDG = ancestorParent->
pdgId();
1224 if (ancestor == ancestorParent) {
break; }
1228 ancestor = ancestorParent;
1229 info.setMotherProperties(ancestor);
1238 ancestor = ancestorParent;
1239 info.setMotherProperties(ancestor);
1245 info.setMotherProperties(ancestor);
1246 const int ancestorPDG = ancestor->
pdgId();
1247 partProdVtx = ancestor->
decayVtx();
1253 auto DP = DecayProducts(partProdVtx);
1256 const int NumOfgluon = DP.apd(
MC::GLUON);
1258 const int NumOfElNeut = DP.apd(
MC::NU_E);
1259 const int NumOfMuNeut = DP.apd(
MC::NU_MU);
1262 const int NumOfMu = DP.apd(
MC::MUON);
1263 const int NumOfTau = DP.apd(
MC::TAU);
1267 if (!aChild)
continue;
1276 if (
MC::isQuark(ancestorPDG) && numOfParents == 1 && numberOfChildren == 3 && NumOfquark == 1 && (NumOfEl == 1 || NumOfMu == 1 || NumOfTau == 1))
return QuarkWeakDec;
1285 }
while (
MC::isW(ptrPart) && prodVert);
1306 bool isZboson =
false;
1307 bool isWboson =
false;
1308 bool skipnext =
false;
1310 for (
unsigned int ipOut = 0; ipOut + 1 < partProdVtx->
nOutgoingParticles(); ++ipOut) {
1312 if (!aChild)
continue;
1314 for (
unsigned int ipOut1 = ipOut + 1; ipOut1 < partProdVtx->
nOutgoingParticles(); ipOut1++) {
1316 if (theNextChild)
break;
1318 if (!theNextChild)
continue;
1325 const int apdgID1 = std::abs(aChild->
pdgId());
1326 const int apdgID2 = std::abs(theNextChild->
pdgId());
1329 if (thePartToCheck == aChild || thePartToCheck == theNextChild) {
1342 if (thePartToCheck == aChild || thePartToCheck == theNextChild) {
1349 if (isWboson)
return WBoson;
1350 if (isZboson)
return ZBoson;
1353 if (numOfParents == 2) {
1355 if ( (numberOfChildren - NumOfquark - NumOfgluon) == 2 && (NumOfElNeut == 2 || NumOfMuNeut == 2 || NumOfTauNeut == 2))
return ZBoson;
1358 if ((numberOfChildren - NumOfquark - NumOfgluon) == 2 && ((NumOfEl == 1 && NumOfElNeut == 1) || (NumOfMu == 1 && NumOfMuNeut == 1) || (NumOfTau == 1 && NumOfTauNeut == 1)))
return WBoson;
1363 if ( (numberOfChildren - NumOfquark - NumOfgluon) == 4 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 4) &&
1367 if ((numberOfChildren - NumOfquark - NumOfgluon - NumOfPhot) == 6 && (NumOfEl + NumOfMu + NumOfTau + NumOfElNeut + NumOfMuNeut + NumOfTauNeut == 6) &&
1372 if (partProdVtx == ancestorProdVtx) {
1373 int NumOfLepLoop = 0;
1374 int NumOfNeuLoop = 0;
1375 for (
const auto *
const pout: partProdVtx->
particles_out()) {
1376 if (!pout)
continue;
1377 for (
const auto *
const pin: partProdVtx->
particles_in()) {
1380 const int apdgid = std::abs(pout->pdgId());
1383 else { NumOfLepLoop++; }
1388 if (NumOfNeuLoop == 2 && NumOfLepLoop == 0)
return ZBoson;
1389 if (NumOfNeuLoop == 1 && NumOfLepLoop == 1)
return WBoson;
1390 if (NumOfNeuLoop + NumOfLepLoop == 4)
return DiBoson;
#define ATH_MSG_WARNING(x)
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
a link optimized in size for a GenParticle in a McEventCollection
bool TruthLoopDetectionMethod3(const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleHepMCTruthClassifier(const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override final
MCTruthPartClassifier::ParticleOrigin defOrigOfElectron(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthLinkVecReadHandleKey
bool TruthLoopDetectionMethod1(const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const
MCTruthPartClassifier::ParticleOrigin defOrigOfNeutrino(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
MCTruthPartClassifier::ParticleOrigin defOrigOfMuon(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
MCTruthPartClassifier::ParticleOrigin defOrigOfPhoton(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final
bool TruthLoopDetectionMethod2(const xAOD::TruthParticle *child, const xAOD::TruthParticle *parent) const
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
MCTruthPartClassifier::ParticleOrigin defOrigOfTau(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info &info) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
int status() const
Status code.
int pdgId() const
PDG ID code.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
int pdg_id() const
PDG ID code.
bool hasProdVtx() const
Check for a production vertex on this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
size_t nOutgoingParticles() const
Get the number of outgoing particles.
size_t nIncomingParticles() const
Get the number of incoming particles.
std::vector< const TruthParticle * > particles_in() const
Get the incoming particles.
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_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same 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...
bool is_same_vertex(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same vertex.
ParticleOutCome defOutComeOfElectron(T thePart)
ParticleOutCome defOutComeOfPhoton(T thePart)
ParticleType defTypeOfPhoton(ParticleOrigin PhotOrig)
ParticleOrigin convHadronTypeToOrig(ParticleType pType, int motherPDG)
ParticleOutCome defOutComeOfTau(T thePart)
ParticleType defTypeOfTau(ParticleOrigin TauOrig)
ParticleType defTypeOfMuon(ParticleOrigin MuOrig, bool isPrompt)
ParticleType defTypeOfHadron(int pdg)
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
ParticleOutCome defOutComeOfMuon(T thePart)
ParticleType defTypeOfElectron(ParticleOrigin EleOrig, bool isPrompt)
bool isConditionA(const T &p)
To be understood.
T findMatching(C TruthContainer, T p)
Function to find a particle in container.
bool isNeutrinoRH(const T &p)
PDG Rule 12: APID: Helper function for right-handed neutrino states These are generator defined PDG I...
bool isHardScatteringVertex(T pVert)
Function to classify the vertex as hard scattering vertex.
bool isSMLepton(const T &p)
APID: the fourth generation leptons are not standard model leptons.
bool isPhoton(const T &p)
static const int RH_NU_TAU
bool isSMNeutrino(const T &p)
static const int WBOSON_LRSM
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
bool isElectron(const T &p)
static const int ELECTRON
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isSMQuark(const T &p)
static const int POSITRON
bool isMSSMHiggs(const T &p)
APID: Additional Higgs bosons for MSSM (Used in MCTruthClassifier)
bool isDecayed(const T &p)
Identify if the particle decayed.
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to do ...
T findMother(T thePart)
Function to get a mother of particle. MCTruthClassifier legacy.
bool isHiggs(const T &p)
APID: HIGGS boson is only one particle.
static const int LEPTOQUARK
bool isBeam(const T &p)
Identify if the particle is beam particle.
bool isHadron(const T &p)
bool isNucleus(const T &p)
PDG rule 16 Nuclear codes are given as 10-digit numbers ±10LZZZAAAI.
static const int RH_NU_MU
bool isHeavyBoson(const T &p)
APID: Additional "Heavy"/"prime" versions of W and Z bosons (Used in MCTruthClassifier)
bool isLeptoQuark(const T &p)
PDG rule 11c: “One-of-a-kind” exotic particles are assigned numbers in the range 41–80.
static const int RH_NU_E
PDG Rule 12: Generator defined PDG ID values for right handed neutrinos and corresponding W+ boson fr...
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
bool isBSM(const T &p)
APID: graviton and all Higgs extensions are BSM.
TruthVertex_v1 TruthVertex
Typedef to implementation.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.