ATLAS Offline Software
MCRecoToTruth.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GENERATIONBASE
8 using namespace MCTruthPartClassifier;
9 
10 std::pair<ParticleType, ParticleOrigin>
12 {
13  ATH_MSG_DEBUG("Executing trackClassifier");
14  ParticleType parttype = Unknown;
15  ParticleOrigin partorig = NonDefined;
16  const xAOD::TruthParticle* genPart = getGenPart(trkPtr);
17  if (info) info->genPart = genPart;
18  if (!genPart) return std::make_pair(parttype, partorig);
19  ATH_MSG_DEBUG("trackClassifier succeeded ");
20  return particleTruthClassifier(genPart, info);
21 }
22 
23 std::pair<ParticleType, ParticleOrigin>
25 {
26  ATH_MSG_DEBUG("Executing egamma electron Classifier");
27  ParticleType parttype = Unknown;
28  ParticleOrigin partorig = NonDefined;
29  const xAOD::TruthParticle* genPart = nullptr;
30  const xAOD::TrackParticle* trkPtr = elec->trackParticle();
31  if (elec->author() != xAOD::EgammaParameters::AuthorFwdElectron ||trkPtr) {
32  // Central electron or forward electron with track (when reco
33  // implemented in the future)
34  if (!trkPtr){
35  return std::make_pair(parttype, partorig);
36  }
37  genPart = getGenPart(trkPtr);
38  } else {
39 #ifndef XAOD_ANALYSIS // cluster matching available only in Athena
40  const xAOD::CaloCluster* clus = elec->caloCluster();
41  genPart = egammaClusMatch(clus, true, info);
42 #else
43  ATH_MSG_WARNING("Forward Electron classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
44 #endif
45  }
46 
47  if (info) info->genPart = genPart;
48  if (!genPart) return std::make_pair(parttype, partorig);
49  ATH_MSG_DEBUG("egamma electron Classifier succeeded ");
50  return particleTruthClassifier(genPart, info);
51 }
52 
53 std::pair<ParticleType, ParticleOrigin>
55 {
56  ATH_MSG_DEBUG("Executing egamma photon Classifier");
57  ParticleType parttype = Unknown;
58  ParticleOrigin partorig = NonDefined;
59  const xAOD::CaloCluster* clus = phot->caloCluster();
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);
62 
63  const xAOD::Vertex* VxCvPtr = phot->vertex();
64  if (VxCvPtr != nullptr) {
65  for (int itrk = 0; itrk < (int)VxCvPtr->nTrackParticles(); itrk++) {
66  if (itrk > 1) continue;
67  const xAOD::TrackParticle* trkPtr = VxCvPtr->trackParticle(itrk);
68  if (!trkPtr) continue;
69  const xAOD::TruthParticle* thePart = getGenPart(trkPtr);
70  std::pair<ParticleType, ParticleOrigin> classif = particleTruthClassifier(thePart, info);
71  if (info) {
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);
76  }
77  }
78  }
79 
80  const xAOD::TruthParticle* genPart = nullptr;
81 #ifndef XAOD_ANALYSIS // Fwd electron available only in Athena
82  genPart = egammaClusMatch(clus, false, info);
83 #else
84  ATH_MSG_WARNING("Photon Classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
85 #endif
86  if (!genPart) return std::make_pair(parttype, partorig);
87  if (info) info->genPart = genPart;
88  ATH_MSG_DEBUG("egamma photon Classifier succeeded ");
89  return particleTruthClassifier(genPart, info);
90 }
91 
92 std::pair<ParticleType, ParticleOrigin>
94 {
95  ATH_MSG_DEBUG("Executing muon Classifier");
96  ParticleType parttype = Unknown;
97  ParticleOrigin partorig = NonDefined;
98  const xAOD::TrackParticle* trkPtr = nullptr;
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();
103 
104  if (!trkPtr) return std::make_pair(parttype, partorig);
105 
106  const xAOD::TruthParticle* genPart = getGenPart(trkPtr);
107  if (!genPart) return std::make_pair(parttype, partorig);
108  if (info) info->genPart = genPart;
109  ATH_MSG_DEBUG("muon Classifier succeeded ");
110  return particleTruthClassifier(genPart, info);
111 }
112 
113 std::pair<ParticleType, ParticleOrigin>
115 {
116  ATH_MSG_DEBUG("Executing egamma photon Classifier with cluster Input");
117  ParticleType parttype = Unknown;
118  ParticleOrigin partorig = NonDefined;
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);
121  const xAOD::TruthParticle* genPart = nullptr;
122 #ifndef XAOD_ANALYSIS // Fwd electron available only in Athena
123  genPart = egammaClusMatch(clus, false, info);
124 #else
125  ATH_MSG_WARNING("Cluster Classification using extrapolation to Calo is available only in Athena , check your enviroment. ");
126 #endif
127  if (!genPart) return std::make_pair(parttype, partorig);
128  ATH_MSG_DEBUG("Calo Cluster Classifier succeeded ");
129  if (info) info->genPart = genPart;
130  return particleTruthClassifier(genPart, info);
131 }
132 
133 std::pair<ParticleType, ParticleOrigin>
135 {
136  ATH_MSG_DEBUG("Executing Classifier with jet Input");
137  ParticleType parttype = UnknownJet;
138  ParticleOrigin partorig = NonDefined;
139  ParticleType tempparttype = UnknownJet;
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();
145  findJetConstituents(jet, constituents, DR);
146  // AV: Jet type is the type of hadron with "heaviest" flavour among the jet constituents.
147  // AV: No hadrons in the jet -- the flavour is unknown.
148  // AV: The algorithm will fail on 4/5 quark hadrons and probably on nonBSM hadrons. To be fixed.
149  for (const auto& thePart: constituents) {
150  MC::findAllJetMothers(thePart, allJetMothers);
151  //AV: probably skip ME particles
152  if (thePart->status() == 3) continue;
153  // determine if hadron and its type
154  tempparttype = particleTruthClassifier(thePart, info).first;
155  if (tempparttype != Hadron) continue;
156  tempparttype = defTypeOfHadron(thePart->pdgId());
157  // classify the jet
158  if (tempparttype == BBbarMesonPart || tempparttype == BottomMesonPart || tempparttype == BottomBaryonPart) {
159  parttype = BJet;
160  continue;
161  }
162  if (tempparttype == CCbarMesonPart || tempparttype == CharmedMesonPart || tempparttype == CharmedBaryonPart) {
163  if (parttype != BJet) parttype = CJet;
164  continue;
165  }
166  if (tempparttype == StrangeBaryonPart || tempparttype == LightBaryonPart || tempparttype == StrangeMesonPart || tempparttype == LightMesonPart) {
167  if (parttype != BJet && parttype != CJet) parttype = LJet;
168  continue;
169  }
170  }
171 
172  // clasify the jet origin
173  partorig = defJetOrig(allJetMothers);
174  allJetMothers.clear();
175  constituents.clear();
176  ATH_MSG_DEBUG(" jet Classifier succeeded");
177  return std::make_pair(parttype, partorig);
178 }
179 
180 const xAOD::TruthParticle*
182 {
183  // return GenParticle corresponding to given TrackParticle
184  ATH_MSG_DEBUG("Executing getGenPart ");
185  if (!trk) return nullptr;
186  if (info) {
187  info->deltaRMatch = -999.;
188  info->deltaPhi = -999.;
189  info->probTrkToTruth = 0;
190  info->numOfSiHits = 0;
191  }
192 
193  uint8_t NumOfPixHits = 0;
194  uint8_t NumOfSCTHits = 0;
196 
197  static const SG::AuxElement::Accessor<TruthLink_t> tPL("truthParticleLink");
198  if (!tPL.isAvailable(*trk)) {
199  ATH_MSG_DEBUG("Track particle is not associated to truth particle");
200  return nullptr;
201  }
202 
203  const auto& truthLink = tPL(*trk);
204  if (!truthLink.isValid()) {
205  ATH_MSG_DEBUG("Invalid link to truth particle");
206  return nullptr;
207  }
208 
209  const xAOD::TruthParticle* theGenParticle = (*truthLink);
210  if (!theGenParticle) {
211  ATH_MSG_DEBUG("Could not find truth matching for track");
212  return nullptr;
213  }
214 
215  if (info) {
216  static const SG::AuxElement::Accessor<float> tMP("truthMatchProbability");
217  if (tMP.isAvailable(*trk)) {
218  info->probTrkToTruth = tMP(*trk);
219  } else {
220  ATH_MSG_DEBUG("Truth match probability not available");
221  }
222  }
223 
224  if (MC::isDecayed(theGenParticle) || theGenParticle->status() == 3) {
225  ATH_MSG_WARNING("track matched to the truth with status " << theGenParticle->status());
226  }
227 
228  if (MC::isDecayed(theGenParticle) && (std::abs(theGenParticle->pdgId()) == 11 || std::abs(theGenParticle->pdgId()) == 13)) {
229  const xAOD::TruthVertex* EndVrtx = theGenParticle->decayVtx();
230  const xAOD::TruthParticle* theGenPartTmp(nullptr);
231 
232  if (EndVrtx != nullptr) {
233  int itr = 0;
234  do {
235  theGenPartTmp = nullptr;
236  for (const auto & theDaugt: EndVrtx->particles_out()) {
237  if (!theDaugt) continue;
238  if (theDaugt->pdgId() == theGenParticle->pdgId()) theGenPartTmp = theDaugt;
239  if (theDaugt->pdgId() != theGenParticle->pdgId() && theDaugt->pdgId() != 22) theGenPartTmp = nullptr;
240  }
241  itr++;
242  if (itr > 100) {
243  ATH_MSG_WARNING("getGenPart infinite while");
244  break;
245  }
246  EndVrtx = theGenPartTmp ? theGenPartTmp->decayVtx() : nullptr;
247  } while (theGenPartTmp && theGenPartTmp->pdgId() == theGenParticle->pdgId() && MC::isDecayed(theGenPartTmp) && EndVrtx != nullptr);
248 
249  if (theGenPartTmp && theGenPartTmp->pdgId() == theGenParticle->pdgId()) theGenParticle = theGenPartTmp;
250  }
251  }
252 
253  if (!trk->summaryValue(NumOfSCTHits, xAOD::numberOfSCTHits)) ATH_MSG_DEBUG("Could not retrieve number of SCT hits");
254  if (!trk->summaryValue(NumOfPixHits, xAOD::numberOfPixelHits)) ATH_MSG_DEBUG("Could not retrieve number of Pixel hits");
255 
256  uint8_t NumOfSiHits = NumOfSCTHits + NumOfPixHits;
257 
258  float deltaPhi = detPhi(theGenParticle->phi(), trk->phi());
259  float deteta = detEta(theGenParticle->eta(), trk->eta());
260  float deltaRMatch = std::hypot(deltaPhi, deteta);
261  if ((NumOfSiHits > m_NumOfSiHitsCut && deltaRMatch > m_deltaRMatchCut) ||
262  (NumOfSiHits <= m_NumOfSiHitsCut && deltaPhi > m_deltaPhiMatchCut)) theGenParticle = nullptr;
263 
264  if (info) {
265  info->deltaRMatch = deltaRMatch;
266  info->deltaPhi = deltaPhi;
267  info->numOfSiHits = NumOfSiHits;
268  }
269  ATH_MSG_DEBUG("getGenPart succeeded ");
270  return (theGenParticle);
271 }
272 
274  std::set<const xAOD::TruthParticle*>& constituents,
275  bool DR) const
276 {
277  if (DR) {
278  // use a DR matching scheme (default)
279  // retrieve collection and get a pointer
280  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainerReadHandle(m_truthParticleContainerKey);
281 
282  if (!truthParticleContainerReadHandle.isValid()) {
283  ATH_MSG_WARNING(" Invalid ReadHandle for xAOD::TruthParticleContainer with key: " << truthParticleContainerReadHandle.key());
284  return;
285  }
286  ATH_MSG_DEBUG("xAODTruthParticleContainer with key " << truthParticleContainerReadHandle.key() << " has valid ReadHandle ");
287  // find the matching truth particles
288  for (const auto *const thePart : *truthParticleContainerReadHandle) {
289  // match truth particles to the jet
290  if (MC::isStable(thePart) && thePart->p4().DeltaR(jet->p4()) < m_jetPartDRMatch) {
291  constituents.insert(thePart);
292  }
293  }
294  }
295  else {
296  xAOD::JetConstituentVector vec = jet->getConstituents();
297  for (const auto *particle0 : vec) {
298  const xAOD::TruthParticle* thePart = dynamic_cast<const xAOD::TruthParticle*>(particle0->rawConstituent());
299  if (MC::isStable(thePart)) {
300  constituents.insert(thePart);
301  }
302  }
303  }
304 }
305 double MCTruthClassifier::fracParticleInJet(const xAOD::TruthParticle* thePart, const xAOD::Jet* jet, bool DR, bool nparts) const
306 {
307  std::set<const xAOD::TruthParticle*> constituents;
308  std::set<const xAOD::TruthParticle*> daughters;
309  std::set<const xAOD::TruthParticle*> intersect;
310 
311  findJetConstituents(jet, constituents, DR);
312  MC::findParticleDaughters(thePart, daughters);
313  if (daughters.empty()) daughters.insert(thePart);
314  // Get the intersection of constituents and daughters
315  std::set_intersection(constituents.begin(),
316  constituents.end(),
317  daughters.begin(),
318  daughters.end(),
319  std::inserter(intersect, intersect.begin()));
320 
321  if (nparts) return 1.0*intersect.size() / daughters.size();
322  double frac = 0;
323  double tot = 0;
324  for (const auto *daughter : daughters) { tot += daughter->pt();}
325  for (const auto *particle : intersect) { frac += particle->pt();}
326  return frac/tot;
327 }
328 
329 #endif
grepfile.info
info
Definition: grepfile.py:38
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
LightBaryonPart
@ LightBaryonPart
Definition: TruthClasses.h:40
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
MCTruthClassifier::findJetConstituents
void findJetConstituents(const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) const
Definition: MCRecoToTruth.cxx:273
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition: TrackParticle_v1.cxx:736
xAOD::Egamma_v1::author
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
Definition: Egamma_v1.cxx:166
MC::findAllJetMothers
void findAllJetMothers(T thePart, std::set< T > &allJetMothers)
Function to find all ancestors of the particle.
Definition: HepMCHelpers.h:116
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::CaloCluster_v1::et
double et() const
Definition: CaloCluster_v1.h:856
CharmedMesonPart
@ CharmedMesonPart
Definition: TruthClasses.h:36
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:55
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MCTruthClassifier.h
BottomMesonPart
@ BottomMesonPart
Definition: TruthClasses.h:34
xAOD::EgammaParameters::AuthorFwdElectron
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
Definition: EgammaDefs.h:30
Hadron
@ Hadron
Definition: TruthClasses.h:26
StrangeMesonPart
@ StrangeMesonPart
Definition: TruthClasses.h:41
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
BBbarMesonPart
@ BBbarMesonPart
Definition: TruthClasses.h:33
NonDefined
@ NonDefined
Definition: TruthClasses.h:52
CCbarMesonPart
@ CCbarMesonPart
Definition: TruthClasses.h:35
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
TruthLink_t
ElementLink< xAOD::TruthParticleContainer > TruthLink_t
Definition: TauxAODHelpers.cxx:7
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
checkxAOD.frac
frac
Definition: Tools/PyUtils/bin/checkxAOD.py:256
ParticleOrigin
ParticleOrigin
Definition: TruthClasses.h:51
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
LightMesonPart
@ LightMesonPart
Definition: TruthClasses.h:42
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
StrangeBaryonPart
@ StrangeBaryonPart
Definition: TruthClasses.h:39
CharmedBaryonPart
@ CharmedBaryonPart
Definition: TruthClasses.h:38
MCTruthPartClassifier::defTypeOfHadron
ParticleType defTypeOfHadron(int pdg)
Definition: TruthClassifiers.h:46
LB_AnalMapSplitter.tot
tot
Definition: LB_AnalMapSplitter.py:46
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
LJet
@ LJet
Definition: TruthClasses.h:45
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
MCTruthClassifier::getGenPart
virtual const xAOD::TruthParticle * getGenPart(const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override
Definition: MCRecoToTruth.cxx:181
BJet
@ BJet
Definition: TruthClasses.h:43
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
BottomBaryonPart
@ BottomBaryonPart
Definition: TruthClasses.h:37
ReadHandle.h
Handle class for reading from StoreGate.
xAOD::TruthVertex_v1::particles_out
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
Definition: TruthVertex_v1.cxx:66
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
xAOD::TruthParticle_v1::status
int status() const
Status code.
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Photon_v1
Definition: Photon_v1.h:37
Amg::intersect
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.
Definition: GeoPrimitivesHelpers.h:302
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MCTruthPartClassifier
Definition: TruthClassifiers.h:12
MC::isDecayed
bool isDecayed(const T &p)
Definition: HepMCHelpers.h:29
MCTruthPartClassifier::defJetOrig
ParticleOrigin defJetOrig(const T &allJetMothers)
Definition: TruthClassifiers.h:131
MC::findParticleDaughters
void findParticleDaughters(T thePart, std::set< T > &daughters)
Function to get the particle stable MC daughters.
Definition: HepMCHelpers.h:129
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::JetConstituentVector
A vector of jet constituents at the scale used during jet finding.
Definition: JetConstituentVector.h:117
UnknownJet
@ UnknownJet
Definition: TruthClasses.h:48
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
CJet
@ CJet
Definition: TruthClasses.h:44
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
MCTruthClassifier::particleTruthClassifier
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override
Definition: MCTruthClassifierGen.cxx:77
ParticleType
ParticleType
Definition: TruthClasses.h:8
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
MCTruthPartClassifier::Info
Definition: IMCTruthClassifier.h:49
xAOD::Photon_v1::vertex
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Definition: Photon_v1.cxx:46
MCTruthClassifier::fracParticleInJet
double fracParticleInJet(const xAOD::TruthParticle *, const xAOD::Jet *, bool DR, bool nparts) const
Definition: MCRecoToTruth.cxx:305
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)