ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDetSecVtxTruthMatchTool Class Referenceabstract

Class for vertex truth matching. More...

#include <InDetSecVtxTruthMatchTool.h>

Inheritance diagram for InDetSecVtxTruthMatchTool:
Collaboration diagram for InDetSecVtxTruthMatchTool:

Public Member Functions

 InDetSecVtxTruthMatchTool (const std::string &name)
 
virtual StatusCode initialize () override final
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode matchVertices (std::vector< const xAOD::Vertex * > recoVerticesToMatch, std::vector< const xAOD::TruthVertex * > truthVerticesToMatch, const xAOD::TrackParticleContainer *trackParticles) 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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

int checkProduction (const xAOD::TruthParticle &truthPart, std::vector< const xAOD::TruthVertex * > truthVerticesToMatch) const
 
void countReconstructibleDescendentParticles (const xAOD::TruthVertex &signalTruthVertex, std::vector< const xAOD::TruthParticle * > &set, int counter) const
 
std::vector< int > checkParticle (const xAOD::TruthParticle &part, const xAOD::TrackParticleContainer *tkCont) 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...
 

Private Attributes

Gaudi::Property< float > m_trkMatchProb {this, "trackMatchProb", 0.5, "Required MC match probability to consider track a good match" }
 
Gaudi::Property< float > m_vxMatchWeight {this, "vertexMatchWeight", 0.5, "Relative weight threshold to consider vertex matched"}
 
Gaudi::Property< float > m_trkPtCut {this, "trackPtCut", 1000., "pt cut to apply on tracks"}
 
Gaudi::Property< std::string > m_selectedTrackFlag {this, "selectedTrackFlag", "is_selected", "Aux decoration on tracks for seeding efficiencies"}
 
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
 

Detailed Description

Class for vertex truth matching.

Match reconstructed vertices to truth level decay vertices Categorize reconstructed vertices depending on their composition.

Definition at line 95 of file InDetSecVtxTruthMatchTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ InDetSecVtxTruthMatchTool()

InDetSecVtxTruthMatchTool::InDetSecVtxTruthMatchTool ( const std::string &  name)

Definition at line 12 of file InDetSecVtxTruthMatchTool.cxx.

12 : asg::AsgTool(name) {}

Member Function Documentation

◆ checkParticle()

std::vector< int > InDetSecVtxTruthMatchTool::checkParticle ( const xAOD::TruthParticle part,
const xAOD::TrackParticleContainer tkCont 
) const
private

Definition at line 318 of file InDetSecVtxTruthMatchTool.cxx.

318  {
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::is_same_particle(tmpPart,truthPart) ) {
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 }

◆ checkProduction()

int InDetSecVtxTruthMatchTool::checkProduction ( const xAOD::TruthParticle truthPart,
std::vector< const xAOD::TruthVertex * >  truthVerticesToMatch 
) const
private

Definition at line 360 of file InDetSecVtxTruthMatchTool.cxx.

360  {
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 }

◆ countReconstructibleDescendentParticles()

void InDetSecVtxTruthMatchTool::countReconstructibleDescendentParticles ( const xAOD::TruthVertex signalTruthVertex,
std::vector< const xAOD::TruthParticle * > &  set,
int  counter 
) const
private

Definition at line 385 of file InDetSecVtxTruthMatchTool.cxx.

386  {
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  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

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
ptrThe 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.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ 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
ptrThe 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.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode InDetSecVtxTruthMatchTool::initialize ( )
finaloverridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 14 of file InDetSecVtxTruthMatchTool.cxx.

14  {
15  ATH_MSG_INFO("Initializing InDetSecVtxTruthMatchTool");
16 
17 
18  return StatusCode::SUCCESS;
19 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ matchVertices()

StatusCode InDetSecVtxTruthMatchTool::matchVertices ( std::vector< const xAOD::Vertex * >  recoVerticesToMatch,
std::vector< const xAOD::TruthVertex * >  truthVerticesToMatch,
const xAOD::TrackParticleContainer trackParticles 
)
overridevirtual

Implements IInDetSecVtxTruthMatchTool.

Definition at line 37 of file InDetSecVtxTruthMatchTool.cxx.

39  {
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 ancestorVertexUniqueID = checkProduction(truthPart, truthVerticesToMatch);
120 
121  //check if the truth particle is "good"
122  if ( ancestorVertexUniqueID != 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) == ancestorVertexUniqueID;} );
127 
128  if(it == truthVerticesToMatch.end()) {
129  ATH_MSG_WARNING("Truth vertex with unique ID " << ancestorVertexUniqueID << " 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 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ print() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_selectedTrackFlag

Gaudi::Property<std::string> InDetSecVtxTruthMatchTool::m_selectedTrackFlag {this, "selectedTrackFlag", "is_selected", "Aux decoration on tracks for seeding efficiencies"}
private

Definition at line 114 of file InDetSecVtxTruthMatchTool.h.

◆ m_trkMatchProb

Gaudi::Property<float> InDetSecVtxTruthMatchTool::m_trkMatchProb {this, "trackMatchProb", 0.5, "Required MC match probability to consider track a good match" }
private

Definition at line 111 of file InDetSecVtxTruthMatchTool.h.

◆ m_trkPtCut

Gaudi::Property<float> InDetSecVtxTruthMatchTool::m_trkPtCut {this, "trackPtCut", 1000., "pt cut to apply on tracks"}
private

Definition at line 113 of file InDetSecVtxTruthMatchTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vxMatchWeight

Gaudi::Property<float> InDetSecVtxTruthMatchTool::m_vxMatchWeight {this, "vertexMatchWeight", 0.5, "Relative weight threshold to consider vertex matched"}
private

Definition at line 112 of file InDetSecVtxTruthMatchTool.h.


The documentation for this class was generated from the following files:
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
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
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
InDetSecVtxTruthMatchUtils::isReconstructable
bool isReconstructable(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:69
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:396
InDetSecVtxTruthMatchTool::countReconstructibleDescendentParticles
void countReconstructibleDescendentParticles(const xAOD::TruthVertex &signalTruthVertex, std::vector< const xAOD::TruthParticle * > &set, int counter) const
Definition: InDetSecVtxTruthMatchTool.cxx:385
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
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:55
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)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
covarianceTool.prob
prob
Definition: covarianceTool.py:678
InDetSecVtxTruthMatchUtils::Fake
@ Fake
Definition: InDetSecVtxTruthMatchTool.h:34
HepMC::is_same_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.
Definition: MagicNumbers.h:367
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
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
InDetSecVtxTruthMatchUtils::Other
@ Other
Definition: InDetSecVtxTruthMatchTool.h:35
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::TruthParticle_v1::nParents
size_t nParents() const
Number of parents of this particle.
Definition: TruthParticle_v1.cxx:122
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
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:37
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
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
xAOD::Vertex_v1::TrackParticleLinks_t
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
Type for the associated track particles.
Definition: Vertex_v1.h:128
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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:232
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
HepMC::INVALID_VERTEX_ID
constexpr int INVALID_VERTEX_ID
Definition: MagicNumbers.h:58
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.PyAthena.v
v
Definition: PyAthena.py:154
InDetSecVtxTruthMatchUtils::Reconstructed
@ Reconstructed
Definition: InDetSecVtxTruthMatchTool.h:44
InDetSecVtxTruthMatchUtils::Seeded
@ Seeded
Definition: InDetSecVtxTruthMatchTool.h:43
a
TList * a
Definition: liststreamerinfos.cxx:10
h
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
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
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
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
InDetSecVtxTruthMatchUtils::isSeeded
bool isSeeded(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:77
test_pyathena.counter
counter
Definition: test_pyathena.py:15
SG::DataProxy
Definition: DataProxy.h:45
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:119
InDetSecVtxTruthMatchUtils::Accepted
@ Accepted
Definition: InDetSecVtxTruthMatchTool.h:42
fitman.k
k
Definition: fitman.py:528
InDetSecVtxTruthMatchTool::m_trkPtCut
Gaudi::Property< float > m_trkPtCut
Definition: InDetSecVtxTruthMatchTool.h:113