ATLAS Offline Software
InDetSecVtxTruthMatchTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
5 
9 
10 using namespace InDetSecVtxTruthMatchUtils;
11 
13 
15  ATH_MSG_INFO("Initializing InDetSecVtxTruthMatchTool");
16 
17 
18  return StatusCode::SUCCESS;
19 }
20 
21 namespace {
22 //Helper methods for this file only
23 
24 //In the vector of match info, find the element corresponding to link and return its index; create a new one if necessary
25 size_t indexOfMatchInfo( std::vector<VertexTruthMatchInfo> & matches, const ElementLink<xAOD::TruthVertexContainer> & link ) {
26  for ( size_t i = 0; i < matches.size(); ++i ) {
27  if ( link.key() == std::get<0>(matches[i]).key() && link.index() == std::get<0>(matches[i]).index() )
28  return i;
29  }
30  // This is the first time we've seen this truth vertex, so make a new entry
31  matches.emplace_back( link, 0., 0. );
32  return matches.size() - 1;
33 }
34 
35 }
36 
37 StatusCode InDetSecVtxTruthMatchTool::matchVertices( std::vector<const xAOD::Vertex*> recoVerticesToMatch,
38  std::vector<const xAOD::TruthVertex*> truthVerticesToMatch,
39  const xAOD::TrackParticleContainer* trackParticles) {
40 
41  ATH_MSG_DEBUG("Start vertex matching");
42 
43  //setup decorators for truth matching info
44  static const xAOD::Vertex::Decorator<std::vector<VertexTruthMatchInfo> > matchInfoDecor("truthVertexMatchingInfos");
45  static const xAOD::Vertex::Decorator<int> recoMatchTypeDecor("vertexMatchType");
46  static const xAOD::Vertex::Decorator<std::vector<ElementLink<xAOD::VertexContainer> > > splitPartnerDecor("splitPartners");
47 
48  const xAOD::Vertex::Decorator<float> fakeScoreDecor("fakeScore");
49  const xAOD::Vertex::Decorator<float> otherScoreDecor("otherScore");
50 
51  //setup accessors
52  // can switch to built in method in xAOD::Vertex once don't have to deal with changing names anymore
54  xAOD::Vertex::ConstAccessor<std::vector<float> > weightAcc("trackWeights");
55 
57  xAOD::TrackParticle::ConstAccessor<float> trk_truthProbAcc("truthMatchProbability");
58 
59  ATH_MSG_DEBUG("Starting Loop on Vertices");
60 
61  //=============================================================================
62  //First loop over vertices: get tracks, then TruthParticles, and store relative
63  //weights from each TruthVertex
64  //=============================================================================
65  for ( const xAOD::Vertex* vtx : recoVerticesToMatch ) {
66 
67  //create the vector we will add as matching info decoration later
68  std::vector<VertexTruthMatchInfo> matchinfo;
69 
70  const xAOD::Vertex::TrackParticleLinks_t & trkParts = trkAcc( *vtx );
71  size_t ntracks = trkParts.size();
72  const std::vector<float> & trkWeights = weightAcc( *vtx );
73 
74  //if don't have track particles
75  if (!trkAcc.isAvailable(*vtx) || !weightAcc.isAvailable(*vtx) ) {
76  ATH_MSG_WARNING("trackParticles or trackWeights not available, vertex is missing info");
77  continue;
78  }
79  if ( trkWeights.size() != ntracks ) {
80  ATH_MSG_WARNING("Vertex without same number of tracks and trackWeights, vertex is missing info");
81  continue;
82  }
83 
84  ATH_MSG_DEBUG("Matching new vertex at (" << vtx->x() << ", " << vtx->y() << ", " << vtx->z() << ")" << " with " << ntracks << " tracks, at index: " << vtx->index());
85 
86  float totalWeight = 0.;
87  float totalPt = 0;
88  float otherPt = 0;
89  float fakePt = 0;
90 
91  //loop over the tracks in the vertex
92  for ( size_t t = 0; t < ntracks; ++t ) {
93 
94  ATH_MSG_DEBUG("Checking track number " << t);
95 
96  if (!trkParts[t].isValid()) {
97  ATH_MSG_DEBUG("Track " << t << " is bad!");
98  continue;
99  }
100  const xAOD::TrackParticle & trk = **trkParts[t];
101 
102  // store the contribution to total weight and pT
103  totalWeight += trkWeights[t];
104  totalPt += trk.pt();
105 
106  // get the linked truth particle
107  if (!trk_truthPartAcc.isAvailable(trk)) {
108  ATH_MSG_DEBUG("The truth particle link decoration isn't available.");
109  continue;
110  }
111  const ElementLink<xAOD::TruthParticleContainer> & truthPartLink = trk_truthPartAcc( trk );
112  float prob = trk_truthProbAcc( trk );
113  ATH_MSG_DEBUG("Truth prob: " << prob);
114 
115  // check the truth particle origin
116  if (truthPartLink.isValid() && prob > m_trkMatchProb) {
117  const xAOD::TruthParticle & truthPart = **truthPartLink;
118 
119  const int truthVertexUniqueID = checkProduction(truthPart, truthVerticesToMatch);
120 
121  //check if the truth particle is "good"
122  if ( truthVertexUniqueID != HepMC::INVALID_VERTEX_ID ) {
123  //track in vertex is linked to LLP descendant
124  //create link to truth vertex and add to matchInfo
125  auto it = std::find_if(truthVerticesToMatch.begin(), truthVerticesToMatch.end(),
126  [&](const auto& ele){ return HepMC::uniqueID(ele) == truthVertexUniqueID;} );
127 
128  if(it == truthVerticesToMatch.end()) {
129  ATH_MSG_WARNING("Truth vertex with unique ID " << truthVertexUniqueID << " not found!");
130  }
131  else {
133  elLink.setElement(*it);
134  elLink.setStorableObject( *dynamic_cast<const xAOD::TruthVertexContainer*>( (*it)->container() ) );
135  size_t matchIdx = indexOfMatchInfo( matchinfo, elLink );
136 
137  std::get<1>(matchinfo[matchIdx]) += trkWeights[t];
138  std::get<2>(matchinfo[matchIdx]) += trk.pt();
139  }
140  } else {
141  //truth particle failed cuts
142  ATH_MSG_DEBUG("Truth particle not from LLP decay.");
143  otherPt += trk.pt();
144  }
145  } else {
146  //not valid or low matching probability
147  ATH_MSG_DEBUG("Invalid or low prob truth link!");
148  fakePt += trk.pt();
149  }
150  }//end loop over tracks in vertex
151 
152  // normalize by total weight and pT
153  std::for_each( matchinfo.begin(), matchinfo.end(), [&](VertexTruthMatchInfo& link)
154  {
155  std::get<1>(link) /= totalWeight;
156  std::get<2>(link) /= totalPt;
157  });
158 
159  float fakeScore = fakePt/totalPt;
160  float otherScore = otherPt/totalPt;
161 
162  matchInfoDecor ( *vtx ) = matchinfo;
163  fakeScoreDecor ( *vtx ) = fakeScore;
164  otherScoreDecor( *vtx ) = otherScore;
165  }
166 
167  //After first loop, all vertices have been decorated with their vector of match info (link to TruthVertex paired with weight)
168  //now we want to use that information from the whole collection to assign types
169  //keep track of whether a type is assigned
170  //useful since looking for splits involves a double loop, and then setting types ahead in the collection
171  std::vector<bool> assignedType( recoVerticesToMatch.size(), false );
172  static const xAOD::TruthVertex::Decorator<bool> isMatched("matchedToRecoVertex");
173  static const xAOD::TruthVertex::Decorator<bool> isSplit("vertexSplit");
174 
175  for ( size_t i = 0; i < recoVerticesToMatch.size(); ++i ) {
176 
177  int recoVertexMatchType = 0;
178 
179  if ( assignedType[i] ) {
180  ATH_MSG_DEBUG("Vertex already defined as split.");
181  continue; // make sure we don't reclassify vertices already found in the split loop below
182  }
183 
184  std::vector<VertexTruthMatchInfo> & info = matchInfoDecor( *recoVerticesToMatch[i] );
185  float fakeScore = fakeScoreDecor( *recoVerticesToMatch[i] );
186 
187  if(fakeScore > m_vxMatchWeight) {
188  ATH_MSG_DEBUG("Vertex is fake.");
189  recoVertexMatchType = recoVertexMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Fake);
190  } else if (info.size() == 1) {
191  if(std::get<2>(info[0]) > m_vxMatchWeight ) { // one truth matched vertex, sufficient weight
192  ATH_MSG_DEBUG("One true decay vertices matched with sufficient weight. Vertex is matched.");
193  recoVertexMatchType = recoVertexMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Matched);
194  isMatched(**std::get<0>(info[0])) = true;
195  }
196  else {
197  ATH_MSG_DEBUG("One true decay vertices matched with insufficient weight. Vertex is other.");
198  recoVertexMatchType = recoVertexMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Other);
199  }
200  } else if (info.size() >= 2 ) { // more than one true deacy vertices matched
201  ATH_MSG_DEBUG("Multiple true decay vertices matched. Vertex is merged.");
202  recoVertexMatchType = recoVertexMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Merged);
203  std::for_each( info.begin(), info.end(), [](VertexTruthMatchInfo& link)
204  {
205  isMatched(**std::get<0>(link)) = true;
206  });
207  } else { // zero truth matched vertices, but not fake
208  ATH_MSG_DEBUG("Vertex is neither fake nor LLP. Marking as OTHER.");
209  recoVertexMatchType = recoVertexMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Other);
210  }
211 
212  recoMatchTypeDecor(*recoVerticesToMatch[i]) = recoVertexMatchType;
213 
214  //check for splitting
215  if ( InDetSecVtxTruthMatchUtils::isMatched(recoMatchTypeDecor(*recoVerticesToMatch[i])) ||
216  InDetSecVtxTruthMatchUtils::isMerged(recoMatchTypeDecor(*recoVerticesToMatch[i])) ) {
217  std::vector<size_t> foundSplits;
218  for ( size_t j = i + 1; j < recoVerticesToMatch.size(); ++j ) {
219  std::vector<VertexTruthMatchInfo> & info2 = matchInfoDecor( *recoVerticesToMatch[j] );
220  //check second vertex is not dummy or fake, and that it has same elementlink as first vertex
221  //equality test is in code but doesnt seem to work for ElementLinks that I have?
222  //so i am just checking that the contianer key hash and the index are the same
223  if (recoMatchTypeDecor( *recoVerticesToMatch[j] ) & (0x1 << InDetSecVtxTruthMatchUtils::Fake)) continue;
224  if (!info2.empty() && std::get<0>(info2[0]).isValid() && std::get<0>(info[0]).key() == std::get<0>(info2[0]).key() && std::get<0>(info[0]).index() == std::get<0>(info2[0]).index() ) {
225  //add split links; first between first one found and newest one
227  splitLink_ij.setElement( recoVerticesToMatch[j] );
228  splitLink_ij.setStorableObject( *dynamic_cast<const xAOD::VertexContainer*>(recoVerticesToMatch[j]->container()));
229  splitPartnerDecor( *recoVerticesToMatch[i] ).emplace_back(splitLink_ij);
230 
232  splitLink_ji.setElement( recoVerticesToMatch[i] );
233  splitLink_ji.setStorableObject( *dynamic_cast<const xAOD::VertexContainer*>(recoVerticesToMatch[i]->container()));
234  splitPartnerDecor( *recoVerticesToMatch[j] ).emplace_back(splitLink_ji);
235 
236  //then between any others we found along the way
237  for ( auto k : foundSplits ) { //k is a size_t in the vector of splits
239  splitLink_kj.setElement( recoVerticesToMatch[j] );
240  splitLink_kj.setStorableObject( *dynamic_cast<const xAOD::VertexContainer*>(recoVerticesToMatch[j]->container()));
241  splitPartnerDecor( *recoVerticesToMatch[k] ).emplace_back(splitLink_kj);
242 
244  splitLink_jk.setElement( recoVerticesToMatch[k] );
245  splitLink_jk.setStorableObject( *dynamic_cast<const xAOD::VertexContainer*>(recoVerticesToMatch[k]->container()));
246  splitPartnerDecor( *recoVerticesToMatch[j] ).emplace_back(splitLink_jk);
247  }
248  //then keep track that we found this one
249  foundSplits.push_back(j);
250  recoMatchTypeDecor( *recoVerticesToMatch[i] ) = recoMatchTypeDecor( *recoVerticesToMatch[i] ) | (0x1 << InDetSecVtxTruthMatchUtils::Split);
251  recoMatchTypeDecor( *recoVerticesToMatch[j] ) = recoMatchTypeDecor( *recoVerticesToMatch[j] ) | (0x1 << InDetSecVtxTruthMatchUtils::Split);
252  isSplit(**std::get<0>(info[0])) = true;
253  assignedType[j] = true;
254  } //if the two vertices match to same TruthVertex
255  }//inner loop over vertices
256  } //if matched or merged
257 
258  } //outer loop
259 
260  // now label truth vertices
261 
262  ATH_MSG_DEBUG("Labeling truth vertices");
263 
264  static const xAOD::TruthVertex::Decorator<int> truthMatchTypeDecor("truthVertexMatchType");
265 
266  for(const xAOD::TruthVertex* truthVtx : truthVerticesToMatch) {
267 
268  std::vector<const xAOD::TruthParticle*> reconstructibleParticles;
269  int counter = 0;
270  countReconstructibleDescendentParticles( *truthVtx, reconstructibleParticles, counter );
271 
272  // hacky solution for keeping track of particles in the vertex
273  std::vector<int> particleInfo = {0,0,0};
274  std::vector<int> vertexInfo = {0,0,0};
275 
276  for(size_t n = 0; n < reconstructibleParticles.size(); n++){
277  ATH_MSG_DEBUG("Checking daughter no. " << n);
278  const xAOD::TruthParticle* outPart = reconstructibleParticles.at(n);
279 
280  if (trackParticles){
281  particleInfo = checkParticle(*outPart, trackParticles);
282 
283  for(size_t h = 0; h < particleInfo.size(); h++){
284  vertexInfo.at(h) += particleInfo.at(h);
285  }
286  }
287  }
288 
289  int truthMatchType = 0;
290  if( vertexInfo.at(0) > 1 && truthVtx->perp() < 320 && abs(truthVtx->z()) < 1500){
291  ATH_MSG_DEBUG("Vertex is reconstructable and in Inner Det region");
292  truthMatchType = truthMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Reconstructable);
293  }
294  if( InDetSecVtxTruthMatchUtils::isReconstructable(truthMatchType) and vertexInfo.at(1) > 1){
295  ATH_MSG_DEBUG("Vertex has at least two tracks");
296  truthMatchType = truthMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Accepted);
297  }
298  if(InDetSecVtxTruthMatchUtils::isAccepted(truthMatchType) and vertexInfo.at(2) > 1){
299  ATH_MSG_DEBUG("Vertex is has at least two tracks passing track selection: " << vertexInfo.at(2));
300  truthMatchType = truthMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Seeded);
301  }
302  if(InDetSecVtxTruthMatchUtils::isSeeded(truthMatchType) and isMatched(*truthVtx)){
303  ATH_MSG_DEBUG("Vertex is matched to a reconstructed secVtx");
304  truthMatchType = truthMatchType | (0x1 << InDetSecVtxTruthMatchUtils::Reconstructed);
305  }
306  if(InDetSecVtxTruthMatchUtils::isSeeded(truthMatchType) and isSplit(*truthVtx)){
307  ATH_MSG_DEBUG("Vertex is matched to multiple secVtx");
308  truthMatchType = truthMatchType | (0x1 << InDetSecVtxTruthMatchUtils::ReconstructedSplit);
309  }
310  truthMatchTypeDecor(*truthVtx) = truthMatchType;
311  }
312  ATH_MSG_DEBUG("Done labeling truth vertices");
313 
314  return StatusCode::SUCCESS;
315 
316 }
317 
318 std::vector<int> InDetSecVtxTruthMatchTool::checkParticle(const xAOD::TruthParticle &truthPart, const xAOD::TrackParticleContainer* trkCont) const {
319 
322  xAOD::TrackParticle::ConstAccessor<float> trk_truthProbAcc("truthMatchProbability");
323 
324  if(truthPart.pt() < m_trkPtCut){
325  ATH_MSG_DEBUG("Insufficient pt to reconstruct the particle");
326  return {0,0,0};
327  }
328  else{
329 
330  for(const xAOD::TrackParticle* trkPart : *trkCont){
331  const ElementLink<xAOD::TruthParticleContainer> & truthPartLink = trk_truthPartAcc( *trkPart );
332  float matchProb = trk_truthProbAcc( *trkPart );
333 
334  if(truthPartLink.isValid() && matchProb > m_trkMatchProb) {
335  const xAOD::TruthParticle& tmpPart = **truthPartLink;
336  if( HepMC::barcode(tmpPart) == HepMC::barcode(truthPart) ) { // FIXME barcode-based - comparing GenParticles and xAOD::TruthParticles so use barcode
337  if(trackPass.isAvailable( *trkPart )) {
338  if(trackPass( *trkPart )) {
339  ATH_MSG_DEBUG("Particle has a track that passes track selection.");
340  return {1,1,1};
341  } else {
342  ATH_MSG_DEBUG("Particle has a track, but did not pass track selection.");
343  return {1,1,0};
344  }
345  } else {
346  ATH_MSG_DEBUG("Track selection decoration not available, calling the track selected");
347  return {1,1,1};
348  }
349  }
350  }
351  }
352  ATH_MSG_DEBUG("Particle has enough pt.");
353  return {1,0,0};
354 
355  }
356  return {0,0,0};
357 }
358 
359 // check if truth particle originated from decay of particle in the pdgIdList
360 int InDetSecVtxTruthMatchTool::checkProduction( const xAOD::TruthParticle & truthPart, std::vector<const xAOD::TruthVertex*> truthVerticesToMatch ) const {
361 
362  if (truthPart.nParents() == 0){
363  ATH_MSG_DEBUG("Particle has no parents (end of loop)");
365  }
366  else{
367  const xAOD::TruthParticle * parent = truthPart.parent(0);
368  if(not parent) {
369  ATH_MSG_DEBUG("Particle parent is null");
371  }
372  ATH_MSG_DEBUG("Parent ID: " << parent->pdgId());
373 
374  const xAOD::TruthVertex* parentVertex = parent->decayVtx();
375  if(std::find(truthVerticesToMatch.begin(), truthVerticesToMatch.end(), parentVertex) != truthVerticesToMatch.end()) {
376  ATH_MSG_DEBUG("Found LLP decay.");
377  return HepMC::barcode(parentVertex); // FIXME barcode-based
378  }
379  // recurse on parent
380  return checkProduction(*parent, truthVerticesToMatch);
381  }
383 }
384 
386  std::vector<const xAOD::TruthParticle*>& set, int counter) const {
387 
388  counter++;
389 
390  for( size_t itrk = 0; itrk < signalTruthVertex.nOutgoingParticles(); itrk++) {
391  const auto* particle = signalTruthVertex.outgoingParticle( itrk );
392  if( !particle ) continue;
393  // Recursively add descendents
394  if( particle->hasDecayVtx() ) {
395 
396  TVector3 decayPos( particle->decayVtx()->x(), particle->decayVtx()->y(), particle->decayVtx()->z() );
397  TVector3 prodPos ( particle->prodVtx()->x(), particle->prodVtx()->y(), particle->prodVtx()->z() );
398 
399  auto isInside = []( TVector3& v ) { return ( v.Perp() < 300. && std::abs( v.z() ) < 1500. ); };
400  auto isOutside = []( TVector3& v ) { return ( v.Perp() > 563. || std::abs( v.z() ) > 2720. ); };
401 
402  const auto distance = (decayPos - prodPos).Mag();
403 
404  if (counter > 100) {
405  ATH_MSG_WARNING("Vetoing particle that may be added recursively infinitely (potential loop in generator record");
406  break;
407  }
408 
409  // consider track reconstructible if it travels at least 10mm
410  if( distance < 10.0 ) {
412  } else if( isInside ( prodPos ) && isOutside( decayPos ) && particle->isCharged() ) {
413  set.push_back( particle );
414  } else if( particle->isElectron() || particle->isMuon() ) {
415  set.push_back( particle );
416  }
417  } else {
418  if( !(particle->isCharged()) ) continue;
419  set.push_back( particle );
420  }
421  }
422 
423  }
grepfile.info
info
Definition: grepfile.py:38
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::TruthParticle_v1::parent
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:131
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
InDetSecVtxTruthMatchTool::m_selectedTrackFlag
Gaudi::Property< std::string > m_selectedTrackFlag
Definition: InDetSecVtxTruthMatchTool.h:114
InDetSecVtxTruthMatchUtils::ReconstructedSplit
@ ReconstructedSplit
Definition: InDetSecVtxTruthMatchTool.h:45
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
InDetSecVtxTruthMatchTool::initialize
virtual StatusCode initialize() override final
Dummy implementation of the initialisation function.
Definition: InDetSecVtxTruthMatchTool.cxx:14
InDetSecVtxTruthMatchUtils::isReconstructable
bool isReconstructable(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:69
skel.it
it
Definition: skel.GENtoEVGEN.py:423
asg
Definition: DataHandleTestTool.h:28
InDetSecVtxTruthMatchTool::countReconstructibleDescendentParticles
void countReconstructibleDescendentParticles(const xAOD::TruthVertex &signalTruthVertex, std::vector< const xAOD::TruthParticle * > &set, int counter) const
Definition: InDetSecVtxTruthMatchTool.cxx:385
InDetSecVtxTruthMatchUtils::isMerged
bool isMerged(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:52
InDetSecVtxTruthMatchUtils::isMatched
bool isMatched(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:48
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
InDetSecVtxTruthMatchUtils::isSplit
bool isSplit(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
covarianceTool.prob
prob
Definition: covarianceTool.py:678
InDetSecVtxTruthMatchUtils::Fake
@ Fake
Definition: InDetSecVtxTruthMatchTool.h:34
InDetSecVtxTruthMatchTool::checkProduction
int checkProduction(const xAOD::TruthParticle &truthPart, std::vector< const xAOD::TruthVertex * > truthVerticesToMatch) const
Definition: InDetSecVtxTruthMatchTool.cxx:360
InDetSecVtxTruthMatchUtils::Split
@ Split
Definition: InDetSecVtxTruthMatchTool.h:33
InDetSecVtxTruthMatchTool::matchVertices
virtual StatusCode matchVertices(std::vector< const xAOD::Vertex * > recoVerticesToMatch, std::vector< const xAOD::TruthVertex * > truthVerticesToMatch, const xAOD::TrackParticleContainer *trackParticles) override
Definition: InDetSecVtxTruthMatchTool.cxx:37
InDetSecVtxTruthMatchUtils::Other
@ Other
Definition: InDetSecVtxTruthMatchTool.h:35
InDetSecVtxTruthMatchTool.h
xAOD::TruthParticle_v1::nParents
size_t nParents() const
Number of parents of this particle.
Definition: TruthParticle_v1.cxx:122
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
lumiFormat.i
int i
Definition: lumiFormat.py:92
InDetSecVtxTruthMatchTool::m_vxMatchWeight
Gaudi::Property< float > m_vxMatchWeight
Definition: InDetSecVtxTruthMatchTool.h:112
InDetSecVtxTruthMatchUtils::isAccepted
bool isAccepted(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:73
h
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
InDetSecVtxTruthMatchUtils::Reconstructable
@ Reconstructable
Definition: InDetSecVtxTruthMatchTool.h:41
InDetSecVtxTruthMatchTool::m_trkMatchProb
Gaudi::Property< float > m_trkMatchProb
Definition: InDetSecVtxTruthMatchTool.h:111
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::Vertex_v1::TrackParticleLinks_t
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
Type for the associated track particles.
Definition: Vertex_v1.h:128
DataVector< xAOD::TrackParticle_v1 >
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
HepMC::INVALID_VERTEX_ID
constexpr int INVALID_VERTEX_ID
Definition: MagicNumbers.h:57
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MagicNumbers.h
python.PyAthena.v
v
Definition: PyAthena.py:157
InDetSecVtxTruthMatchUtils::Reconstructed
@ Reconstructed
Definition: InDetSecVtxTruthMatchTool.h:44
InDetSecVtxTruthMatchUtils::Seeded
@ Seeded
Definition: InDetSecVtxTruthMatchTool.h:43
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetSecVtxTruthMatchUtils::Merged
@ Merged
Definition: InDetSecVtxTruthMatchTool.h:32
InDetSecVtxTruthMatchUtils::VertexTruthMatchInfo
std::tuple< ElementLink< xAOD::TruthVertexContainer >, float, float > VertexTruthMatchInfo
Definition: InDetSecVtxTruthMatchTool.h:27
InDetSecVtxTruthMatchUtils::Matched
@ Matched
Definition: InDetSecVtxTruthMatchTool.h:31
InDetSecVtxTruthMatchTool::checkParticle
std::vector< int > checkParticle(const xAOD::TruthParticle &part, const xAOD::TrackParticleContainer *tkCont) const
Definition: InDetSecVtxTruthMatchTool.cxx:318
InDetSecVtxTruthMatchTool::InDetSecVtxTruthMatchTool
InDetSecVtxTruthMatchTool(const std::string &name)
Definition: InDetSecVtxTruthMatchTool.cxx:12
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TruthEventContainer.h
InDetSecVtxTruthMatchUtils::isSeeded
bool isSeeded(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:77
test_pyathena.counter
counter
Definition: test_pyathena.py:15
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:121
InDetSecVtxTruthMatchUtils::Accepted
@ Accepted
Definition: InDetSecVtxTruthMatchTool.h:42
TrackParticleContainer.h
InDetSecVtxTruthMatchUtils
Definition: InDetSecVtxTruthMatchTool.h:22
fitman.k
k
Definition: fitman.py:528
InDetSecVtxTruthMatchTool::m_trkPtCut
Gaudi::Property< float > m_trkPtCut
Definition: InDetSecVtxTruthMatchTool.h:113