ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ActsTrk::ActsInspectTruthContentAlg Class Reference

#include <ActsInspectTruthContentAlg.h>

Inheritance diagram for ActsTrk::ActsInspectTruthContentAlg:
Collaboration diagram for ActsTrk::ActsInspectTruthContentAlg:

Public Types

enum  EStatClusters : std::size_t {
  EStatClusters::kNTotal, EStatClusters::kNClustersFromPrimaries, EStatClusters::kNClustersWithNoBarcode, EStatClusters::kNClustersWith1Contribution,
  EStatClusters::kNClustersWith1ValidContribution, EStatClusters::kNClustersWith2Contribution, EStatClusters::kNClustersWith2ValidContribution, EStatClusters::kNClustersWith3Contribution,
  EStatClusters::kNClustersWith3ValidContribution, EStatClusters::kNClustersWith200kBarcode, EStatClusters::kNStat
}
 
enum  EStatSeeds : std::size_t {
  EStatSeeds::kNTotal, EStatSeeds::nKSeedsWith0Matches, EStatSeeds::nKSeedsWith1Matches, EStatSeeds::nKSeedsWith2Matches,
  EStatSeeds::nKSeedsSame2Matches, EStatSeeds::nKSeedsWith3Matches, EStatSeeds::nKSeedsSame3Matches, EStatSeeds::nKSeedsWith4Matches,
  EStatSeeds::nKSeedsSame4Matches, EStatSeeds::nKSeedsWith5Matches, EStatSeeds::nKSeedsSame5Matches, EStatSeeds::nKSeedsWith6Matches,
  EStatSeeds::nKSeedsSame6Matches, EStatSeeds::kNStat
}
 
enum  EStatTracks : std::size_t {
  EStatTracks::kNTotal, EStatTracks::kNFullMatch, EStatTracks::kNPerfectMatch, EStatTracks::kNTracks0Holes,
  EStatTracks::kNTracks1Holes, EStatTracks::kNTracks2Holes, EStatTracks::kNTracks3Holes, EStatTracks::kNTracks0Outliers,
  EStatTracks::kNTracks1Outliers, EStatTracks::kNTracks2Outliers, EStatTracks::kNTracks3Outliers, EStatTracks::kNStat
}
 
enum  SeedType : std::size_t {
  SeedType::PPP, SeedType::SSS, SeedType::PPS, SeedType::PSS,
  SeedType::Others, SeedType::nTypes
}
 
enum  TrackType : std::size_t { TrackType::Main, TrackType::nTypes }
 

Public Member Functions

 ActsInspectTruthContentAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~ActsInspectTruthContentAlg () override=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode finalize () override
 
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, V, H > &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

using cluster_stat_t = std::array< std::array< std::size_t, s_nClusterTypes >, static_cast< std::size_t >(EStatClusters::kNStat)>
 
using seed_stat_t = std::array< std::array< std::size_t, s_nSeedTypes >, static_cast< std::size_t >(EStatSeeds::kNStat)>
 
using track_stat_t = std::array< std::array< std::size_t, 1 >, static_cast< std::size_t >(EStatTracks::kNStat)>
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode fillStatClusters (const xAOD::UncalibratedMeasurementContainer &container, const ActsTrk::MeasurementToTruthParticleAssociation &truth, cluster_stat_t &stat) const
 
StatusCode fillStatSeeds (const ActsTrk::SeedContainer &seeds, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, seed_stat_t &stat) const
 
StatusCode fillStatTracks (const ActsTrk::TrackContainer &tracks, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, track_stat_t &trackStat, cluster_stat_t &onTrackClusterStat) const
 
template<typename row_t , typename coll_t , typename stat_t >
StatusCode printStatTables (const std::string &objectCollectionName, const stat_t &stat) const
 
template<typename stat_t >
StatusCode copyStatTable (const stat_t &contextual, stat_t &global) const
 
SeedType deduceSeedType (const ActsTrk::Seed &) const
 
std::string to_string (xAOD::UncalibMeasType type) const
 
std::string to_string (ActsInspectTruthContentAlg::SeedType type) const
 
std::string to_string (ActsInspectTruthContentAlg::TrackType type) const
 
std::string to_label (ActsInspectTruthContentAlg::EStatClusters type) const
 
std::string to_label (ActsInspectTruthContentAlg::EStatSeeds type) const
 
std::string to_label (ActsInspectTruthContentAlg::EStatTracks type) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainerm_clusters {this, "Clusters", {}}
 
SG::ReadHandleKeyArray< ActsTrk::SeedContainerm_seeds {this, "Seeds", {}}
 
SG::ReadHandleKeyArray< ActsTrk::MeasurementToTruthParticleAssociationm_associationMap_key {this,"TruthAssociationMaps", {}}
 
SG::ReadHandleKeyArray< ActsTrk::TrackContainerm_tracks {this, "Tracks", {}}
 
std::mutex m_mutex ATLAS_THREAD_SAFE {}
 
cluster_stat_t m_clusterStat ATLAS_THREAD_SAFE {}
 
seed_stat_t m_seedStat ATLAS_THREAD_SAFE {}
 
std::vector< std::pair< std::string, track_stat_t > > m_trackStat ATLAS_THREAD_SAFE {}
 
std::vector< std::pair< std::string, cluster_stat_t > > m_onTrack_clusterStat ATLAS_THREAD_SAFE {}
 
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
 

Static Private Attributes

static constexpr std::size_t s_nClusterTypes = static_cast<std::size_t>(xAOD::UncalibMeasType::nTypes)
 
static constexpr std::size_t s_nSeedTypes = static_cast<std::size_t>(SeedType::nTypes)
 

Detailed Description

Definition at line 18 of file ActsInspectTruthContentAlg.h.

Member Typedef Documentation

◆ cluster_stat_t

using ActsTrk::ActsInspectTruthContentAlg::cluster_stat_t = std::array< std::array<std::size_t, s_nClusterTypes>, static_cast<std::size_t>(EStatClusters::kNStat)>
private

Definition at line 92 of file ActsInspectTruthContentAlg.h.

◆ seed_stat_t

using ActsTrk::ActsInspectTruthContentAlg::seed_stat_t = std::array< std::array<std::size_t, s_nSeedTypes>, static_cast<std::size_t>(EStatSeeds::kNStat)>
private

Definition at line 95 of file ActsInspectTruthContentAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ track_stat_t

using ActsTrk::ActsInspectTruthContentAlg::track_stat_t = std::array< std::array<std::size_t, 1>, static_cast<std::size_t>(EStatTracks::kNStat)>
private

Definition at line 98 of file ActsInspectTruthContentAlg.h.

Member Enumeration Documentation

◆ EStatClusters

Enumerator
kNTotal 
kNClustersFromPrimaries 
kNClustersWithNoBarcode 
kNClustersWith1Contribution 
kNClustersWith1ValidContribution 
kNClustersWith2Contribution 
kNClustersWith2ValidContribution 
kNClustersWith3Contribution 
kNClustersWith3ValidContribution 
kNClustersWith200kBarcode 
kNStat 

Definition at line 29 of file ActsInspectTruthContentAlg.h.

29  : std::size_t {
30  kNTotal,
31  kNClustersFromPrimaries,
32  kNClustersWithNoBarcode,
33  kNClustersWith1Contribution,
34  kNClustersWith1ValidContribution,
35  kNClustersWith2Contribution,
36  kNClustersWith2ValidContribution,
37  kNClustersWith3Contribution,
38  kNClustersWith3ValidContribution,
39  kNClustersWith200kBarcode,
40  kNStat
41  };

◆ EStatSeeds

Enumerator
kNTotal 
nKSeedsWith0Matches 
nKSeedsWith1Matches 
nKSeedsWith2Matches 
nKSeedsSame2Matches 
nKSeedsWith3Matches 
nKSeedsSame3Matches 
nKSeedsWith4Matches 
nKSeedsSame4Matches 
nKSeedsWith5Matches 
nKSeedsSame5Matches 
nKSeedsWith6Matches 
nKSeedsSame6Matches 
kNStat 

Definition at line 43 of file ActsInspectTruthContentAlg.h.

43  : std::size_t {
44  kNTotal,
45  nKSeedsWith0Matches,
46  nKSeedsWith1Matches,
47  nKSeedsWith2Matches,
48  nKSeedsSame2Matches,
49  nKSeedsWith3Matches,
50  nKSeedsSame3Matches,
51  nKSeedsWith4Matches,
52  nKSeedsSame4Matches,
53  nKSeedsWith5Matches,
54  nKSeedsSame5Matches,
55  nKSeedsWith6Matches,
56  nKSeedsSame6Matches,
57  kNStat
58  };

◆ EStatTracks

Enumerator
kNTotal 
kNFullMatch 
kNPerfectMatch 
kNTracks0Holes 
kNTracks1Holes 
kNTracks2Holes 
kNTracks3Holes 
kNTracks0Outliers 
kNTracks1Outliers 
kNTracks2Outliers 
kNTracks3Outliers 
kNStat 

Definition at line 60 of file ActsInspectTruthContentAlg.h.

60  : std::size_t {
61  kNTotal,
62  kNFullMatch,
63  kNPerfectMatch,
64  kNTracks0Holes,
65  kNTracks1Holes,
66  kNTracks2Holes,
67  kNTracks3Holes,
68  kNTracks0Outliers,
69  kNTracks1Outliers,
70  kNTracks2Outliers,
71  kNTracks3Outliers,
72  kNStat
73  };

◆ SeedType

Enumerator
PPP 
SSS 
PPS 
PSS 
Others 
nTypes 

Definition at line 75 of file ActsInspectTruthContentAlg.h.

75  : std::size_t {
76  PPP,
77  SSS,
78  PPS,
79  PSS,
80  Others,
81  nTypes
82  };

◆ TrackType

Enumerator
Main 
nTypes 

Definition at line 84 of file ActsInspectTruthContentAlg.h.

84  : std::size_t {
85  Main,
86  nTypes
87  };

Constructor & Destructor Documentation

◆ ActsInspectTruthContentAlg()

ActsTrk::ActsInspectTruthContentAlg::ActsInspectTruthContentAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 18 of file ActsInspectTruthContentAlg.cxx.

20  : AthReentrantAlgorithm(name, pSvcLocator)
21  {}

◆ ~ActsInspectTruthContentAlg()

virtual ActsTrk::ActsInspectTruthContentAlg::~ActsInspectTruthContentAlg ( )
overridevirtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
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 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ copyStatTable()

template<typename stat_t >
StatusCode ActsTrk::ActsInspectTruthContentAlg::copyStatTable ( const stat_t &  contextual,
stat_t &  global 
) const
private

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ deduceSeedType()

ActsInspectTruthContentAlg::SeedType ActsTrk::ActsInspectTruthContentAlg::deduceSeedType ( const ActsTrk::Seed seed) const
private

Definition at line 278 of file ActsInspectTruthContentAlg.cxx.

278  {
279  assert(seed.sp().size() == 3ul);
280  const auto& bottom = seed.sp().at(0);
281  const auto& middle = seed.sp().at(1);
282  const auto& top = seed.sp().at(2);
283  xAOD::UncalibMeasType bottom_type = bottom->measurements().front()->type();
284  xAOD::UncalibMeasType middle_type = middle->measurements().front()->type();
285  xAOD::UncalibMeasType top_type = top->measurements().front()->type();
286 
287  if (bottom_type == xAOD::UncalibMeasType::PixelClusterType and
288  middle_type == xAOD::UncalibMeasType::PixelClusterType and
290  return SeedType::PPP;
291  } else if (bottom_type == xAOD::UncalibMeasType::PixelClusterType and
292  middle_type == xAOD::UncalibMeasType::PixelClusterType and
294  return SeedType::PPS;
295  } else if (bottom_type == xAOD::UncalibMeasType::PixelClusterType and
296  middle_type == xAOD::UncalibMeasType::StripClusterType and
298  return SeedType::PSS;
299  } else if (bottom_type == xAOD::UncalibMeasType::StripClusterType and
300  middle_type == xAOD::UncalibMeasType::StripClusterType and
302  return SeedType::SSS;
303  } else {
304  return SeedType::Others;
305  }
306  }

◆ 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 ActsTrk::ActsInspectTruthContentAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 80 of file ActsInspectTruthContentAlg.cxx.

80  {
81  ATH_MSG_DEBUG( "Executing " << name() << " ..." );
82 
83  // contextual stat collectors
84  cluster_stat_t clusterStat {};
85  seed_stat_t seedStat {};
86 
87  std::array<const ActsTrk::MeasurementToTruthParticleAssociation*, s_nClusterTypes> truths {};
88  // Fill Stat info for Cluster collection(s)
89  for (std::size_t i(0); i<m_clusters.size(); ++i) {
90  ATH_MSG_DEBUG( "Retrieving cluster collection with key " << m_clusters.at(i).key() );
92  ATH_CHECK( clusterHandle.isValid() );
93  const xAOD::UncalibratedMeasurementContainer *clusters = clusterHandle.cptr();
94 
95  if (clusters->empty()) continue;
96  xAOD::UncalibMeasType elementType = clusters->front()->type();
97 
98  ATH_MSG_DEBUG( "Retrieving Measurement to Truth Particle Association map with key: " << m_associationMap_key.at(i).key() );
100  ATH_CHECK( truthHandle.isValid() );
101  truths[static_cast<std::size_t>(elementType)] = truthHandle.cptr();
102 
103  // Check truth and clusters are compatible
104  ATH_CHECK( truths[static_cast<std::size_t>(elementType)]->isCompatibleWith(clusters) );
105 
107  *truths[static_cast<std::size_t>(elementType)],
108  clusterStat) );
109  }
110 
111  ATH_CHECK( copyStatTable(clusterStat, m_clusterStat) );
112 
113  for (std::size_t i(0); i<m_seeds.size(); ++i) {
114  ATH_MSG_DEBUG( "Retrieving seed collection with key: " << m_seeds.at(i).key() );
116  ATH_CHECK( seedHandle.isValid() );
117  const ActsTrk::SeedContainer* seeds = seedHandle.cptr();
118 
119  ATH_CHECK( fillStatSeeds(*seeds,
120  truths,
121  seedStat) );
122  }
123 
124  ATH_CHECK( copyStatTable(seedStat, m_seedStat) );
125 
126  for (std::size_t i(0); i<m_tracks.size(); ++i) {
127  ATH_MSG_DEBUG( "Retrieving tracks collection with key " << m_tracks.at(i).key() );
129  ATH_CHECK( trackHandle.isValid() );
130  const ActsTrk::TrackContainer* tracks = trackHandle.cptr();
131 
132  cluster_stat_t onTrack_clusterStat {};
133  track_stat_t trackStat {};
134  ATH_CHECK( fillStatTracks(*tracks,
135  truths,
136  trackStat,
137  onTrack_clusterStat) );
138 
139  ATH_CHECK( copyStatTable(trackStat, m_trackStat.at(i).second) );
140  ATH_CHECK( copyStatTable(onTrack_clusterStat, m_onTrack_clusterStat.at(i).second) );
141  }
142 
143  return StatusCode::SUCCESS;
144  }

◆ 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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ fillStatClusters()

StatusCode ActsTrk::ActsInspectTruthContentAlg::fillStatClusters ( const xAOD::UncalibratedMeasurementContainer container,
const ActsTrk::MeasurementToTruthParticleAssociation truth,
typename ActsInspectTruthContentAlg::cluster_stat_t stat 
) const
private

Definition at line 147 of file ActsInspectTruthContentAlg.cxx.

150  {
151  ATH_MSG_DEBUG( "Checking truth for clusters ..." );
152  for (const xAOD::UncalibratedMeasurement* meas : container) {
153  std::size_t clusterTypeIndex = static_cast<std::size_t>(meas->type());
154  ++stat[to_underlying(EStatClusters::kNTotal)][clusterTypeIndex];
155  const auto& tps = truth.at(meas->index());
156 
157  // get number of (valid) contributions
158  if (tps.empty()) {
160  continue;
161  }
162 
163  // Check all barcodes are from primary particles
164  bool allValidParticles = true;
165  for (const auto* tp : tps) {
166  if ( not HepMC::is_simulation_particle(*tp) ) continue;
167  allValidParticles = false;
168  break;
169  }
170 
171  if (tps.size() == 1) {
173  if (allValidParticles) ++stat[to_underlying(EStatClusters::kNClustersWith1ValidContribution)][clusterTypeIndex];
174  }
175  else if (tps.size() == 2) {
177  if (allValidParticles) ++stat[to_underlying(EStatClusters::kNClustersWith2ValidContribution)][clusterTypeIndex];
178  }
179  else {
181  if (allValidParticles) ++stat[to_underlying(EStatClusters::kNClustersWith3ValidContribution)][clusterTypeIndex];
182  }
183 
184  // get main contribution
185  bool hasContributionFromPrimaryParticle = false;
186  for (const auto* tp : tps) {
187  if ( HepMC::is_simulation_particle(*tp) ) continue;
188  hasContributionFromPrimaryParticle = true;
189  break;
190  }
191 
192  if (not hasContributionFromPrimaryParticle) ++stat[to_underlying(EStatClusters::kNClustersWith200kBarcode)][clusterTypeIndex];
193  else ++stat[to_underlying(EStatClusters::kNClustersFromPrimaries)][clusterTypeIndex];
194  }
195 
196  return StatusCode::SUCCESS;
197  }

◆ fillStatSeeds()

StatusCode ActsTrk::ActsInspectTruthContentAlg::fillStatSeeds ( const ActsTrk::SeedContainer seeds,
std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &  truths,
seed_stat_t stat 
) const
private

Definition at line 200 of file ActsInspectTruthContentAlg.cxx.

203  {
204  ATH_MSG_DEBUG( "Checking truth for seeds ..." );
205  for (std::size_t i(0); i<seeds.size(); ++i) {
206  const ActsTrk::Seed* seed = seeds.at(i);
207 
208  int nMatches = 0;
209  int nMeasurements = 0;
210  std::unordered_map<std::size_t, int> particleIds {};
211 
212  std::size_t seedType = to_underlying(deduceSeedType(*seed));
213  ++stat[to_underlying(EStatSeeds::kNTotal)][seedType];
214 
215  const auto& sps = seed->sp();
216  for ( const xAOD::SpacePoint* sp : sps ) {
217  const auto& measurements = sp->measurements();
218  for (const xAOD::UncalibratedMeasurement* meas : measurements ) {
219  ++nMeasurements;
220 
221  std::size_t clusterTypeIndex = to_underlying(meas->type());
222  const ActsTrk::MeasurementToTruthParticleAssociation* truth = truths.at(clusterTypeIndex);
223  auto tps = truth->at(meas->index());
224 
225  if (tps.empty()) continue;
226 
227  bool contributionOnlyFromSimulationParticles = true;
228  for (const auto* tp : tps) {
229  if ( HepMC::is_simulation_particle(*tp) ) continue;
230  contributionOnlyFromSimulationParticles = false;
231 
232  std::size_t pid = HepMC::uniqueID(tp);
233  particleIds.try_emplace( pid, 0 );
234  ++particleIds[pid];
235  }
236  if (contributionOnlyFromSimulationParticles) continue;
237 
238  ++nMatches;
239  } // loop on measurements
240  } // loop on space points
241 
242  // check if we have measurements associated to the same particle id
243  // if the number of entries for the same id (the key) is the same as the
244  // number of measurements in the seed, then we have a match
245  bool isFromSameParticle = false;
246  for (const auto [pid, nEntries] : particleIds) {
247  if (nEntries != nMeasurements) continue;
248  isFromSameParticle = true;
249  break;
250  }
251 
252 
253  if (nMatches == 0) {
255  } else if (nMatches == 1) {
257  } else if (nMatches == 2) {
259  if (isFromSameParticle) ++stat[to_underlying(EStatSeeds::nKSeedsSame2Matches)][seedType];
260  } else if (nMatches == 3) {
262  if (isFromSameParticle) ++stat[to_underlying(EStatSeeds::nKSeedsSame3Matches)][seedType];
263  } else if (nMatches == 4) {
265  if (isFromSameParticle) ++stat[to_underlying(EStatSeeds::nKSeedsSame4Matches)][seedType];
266  } else if (nMatches == 5) {
268  if (isFromSameParticle) ++stat[to_underlying(EStatSeeds::nKSeedsSame5Matches)][seedType];
269  } else if (nMatches == 6) {
271  if (isFromSameParticle) ++stat[to_underlying(EStatSeeds::nKSeedsSame6Matches)][seedType];
272  }
273  } // loop on seed
274 
275  return StatusCode::SUCCESS;
276  }

◆ fillStatTracks()

StatusCode ActsTrk::ActsInspectTruthContentAlg::fillStatTracks ( const ActsTrk::TrackContainer tracks,
std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &  truths,
track_stat_t trackStat,
cluster_stat_t onTrackClusterStat 
) const
private

Definition at line 309 of file ActsInspectTruthContentAlg.cxx.

312  {
313  ATH_MSG_DEBUG( "Checking truth for tracks ..." );
314  for (const auto track : tracks) {
315  ++trackStat[to_underlying(EStatTracks::kNTotal)][0];
316  std::size_t nHoles = track.nHoles();
317  if (nHoles == 0) ++trackStat[to_underlying(EStatTracks::kNTracks0Holes)][0];
318  else if (nHoles == 1) ++trackStat[to_underlying(EStatTracks::kNTracks1Holes)][0];
319  else if (nHoles == 2) ++trackStat[to_underlying(EStatTracks::kNTracks2Holes)][0];
320  else ++trackStat[to_underlying(EStatTracks::kNTracks3Holes)][0];
321 
322  std::size_t nOutliers = track.nOutliers();
323  if (nOutliers == 0) ++trackStat[to_underlying(EStatTracks::kNTracks0Outliers)][0];
324  else if (nOutliers == 1) ++trackStat[to_underlying(EStatTracks::kNTracks1Outliers)][0];
325  else if (nOutliers == 2) ++trackStat[to_underlying(EStatTracks::kNTracks2Outliers)][0];
326  else ++trackStat[to_underlying(EStatTracks::kNTracks3Outliers)][0];
327 
328 
329  bool AllValids = true;
330  int nConsideredMeasurements = 0;
331  std::unordered_map<std::size_t, int> particleIds {};
332 
333  // on track clusters
334  track.container()
335  .trackStateContainer().visitBackwards(track.tipIndex(),
336  [&truths, &onTrackStat,
337  &AllValids,
338  &nConsideredMeasurements, &particleIds]
339  (const auto& state) {
340  auto flags = state.typeFlags();
341  if (not flags.test(Acts::TrackStateFlag::MeasurementFlag) and
342  not flags.test(Acts::TrackStateFlag::OutlierFlag)) return;
343  ++nConsideredMeasurements;
344 
345  // get cluster
346  auto sl = state.getUncalibratedSourceLink().template get<ATLASUncalibSourceLink>();
347  assert( sl != nullptr);
348  const xAOD::UncalibratedMeasurement &meas = getUncalibratedMeasurement(sl);
349 
350  std::size_t clusterTypeIndex = to_underlying(meas.type());
351  ++onTrackStat[to_underlying(EStatClusters::kNTotal)][clusterTypeIndex];
352 
353  const ActsTrk::MeasurementToTruthParticleAssociation* truth = truths[clusterTypeIndex];
354  const auto& tps = truth->at(meas.index());
355 
356  if (tps.empty()) {
357  ++onTrackStat[to_underlying(EStatClusters::kNClustersWithNoBarcode)][clusterTypeIndex];
358  AllValids = false;
359  return;
360  }
361 
362  bool allBarcodesValid = true;
363  bool hasContributionFromPrimaryParticle = false;
364  for (const auto* tp : tps) {
365  if ( not HepMC::is_simulation_particle(*tp) ) {
366  hasContributionFromPrimaryParticle = true;
367  continue;
368  }
369  allBarcodesValid = false;
370  break;
371  }
372  if (not hasContributionFromPrimaryParticle) AllValids = false;
373 
374  if (tps.size() == 1) {
375  ++onTrackStat[to_underlying(EStatClusters::kNClustersWith1Contribution)][clusterTypeIndex];
376  if (allBarcodesValid) ++onTrackStat[to_underlying(EStatClusters::kNClustersWith1ValidContribution)][clusterTypeIndex];
377  }
378  else if (tps.size() == 2) {
379  ++onTrackStat[to_underlying(EStatClusters::kNClustersWith2Contribution)][clusterTypeIndex];
380  if (allBarcodesValid) ++onTrackStat[to_underlying(EStatClusters::kNClustersWith2ValidContribution)][clusterTypeIndex];
381  }
382  else {
383  ++onTrackStat[to_underlying(EStatClusters::kNClustersWith3Contribution)][clusterTypeIndex];
384  if (allBarcodesValid) ++onTrackStat[to_underlying(EStatClusters::kNClustersWith3ValidContribution)][clusterTypeIndex];
385  }
386 
387  bool contributionOnlyFromSimulationParticles = true;
388  for (const auto* tp : tps) {
389  if ( HepMC::is_simulation_particle(*tp) ) continue;
390  contributionOnlyFromSimulationParticles = false;
391 
392  std::size_t pid = HepMC::uniqueID(tp);
393  particleIds.try_emplace( pid, 0 );
394  ++particleIds[pid];
395  }
396 
397  // get main contribution
398  if (contributionOnlyFromSimulationParticles) ++onTrackStat[to_underlying(EStatClusters::kNClustersWith200kBarcode)][clusterTypeIndex];
399  else ++onTrackStat[to_underlying(EStatClusters::kNClustersFromPrimaries)][clusterTypeIndex];
400  }); // llop on states
401 
402  bool AllSameBarcode = false;
403  for ( const auto [pid, nEntries] : particleIds ) {
404  if (nEntries != nConsideredMeasurements) continue;
405  AllSameBarcode = true;
406  break;
407  }
408 
409  if (AllValids) ++trackStat[to_underlying(EStatTracks::kNFullMatch)][0];
410  if (AllSameBarcode) ++trackStat[to_underlying(EStatTracks::kNPerfectMatch)][0];
411  } // loop on tracks
412 
413  return StatusCode::SUCCESS;
414  }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ finalize()

StatusCode ActsTrk::ActsInspectTruthContentAlg::finalize ( )
overridevirtual

Definition at line 46 of file ActsInspectTruthContentAlg.cxx.

46  {
47  ATH_MSG_INFO( "Finalizing " << name() << " ..." );
48  ATH_MSG_INFO( "Statistics from Seed check with truth info:" );
49 
50  if ( printStatTables<ActsInspectTruthContentAlg::EStatClusters, xAOD::UncalibMeasType>("Clusters", m_clusterStat).isFailure() ) {
51  ATH_MSG_FATAL("Problem dumping Cluster truth information");
52  return StatusCode::FAILURE;
53  }
54 
55  if ( printStatTables<ActsInspectTruthContentAlg::EStatSeeds, ActsInspectTruthContentAlg::SeedType>("Seeds", m_seedStat).isFailure() ) {
56  ATH_MSG_FATAL("Problem dumping Seed truth information");
57  return StatusCode::FAILURE;
58  }
59 
60  for (const auto& [trackCollectionName, onTrackStat] : m_onTrack_clusterStat) {
61  std::string reportName = "On Track Clusters (" + trackCollectionName + ")";
62  if ( printStatTables<ActsInspectTruthContentAlg::EStatClusters, xAOD::UncalibMeasType>(reportName, onTrackStat).isFailure() ) {
63  ATH_MSG_FATAL("Problem dumping On Track Cluster truth info (" << trackCollectionName << ")");
64  return StatusCode::FAILURE;
65  }
66  }
67 
68  for (const auto& [trackCollectionName, trackStat] : m_trackStat) {
69  std::string reportName = "Track (" + trackCollectionName + ")";
70  if ( printStatTables<ActsInspectTruthContentAlg::EStatTracks, ActsInspectTruthContentAlg::TrackType>(reportName, trackStat).isFailure() ) {
71  ATH_MSG_FATAL("Problem dumping Track truth info (" << trackCollectionName << ")");
72  return StatusCode::FAILURE;
73  }
74  }
75 
76  return StatusCode::SUCCESS;
77  }

◆ initialize()

StatusCode ActsTrk::ActsInspectTruthContentAlg::initialize ( )
overridevirtual

Definition at line 23 of file ActsInspectTruthContentAlg.cxx.

23  {
24  ATH_MSG_INFO( "Initializing " << name() << " ..." );
25 
26  ATH_CHECK( m_clusters.initialize() );
27  ATH_CHECK( m_seeds.initialize() );
28  ATH_CHECK( m_associationMap_key.initialize() );
29  ATH_CHECK( m_tracks.initialize() );
30 
31  if (m_clusters.size() != m_associationMap_key.size()) {
32  ATH_MSG_ERROR("Inconsistent sizes of Clusters and TruthAssociationMaps");
33  return StatusCode::FAILURE;
34  }
35 
36  for (const auto& trackKey : m_tracks) {
37  std::string containerName = trackKey.key();
38  m_onTrack_clusterStat.push_back( std::make_pair(containerName, cluster_stat_t()) );
39  m_trackStat.push_back( std::make_pair(containerName, track_stat_t()) );
40  }
41 
42  return StatusCode::SUCCESS;
43  }

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

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

◆ printStatTables()

template<typename row_t , typename coll_t , typename stat_t >
StatusCode ActsTrk::ActsInspectTruthContentAlg::printStatTables ( const std::string &  objectCollectionName,
const stat_t &  stat 
) const
private

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

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

◆ to_label() [1/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_label ( ActsInspectTruthContentAlg::EStatClusters  type) const
inlineprivate

◆ to_label() [2/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_label ( ActsInspectTruthContentAlg::EStatSeeds  type) const
inlineprivate

◆ to_label() [3/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_label ( ActsInspectTruthContentAlg::EStatTracks  type) const
inlineprivate

◆ to_string() [1/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_string ( ActsInspectTruthContentAlg::SeedType  type) const
inlineprivate

◆ to_string() [2/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_string ( ActsInspectTruthContentAlg::TrackType  type) const
inlineprivate

◆ to_string() [3/3]

std::string ActsTrk::ActsInspectTruthContentAlg::to_string ( xAOD::UncalibMeasType  type) const
inlineprivate

◆ 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

◆ ATLAS_THREAD_SAFE [1/5]

std::mutex m_mutex ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 130 of file ActsInspectTruthContentAlg.h.

◆ ATLAS_THREAD_SAFE [2/5]

cluster_stat_t m_clusterStat ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 131 of file ActsInspectTruthContentAlg.h.

◆ ATLAS_THREAD_SAFE [3/5]

seed_stat_t m_seedStat ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 132 of file ActsInspectTruthContentAlg.h.

◆ ATLAS_THREAD_SAFE [4/5]

std::vector<std::pair<std::string, track_stat_t> > m_trackStat ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 133 of file ActsInspectTruthContentAlg.h.

◆ ATLAS_THREAD_SAFE [5/5]

std::vector<std::pair<std::string, cluster_stat_t> > m_onTrack_clusterStat ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 134 of file ActsInspectTruthContentAlg.h.

◆ m_associationMap_key

SG::ReadHandleKeyArray<ActsTrk::MeasurementToTruthParticleAssociation> ActsTrk::ActsInspectTruthContentAlg::m_associationMap_key {this,"TruthAssociationMaps", {}}
private

Definition at line 126 of file ActsInspectTruthContentAlg.h.

◆ m_clusters

SG::ReadHandleKeyArray<xAOD::UncalibratedMeasurementContainer> ActsTrk::ActsInspectTruthContentAlg::m_clusters {this, "Clusters", {}}
private

Definition at line 124 of file ActsInspectTruthContentAlg.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_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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_seeds

SG::ReadHandleKeyArray<ActsTrk::SeedContainer> ActsTrk::ActsInspectTruthContentAlg::m_seeds {this, "Seeds", {}}
private

Definition at line 125 of file ActsInspectTruthContentAlg.h.

◆ m_tracks

SG::ReadHandleKeyArray<ActsTrk::TrackContainer> ActsTrk::ActsInspectTruthContentAlg::m_tracks {this, "Tracks", {}}
private

Definition at line 127 of file ActsInspectTruthContentAlg.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.

◆ s_nClusterTypes

constexpr std::size_t ActsTrk::ActsInspectTruthContentAlg::s_nClusterTypes = static_cast<std::size_t>(xAOD::UncalibMeasType::nTypes)
staticconstexprprivate

Definition at line 90 of file ActsInspectTruthContentAlg.h.

◆ s_nSeedTypes

constexpr std::size_t ActsTrk::ActsInspectTruthContentAlg::s_nSeedTypes = static_cast<std::size_t>(SeedType::nTypes)
staticconstexprprivate

Definition at line 91 of file ActsInspectTruthContentAlg.h.


The documentation for this class was generated from the following files:
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks3Outliers
@ kNTracks3Outliers
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame4Matches
@ nKSeedsSame4Matches
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ActsTrk::TrackContainer
Definition: TrackContainer.h:30
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks1Holes
@ kNTracks1Holes
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
ActsTrk::ActsInspectTruthContentAlg::m_clusters
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_clusters
Definition: ActsInspectTruthContentAlg.h:124
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith200kBarcode
@ kNClustersWith200kBarcode
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith1ValidContribution
@ kNClustersWith1ValidContribution
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith1Contribution
@ kNClustersWith1Contribution
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
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame6Matches
@ nKSeedsSame6Matches
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
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks0Holes
@ kNTracks0Holes
ParticleTest.tp
tp
Definition: ParticleTest.py:25
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame5Matches
@ nKSeedsSame5Matches
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
ActsTrk::ActsInspectTruthContentAlg::m_tracks
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_tracks
Definition: ActsInspectTruthContentAlg.h:127
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame3Matches
@ nKSeedsSame3Matches
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith2Matches
@ nKSeedsWith2Matches
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTotal
@ kNTotal
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersFromPrimaries
@ kNClustersFromPrimaries
ActsTrk::ActsInspectTruthContentAlg::SeedType::SSS
@ SSS
ActsTrk::ActsInspectTruthContentAlg::fillStatClusters
StatusCode fillStatClusters(const xAOD::UncalibratedMeasurementContainer &container, const ActsTrk::MeasurementToTruthParticleAssociation &truth, cluster_stat_t &stat) const
Definition: ActsInspectTruthContentAlg.cxx:147
ActsTrk::MeasurementToTruthParticleAssociation
Definition: MeasurementToTruthParticleAssociation.h:18
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks2Holes
@ kNTracks2Holes
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Analysis::Main
@ Main
Definition: CalibrationDataInterfaceROOT.h:85
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks3Holes
@ kNTracks3Holes
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks1Outliers
@ kNTracks1Outliers
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::kNTotal
@ kNTotal
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith3Contribution
@ kNClustersWith3Contribution
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith5Matches
@ nKSeedsWith5Matches
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::ActsInspectTruthContentAlg::SeedType::PPS
@ PPS
ActsTrk::ActsInspectTruthContentAlg::cluster_stat_t
std::array< std::array< std::size_t, s_nClusterTypes >, static_cast< std::size_t >(EStatClusters::kNStat)> cluster_stat_t
Definition: ActsInspectTruthContentAlg.h:94
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:354
lumiFormat.i
int i
Definition: lumiFormat.py:85
ActsTrk::ActsInspectTruthContentAlg::SeedType::PPP
@ PPP
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
ActsTrk::ActsInspectTruthContentAlg::SeedType::PSS
@ PSS
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith0Matches
@ nKSeedsWith0Matches
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
ActsTrk::ActsInspectTruthContentAlg::seed_stat_t
std::array< std::array< std::size_t, s_nSeedTypes >, static_cast< std::size_t >(EStatSeeds::kNStat)> seed_stat_t
Definition: ActsInspectTruthContentAlg.h:97
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrk::ActsInspectTruthContentAlg::m_seeds
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_seeds
Definition: ActsInspectTruthContentAlg.h:125
ActsTrk::to_underlying
std::underlying_type_t< T > to_underlying(T val)
Definition: ActsInspectTruthContentAlg.cxx:14
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
detail::ul
unsigned long ul
Definition: PrimitiveHelpers.h:46
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith2Contribution
@ kNClustersWith2Contribution
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
beamspotman.stat
stat
Definition: beamspotman.py:264
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame2Matches
@ nKSeedsSame2Matches
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
xAOD::UncalibMeasType::nTypes
@ nTypes
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith3Matches
@ nKSeedsWith3Matches
ActsTrk::ActsInspectTruthContentAlg::fillStatTracks
StatusCode fillStatTracks(const ActsTrk::TrackContainer &tracks, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, track_stat_t &trackStat, cluster_stat_t &onTrackClusterStat) const
Definition: ActsInspectTruthContentAlg.cxx:309
ActsTrk::ActsInspectTruthContentAlg::fillStatSeeds
StatusCode fillStatSeeds(const ActsTrk::SeedContainer &seeds, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, seed_stat_t &stat) const
Definition: ActsInspectTruthContentAlg.cxx:200
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNTotal
@ kNTotal
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith3ValidContribution
@ kNClustersWith3ValidContribution
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith4Matches
@ nKSeedsWith4Matches
ActsTrk::ActsSeed
Definition: Seed.h:18
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith6Matches
@ nKSeedsWith6Matches
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith1Matches
@ nKSeedsWith1Matches
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNPerfectMatch
@ kNPerfectMatch
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWithNoBarcode
@ kNClustersWithNoBarcode
ActsTrk::ActsInspectTruthContentAlg::SeedType::Others
@ Others
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:25
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
ActsTrk::ActsInspectTruthContentAlg::copyStatTable
StatusCode copyStatTable(const stat_t &contextual, stat_t &global) const
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNFullMatch
@ kNFullMatch
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
top
@ top
Definition: TruthClasses.h:64
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
ActsTrk::ActsInspectTruthContentAlg::track_stat_t
std::array< std::array< std::size_t, 1 >, static_cast< std::size_t >(EStatTracks::kNStat)> track_stat_t
Definition: ActsInspectTruthContentAlg.h:100
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
dqBeamSpot.nEntries
int nEntries
Definition: dqBeamSpot.py:72
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks0Outliers
@ kNTracks0Outliers
ActsTrk::ActsInspectTruthContentAlg::deduceSeedType
SeedType deduceSeedType(const ActsTrk::Seed &) const
Definition: ActsInspectTruthContentAlg.cxx:278
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks2Outliers
@ kNTracks2Outliers
ActsTrk::ActsInspectTruthContentAlg::m_associationMap_key
SG::ReadHandleKeyArray< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
Definition: ActsInspectTruthContentAlg.h:126
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType
fitman.k
k
Definition: fitman.py:528
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith2ValidContribution
@ kNClustersWith2ValidContribution
ServiceHandle< ICondSvc >