ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAODMaker::TrackParticleCnvAlg Class Reference

Algorithm creating xAOD::TrackParticles from TrackParticles. More...

#include <TrackParticleCnvAlg.h>

Inheritance diagram for xAODMaker::TrackParticleCnvAlg:
Collaboration diagram for xAODMaker::TrackParticleCnvAlg:

Public Member Functions

 TrackParticleCnvAlg (const std::string &name, ISvcLocator *svcLoc)
 Regular algorithm constructor. More...
 
virtual StatusCode initialize ()
 Function initialising the algorithm. More...
 
virtual StatusCode execute (const EventContext &ctx) const
 Function executing the algorithm. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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

template<typename CONT , typename TRUTHCONT , typename CONVTOOL >
int convert (const CONT &, const TRUTHCONT &, CONVTOOL &tool, SG::WriteHandle< xAOD::TrackParticleContainer > &, const xAODTruthParticleLinkVector *, const xAOD::Vertex *primaryVertex=nullptr, const ObservedTrackMap *obs_track_map=0) const
 
xAOD::TrackParticlecreateParticle (xAOD::TrackParticleContainer &xaod, const Rec::TrackParticleContainer &container, const Rec::TrackParticle &tp)
 
xAOD::TrackParticlecreateParticle (xAOD::TrackParticleContainer &xaod, const TrackCollection &container, const Trk::Track &tp, const EventContext &ctx)
 
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< bool > m_addTruthLink {this,"AddTruthLink", false }
 toggle on adding truth links More...
 
ToolHandle< Trk::ITrackParticleCreatorToolm_particleCreator {this, "TrackParticleCreator", "Trk::TrackParticleCreatorTool/TrackParticleCreatorTool" }
 The key for the input TrackParticleTruthCollection. More...
 
ToolHandle< IMCTruthClassifierm_truthClassifier
 ToolHandle to truth classifier. More...
 
ToolHandle< xAODMaker::ITrackCollectionCnvToolm_TrackCollectionCnvTool {this, "TrackCollectionCnvTool", "xAODMaker::TrackCollectionCnvTool/TrackCollectionCnvTool"}
 
ToolHandle< xAODMaker::IRecTrackParticleContainerCnvToolm_RecTrackParticleContainerCnvTool
 
SG::ReadHandleKey< Rec::TrackParticleContainerm_aod {this, "AODContainerName", "TrackParticleCandidate"}
 
SG::ReadHandleKey< TrackCollectionm_tracks {this, "TrackContainerName", "Tracks"}
 
SG::ReadHandleKey< xAOD::VertexContainerm_primaryVertexContainer { this, "PrimaryVerticesName", "", "Name of primary vertex container is case the parameters should be calculated with respect to the primary vertex"}
 
SG::WriteHandleKey< xAOD::TrackParticleContainerm_xaodout {this, "xAODTrackParticlesFromTracksContainerName", "InDetTrackParticles"}
 
SG::WriteHandleKey< xAOD::TrackParticleContainerm_xaodTrackParticlesout {this, "xAODContainerName", "ConvertedTrackParticleCandidate" }
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_xaodTruthOriginKey {this,"truthOriginKey", "" , "Key to declare that the alg will write truthOrigin. Will be overwritten during init"}
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_xaodTruthTypeKey {this, "truthTypeKey", "" , "Key to declare that the alg will write truthType. Will be overwritten during init" }
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_xaodTruthLinkKey {this, "truthLinkKey", "", "Key to declare that the alg will writhe the truthParticleLink. Will be overwritten during init."}
 
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_xaodTruthMatchProbKey {this, "truthMatchProbKey", "", "Key to declare that the alg will writhe the truthParticleLink. Will be overwritten during init."}
 
SG::ReadHandleKey< xAODTruthParticleLinkVectorm_truthParticleLinkVec {this, "xAODTruthLinkVector", "xAODTruthLinks"}
 
SG::ReadHandleKey< TrackParticleTruthCollectionm_aodTruth {this, "AODTruthContainerName" , ""}
 
SG::ReadHandleKey< TrackTruthCollectionm_trackTruth {this, "TrackTruthContainerName", ""}
 
Gaudi::Property< bool > m_doMonitoring {this, "DoMonitoring", false}
 
ToolHandle< ITrackParticleMonitoringm_trackMonitoringTool { this, "TrkMonTool", "", "Tracking Monitoring tool" }
 
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Monitoring tool" }
 
Gaudi::Property< bool > m_augmentObservedTracks {this, "AugmentObservedTracks", false, "augment observed tracks"}
 
SG::ReadHandleKey< ObservedTrackMapm_tracksMap {this, "TracksMapName", "" , "name of observed tracks map saved in store"}
 
Gaudi::Property< bool > m_convertAODTrackParticles {this, "ConvertTrackParticles", true}
 toggle on converting AOD track particles to xAOD More...
 
Gaudi::Property< bool > m_convertTracks {this, "ConvertTracks", false}
 toggle on converting tracks to xAOD More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

Algorithm creating xAOD::TrackParticles from TrackParticles.

   This algorithm can be used to translate the TrackParticles coming
   from an AOD, and create xAOD::TrackParticle objects out of them
   for an output xAOD.
Author
Edward Moyse Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
297747
Date
2013-10-28 16:14:24 +0100 (Mon, 28 Oct 2013)

Definition at line 54 of file TrackParticleCnvAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrackParticleCnvAlg()

xAODMaker::TrackParticleCnvAlg::TrackParticleCnvAlg ( const std::string &  name,
ISvcLocator *  svcLoc 
)

Regular algorithm constructor.

Definition at line 26 of file TrackParticleCnvAlg.cxx.

28  : AthReentrantAlgorithm(name, svcLoc) {}

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ convert()

template<typename CONT , typename TRUTHCONT , typename CONVTOOL >
int xAODMaker::TrackParticleCnvAlg::convert ( const CONT &  container,
const TRUTHCONT &  truth,
CONVTOOL &  tool,
SG::WriteHandle< xAOD::TrackParticleContainer > &  xaod,
const xAODTruthParticleLinkVector truthLinkVec,
const xAOD::Vertex primaryVertex = nullptr,
const ObservedTrackMap obs_track_map = 0 
) const
private

Definition at line 283 of file TrackParticleCnvAlg.cxx.

291 {
292  // Create the xAOD container and its auxiliary store:
293 
294  // convert the track containers separately with the converting tools that are
295  // also used by TrigHLTtoxAODTool
296  ATH_MSG_DEBUG("calling the converting tool for " << xaod.name());
297  // Augment track particles using track map if available
298  if (obs_track_map){
299  if (conv_tool->convertAndAugment(&container, xaod.ptr(), obs_track_map, primaryVertex).isFailure()) {
300  ATH_MSG_ERROR("Couldn't convert and augment aod to xaod ("
301  << xaod.name() << ") with the converting tool");
302  return -1;
303  }
304  }
305  else{
306  if (conv_tool->convert(&container, xaod.ptr(), primaryVertex).isFailure()) {
307  ATH_MSG_ERROR("Couldn't convert aod to xaod ("
308  << xaod.name() << ") with the converting tool");
309  return -1;
310  }
311  }
312  // Create the xAOD objects:
314  xAOD::TrackParticleContainer::iterator end_xaod = xaod->end();
315 
316  AssociationHelper<CONT> association_to_src(container, xaod.ptr());
317  unsigned int trackCounter(0);
318  // loop over AOD and converted xAOD for summary info and truth links
319  for (; itr_xaod != end_xaod; ++itr_xaod) {
320  // protect if something went wrong and there is no converted xaod equivalent
321 
322  if (!(*itr_xaod)) {
323  ATH_MSG_WARNING("Empty element in xAOD container!");
324  continue;
325  }
326 
327  xAOD::TrackParticle* particle = *itr_xaod;
328 
329  if (!particle) {
330  ATH_MSG_WARNING("Failed to get an xAOD::TrackParticle");
331  continue;
332  }
333 
334  trackCounter++;
335  if(msgLvl(MSG::DEBUG)){
336  int npix, nsct, ntrt, npixh, nscth, npixshim, npixsplit;
337  npix = nsct = ntrt = npixh = nscth = npixshim = npixsplit = -1;
338  const Trk::Track *tr = particle->track();
339  if (tr){
340  const Trk::TrackSummary *ts = tr->trackSummary();
341  if (ts){
342  npix = ts->get(Trk::numberOfPixelHits);
343  nsct = ts->get(Trk::numberOfSCTHits);
344  ntrt = ts->get(Trk::numberOfTRTHits);
345  nscth= ts->get(Trk::numberOfSCTHoles);
346  npixh= ts->get(Trk::numberOfPixelHoles);
347  }
348  }
349  msg() << MSG::DEBUG << "REGTEST: " << std::setw(5) << trackCounter
350  << " pT: " << std::setw(10) << particle->pt()
351  << " eta: " << particle->eta()
352  << " phi: " << particle->phi()
353  << " d0: " << particle->d0()
354  << " z0: " << particle->z0()
355  << "\t" << npix << "/" << nsct << "/" << ntrt << "/holes/" << npixh << "/" << nscth
356  << endmsg;
357 
358  }
359 
360 
361  //
362  // --------- statistics
363  //
364 
365  if (m_addTruthLink) {
366  MCTruthPartClassifier::ParticleType type = MCTruthPartClassifier::Unknown;
369  float probability = -1.0;
371 
372  ElementLink<CONT> tpLink(
373  association_to_src(*itr_xaod, itr_xaod - xaod->begin()), container);
374  if (!tpLink.isValid()) {
375  ATH_MSG_WARNING("Failed to create ElementLink to Track/TrackParticle");
376  } else if(truth->empty()){
377  // This can happen if there is no HS track
378  ATH_MSG_DEBUG("No truth available");
379  } else {
380  auto result = truth->find(tpLink);
381  if (result == truth->end()) {
383  "Failed find truth associated with Track/TrackParticle");
384  } else {
385  // setTruthLink(link,result->second, type, origin);
386  ATH_MSG_VERBOSE("Found track Truth: uniqueID "
387  << HepMC::uniqueID(result->second.particleLink()) << " evt "
388  << result->second.particleLink().eventIndex());
389  probability = result->second.probability();
390  link = truthLinkVec->find(result->second.particleLink());
391  if (link.isValid()) {
392  ATH_MSG_DEBUG("Found matching xAOD Truth: uniqueID "
393  << HepMC::uniqueID(*link) << " pt " << (*link)->pt()
394  << " eta " << (*link)->eta() << " phi "
395  << (*link)->phi());
396  // if configured also get truth classification
397  if (result->second.particleLink().cptr() &&
398  !m_truthClassifier.empty()) {
399  auto truthClass = m_truthClassifier->particleTruthClassifier(
400  result->second.particleLink());
401  type = truthClass.first;
402  origin = truthClass.second;
403  ATH_MSG_VERBOSE("Got truth type " << static_cast<int>(type)
404  << " origin "
405  << static_cast<int>(origin));
406  }
407  } else {
408  if (HepMC::uniqueID(result->second.particleLink()) > 0) {
409  ATH_MSG_WARNING("No associated xAOD truth for valid truth link "
410  << result->second.particleLink());
411  }
412  }
413  }
414  }
415  static const SG::AuxElement::Accessor<
417  theLink("truthParticleLink");
418  static const SG::AuxElement::Accessor<float> theProbability(
419  "truthMatchProbability");
420  theLink(*particle) = link;
421  theProbability(*particle) = probability;
422  if (!m_truthClassifier.empty()) {
423  static const SG::AuxElement::Accessor<int> theType("truthType");
424  static const SG::AuxElement::Accessor<int> theOrigin("truthOrigin");
425  theType(*particle) = static_cast<int>(type);
426  theOrigin(*particle) = static_cast<int>(origin);
427  }
428  }
429  } // loop over aod tracks
430 
431  ATH_MSG_DEBUG("Converted [" << container.size() << " -> " << xaod->size()
432  << "] TrackParticles and stored in "
433  << xaod.name());
434  if (container.size() != xaod->size()) {
435  ATH_MSG_WARNING("number of items in the AOD container: "
436  << container.size()
437  << " is not equal to the number of items in its converted "
438  "xAOD equivalent: "
439  << xaod->size());
440  }
441 
442  return 1;
443 }

◆ createParticle() [1/2]

xAOD::TrackParticle * xAODMaker::TrackParticleCnvAlg::createParticle ( xAOD::TrackParticleContainer xaod,
const Rec::TrackParticleContainer container,
const Rec::TrackParticle tp 
)
inlineprivate
Parameters
containercontainer

Definition at line 446 of file TrackParticleCnvAlg.cxx.

450 {
451  // create the xAOD::TrackParticle, the pointer is added to the container in
452  // the function
453  xAOD::TrackParticle* xp = m_particleCreator->createParticle(tp, &xaod);
454  return xp;
455 } // createParticleAndTruth

◆ createParticle() [2/2]

xAOD::TrackParticle * xAODMaker::TrackParticleCnvAlg::createParticle ( xAOD::TrackParticleContainer xaod,
const TrackCollection container,
const Trk::Track tp,
const EventContext &  ctx 
)
inlineprivate

Definition at line 458 of file TrackParticleCnvAlg.cxx.

462 {
463  // create the xAOD::TrackParticle, the pointer is added to the container in
464  // the function
465  ElementLink<TrackCollection> trackLink(&tp, container,ctx);
466  return m_particleCreator->createParticle(trackLink, &xaod);
467 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode xAODMaker::TrackParticleCnvAlg::execute ( const EventContext &  ctx) const
virtual

Function executing the algorithm.

Definition at line 87 of file TrackParticleCnvAlg.cxx.

88 {
89 
90  const Rec::TrackParticleContainer* aod = nullptr;
91  const TrackCollection* tracks = nullptr;
92  const xAODTruthParticleLinkVector* truthLinks = nullptr;
93  const TrackParticleTruthCollection* aodTruth = nullptr;
94  const TrackTruthCollection* trackTruth = nullptr;
95  const ObservedTrackMap* tracksMap = nullptr;
96  const xAOD::Vertex* primaryVertex = nullptr;
97 
98  //timer object for total execution time
99  auto mnt_timer_Total = Monitored::Timer<std::chrono::milliseconds>("TIME_Total");
100 
101  // Retrieve the AOD particles:
104  if (!rh_aod.isValid()) {
105  ATH_MSG_ERROR(m_aod.key() << " not found");
106  return StatusCode::FAILURE;
107  } else {
108  aod = rh_aod.cptr();
109  ATH_MSG_VERBOSE("Got TrackParticleContainer with key " << m_aod.key()
110  << " found.");
111  }
112  }
113  // Retrieve the Tracks:
114  if (m_convertTracks) {
116  if (!rh_tracks.isValid()) {
117  ATH_MSG_ERROR(m_tracks.key() << " not found");
118  return StatusCode::SUCCESS;
119  } else {
120  tracks = rh_tracks.cptr();
121  ATH_MSG_VERBOSE("Got TrackCollection with key " << m_tracks.key()
122  << " found.");
123 
124  }
125  }
126  if (m_addTruthLink) {
129  if (!rh_aodTruth.isValid()) {
130  ATH_MSG_WARNING("No TrackParticleTruthCollection with key "
131  << m_aodTruth.key() << " found. Do nothing.");
132  return StatusCode::SUCCESS;
133  } else
134  aodTruth = rh_aodTruth.cptr();
135  }
136  if (m_convertTracks) {
138  if (!rh_trackTruth.isValid()) {
139  ATH_MSG_WARNING("No DetailedTrackTruthCollection with key "
140  << m_trackTruth.key() << " found. Do nothing.");
141  return StatusCode::SUCCESS;
142  } else
143  trackTruth = rh_trackTruth.cptr();
144  }
145 
146  SG::ReadHandle<xAODTruthParticleLinkVector> rh_truthParticleLinkVec(
148  if (!rh_truthParticleLinkVec.isValid()) {
149  ATH_MSG_WARNING("No xAODTruthParticleLinkVector with key "
150  << m_truthParticleLinkVec.key() << " found. Do nothing.");
151  return StatusCode::SUCCESS;
152  } else
153  truthLinks = rh_truthParticleLinkVec.cptr();
154  }
155 
156  if(!m_primaryVertexContainer.key().empty())
157  {
159  if (!vtx_container.isValid()) {
160  ATH_MSG_WARNING("No xAOD::VertexContainer with key "<< m_primaryVertexContainer.key() << " found. Do nothing.");
161  return StatusCode::SUCCESS;
162  }
163  const xAOD::Vertex* dummyVertex = nullptr;
164  for(auto vtx : *vtx_container) {
165  if(vtx->vertexType()==xAOD::VxType::PriVtx) {
166  primaryVertex = vtx;
167  break;
168  }
169  if(vtx->vertexType()==xAOD::VxType::NoVtx) {
170  // in case of no primary vertex
171  dummyVertex = vtx;
172  }
173  }
174  if(!primaryVertex)
175  {
176  if(dummyVertex)
177  {
178  ATH_MSG_INFO("No primary vertex found, will use dummy vertex at "<<dummyVertex->x()<<","<<dummyVertex->y()<<","<<dummyVertex->z());
179  primaryVertex=dummyVertex;
180  }
181  else
182  {
183  ATH_MSG_WARNING("Neither primary nor dummy vertex found. Do Nothing.");
184  return StatusCode::SUCCESS;
185  }
186  }
187  }
188 
189  if (m_convertTracks) {
191  ATH_CHECK(
192  wh_xaodout.record(std::make_unique<xAOD::TrackParticleContainer>(),
193  std::make_unique<xAOD::TrackParticleAuxContainer>()));
194 
195  // Augment track particles with information from observer tool
198  if (!rh_tracksMap.isValid()) {
199  ATH_MSG_ERROR(m_tracksMap.key() << " not found");
200  return StatusCode::FAILURE;
201  }
202  else {
203  tracksMap = rh_tracksMap.cptr();
204  ATH_MSG_VERBOSE("Got ObservedTrackMap with key " << m_tracksMap.key()
205  << " found.");
206  }
207 
208  convert(
209  (*tracks), trackTruth, m_TrackCollectionCnvTool, wh_xaodout, truthLinks, primaryVertex, tracksMap);
210  }
211  else{
212  convert(
213  (*tracks), trackTruth, m_TrackCollectionCnvTool, wh_xaodout, truthLinks, primaryVertex);
214  }
215  // Monitor track parameters
216  if (m_doMonitoring)
217  m_trackMonitoringTool->monitor_tracks("Track", "Pass", *wh_xaodout);
218  }
220  SG::WriteHandle<xAOD::TrackParticleContainer> wh_xaodTrackParticlesout(
222  ATH_CHECK(wh_xaodTrackParticlesout.record(
223  std::make_unique<xAOD::TrackParticleContainer>(),
224  std::make_unique<xAOD::TrackParticleAuxContainer>()));
225  convert((*aod),
226  aodTruth,
228  wh_xaodTrackParticlesout,
229  truthLinks);
230  }
231 
232  //extra scope needed to trigger the monitoring
233  {auto monTime = Monitored::Group(m_monTool, mnt_timer_Total);}
234 
235  return StatusCode::SUCCESS;
236 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode xAODMaker::TrackParticleCnvAlg::initialize ( )
virtual

Function initialising the algorithm.

Definition at line 31 of file TrackParticleCnvAlg.cxx.

32 {
33 
34  ATH_MSG_DEBUG("Initializing TrackParticleCnvAlg");
35  ATH_MSG_DEBUG("AODContainerName = " << m_aod.key());
36  ATH_MSG_DEBUG("xAODContainerName = " << m_xaodTrackParticlesout.key());
37  ATH_CHECK(m_particleCreator.retrieve());
38  if (m_addTruthLink)
39  ATH_CHECK(m_truthClassifier.retrieve());
40  else
41  m_truthClassifier.disable();
42  ATH_CHECK(m_TrackCollectionCnvTool.retrieve(DisableTool{ !m_convertTracks }));
44  DisableTool{ !m_convertAODTrackParticles }));
45  // to preserve the inisialised parameters of the ParticleCreatorTool:
46  ATH_MSG_DEBUG("Overriding particle creator tool settings.");
47  if (m_convertTracks)
48  ATH_CHECK(
49  m_TrackCollectionCnvTool->setParticleCreatorTool(&m_particleCreator));
51  ATH_CHECK(m_RecTrackParticleContainerCnvTool->setParticleCreatorTool(
53 
57  ATH_CHECK(m_tracks.initialize(m_convertTracks));
60  ATH_CHECK(
63  if (m_addTruthLink) {
64  const std::string container_key = m_convertTracks ? m_xaodout.key() : m_xaodTrackParticlesout.key();
65  m_xaodTruthOriginKey = container_key+".truthOrigin";
66  m_xaodTruthTypeKey = container_key+".truthType";
67  m_xaodTruthLinkKey = container_key+".truthParticleLink";
68  m_xaodTruthMatchProbKey = container_key+".truthMatchProbability";
69  }
70  const bool init_truthKey = m_addTruthLink;
71  ATH_CHECK(m_xaodTruthOriginKey.initialize(init_truthKey && !m_truthClassifier.empty()));
72  ATH_CHECK(m_xaodTruthTypeKey.initialize(init_truthKey && !m_truthClassifier.empty()));
73  ATH_CHECK(m_xaodTruthLinkKey.initialize(init_truthKey));
75 
76  // Retrieve monitoring tools if provided
77  ATH_CHECK(m_trackMonitoringTool.retrieve(DisableTool{ !m_doMonitoring }));
78  ATH_CHECK(m_monTool.retrieve(DisableTool{ !m_doMonitoring }));
79 
81 
82  // Return gracefully:
83  return StatusCode::SUCCESS;
84 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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_addTruthLink

Gaudi::Property<bool> xAODMaker::TrackParticleCnvAlg::m_addTruthLink {this,"AddTruthLink", false }
private

toggle on adding truth links

Definition at line 68 of file TrackParticleCnvAlg.h.

◆ m_aod

SG::ReadHandleKey<Rec::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_aod {this, "AODContainerName", "TrackParticleCandidate"}
private

Definition at line 88 of file TrackParticleCnvAlg.h.

◆ m_aodTruth

SG::ReadHandleKey<TrackParticleTruthCollection> xAODMaker::TrackParticleCnvAlg::m_aodTruth {this, "AODTruthContainerName" , ""}
private

Definition at line 105 of file TrackParticleCnvAlg.h.

◆ m_augmentObservedTracks

Gaudi::Property<bool> xAODMaker::TrackParticleCnvAlg::m_augmentObservedTracks {this, "AugmentObservedTracks", false, "augment observed tracks"}
private

Definition at line 116 of file TrackParticleCnvAlg.h.

◆ m_convertAODTrackParticles

Gaudi::Property<bool> xAODMaker::TrackParticleCnvAlg::m_convertAODTrackParticles {this, "ConvertTrackParticles", true}
private

toggle on converting AOD track particles to xAOD

Definition at line 121 of file TrackParticleCnvAlg.h.

◆ m_convertTracks

Gaudi::Property<bool> xAODMaker::TrackParticleCnvAlg::m_convertTracks {this, "ConvertTracks", false}
private

toggle on converting tracks to xAOD

Definition at line 124 of file TrackParticleCnvAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doMonitoring

Gaudi::Property<bool> xAODMaker::TrackParticleCnvAlg::m_doMonitoring {this, "DoMonitoring", false}
private

Definition at line 109 of file TrackParticleCnvAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool > xAODMaker::TrackParticleCnvAlg::m_monTool { this, "MonTool", "", "Monitoring tool" }
private

Definition at line 113 of file TrackParticleCnvAlg.h.

◆ m_particleCreator

ToolHandle<Trk::ITrackParticleCreatorTool> xAODMaker::TrackParticleCnvAlg::m_particleCreator {this, "TrackParticleCreator", "Trk::TrackParticleCreatorTool/TrackParticleCreatorTool" }
private

The key for the input TrackParticleTruthCollection.

ToolHandle to particle creator

Definition at line 73 of file TrackParticleCnvAlg.h.

◆ m_primaryVertexContainer

SG::ReadHandleKey<xAOD::VertexContainer> xAODMaker::TrackParticleCnvAlg::m_primaryVertexContainer { this, "PrimaryVerticesName", "", "Name of primary vertex container is case the parameters should be calculated with respect to the primary vertex"}
private

Definition at line 92 of file TrackParticleCnvAlg.h.

◆ m_RecTrackParticleContainerCnvTool

ToolHandle<xAODMaker::IRecTrackParticleContainerCnvTool> xAODMaker::TrackParticleCnvAlg::m_RecTrackParticleContainerCnvTool
private
Initial value:
{this, "RecTrackParticleContainerCnvTool", "xAODMaker::RecTrackParticleContainerCnvTool/"
"RecTrackParticleContainerCnvTool" }

Definition at line 85 of file TrackParticleCnvAlg.h.

◆ m_TrackCollectionCnvTool

ToolHandle<xAODMaker::ITrackCollectionCnvTool> xAODMaker::TrackParticleCnvAlg::m_TrackCollectionCnvTool {this, "TrackCollectionCnvTool", "xAODMaker::TrackCollectionCnvTool/TrackCollectionCnvTool"}
private

Definition at line 83 of file TrackParticleCnvAlg.h.

◆ m_trackMonitoringTool

ToolHandle<ITrackParticleMonitoring> xAODMaker::TrackParticleCnvAlg::m_trackMonitoringTool { this, "TrkMonTool", "", "Tracking Monitoring tool" }
private

Definition at line 110 of file TrackParticleCnvAlg.h.

◆ m_tracks

SG::ReadHandleKey<TrackCollection> xAODMaker::TrackParticleCnvAlg::m_tracks {this, "TrackContainerName", "Tracks"}
private

Definition at line 90 of file TrackParticleCnvAlg.h.

◆ m_tracksMap

SG::ReadHandleKey<ObservedTrackMap> xAODMaker::TrackParticleCnvAlg::m_tracksMap {this, "TracksMapName", "" , "name of observed tracks map saved in store"}
private

Definition at line 117 of file TrackParticleCnvAlg.h.

◆ m_trackTruth

SG::ReadHandleKey<TrackTruthCollection> xAODMaker::TrackParticleCnvAlg::m_trackTruth {this, "TrackTruthContainerName", ""}
private

Definition at line 106 of file TrackParticleCnvAlg.h.

◆ m_truthClassifier

ToolHandle<IMCTruthClassifier> xAODMaker::TrackParticleCnvAlg::m_truthClassifier
private
Initial value:
{
this,
"MCTruthClassifier",
"MCTruthClassifier/MCTruthClassifier",
" MCTruthClassifier Instance to use "
}

ToolHandle to truth classifier.

Definition at line 75 of file TrackParticleCnvAlg.h.

◆ m_truthParticleLinkVec

SG::ReadHandleKey<xAODTruthParticleLinkVector> xAODMaker::TrackParticleCnvAlg::m_truthParticleLinkVec {this, "xAODTruthLinkVector", "xAODTruthLinks"}
private

Definition at line 104 of file TrackParticleCnvAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xaodout

SG::WriteHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodout {this, "xAODTrackParticlesFromTracksContainerName", "InDetTrackParticles"}
private

Definition at line 94 of file TrackParticleCnvAlg.h.

◆ m_xaodTrackParticlesout

SG::WriteHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodTrackParticlesout {this, "xAODContainerName", "ConvertedTrackParticleCandidate" }
private

Definition at line 97 of file TrackParticleCnvAlg.h.

◆ m_xaodTruthLinkKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodTruthLinkKey {this, "truthLinkKey", "", "Key to declare that the alg will writhe the truthParticleLink. Will be overwritten during init."}
private

Definition at line 100 of file TrackParticleCnvAlg.h.

◆ m_xaodTruthMatchProbKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodTruthMatchProbKey {this, "truthMatchProbKey", "", "Key to declare that the alg will writhe the truthParticleLink. Will be overwritten during init."}
private

Definition at line 101 of file TrackParticleCnvAlg.h.

◆ m_xaodTruthOriginKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodTruthOriginKey {this,"truthOriginKey", "" , "Key to declare that the alg will write truthOrigin. Will be overwritten during init"}
private

Definition at line 98 of file TrackParticleCnvAlg.h.

◆ m_xaodTruthTypeKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> xAODMaker::TrackParticleCnvAlg::m_xaodTruthTypeKey {this, "truthTypeKey", "" , "Key to declare that the alg will write truthType. Will be overwritten during init" }
private

Definition at line 99 of file TrackParticleCnvAlg.h.


The documentation for this class was generated from the following files:
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
xAOD::Vertex_v1::x
float x() const
Returns the x position.
xAODMaker::TrackParticleCnvAlg::m_xaodTruthLinkKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_xaodTruthLinkKey
Definition: TrackParticleCnvAlg.h:100
xAODMaker::TrackParticleCnvAlg::m_xaodTruthOriginKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_xaodTruthOriginKey
Definition: TrackParticleCnvAlg.h:98
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAODMaker::TrackParticleCnvAlg::m_trackMonitoringTool
ToolHandle< ITrackParticleMonitoring > m_trackMonitoringTool
Definition: TrackParticleCnvAlg.h:110
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
get_generator_info.result
result
Definition: get_generator_info.py:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAODMaker::TrackParticleCnvAlg::m_augmentObservedTracks
Gaudi::Property< bool > m_augmentObservedTracks
Definition: TrackParticleCnvAlg.h:116
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
SG::VarHandleBase::name
const std::string & name() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:75
xAODTruthParticleLinkVector::find
ElementLink< xAOD::TruthParticleContainer > find(const HepMcParticleLink &hepMCLink) const
Definition: xAODTruthParticleLink.h:28
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
xAODMaker::TrackParticleCnvAlg::m_truthClassifier
ToolHandle< IMCTruthClassifier > m_truthClassifier
ToolHandle to truth classifier.
Definition: TrackParticleCnvAlg.h:75
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAODMaker::TrackParticleCnvAlg::m_convertAODTrackParticles
Gaudi::Property< bool > m_convertAODTrackParticles
toggle on converting AOD track particles to xAOD
Definition: TrackParticleCnvAlg.h:121
Trk::numberOfSCTHoles
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:73
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
xAODMaker::TrackParticleCnvAlg::m_xaodTrackParticlesout
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_xaodTrackParticlesout
Definition: TrackParticleCnvAlg.h:97
xAODMaker::TrackParticleCnvAlg::m_xaodTruthMatchProbKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_xaodTruthMatchProbKey
Definition: TrackParticleCnvAlg.h:101
xAODMaker::TrackParticleCnvAlg::m_tracksMap
SG::ReadHandleKey< ObservedTrackMap > m_tracksMap
Definition: TrackParticleCnvAlg.h:117
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ObservedTrackMap
std::map< int, std::tuple< Trk::Track *, double, xAOD::RejectionStep, xAOD::RejectionReason, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, float, float, int, std::vector< xAOD::RejectionStep >, std::vector< xAOD::RejectionReason > > > ObservedTrackMap
Definition: ObservedTrackMap.h:50
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
NonDefined
@ NonDefined
Definition: TruthClasses.h:52
TrackTruthCollection
Definition: TrackTruthCollection.h:21
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAODMaker::TrackParticleCnvAlg::m_aod
SG::ReadHandleKey< Rec::TrackParticleContainer > m_aod
Definition: TrackParticleCnvAlg.h:88
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAODMaker::TrackParticleCnvAlg::m_trackTruth
SG::ReadHandleKey< TrackTruthCollection > m_trackTruth
Definition: TrackParticleCnvAlg.h:106
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ParticleOrigin
ParticleOrigin
Definition: TruthClasses.h:51
xAODMaker::TrackParticleCnvAlg::m_addTruthLink
Gaudi::Property< bool > m_addTruthLink
toggle on adding truth links
Definition: TrackParticleCnvAlg.h:68
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
xAODMaker::TrackParticleCnvAlg::m_aodTruth
SG::ReadHandleKey< TrackParticleTruthCollection > m_aodTruth
Definition: TrackParticleCnvAlg.h:105
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAODMaker::TrackParticleCnvAlg::m_xaodTruthTypeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_xaodTruthTypeKey
Definition: TrackParticleCnvAlg.h:99
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::Vertex_v1::z
float z() const
Returns the z position.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector< Trk::Track >
xAODMaker::TrackParticleCnvAlg::m_TrackCollectionCnvTool
ToolHandle< xAODMaker::ITrackCollectionCnvTool > m_TrackCollectionCnvTool
Definition: TrackParticleCnvAlg.h:83
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
Trk::numberOfPixelHoles
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:59
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
xAODMaker::TrackParticleCnvAlg::m_doMonitoring
Gaudi::Property< bool > m_doMonitoring
Definition: TrackParticleCnvAlg.h:109
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAODMaker::TrackParticleCnvAlg::convert
int convert(const CONT &, const TRUTHCONT &, CONVTOOL &tool, SG::WriteHandle< xAOD::TrackParticleContainer > &, const xAODTruthParticleLinkVector *, const xAOD::Vertex *primaryVertex=nullptr, const ObservedTrackMap *obs_track_map=0) const
Definition: TrackParticleCnvAlg.cxx:283
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAODMaker::TrackParticleCnvAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrackParticleCnvAlg.h:113
xAODMaker::TrackParticleCnvAlg::m_RecTrackParticleContainerCnvTool
ToolHandle< xAODMaker::IRecTrackParticleContainerCnvTool > m_RecTrackParticleContainerCnvTool
Definition: TrackParticleCnvAlg.h:85
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
xAODMaker::TrackParticleCnvAlg::m_truthParticleLinkVec
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthParticleLinkVec
Definition: TrackParticleCnvAlg.h:104
xAODMaker::TrackParticleCnvAlg::m_convertTracks
Gaudi::Property< bool > m_convertTracks
toggle on converting tracks to xAOD
Definition: TrackParticleCnvAlg.h:124
xAODMaker::TrackParticleCnvAlg::m_tracks
SG::ReadHandleKey< TrackCollection > m_tracks
Definition: TrackParticleCnvAlg.h:90
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAODTruthParticleLinkVector
Definition: xAODTruthParticleLink.h:26
TrackParticleTruthCollection
Definition: TrackParticleTruthCollection.h:18
DEBUG
#define DEBUG
Definition: page_access.h:11
xAOD::Vertex_v1::y
float y() const
Returns the y position.
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAODMaker::TrackParticleCnvAlg::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
The key for the input TrackParticleTruthCollection.
Definition: TrackParticleCnvAlg.h:73
xAODMaker::TrackParticleCnvAlg::m_primaryVertexContainer
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexContainer
Definition: TrackParticleCnvAlg.h:92
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAODMaker::TrackParticleCnvAlg::m_xaodout
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_xaodout
Definition: TrackParticleCnvAlg.h:94
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.CaloScaleNoiseConfig.ts
ts
Definition: CaloScaleNoiseConfig.py:86
ParticleType
ParticleType
Definition: TruthClasses.h:8
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Monitored::Timer
A monitored timer.
Definition: MonitoredTimer.h:32
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >