ATLAS Offline Software
Loading...
Searching...
No Matches
TruthClassifiers.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRUTHUTILS_TRUTHCLASSIFIERS_H
5#define TRUTHUTILS_TRUTHCLASSIFIERS_H
8#include <utility>
9#include <bitset>
10#include <vector>
11#include <string>
13namespace MCTruthPartClassifier {
16{
17 if (pType == CCbarMesonPart && abs(motherPDG) == MC::JPSI) return JPsi;
18 if (pType == BBbarMesonPart) return BBbarMeson;
19 if (pType == BottomMesonPart) return BottomMeson;
20 if (pType == BottomBaryonPart) return BottomBaryon;
21 if (pType == CCbarMesonPart) return CCbarMeson;
22 if (pType == CharmedMesonPart) return CharmedMeson;
23 if (pType == CharmedBaryonPart) return CharmedBaryon;
24 if (pType == StrangeBaryonPart) return StrangeBaryon;
25 if (pType == StrangeMesonPart) return StrangeMeson;
26 if (pType == LightBaryonPart) return LightBaryon;
27 if (pType == LightMesonPart) return LightMeson;
28 return NonDefined;
29}
30
33 if (abs(pdg) == MC::JPSI) return JPsi;
34 if (MC::isBBbarMeson(pdg)) return BBbarMeson;
35 if (MC::isCCbarMeson(pdg)) return CCbarMeson;
36 if (MC::isBottomMeson(pdg)) return BottomMeson;
37 if (MC::isCharmMeson(pdg)) return CharmedMeson;
38 if (MC::isBottomBaryon(pdg)) return BottomBaryon;
39 if (MC::isCharmBaryon(pdg)) return CharmedBaryon;
40 if (MC::isStrangeBaryon(pdg)) return StrangeBaryon;
41 if (MC::isLightBaryon(pdg)) return LightBaryon;
42 if (MC::isStrangeMeson(pdg)) return StrangeMeson;
43 if (MC::isLightMeson(pdg)) return LightMeson;
44 return NonDefined;
45}
46
49 if (MC::isBBbarMeson(pdg)) return BBbarMesonPart;
50 if (MC::isCCbarMeson(pdg)) return CCbarMesonPart;
51 if (MC::isBottomMeson(pdg)) return BottomMesonPart;
52 if (MC::isCharmMeson(pdg)) return CharmedMesonPart;
53 if (MC::isBottomBaryon(pdg)) return BottomBaryonPart;
54 if (MC::isCharmBaryon(pdg)) return CharmedBaryonPart;
56 if (MC::isLightBaryon(pdg)) return LightBaryonPart;
57 if (MC::isStrangeMeson(pdg)) return StrangeMesonPart;
58 if (MC::isLightMeson(pdg)) return LightMesonPart;
59 return Unknown;
60}
61
62
65
66 if (EleOrig == NonDefined)
67 return UnknownElectron;
68
69 if (EleOrig == WBoson || EleOrig == ZBoson || EleOrig == top || EleOrig == SingleElec || EleOrig == Higgs ||
70 EleOrig == HiggsMSSM || EleOrig == HeavyBoson || EleOrig == WBosonLRSM || EleOrig == NuREle || EleOrig == NuRMu ||
71 EleOrig == NuRTau || EleOrig == LQ || EleOrig == SUSY || EleOrig == DiBoson || EleOrig == ZorHeavyBoson ||
72 EleOrig == OtherBSM || EleOrig == MultiBoson || isPrompt) {
73 return IsoElectron;
74 }
75 if (EleOrig == JPsi || EleOrig == BottomMeson || EleOrig == CharmedMeson || EleOrig == BottomBaryon ||
76 EleOrig == CharmedBaryon || EleOrig == TauLep || EleOrig == Mu || EleOrig == QuarkWeakDec) {
77 return NonIsoElectron;
78 }
79 return BkgElectron;
80}
81
82
85
86 if (MuOrig == NonDefined) return UnknownMuon;
87
88 if (MuOrig == WBoson || MuOrig == ZBoson || MuOrig == top || MuOrig == SingleMuon || MuOrig == Higgs ||
89 MuOrig == HiggsMSSM || MuOrig == HeavyBoson || MuOrig == WBosonLRSM || MuOrig == NuREle || MuOrig == NuRMu ||
90 MuOrig == NuRTau || MuOrig == LQ || MuOrig == SUSY || MuOrig == DiBoson || MuOrig == ZorHeavyBoson ||
91 MuOrig == OtherBSM || MuOrig == MultiBoson || isPrompt) {
92 return IsoMuon;
93 }
94 if (MuOrig == JPsi || MuOrig == BottomMeson || MuOrig == CharmedMeson || MuOrig == BottomBaryon ||
95 MuOrig == CharmedBaryon || MuOrig == TauLep || MuOrig == QuarkWeakDec) {
96 return NonIsoMuon;
97 }
98 // if (MuOrig == Pion || MuOrig == Kaon ) return DecayMuon;
99 return BkgMuon;
100}
101
104 if (TauOrig == NonDefined) return UnknownTau;
105
106 if (TauOrig == WBoson || TauOrig == ZBoson || TauOrig == top || TauOrig == SingleTau || TauOrig == Higgs ||
107 TauOrig == HiggsMSSM || TauOrig == HeavyBoson || TauOrig == WBosonLRSM || TauOrig == NuREle || TauOrig == NuRMu ||
108 TauOrig == NuRTau || TauOrig == SUSY || TauOrig == DiBoson || TauOrig == ZorHeavyBoson || TauOrig == OtherBSM ||
109 TauOrig == MultiBoson)
110 return IsoTau;
111
112 if (TauOrig == JPsi || TauOrig == BottomMeson || TauOrig == CharmedMeson || TauOrig == BottomBaryon ||
113 TauOrig == CharmedBaryon || TauOrig == QuarkWeakDec)
114 return NonIsoTau;
115
116 return BkgTau;
117}
118
119
122{
123 if (PhotOrig == NonDefined) return UnknownPhoton;
124
125 if (PhotOrig == WBoson || PhotOrig == ZBoson || PhotOrig == SinglePhot || PhotOrig == Higgs ||
126 PhotOrig == HiggsMSSM || PhotOrig == HeavyBoson || PhotOrig == PromptPhot || PhotOrig == SUSY ||
127 PhotOrig == OtherBSM)
128 return IsoPhoton;
129
130 if (PhotOrig == ISRPhot || PhotOrig == FSRPhot || PhotOrig == TauLep || PhotOrig == Mu || PhotOrig == NuREle ||
131 PhotOrig == NuRMu || PhotOrig == NuRTau)
132 return NonIsoPhoton;
133
134 return BkgPhoton;
135}
136
138template <class T> ParticleOrigin defJetOrig(const T& allJetMothers) {
139 ParticleOrigin partOrig = NonDefined;
140 for (const auto& it: allJetMothers) {
141 int pdg = abs(it->pdg_id());
142 if (MC::isTop(pdg)) partOrig = top;
143 if (MC::isZ(pdg)) partOrig = ZBoson;
144 if (MC::isW(pdg) && !(partOrig == top)) partOrig = WBoson;
145 if ((MC::isQuark(pdg) || MC::isGluon(pdg)) && partOrig != top && partOrig != ZBoson && partOrig != WBoson) partOrig = QCD;
146 if (MC::isHiggs(pdg)) return Higgs;
147 if (pdg == 35 || pdg == 36 || pdg == 37) return HiggsMSSM;
148 if (pdg == 32 || pdg == 33 || pdg == 34) return HeavyBoson;
149 if (pdg == 42) return LQ;
150 if (MC::isSUSY(pdg)) return SUSY;
151 if (MC::isBSM(pdg)) return OtherBSM;
152 }
153 return partOrig;
154}
155
178
181template <class T> std::tuple<unsigned int, T> defOrigOfParticle(T thePart) {
182
183 T parent_hadron_ptr = nullptr;
184
185 bool uncat = 0, fromHad = 0, fromTau = 0;
186 bool isPhysical = MC::isPhysical(thePart);
187 bool isGeant = HepMC::is_simulation_particle(thePart);
188 bool isBSM = MC::isBSM(thePart);
189 bool fromBSM = isBSM; // just to initialise
190
191 auto prodVtx = thePart->production_vertex();
192 if (isPhysical && prodVtx && !isGeant) {
193 fromHad = MC::isFromHadron(thePart, parent_hadron_ptr, fromTau, fromBSM);
194 }
195 else uncat = 1;
196
197 std::bitset<MCTC_bits::totalBits> classifier;
198 classifier[MCTC_bits::stable] = isPhysical;
199 classifier[MCTC_bits::isgeant] = isGeant;
200 classifier[MCTC_bits::isbsm] = isBSM;
201 classifier[MCTC_bits::uncat] = uncat;
202 classifier[MCTC_bits::frombsm] = fromBSM;
203 classifier[MCTC_bits::hadron] = fromHad;
204 classifier[MCTC_bits::Tau] = fromTau;
205 classifier[MCTC_bits::HadTau] = fromHad && fromTau;
206 unsigned int outputvalue = static_cast<unsigned int>(classifier.to_ulong());
207
208 return std::make_tuple(outputvalue,parent_hadron_ptr);
209}
210
214inline int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays = true) {
215 std::bitset<MCTC_bits::totalBits> res(classify);
216 if (res.test(MCTC_bits::uncat)) return -1;
217 bool fromPromptTau = res.test(MCTC_bits::Tau) && !res.test(MCTC_bits::HadTau);
218 if (fromPromptTau) return int(allow_prompt_tau_decays);
219 return !res.test(MCTC_bits::hadron);
220 }
221
224template <class T> ParticleOutCome defOutComeOfElectron(T thePart) {
225 ParticleOutCome PartOutCome = UnknownOutCome;
226 auto EndVert = MC::findSimulatedEndVertex(thePart);
227 if (EndVert == nullptr) return NonInteract;
228
229 int ElecOutNumOfNucFr(0);
230 int ElecOutNumOfElec(0);
231 int NumOfHadr(0);
232 auto outgoing = EndVert->particles_out();
233 int NumOfElecDaug = outgoing.size();
234 for (const auto& p: outgoing) {
235 if (!p) continue;
236 int EndDaugType = p->pdg_id();
237 if (MC::isElectron(EndDaugType)) ElecOutNumOfElec++;
238 if (MC::isHadron(p) && !MC::isBeam(p)) NumOfHadr++;
239 if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) ElecOutNumOfNucFr++;
240 }
241
242 if (ElecOutNumOfNucFr != 0 || NumOfHadr != 0) PartOutCome = NuclInteraction;
243 if (ElecOutNumOfElec == 1 && NumOfElecDaug == 1) PartOutCome = ElectrMagInter;
244
245 return PartOutCome;
246}
247
250template <class T> ParticleOutCome defOutComeOfMuon(T thePart) {
251 ParticleOutCome PartOutCome = UnknownOutCome;
252 auto EndVert = MC::findSimulatedEndVertex(thePart);
253 if (EndVert == nullptr) return NonInteract;
254 int MuOutNumOfNucFr(0);
255 int NumOfHadr(0);
256 int NumOfEleNeutr(0);
257 int NumOfMuonNeutr(0);
258 int NumOfElec(0);
259 auto outgoing = EndVert->particles_out();
260 int NumOfMuDaug = outgoing.size();
261 for (const auto& p: outgoing) {
262 if (!p) continue;
263 int EndDaugType = p->pdg_id();
264 if (MC::isElectron(EndDaugType)) NumOfElec++;
265 if (abs(EndDaugType) == 12) NumOfEleNeutr++;
266 if (abs(EndDaugType) == 14) NumOfMuonNeutr++;
267 if (MC::isHadron(p) && !MC::isBeam(p)) NumOfHadr++;
268 if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) MuOutNumOfNucFr++;
269 }
270
271 if (MuOutNumOfNucFr != 0 || NumOfHadr != 0) PartOutCome = NuclInteraction;
272 if (NumOfMuDaug == 3 && NumOfElec == 1 && NumOfEleNeutr == 1 && NumOfMuonNeutr == 1) PartOutCome = DecaytoElectron;
273
274 return PartOutCome;
275}
276
278template <class T> ParticleOutCome defOutComeOfTau(T thePart) {
279 ParticleOutCome PartOutCome = UnknownOutCome;
280 auto EndVert = MC::findSimulatedEndVertex(thePart);
281 if (EndVert == nullptr) return NonInteract;
282 int NumOfTauDaug = EndVert->nOutgoingParticles();
283 auto tauFinalStatePart = MC::findFinalStateParticles(EndVert);
284 auto PD = DecayProducts(tauFinalStatePart);
285 int NumOfElec = PD.apd(11);
286 int NumOfMuon = PD.apd(13);
287 int NumOfElecNeut = PD.apd(12);
288 int NumOfMuonNeut = PD.apd(14);
289 int NumOfPhot = PD.apd(22);
290 int NumOfPi = PD.apd(211);
291 int NumOfKaon = PD.apd(321);
292 int NumOfNucFr = PD.apd(0) + PD.apd(1000000000, std::numeric_limits<int>::max());
293
294 if (NumOfNucFr != 0) PartOutCome = NuclInteraction;
295 if ((NumOfTauDaug == 3 && NumOfElec == 1 && NumOfElecNeut == 1) || (NumOfTauDaug == (3 + NumOfPhot) && NumOfElecNeut == 1)) PartOutCome = DecaytoElectron;
296 if ((NumOfTauDaug == 3 && NumOfMuon == 1 && NumOfMuonNeut == 1) || (NumOfTauDaug == (3 + NumOfPhot) && NumOfMuonNeut == 1)) PartOutCome = DecaytoMuon;
297
298 if (NumOfPi == 1 || NumOfKaon == 1) PartOutCome = OneProng;
299 if (NumOfPi + NumOfKaon == 3) PartOutCome = ThreeProng;
300 if (NumOfPi + NumOfKaon == 5) PartOutCome = FiveProng;
301
302
303 return PartOutCome;
304}
305
308template <class T> ParticleOutCome defOutComeOfPhoton(T thePart) {
309 ParticleOutCome PartOutCome = UnknownOutCome;
310 auto EndVert = MC::findSimulatedEndVertex(thePart);
311 if (EndVert == nullptr) return UnConverted;
312
313 int PhtOutNumOfNucFr(0);
314 int PhtOutNumOfEl(0);
315 int PhtOutNumOfPos(0);
316 int PhtOutNumOfHadr(0);
317
318 auto outgoing = EndVert->particles_out();
319 int NumOfPhtDaug = outgoing.size();
320 for (const auto& p: outgoing) {
321 if (!p) continue;
322 int EndDaugType = p->pdg_id();
323 if (EndDaugType > 1000000000 || EndDaugType == 0 || abs(EndDaugType) == 2212 || abs(EndDaugType) == 2112) PhtOutNumOfNucFr++;
324 if (EndDaugType == 11) PhtOutNumOfEl++;
325 if (EndDaugType == -11) PhtOutNumOfPos++;
326 if (MC::isHadron(p) && !MC::isBeam(p)) PhtOutNumOfHadr++;
327 }
328
329 if (PhtOutNumOfEl == 1 && PhtOutNumOfPos == 1 && NumOfPhtDaug == 2) PartOutCome = Converted;
330 if ((NumOfPhtDaug > 1 && PhtOutNumOfNucFr != 0) || PhtOutNumOfHadr > 0) PartOutCome = NuclInteraction;
331
332 return PartOutCome;
333}
334
335}
336#endif
bool isBSM(const T &p)
APID: graviton and all Higgs extensions are BSM.
Definition AtlasPID.h:896
ATLAS-specific HepMC functions.
std::pair< std::vector< unsigned int >, bool > res
bool is_simulation_particle(const T &p)
Method to establish if a particle was created during the simulation (based on the status value).
ParticleOutCome defOutComeOfElectron(T thePart)
Determine the outcome of a simulated electron from its end vertex (NonInteract, ElectrMagInter,...
ParticleOutCome defOutComeOfPhoton(T thePart)
Determine the outcome of a simulated photon from its end vertex (UnConverted, Converted,...
ParticleOutCome
Outcome of a (simulated) truth particle: what happened to it after being produced,...
@ ThreeProng
Tau decayed hadronically with three charged pions or kaons.
@ DecaytoMuon
Tau decayed to mu nu nu (with optional photons).
@ NonInteract
Particle without an end vertex (survived the detector) – also used for neutrinos.
@ Converted
Photon converted: end vertex has exactly one e+ and one e-.
@ DecaytoElectron
Muon decayed to e nu_e nu_mu, or tau decayed to e nu nu (with optional photons).
@ NuclInteraction
Interaction with nuclei: the end vertex contains hadrons, nucleons or nuclear fragments.
@ FiveProng
Tau decayed hadronically with five charged pions or kaons.
@ UnConverted
Photon without an end vertex: it did not convert.
@ UnknownOutCome
End vertex exists, but its content matches none of the patterns below.
@ ElectrMagInter
Electron that only scattered electromagnetically: its end vertex has one electron and nothing else.
@ OneProng
Tau decayed hadronically with one charged pion or kaon.
ParticleOrigin defJetOrig(const T &allJetMothers)
Determine a jet's origin from its mother particles (Higgs/BSM mothers return immediately; otherwise t...
ParticleType defTypeOfPhoton(ParticleOrigin PhotOrig)
Classify a photon (Unknown/Iso/NonIso/Bkg) from its origin.
MCTC_bits
Bit positions in the classification word returned by defOrigOfParticle().
@ frombsm
A BSM particle is among the ancestors walked, or the particle is itself BSM.
@ isbsm
The particle itself is a BSM particle.
@ HadTau
Descends from a hadron and from a tau: a hadronic tau decay product (hadron && Tau).
@ Tau
A tau is among the ancestors, or the parents of an ancestor, that were walked on the way up (product ...
@ hadron
The particle is a hadron (not a beam particle) or descends from one (non-prompt); unset for prompt pa...
@ totalBits
Number of bits (not a property).
@ stable
The particle is physical: stable or decayed (MC::isPhysical), not an intermediate or documentation en...
@ uncat
Uncategorised: the particle is not physical (neither stable nor decayed), has no production vertex or...
@ isgeant
The particle is produced by the detector simulation (e.g. Geant4), not by the generator.
ParticleOrigin convHadronTypeToOrig(ParticleType pType, int motherPDG)
Convert a hadron ParticleType to a ParticleOrigin (JPsi if a c-cbar meson has a J/psi mother).
ParticleOutCome defOutComeOfTau(T thePart)
Determine the outcome of a simulated tau from its decay products (NonInteract, NuclInteraction,...
ParticleType defTypeOfTau(ParticleOrigin TauOrig)
Classify a tau (Unknown/Iso/NonIso/Bkg) from its origin.
ParticleType defTypeOfMuon(ParticleOrigin MuOrig, bool isPrompt)
Classify a muon (Unknown/Iso/NonIso/Bkg) from its origin; prompt muons are always Iso.
ParticleOrigin defHadronType(int pdg)
Classify a hadron by PDG ID into a ParticleOrigin (NonDefined if none applies).
ParticleOrigin
Origin of a truth particle, as assigned by MCTruthClassifier::particleTruthClassifier (the second mem...
@ BottomMeson
Decay of an open-bottom meson.
@ LightBaryon
Decay of a light (u, d only) baryon.
@ WBosonLRSM
Decay of the W_R boson of the left-right symmetric model (Pythia-specific PDG 9900024).
@ JPsi
Decay of a J/psi.
@ ZBoson
Z boson (or Z/gamma*) decay (including Sherpa Z records and Z+gamma).
@ BBbarMeson
Decay of a hidden-bottom meson.
@ ISRPhot
Initial-state radiation photon (quark/gluon mother whose copy is a Herwig cluster).
@ PromptPhot
Prompt (direct) photon of the hard process, e.g. Pythia8 gamma+jet.
@ StrangeMeson
Decay of a meson containing s quark (e.g. kaon).
@ DiBoson
Two-boson (WW, WZ, ZZ) production recorded without explicit bosons: four leptons/neutrinos in the har...
@ Higgs
Higgs boson decay (SM Higgs, PDG 25).
@ CharmedBaryon
Decay of a charmed baryon.
@ StrangeBaryon
Decay of a strange baryon.
@ LightMeson
Decay of a light (u, d only) meson.
@ HiggsMSSM
Decay of an extra (MSSM/2HDM) Higgs boson: H (35), A (36) or H+ (37).
@ ZorHeavyBoson
UNUSED: never returned by the classifier; only compared against in defTypeOfElectron/Muon/Tau.
@ LQ
Leptoquark: the ancestor is a leptoquark, or the decay vertex contains one.
@ BottomBaryon
Decay of a bottom baryon.
@ NuREle
Decay of a right-handed electron neutrino (Pythia-specific PDG 9900012), or of a W_R decaying to it.
@ TauLep
Decay (or radiation) of a tau lepton that is not itself prompt.
@ NuRMu
Decay of a right-handed muon neutrino (Pythia-specific PDG 9900014).
@ FSRPhot
Final-state radiation photon, e.g. from the leptons of W/Z/H decays or from Photos.
@ WBoson
W boson decay (including Sherpa W records and W+gamma).
@ Mu
Decay (or radiation) of a muon.
@ OtherBSM
Decay of a non-SUSY BSM particle (added later, hence the out-of-order value).
@ NuRTau
Decay of a right-handed tau neutrino (Pythia-specific PDG 9900016).
@ NonDefined
Origin could not be determined (no production vertex, no ancestor, or particle not classified).
@ CharmedMeson
Decay of an open-charm meson.
@ SingleElec
Single-electron particle gun: production vertex with no mother and one outgoing particle.
@ CCbarMeson
Decay of a hidden-charm meson other than J/psi.
@ top
Decay of a top quark (including through W).
@ QuarkWeakDec
Weak decay of a quark: q -> q' l nu with a single other quark in the final state.
@ SingleTau
Single-tau particle gun.
@ HeavyBoson
Decay of a heavy gauge boson Z', Z'', W'+ (PDG 32, 33, 34), or a KK graviton (5100039) in the photon ...
@ SingleMuon
Single-muon particle gun.
@ QCD
Jet origin: a quark or gluon mother (see defJetOrig); only assigned by the jet classifier,...
@ SinglePhot
Single-photon particle gun.
@ MultiBoson
Three or more bosons (VVV, 4-top with leptonic W decays): six or eight leptons/neutrinos in the hard-...
ParticleType defTypeOfHadron(int pdg)
Classify a hadron by PDG ID into a ParticleType (Unknown if none applies).
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
Tell whether a particle is prompt, from the word returned by defOrigOfParticle().
ParticleOutCome defOutComeOfMuon(T thePart)
Determine the outcome of a simulated muon from its end vertex (NonInteract, DecaytoElectron,...
ParticleType defTypeOfElectron(ParticleOrigin EleOrig, bool isPrompt)
Classify an electron (Unknown/Iso/NonIso/Bkg) from its origin; prompt electrons are always Iso.
ParticleType
Type of a truth particle, as assigned by MCTruthClassifier::particleTruthClassifier (the first member...
@ BkgTau
Background tau (remaining cases).
@ BBbarMesonPart
Hidden-bottom meson (e.g. Upsilon, chi_b).
@ Unknown
Not classified: not a lepton, photon, neutrino or hadron (e.g. a quark, a gluon, a boson),...
@ LightMesonPart
Meson made of u and d quarks only, e.g. a pion.
@ CharmedMesonPart
Open-charm meson (D, D_s).
@ IsoPhoton
Isolated (prompt) photon: from W/Z/H/BSM decay, a hard-process prompt photon, or a single-photon gun.
@ StrangeBaryonPart
Baryon containing an s quark (and no c, b).
@ IsoTau
Isolated (prompt) tau.
@ UnknownMuon
Muon with undefined origin.
@ StrangeMesonPart
Meson containing an s quark (and no c, b), e.g. a kaon.
@ CCbarMesonPart
Hidden-charm meson (e.g. J/psi, chi_c).
@ NonIsoPhoton
Non-isolated photon: initial/final-state radiation, or from tau, muon or right-handed neutrino/W_R de...
@ BkgPhoton
Background photon: bremsstrahlung, pi0 decay, hadron decay, nuclear reaction, underlying-event photon...
@ NonIsoMuon
Non-isolated muon from J/psi, B/D hadron, tau or quark weak decay.
@ BottomBaryonPart
Baryon containing a b quark.
@ BkgMuon
Background muon: pion/kaon decay in flight and other remaining cases.
@ NonIsoTau
Non-isolated tau from J/psi, B/D hadron or quark weak decay.
@ CharmedBaryonPart
Baryon containing a c quark (and no b).
@ IsoElectron
Isolated (prompt) electron, e.g. from W/Z/H/top/BSM decay, or a single-electron particle gun.
@ IsoMuon
Isolated (prompt) muon.
@ NonIsoElectron
Non-isolated electron from J/psi, B/D hadron, tau, muon or quark weak decay.
@ UnknownPhoton
Photon with undefined origin.
@ UnknownElectron
Electron with undefined origin (no production vertex, or origin could not be traced).
@ BottomMesonPart
Open-bottom meson (B, B_s, B_c).
@ BkgElectron
Background electron: photon conversion, Dalitz decay, material interaction, light-hadron decay,...
@ UnknownTau
Tau with undefined origin.
@ LightBaryonPart
Baryon made of u and d quarks only.
std::tuple< unsigned int, T > defOrigOfParticle(T thePart)
Classify a particle into a bit-word (see MCTC_bits).
bool isZ(const T &p)
bool isStrangeBaryon(const T &p)
bool isLightBaryon(const T &p)
bool isLightMeson(const T &p)
bool isStrangeMeson(const T &p)
bool isBottomMeson(const T &p)
bool isCharmBaryon(const T &p)
bool isW(const T &p)
bool isCCbarMeson(const T &p)
bool isFromHadron(T p, U &hadron, bool &fromTau, bool &fromBSM)
Function to check if the particle is a hadron or descends from one; sets the parent hadron,...
bool isBottomBaryon(const T &p)
bool isCharmMeson(const T &p)
bool isElectron(const T &p)
bool isBBbarMeson(const T &p)
bool isTop(const T &p)
bool isSUSY(const T &p)
auto findFinalStateParticles(V theVert) -> decltype(theVert->particles_out())
Function to find the descendants of the given vertex: its outgoing particles and, recursively,...
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to do ...
static const int JPSI
bool isHiggs(const T &p)
APID: HIGGS boson is only one particle.
bool isBeam(const T &p)
Identify if the particle is beam particle.
bool isHadron(const T &p)
bool isGluon(const T &p)
auto findSimulatedEndVertex(T thePart) -> decltype(thePart->end_vertex())
Function to find the end vertex of a particle.
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.