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

#include <TrackFindingValidationAlg.h>

Inheritance diagram for ActsTrk::TrackFindingValidationAlg:
Collaboration diagram for ActsTrk::TrackFindingValidationAlg:

Public Member Functions

virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
 TrackTruthMatchingBaseAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
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 Types

using EventStat = EventStatBase< TrackFindingValidationDetailedStat >
 

Protected Member Functions

const TruthParticleHitCountsgetTruthParticleHitCounts (const EventContext &ctx) const
 
const IAthSelectionTooltruthSelectionTool () const
 
std::size_t perEtaSize () const
 
std::size_t perPdgIdSize () const
 
TruthMatchResult analyseTrackTruth (const TruthParticleHitCounts &truth_particle_hit_counts, const HitCountsPerTrack &track_hit_counts, EventStat &event_stat) const
 
void postProcessEventStat (const TruthParticleHitCounts &truth_particle_hit_counts, std::size_t n_tracks, EventStat &event_stat) const
 
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

enum  ECounter {
  NTracksTotal, NTruthWithCountsTotal, MissingTruthParticleHitCounts, NoAssociatedTruthParticle,
  NoSelectedTruthParticle, TruthParticleNoNoiseMismatch, kNCounter
}
 
enum  ECategorisedCounter {
  kNTotalParticles, kNParticleWithAssociatedTrack, kNParticleWithMultipleAssociatedTracks, kNTotalTracks,
  kNCategorisedCounter
}
 
enum  ECategorisedStat { kHitEfficiency, kHitPurity, kMatchProbability, kNCategorisedStat }
 
template<class Base >
using Property = std::conditional< TrackFindingValidationDetailedStat, Gaudi::Property< Base >, DummyProperty< Base > >::type
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void checkBinOrder (const std::vector< float > &bin_edges, const std::string &bin_label) const
 check that bins are in increasing order. More...
 
std::size_t getPtEtaStatCategory (float pt, float eta) const
 Return the category based on the provided eta value. More...
 
std::size_t getPtPdgIdStatCategory (float pt, int pdg_id) const
 Return the category based on the PDG ID. More...
 
void initStatTables ()
 
void printStatTables () const
 
void printCategories (const std::vector< std::string > &pt_category_labels, const std::vector< std::string > &eta_category_labels, std::vector< std::string > &counter_labels, std::vector< std::array< ActsUtils::Stat, kNCategorisedStat > > &stat_per_category, std::vector< std::array< std::size_t, kNCategorisedCounter > > &counts_per_category, const std::string &top_left_label, bool print_sub_categories) const
 
void printData2D (const std::vector< std::string > &row_category_labels, const std::vector< std::string > &col_category_labels, const std::string &top_left_label, std::vector< std::array< ActsUtils::Stat, kNCategorisedStat > > &stat_per_category, std::vector< std::array< std::size_t, kNCategorisedCounter > > &counts_per_category, bool rotate) const
 
StatusCode checkMatchWeights ()
 
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...
 

Static Private Member Functions

static double weightedCountSum (const ActsTrk::HitCounterArray &counts, const std::vector< float > &weights)
 
static double noiseCorrection (const ActsTrk::HitCounterArray &noise_counts, const std::vector< float > &weights)
 

Private Attributes

SG::ReadHandleKey< TrackToTruthParticleAssociationm_trackToTruth {this, "TrackToTruthAssociationMap","", "Association map from tracks to generator particles." }
 
SG::ReadHandleKey< TruthParticleHitCountsm_truthHitCounts {this, "TruthParticleHitCounts","", "Map from truth particle to hit counts." }
 
Gaudi::Property< std::vector< float > > m_weightsForProb
 
Gaudi::Property< std::vector< float > > m_weights
 
Property< std::vector< float > > m_statEtaBins {this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these eta bins."}
 
Property< std::vector< float > > m_statPtBins {this, "StatisticPtBins", {1.e3,2.5e3,10e3, 100e3}, "Gather statistics separately for these pt bins."}
 
Property< bool > m_pdgIdCategorisation {this, "PdgIdCategorisation", false, "Categorise by pdg id."}
 
Property< bool > m_showRawCounts {this, "ShowRawCounts", false, "Show all counters."}
 
Property< bool > m_printDetails {this, "ShowDetailedTables", false, "Show more details; stat. uncert., RMS, entries"}
 
Property< bool > m_computeTrackRecoEfficiency {this, "ComputeTrackRecoEfficiency", true, "Compute and print track reconstruction efficiency."}
 
ToolHandle< IAthSelectionToolm_truthSelectionTool {this, "TruthSelectionTool","AthTruthSelectionTool", "Truth selection tool (for efficiencies and resolutions)"}
 
DebugCounter< TrackFindingValidationDebugHistsm_debugCounter
 
bool m_useAbsEtaForStat = false
 
std::mutex m_statMutex ATLAS_THREAD_SAFE
 
std::array< std::size_t, kNCounter > m_counter ATLAS_THREAD_SAFE {}
 
std::vector< int > m_pdgId ATLAS_THREAD_SAFE
 
BaseStat< TrackFindingValidationDetailedStat > m_detailedStat 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

constexpr static unsigned int s_NMeasurementTypes = static_cast<unsigned int>(xAOD::UncalibMeasType::nTypes) - 1u
 
constexpr static int s_pdgIdMax = 1000000000
 

Detailed Description

Definition at line 23 of file TrackFindingValidationAlg.h.

Member Typedef Documentation

◆ EventStat

Definition at line 129 of file TrackTruthMatchingBaseAlg.h.

◆ Property

template<class Base >
using ActsTrk::TrackTruthMatchingBaseAlg::Property = std::conditional< TrackFindingValidationDetailedStat, Gaudi::Property<Base>, DummyProperty<Base> >::type
privateinherited

Definition at line 184 of file TrackTruthMatchingBaseAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ECategorisedCounter

Enumerator
kNTotalParticles 
kNParticleWithAssociatedTrack 
kNParticleWithMultipleAssociatedTracks 
kNTotalTracks 
kNCategorisedCounter 

Definition at line 244 of file TrackTruthMatchingBaseAlg.h.

◆ ECategorisedStat

Enumerator
kHitEfficiency 
kHitPurity 
kMatchProbability 
kNCategorisedStat 

Definition at line 251 of file TrackTruthMatchingBaseAlg.h.

251  {
253  kHitPurity,
256  };

◆ ECounter

Enumerator
NTracksTotal 
NTruthWithCountsTotal 
MissingTruthParticleHitCounts 
NoAssociatedTruthParticle 
NoSelectedTruthParticle 
TruthParticleNoNoiseMismatch 
kNCounter 

Definition at line 234 of file TrackTruthMatchingBaseAlg.h.

Member Function Documentation

◆ analyseTrackTruth()

TrackTruthMatchingBaseAlg::TruthMatchResult ActsTrk::TrackTruthMatchingBaseAlg::analyseTrackTruth ( const TruthParticleHitCounts truth_particle_hit_counts,
const HitCountsPerTrack track_hit_counts,
TrackTruthMatchingBaseAlg::EventStat event_stat 
) const
protectedinherited
Parameters
returntuple containing pointer to best matching truth particle, matching probability, hit purity and hit efficiency.

Definition at line 209 of file TrackTruthMatchingBaseAlg.cxx.

212  {
213  TruthMatchResult ret{};
214  std::array<unsigned int,2> best_match_i{std::numeric_limits<unsigned int>::max(),std::numeric_limits<unsigned int>::max()};
215  std::array<float,2> best_match_prob {};
216 
217  std::array<unsigned int,2> best_match_i_nonoise{std::numeric_limits<unsigned int>::max(),std::numeric_limits<unsigned int>::max()};
218  std::array<float,2> best_match_prob_nonoise{};
219 
220  const HitCounterArray &total_counts = track_hit_counts.totalCounts();
221  const HitCounterArray &noise_counts = track_hit_counts.noiseCounts();
222 
223  double total_sum=weightedCountSum(total_counts, m_weights.value() );
224  double total_sum_for_prob=weightedCountSum(total_counts, m_weightsForProb.value() );
225  double noise_sum=noiseCorrection(noise_counts, m_weightsForProb.value() );
226  double total_sum_for_prob_nonoise=total_sum_for_prob;
227  total_sum_for_prob += noise_sum;
228 
229  if (total_sum_for_prob>0.) {
230  // compute total hit count per truth particle and remember the highest and second highest
231  // count per truth particle.
232  // The match probability is then max_counter / sum_{i in associated truth particles} counts_i
233  unsigned int truth_i=0;
234  --truth_i;
235  for (const std::pair<const xAOD::TruthParticle *, HitCounterArray > &
236  hit_counts_for_associated_truth_particle : track_hit_counts.countsPerTruthParticle() ) {
237  ++truth_i;
238  double truth_sum_for_prob=weightedCountSum(hit_counts_for_associated_truth_particle.second, m_weightsForProb.value() );
239  float match_prob_nonoise = truth_sum_for_prob /total_sum_for_prob_nonoise;
240  float match_prob = truth_sum_for_prob /total_sum_for_prob;
241  if (match_prob>1 || match_prob<0.) {
242  ATH_MSG_ERROR("Negative or too large truth match \"probability\". This should not happen."
243  << " Track hits: " << dumpCounts(total_counts)
244  << " noise hits of those: " << dumpCounts(noise_counts)
245  << " truth hits: " << dumpCounts(hit_counts_for_associated_truth_particle.second));
246  } // remember the highest and next-to-highest hit count per truth particle
247  if (match_prob>best_match_prob[1]) {
248  int dest_i=match_prob<best_match_prob[0];
249  best_match_i[1]=best_match_i[0];
250  best_match_prob[1]=best_match_prob[0];
251  best_match_prob[dest_i]=match_prob;
252  best_match_i[dest_i]=truth_i;
253  }
254  if (match_prob_nonoise>best_match_prob_nonoise[1]) {
255  int dest_i=match_prob_nonoise<best_match_prob_nonoise[0];
256  best_match_i_nonoise[1]=best_match_i_nonoise[0];
257  best_match_prob_nonoise[1]=best_match_prob_nonoise[0];
258  best_match_prob_nonoise[dest_i]=match_prob_nonoise;
259  best_match_i_nonoise[dest_i]=truth_i;
260  }
261 
262  }
263  }
264 
265  if (best_match_i_nonoise[0] != best_match_i[0]) {
266  ++event_stat.m_nTruthParticleNonoiseMismatches;
267  }
268  if ( best_match_i[0] < track_hit_counts.countsPerTruthParticle().size()
269  && track_hit_counts.countsPerTruthParticle()[ best_match_i[0] ].first) {
270  ret.m_truthParticle = track_hit_counts.countsPerTruthParticle()[ best_match_i[0] ].first;
271  ret.m_matchProbability = best_match_prob[0];
272 
273  const xAOD::TruthParticle *best_match = track_hit_counts.countsPerTruthParticle()[ best_match_i[0] ].first;
274  const IAthSelectionTool::CutResult accept = m_truthSelectionTool->accept(best_match);
275  event_stat.m_truthSelectionCuts.add( event_stat.m_nTruthCuts - accept.missingCuts() );
276  if (accept) {
277 
278  double common_truth_sum=weightedCountSum(track_hit_counts.countsPerTruthParticle()[ best_match_i[0] ].second, m_weights.value() );
279 
280  float hit_efficiency = 0.;
281  std::unordered_map<const xAOD::TruthParticle *,HitCounterArray>::const_iterator
282  best_truth_particle_counts_iter = truth_particle_hit_counts.find( best_match );
283 
284  if (best_truth_particle_counts_iter != truth_particle_hit_counts.end()) {
285  double truth_sum=weightedCountSum(best_truth_particle_counts_iter->second, m_weights.value() );
286  // in principle truth_measuremnts should always be larger than 0
287  hit_efficiency = truth_sum > 0u ? (common_truth_sum/truth_sum) : 0.;
288  }
289  else {
290  // this can happen if the total number of hits are below threshold for
291  // accepting a truth particle
292  ++event_stat.m_nTruthParticleWithoutAssociatedCounts;
294  }
295 
296  // in principle a track matched to a truth particle should always have n_total > 0
297  // but the hits could be filtered out.
298  if (total_sum>0.) {
299  float hit_purity = common_truth_sum / total_sum;
300  ret.m_hitPurity = hit_purity;
301  ret.m_hitEfficiency = hit_efficiency;
302  m_debugCounter.fillTruthMatchProb(best_match_prob);
303 
304  if constexpr(TrackFindingValidationDetailedStat) {
305  float best_match_pt = best_match->pt();
306  std::size_t eta_category_i = getPtEtaStatCategory(best_match_pt, best_match->eta());
307  std::size_t pdg_id_category_i = getPtPdgIdStatCategory(best_match_pt, best_match->pdg_id());
308  event_stat.fill( eta_category_i, pdg_id_category_i, hit_efficiency, hit_purity, best_match_prob[0], best_match );
309  }
310  }
311  }
312  else {
313  ++event_stat.m_nTracksWithoutSelectedTruthParticle;
314  }
315  }
316  else {
317  // no eta, pdg_id for tracks without associated truth particle
318  // could use eta of track but not available to the algorithm
319 
320  ++event_stat.m_nTracksWithoutAssociatedTruthParticle;
321  if (!track_hit_counts.countsPerTruthParticle().empty()) {
322  ATH_MSG_ERROR("Failed to select best matching truth particle out of " << track_hit_counts.countsPerTruthParticle().size()
323  << ". This should not happen." );
324  }
325  }
326  return ret;
327  }

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

◆ checkBinOrder()

void ActsTrk::TrackTruthMatchingBaseAlg::checkBinOrder ( const std::vector< float > &  bin_edges,
const std::string &  bin_label 
) const
privateinherited

check that bins are in increasing order.

will cause a FATAL error if bins are not in increasing order.

Definition at line 403 of file TrackTruthMatchingBaseAlg.cxx.

403  {
404  if (!bin_edges.empty())
405  {
406  float last_eta = bin_edges[0];
407  for (float eta : bin_edges)
408  {
409  if (eta < last_eta)
410  {
411  ATH_MSG_FATAL(bin_label + " bins for statistics counter not in ascending order.");
412  }
413  last_eta = eta;
414  }
415  }
416  }

◆ checkMatchWeights()

StatusCode ActsTrk::TrackTruthMatchingBaseAlg::checkMatchWeights ( )
privateinherited

Definition at line 777 of file TrackTruthMatchingBaseAlg.cxx.

777  {
778  if (m_weights.size() != s_NMeasurementTypes) {
779  ATH_MSG_FATAL( "There must be exactly one weight per measurement type. But got "
780  << m_weights.size() << " != " << s_NMeasurementTypes);
781  return StatusCode::FAILURE;
782  }
783  if (m_weightsForProb.size() != s_NMeasurementTypes) {
784  ATH_MSG_FATAL( "There must be exactly one weight for computing the matching probability per measurement type. But got "
785  << m_weightsForProb.size() << " != " << s_NMeasurementTypes);
786  return StatusCode::FAILURE;
787  }
788  for (unsigned int type_i=0; type_i<s_NMeasurementTypes; ++type_i) {
789  if (m_weightsForProb[type_i]<0. || m_weights[type_i]<0. || (m_weights[type_i]>0) != (m_weightsForProb[type_i]>0.)) {
790  ATH_MSG_FATAL( "Invalid weights (should be positive) or inconsistency of weights which are zero (match prob. weights, weights):"
791  << m_weightsForProb[type_i] << " vs " << m_weights[type_i]);
792  return StatusCode::FAILURE;
793  }
794  }
795  return StatusCode::SUCCESS;
796  }

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

Definition at line 23 of file TrackFindingValidationAlg.cxx.

24  {
25  const TruthParticleHitCounts &truth_particle_hit_counts = getTruthParticleHitCounts(ctx);
27  if (!track_to_truth_handle.isValid()) {
28  ATH_MSG_ERROR("No track to truth particle association for key " << m_trackToTruth.key() );
29  return StatusCode::FAILURE;
30  }
31 
32  EventStat event_stat(truthSelectionTool(),
33  perEtaSize(),
34  perPdgIdSize(),
35  track_to_truth_handle->size());
36 
37  for(const HitCountsPerTrack &track_hit_counts : *track_to_truth_handle) {
38  analyseTrackTruth(truth_particle_hit_counts,
39  track_hit_counts,
40  event_stat);
41  }
42  postProcessEventStat(truth_particle_hit_counts,
43  track_to_truth_handle->size(),
44  event_stat);
45  return StatusCode::SUCCESS;
46  }

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

◆ finalize()

StatusCode ActsTrk::TrackFindingValidationAlg::finalize ( )
overridevirtual

Reimplemented from ActsTrk::TrackTruthMatchingBaseAlg.

Definition at line 17 of file TrackFindingValidationAlg.cxx.

18  {
20  return sc;
21  }

◆ getPtEtaStatCategory()

std::size_t ActsTrk::TrackTruthMatchingBaseAlg::getPtEtaStatCategory ( float  pt,
float  eta 
) const
inlineprivateinherited

Return the category based on the provided eta value.

Parameters
ptthe pt of the truth particle
etathe eta of the truth particle
Returns
a bin assigned to the give eta value

Definition at line 368 of file TrackTruthMatchingBaseAlg.cxx.

369  {
370  std::vector<float>::const_iterator pt_bin_iter = std::upper_bound(m_statPtBins.begin(),
371  m_statPtBins.end(),
372  pt);
373  std::vector<float>::const_iterator eta_bin_iter = std::upper_bound(m_statEtaBins.begin(),
374  m_statEtaBins.end(),
375  m_useAbsEtaForStat ? std::abs(eta) : eta);
376  return (m_statEtaBins.size()+2u) * static_cast<std::size_t>(pt_bin_iter - m_statPtBins.begin())
377  + static_cast<std::size_t>(eta_bin_iter - m_statEtaBins.begin());
378  }

◆ getPtPdgIdStatCategory()

std::size_t ActsTrk::TrackTruthMatchingBaseAlg::getPtPdgIdStatCategory ( float  pt,
int  pdg_id 
) const
privateinherited

Return the category based on the PDG ID.

Parameters
ptthe pt of the truth particle
pdg_idthe PDG ID
Returns
0 or a slot associated to a single PDG ID (absolut value)

Definition at line 379 of file TrackTruthMatchingBaseAlg.cxx.

379  {
380  std::vector<float>::const_iterator pt_bin_iter = std::upper_bound(m_statPtBins.begin(),
381  m_statPtBins.end(),
382  pt);
383  int abs_pdg_id = std::min(std::abs(pdg_id), s_pdgIdMax);
384  std::vector< int >::const_iterator iter = std::find(m_pdgId.begin(), m_pdgId.end(), abs_pdg_id);
385  if (iter == m_pdgId.end()){
386  if (m_pdgId.size() < m_pdgId.capacity()) {
387  std::lock_guard<std::mutex> lock(m_statMutex); // @TODO pdg id list specific mutex ?
388  // make sure that the pdg id still does not exist.
389  iter = std::find(m_pdgId.begin(), m_pdgId.end(), abs_pdg_id);
390  if (iter == m_pdgId.end()){
391  m_pdgId.push_back(abs_pdg_id);
392  iter = m_pdgId.end()-1;
393  }
394  }
395  else {
396  iter=m_pdgId.begin();
397  }
398  }
399  return (m_pdgId.capacity()) * static_cast<std::size_t>(pt_bin_iter - m_statPtBins.begin())
400  + (iter - m_pdgId.begin());
401  }

◆ getTruthParticleHitCounts()

const TruthParticleHitCounts& ActsTrk::TrackTruthMatchingBaseAlg::getTruthParticleHitCounts ( const EventContext &  ctx) const
inlineprotectedinherited

Definition at line 60 of file TrackTruthMatchingBaseAlg.h.

60  {
61  SG::ReadHandle<TruthParticleHitCounts> truth_particle_hit_counts_handle = SG::makeHandle(m_truthHitCounts, ctx);
62  if (!truth_particle_hit_counts_handle.isValid()) {
63  ATH_MSG_ERROR("No truth particle hit count map for key " << m_truthHitCounts.key() );
64  std::runtime_error("Failed to get truth particle hit count map");
65  }
66  return *truth_particle_hit_counts_handle;
67  }

◆ initialize()

StatusCode ActsTrk::TrackFindingValidationAlg::initialize ( )
overridevirtual

Reimplemented from ActsTrk::TrackTruthMatchingBaseAlg.

Definition at line 10 of file TrackFindingValidationAlg.cxx.

11  {
13  ATH_CHECK( m_trackToTruth.initialize() );
14  return sc;
15  }

◆ initStatTables()

void ActsTrk::TrackTruthMatchingBaseAlg::initStatTables ( )
privateinherited

Definition at line 417 of file TrackTruthMatchingBaseAlg.cxx.

418  {
419  if (!m_statEtaBins.empty())
420  {
421  m_useAbsEtaForStat = (m_statEtaBins[0] > 0.);
422  checkBinOrder(m_statEtaBins.value(),"Eta");
423  }
424  checkBinOrder(m_statPtBins.value(),"Pt");
425 
426 
427  unsigned int max_pdg_id_slots=( m_pdgIdCategorisation.value() ? 20 : 1 );
428 
429  // last element in statPerEta and counterPerEta will be used accumulate statistics of all eta bins
430  m_detailedStat.reset( *m_truthSelectionTool,
431  (m_statPtBins.size() + 2) * (m_statEtaBins.size() + 2),
432  (m_statPtBins.size() + 2) * max_pdg_id_slots);
433 
434  m_pdgId.reserve(max_pdg_id_slots);
435  m_pdgId.push_back(1000000000);
436  }

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

◆ noiseCorrection()

double ActsTrk::TrackTruthMatchingBaseAlg::noiseCorrection ( const ActsTrk::HitCounterArray noise_counts,
const std::vector< float > &  weights 
)
inlinestaticprivateinherited

Definition at line 808 of file TrackTruthMatchingBaseAlg.cxx.

809  {
810  assert( weights.size() == noise_counts.size());
811  double sum=0.;
812  for (unsigned int count_i=0; count_i < noise_counts.size(); ++count_i) {
813  sum -= weights[count_i] * noise_counts[count_i] - noise_counts[count_i];
814  }
815  return sum;
816  }

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

◆ perEtaSize()

std::size_t ActsTrk::TrackTruthMatchingBaseAlg::perEtaSize ( ) const
inlineprotectedinherited

Definition at line 71 of file TrackTruthMatchingBaseAlg.h.

71  {
72  return m_detailedStat.perEtaSize();
73  }

◆ perPdgIdSize()

std::size_t ActsTrk::TrackTruthMatchingBaseAlg::perPdgIdSize ( ) const
inlineprotectedinherited

Definition at line 74 of file TrackTruthMatchingBaseAlg.h.

74  {
75  return m_detailedStat.perPdgIdSize();
76  }

◆ postProcessEventStat()

void ActsTrk::TrackTruthMatchingBaseAlg::postProcessEventStat ( const TruthParticleHitCounts truth_particle_hit_counts,
std::size_t  n_tracks,
TrackTruthMatchingBaseAlg::EventStat event_stat 
) const
protectedinherited

Definition at line 331 of file TrackTruthMatchingBaseAlg.cxx.

334  {
335  if constexpr(EventStat::doDetail) {
336  if (m_computeTrackRecoEfficiency.value()) {
337  for(const std::pair<const xAOD::TruthParticle * const,ActsTrk::HitCounterArray> &truth_particle : truth_particle_hit_counts) {
338  const IAthSelectionTool::CutResult accept = m_truthSelectionTool->accept(truth_particle.first);
339  if (accept) {
340  double truth_sum=weightedCountSum(truth_particle.second, m_weights.value() );
341  if (truth_sum>0.) {
342  float truth_particle_pt = truth_particle.first->pt();
343  std::size_t eta_category_i = getPtEtaStatCategory(truth_particle_pt, truth_particle.first->eta());
344  std::size_t pdg_id_category_i = getPtPdgIdStatCategory(truth_particle_pt, truth_particle.first->pdg_id());
345  event_stat.incrementTotal(eta_category_i, pdg_id_category_i);
346  }
347  }
348  }
349  }
350  }
351 
352  // update total statistic counter
353  {
354  std::lock_guard<std::mutex> lock(m_statMutex);
355  m_counter[MissingTruthParticleHitCounts] += event_stat.m_nTruthParticleWithoutAssociatedCounts;
356  m_counter[NoAssociatedTruthParticle] += event_stat.m_nTracksWithoutAssociatedTruthParticle;
357  m_counter[NoSelectedTruthParticle] += event_stat.m_nTracksWithoutSelectedTruthParticle;
358  m_counter[TruthParticleNoNoiseMismatch]+=event_stat.m_nTruthParticleNonoiseMismatches;
359  m_counter[NTracksTotal]+=n_tracks;
360  m_counter[NTruthWithCountsTotal]+=truth_particle_hit_counts.size();
361 
362  if constexpr(EventStat::doDetail) {
363  m_detailedStat += event_stat;
364  }
365  }
366  }

◆ printCategories()

void ActsTrk::TrackTruthMatchingBaseAlg::printCategories ( const std::vector< std::string > &  pt_category_labels,
const std::vector< std::string > &  eta_category_labels,
std::vector< std::string > &  counter_labels,
std::vector< std::array< ActsUtils::Stat, kNCategorisedStat > > &  stat_per_category,
std::vector< std::array< std::size_t, kNCategorisedCounter > > &  counts_per_category,
const std::string &  top_left_label,
bool  print_sub_categories 
) const
privateinherited

Definition at line 570 of file TrackTruthMatchingBaseAlg.cxx.

576  {
577  if (!row_category_labels.empty() && !col_category_labels.empty()) {
578  if (row_category_labels.size() * col_category_labels.size() > counts_per_category.size() ) {
579  ATH_MSG_ERROR( "Mismatch between category labels and number of counters (logic error -> fix needed):"
580  << row_category_labels.size() << " * " << col_category_labels.size()
581  << " > " << counts_per_category.size() );
582  }
583  constexpr std::size_t stat_column_width=14*4 + 3*3+4 + 9; // floats + seperators + integer of Stat output
584  assert( stat_per_category.size() == counts_per_category.size());
585  const unsigned int n_rows = row_category_labels.size();
586  const unsigned int n_cols = stat_per_category.size() / n_rows; // some columns at the end of a row might not have labels
587  // and are to be ignored
588 
589  assert( stat_per_category.size() % n_rows == 0 );
590  for(unsigned int row_i=(print_sub_categories ? 0 : n_rows-1); row_i<n_rows; ++row_i) {
591  {
592  std::vector<std::string> stat_labels { std::string("Hit Efficiency") };
593  msg() << makeTable( stat_per_category, row_i*n_cols, kNCategorisedStat, kHitEfficiency, 1u, col_category_labels, stat_labels, top_left)
594  .columnWidth(stat_column_width)
595  .labelPrefix(row_category_labels.at(row_i)+" ")
596  .precision(std::vector<unsigned int>{3})
597  << std::endl;
598  }
599  {
600  std::vector<std::string> stat_labels { std::string("Hit Purity") };
601  msg() << makeTable( stat_per_category, row_i*n_cols, kNCategorisedStat, kHitPurity, 1u, col_category_labels, stat_labels, top_left)
602  .columnWidth(stat_column_width)
603  .labelPrefix(row_category_labels.at(row_i)+" ")
604  .precision(std::vector<unsigned int>{3})
605  << std::endl;
606  }
607  {
608  std::vector<std::string> stat_labels { std::string("Match probability") };
609  msg() << makeTable( stat_per_category, row_i*n_cols, kNCategorisedStat, kMatchProbability, 1u, col_category_labels, stat_labels, top_left)
610  .columnWidth(stat_column_width)
611  .labelPrefix(row_category_labels.at(row_i)+" ")
612  .precision(std::vector<unsigned int>{3})
613  << std::endl;
614  }
615  if (m_showRawCounts.value()) {
616  msg() << makeTable( counts_per_category, row_i*n_cols, kNCategorisedCounter, 0u, 1u, col_category_labels, counter_labels, top_left)
617  .labelPrefix(row_category_labels.at(row_i)+" ")
618  << std::endl;
619  }
620 
621  if (m_computeTrackRecoEfficiency.value()) {
622  std::vector< std::array< float, 2> > eff;
623  eff.reserve(m_pdgId.size());
624  for (unsigned int category_i=0; category_i< col_category_labels.size(); ++category_i) {
625  eff.push_back( computeRatio( counts_per_category[category_i+row_i*n_cols][kNParticleWithAssociatedTrack],
626  counts_per_category[category_i+row_i*n_cols][kNTotalParticles] ) );
627  }
628  std::vector<std::string> eff_labels { std::string("reco efficiency"),
629  std::string("stat. uncertainty") };
630  msg() << makeTable( eff, 0u, eff.begin()->size(),0u,1u, col_category_labels, eff_labels, top_left)
631  .labelPrefix(row_category_labels.at(row_i)+" ")
632  .precision(std::vector<unsigned int>{3,3})
633  << std::endl;
634  }
635  }
636  }
637  }

◆ printData2D()

void ActsTrk::TrackTruthMatchingBaseAlg::printData2D ( const std::vector< std::string > &  row_category_labels,
const std::vector< std::string > &  col_category_labels,
const std::string &  top_left_label,
std::vector< std::array< ActsUtils::Stat, kNCategorisedStat > > &  stat_per_category,
std::vector< std::array< std::size_t, kNCategorisedCounter > > &  counts_per_category,
bool  rotate 
) const
privateinherited

Definition at line 717 of file TrackTruthMatchingBaseAlg.cxx.

723  {
724  if (!row_category_labels.empty() && !col_category_labels.empty()) {
725  if (row_category_labels.size() * col_category_labels.size() > counts_per_category.size() ) {
726  ATH_MSG_ERROR( "Mismatch between category labels and number of counters (logic error -> fix needed):"
727  << row_category_labels.size() << " * " << col_category_labels.size()
728  << " > " << counts_per_category.size() );
729  }
730  std::vector<unsigned int> column_precision;
731  column_precision.resize( rotate ? row_category_labels.size() : col_category_labels.size(), 3u);
732  assert( stat_per_category.size() == counts_per_category.size());
733  msg() << "Hit efficiency : contributing hits over all hits of best matching truth particle" << std::endl
734  << create2DTable( row_category_labels, col_category_labels, top_left_label, stat_per_category,
735  [](const std::array< ActsUtils::Stat, kNCategorisedStat> &stat) {
736  return stat.at(kHitEfficiency).mean();
737  },
738  rotate)
739  .columnWidth(10)
740  .precision(std::vector<unsigned int>(column_precision))
741  << std::endl;
742  msg() << "Hit purity : contributing hits of best matching truth particle over all hits on track" << std::endl
743  << create2DTable( row_category_labels, col_category_labels, top_left_label, stat_per_category,
744  [](const std::array< ActsUtils::Stat, kNCategorisedStat> &stat) {
745  return stat.at(kHitPurity).mean();
746  },
747  rotate)
748  .columnWidth(10)
749  .precision(std::vector<unsigned int>(column_precision))
750  << std::endl;
751  msg() << "Match probability : weighted common hit sum of best matching truth particle over total track weighted hit sum" << std::endl
752  << create2DTable( row_category_labels, col_category_labels, top_left_label, stat_per_category,
753  [](const std::array< ActsUtils::Stat, kNCategorisedStat> &stat) {
754  return stat.at(kMatchProbability).mean();
755  },
756  rotate)
757  .columnWidth(10)
758  .precision(std::vector<unsigned int>(column_precision))
759  << std::endl;
760 
761  if (m_computeTrackRecoEfficiency.value()) {
762  msg() << "Reco efficiency : tracks with assoc. truth particle over all selected truth particles with assoc. measurements."
763  << std::endl
764  << create2DTable( row_category_labels, col_category_labels, top_left_label, counts_per_category,
765  [](const std::array< std::size_t, kNCategorisedCounter> &counter) {
768  },
769  rotate)
770  .columnWidth(10)
771  .precision(std::move(column_precision))
772  << std::endl;
773  }
774  }
775  }

◆ printStatTables()

void ActsTrk::TrackTruthMatchingBaseAlg::printStatTables ( ) const
privateinherited

Definition at line 548 of file TrackTruthMatchingBaseAlg.cxx.

549  {
550  if (msgLvl(MSG::INFO))
551  {
552  msg() << MSG::INFO << std::endl;
553  m_detailedStat.printStatTables( *this, m_statPtBins, m_statEtaBins, m_pdgId, m_printDetails.value(), m_pdgIdCategorisation.value(), m_useAbsEtaForStat );
554  {
555  std::array<std::string, kNCounter> counter_labels { std::string("Number of tracks"),
556  std::string("Number of truth particles with hit counts"),
557  std::string("Associated truth particles without hit counts"),
558  std::string("Tracks without associated truth particle"),
559  std::string("Tracks without selected, associated truth particle"),
560  std::string("Best truth particle without noise correction mismatch")
561  };
562  msg() << makeTable( m_counter, counter_labels) << std::endl;
563  }
564  msg() << endmsg;
565  }
566  }

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

◆ TrackTruthMatchingBaseAlg()

ActsTrk::TrackTruthMatchingBaseAlg::TrackTruthMatchingBaseAlg

Definition at line 53 of file TrackTruthMatchingBaseAlg.cxx.

131  : AthReentrantAlgorithm(name, pSvcLocator)
132  {
133  }

◆ truthSelectionTool()

const IAthSelectionTool& ActsTrk::TrackTruthMatchingBaseAlg::truthSelectionTool ( ) const
inlineprotectedinherited

Definition at line 69 of file TrackTruthMatchingBaseAlg.h.

69 { return *m_truthSelectionTool; }

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

◆ weightedCountSum()

double ActsTrk::TrackTruthMatchingBaseAlg::weightedCountSum ( const ActsTrk::HitCounterArray counts,
const std::vector< float > &  weights 
)
inlinestaticprivateinherited

Definition at line 798 of file TrackTruthMatchingBaseAlg.cxx.

799  {
800  assert( weights.size() == counts.size());
801  double sum=0.;
802  for (unsigned int count_i=0; count_i < counts.size(); ++count_i) {
803  sum += counts[count_i] * weights[count_i];
804  }
805  return sum;
806  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/4]

std::mutex m_statMutex ActsTrk::TrackTruthMatchingBaseAlg::ATLAS_THREAD_SAFE
mutableprivateinherited

Definition at line 359 of file TrackTruthMatchingBaseAlg.h.

◆ ATLAS_THREAD_SAFE [2/4]

std::array< std::size_t, kNCounter > m_counter ActsTrk::TrackTruthMatchingBaseAlg::ATLAS_THREAD_SAFE {}
mutableprivateinherited

Definition at line 360 of file TrackTruthMatchingBaseAlg.h.

◆ ATLAS_THREAD_SAFE [3/4]

std::vector< int > m_pdgId ActsTrk::TrackTruthMatchingBaseAlg::ATLAS_THREAD_SAFE
mutableprivateinherited

Definition at line 361 of file TrackTruthMatchingBaseAlg.h.

◆ ATLAS_THREAD_SAFE [4/4]

BaseStat<TrackFindingValidationDetailedStat> m_detailedStat ActsTrk::TrackTruthMatchingBaseAlg::ATLAS_THREAD_SAFE
mutableprivateinherited

Definition at line 362 of file TrackTruthMatchingBaseAlg.h.

◆ m_computeTrackRecoEfficiency

Property<bool> ActsTrk::TrackTruthMatchingBaseAlg::m_computeTrackRecoEfficiency {this, "ComputeTrackRecoEfficiency", true, "Compute and print track reconstruction efficiency."}
privateinherited

Definition at line 196 of file TrackTruthMatchingBaseAlg.h.

◆ m_debugCounter

DebugCounter<TrackFindingValidationDebugHists> ActsTrk::TrackTruthMatchingBaseAlg::m_debugCounter
privateinherited

Definition at line 227 of file TrackTruthMatchingBaseAlg.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 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_pdgIdCategorisation

Property<bool> ActsTrk::TrackTruthMatchingBaseAlg::m_pdgIdCategorisation {this, "PdgIdCategorisation", false, "Categorise by pdg id."}
privateinherited

Definition at line 190 of file TrackTruthMatchingBaseAlg.h.

◆ m_printDetails

Property<bool> ActsTrk::TrackTruthMatchingBaseAlg::m_printDetails {this, "ShowDetailedTables", false, "Show more details; stat. uncert., RMS, entries"}
privateinherited

Definition at line 194 of file TrackTruthMatchingBaseAlg.h.

◆ m_showRawCounts

Property<bool> ActsTrk::TrackTruthMatchingBaseAlg::m_showRawCounts {this, "ShowRawCounts", false, "Show all counters."}
privateinherited

Definition at line 192 of file TrackTruthMatchingBaseAlg.h.

◆ m_statEtaBins

Property<std::vector<float> > ActsTrk::TrackTruthMatchingBaseAlg::m_statEtaBins {this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these eta bins."}
privateinherited

Definition at line 186 of file TrackTruthMatchingBaseAlg.h.

◆ m_statPtBins

Property<std::vector<float> > ActsTrk::TrackTruthMatchingBaseAlg::m_statPtBins {this, "StatisticPtBins", {1.e3,2.5e3,10e3, 100e3}, "Gather statistics separately for these pt bins."}
privateinherited

Definition at line 188 of file TrackTruthMatchingBaseAlg.h.

◆ m_trackToTruth

SG::ReadHandleKey<TrackToTruthParticleAssociation> ActsTrk::TrackFindingValidationAlg::m_trackToTruth {this, "TrackToTruthAssociationMap","", "Association map from tracks to generator particles." }
private

Definition at line 33 of file TrackFindingValidationAlg.h.

◆ m_truthHitCounts

SG::ReadHandleKey<TruthParticleHitCounts> ActsTrk::TrackTruthMatchingBaseAlg::m_truthHitCounts {this, "TruthParticleHitCounts","", "Map from truth particle to hit counts." }
privateinherited

Definition at line 152 of file TrackTruthMatchingBaseAlg.h.

◆ m_truthSelectionTool

ToolHandle<IAthSelectionTool> ActsTrk::TrackTruthMatchingBaseAlg::m_truthSelectionTool {this, "TruthSelectionTool","AthTruthSelectionTool", "Truth selection tool (for efficiencies and resolutions)"}
privateinherited

Definition at line 199 of file TrackTruthMatchingBaseAlg.h.

◆ m_useAbsEtaForStat

bool ActsTrk::TrackTruthMatchingBaseAlg::m_useAbsEtaForStat = false
privateinherited

Definition at line 261 of file TrackTruthMatchingBaseAlg.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_weights

Gaudi::Property<std::vector<float> > ActsTrk::TrackTruthMatchingBaseAlg::m_weights
privateinherited
Initial value:
{this, "CountWeights", {}, "Weights applied to the counts per measurement type for weighted sums"
" which are used to compute hit efficiencies and purities." }

Definition at line 158 of file TrackTruthMatchingBaseAlg.h.

◆ m_weightsForProb

Gaudi::Property<std::vector<float> > ActsTrk::TrackTruthMatchingBaseAlg::m_weightsForProb
privateinherited
Initial value:
{this, "MatchWeights", {}, "Weights applied to the counts per measurement type for weighted sums"
" which are used compute the match probability." }

Definition at line 155 of file TrackTruthMatchingBaseAlg.h.

◆ s_NMeasurementTypes

constexpr static unsigned int ActsTrk::TrackTruthMatchingBaseAlg::s_NMeasurementTypes = static_cast<unsigned int>(xAOD::UncalibMeasType::nTypes) - 1u
staticconstexprprivateinherited

Definition at line 231 of file TrackTruthMatchingBaseAlg.h.

◆ s_pdgIdMax

constexpr static int ActsTrk::TrackTruthMatchingBaseAlg::s_pdgIdMax = 1000000000
staticconstexprprivateinherited

Definition at line 258 of file TrackTruthMatchingBaseAlg.h.


The documentation for this class was generated from the following files:
ActsTrk::TrackTruthMatchingBaseAlg::postProcessEventStat
void postProcessEventStat(const TruthParticleHitCounts &truth_particle_hit_counts, std::size_t n_tracks, EventStat &event_stat) const
Definition: TrackTruthMatchingBaseAlg.cxx:331
ActsTrk::TrackTruthMatchingBaseAlg::kNParticleWithMultipleAssociatedTracks
@ kNParticleWithMultipleAssociatedTracks
Definition: TrackTruthMatchingBaseAlg.h:247
test_pyathena.eta
eta
Definition: test_pyathena.py:10
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
mean
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:254
rotate
void rotate(double angler, GeoTrf::Vector2D &vector)
Definition: TRTDetectorFactory_Full.cxx:63
max
#define max(a, b)
Definition: cfImp.cxx:41
ActsTrk::TrackTruthMatchingBaseAlg::m_weightsForProb
Gaudi::Property< std::vector< float > > m_weightsForProb
Definition: TrackTruthMatchingBaseAlg.h:156
ActsTrk::TrackTruthMatchingBaseAlg::NTracksTotal
@ NTracksTotal
Definition: TrackTruthMatchingBaseAlg.h:235
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
IAthSelectionTool::CutResult
Definition: IAthSelectionTool.h:30
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ActsTrk::TrackTruthMatchingBaseAlg::initialize
virtual StatusCode initialize() override
Definition: TrackTruthMatchingBaseAlg.cxx:135
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
ActsTrk::TrackTruthMatchingBaseAlg::kHitEfficiency
@ kHitEfficiency
Definition: TrackTruthMatchingBaseAlg.h:252
ActsTrk::TrackTruthMatchingBaseAlg::m_printDetails
Property< bool > m_printDetails
Definition: TrackTruthMatchingBaseAlg.h:195
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
test_pyathena.pt
pt
Definition: test_pyathena.py:11
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
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
ActsTrk::TrackTruthMatchingBaseAlg::EventStat
EventStatBase< TrackFindingValidationDetailedStat > EventStat
Definition: TrackTruthMatchingBaseAlg.h:129
ActsTrk::TrackTruthMatchingBaseAlg::kMatchProbability
@ kMatchProbability
Definition: TrackTruthMatchingBaseAlg.h:254
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
ActsTrk::TrackFindingValidationAlg::m_trackToTruth
SG::ReadHandleKey< TrackToTruthParticleAssociation > m_trackToTruth
Definition: TrackFindingValidationAlg.h:34
xAOD::TruthParticle_v1::pdg_id
int pdg_id() const
PDG ID code.
Definition: TruthParticle_v1.h:52
ActsTrk::TrackTruthMatchingBaseAlg::truthSelectionTool
const IAthSelectionTool & truthSelectionTool() const
Definition: TrackTruthMatchingBaseAlg.h:69
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
ActsTrk::TrackTruthMatchingBaseAlg::weightedCountSum
static double weightedCountSum(const ActsTrk::HitCounterArray &counts, const std::vector< float > &weights)
Definition: TrackTruthMatchingBaseAlg.cxx:798
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
ActsTrk::TrackTruthMatchingBaseAlg::getPtPdgIdStatCategory
std::size_t getPtPdgIdStatCategory(float pt, int pdg_id) const
Return the category based on the PDG ID.
Definition: TrackTruthMatchingBaseAlg.cxx:379
ActsTrk::TrackTruthMatchingBaseAlg::DebugCounter::fillTruthMatchProb
void fillTruthMatchProb(const std::array< float, 2 > &best_match_prob) const
Definition: TrackTruthMatchingBaseAlg.cxx:164
ActsTrk::TrackTruthMatchingBaseAlg::NoAssociatedTruthParticle
@ NoAssociatedTruthParticle
Definition: TrackTruthMatchingBaseAlg.h:238
ActsTrk::TrackTruthMatchingBaseAlg::m_statEtaBins
Property< std::vector< float > > m_statEtaBins
Definition: TrackTruthMatchingBaseAlg.h:187
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ActsTrk::TrackTruthMatchingBaseAlg::s_NMeasurementTypes
constexpr static unsigned int s_NMeasurementTypes
Definition: TrackTruthMatchingBaseAlg.h:231
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
makeTable
TableUtils::StatTable< T > makeTable(const std::array< T, N > &counter, const std::array< std::string, N > &label)
Definition: TableUtils.h:521
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
ActsTrk::TrackTruthMatchingBaseAlg::NTruthWithCountsTotal
@ NTruthWithCountsTotal
Definition: TrackTruthMatchingBaseAlg.h:236
ActsTrk::TrackTruthMatchingBaseAlg::getPtEtaStatCategory
std::size_t getPtEtaStatCategory(float pt, float eta) const
Return the category based on the provided eta value.
Definition: TrackTruthMatchingBaseAlg.cxx:368
ActsTrk::TrackTruthMatchingBaseAlg::TruthParticleNoNoiseMismatch
@ TruthParticleNoNoiseMismatch
Definition: TrackTruthMatchingBaseAlg.h:240
ActsTrk::TrackTruthMatchingBaseAlg::checkBinOrder
void checkBinOrder(const std::vector< float > &bin_edges, const std::string &bin_label) const
check that bins are in increasing order.
Definition: TrackTruthMatchingBaseAlg.cxx:403
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrk::TrackTruthMatchingBaseAlg::m_statPtBins
Property< std::vector< float > > m_statPtBins
Definition: TrackTruthMatchingBaseAlg.h:189
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ActsTrk::TrackTruthMatchingBaseAlg::DebugCounter::fillMeasForTruthParticleWithoutCount
void fillMeasForTruthParticleWithoutCount(double weighted_measurement_sum) const
Definition: TrackTruthMatchingBaseAlg.cxx:157
beamspotman.stat
stat
Definition: beamspotman.py:266
ActsTrk::TrackTruthMatchingBaseAlg::kHitPurity
@ kHitPurity
Definition: TrackTruthMatchingBaseAlg.h:253
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
min
#define min(a, b)
Definition: cfImp.cxx:40
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
ActsTrk::TrackTruthMatchingBaseAlg::perEtaSize
std::size_t perEtaSize() const
Definition: TrackTruthMatchingBaseAlg.h:71
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::TrackTruthMatchingBaseAlg::m_computeTrackRecoEfficiency
Property< bool > m_computeTrackRecoEfficiency
Definition: TrackTruthMatchingBaseAlg.h:197
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
weights
Definition: herwig7_interface.h:44
ActsTrk::TrackTruthMatchingBaseAlg::kNCategorisedCounter
@ kNCategorisedCounter
Definition: TrackTruthMatchingBaseAlg.h:249
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
ActsTrk::TrackTruthMatchingBaseAlg::kNTotalTracks
@ kNTotalTracks
Definition: TrackTruthMatchingBaseAlg.h:248
ActsTrk::TruthParticleHitCounts
std::unordered_map< const xAOD::TruthParticle *, HitCounterArray > TruthParticleHitCounts
Definition: TruthParticleHitCounts.h:19
ActsTrk::TrackTruthMatchingBaseAlg::kNCounter
@ kNCounter
Definition: TrackTruthMatchingBaseAlg.h:241
ActsTrk::TrackTruthMatchingBaseAlg::kNParticleWithAssociatedTrack
@ kNParticleWithAssociatedTrack
Definition: TrackTruthMatchingBaseAlg.h:246
ActsTrk::TrackFindingValidationDetailedStat
constexpr bool TrackFindingValidationDetailedStat
Definition: TrackTruthMatchingBaseAlg.h:42
ActsTrk::TrackTruthMatchingBaseAlg::s_pdgIdMax
constexpr static int s_pdgIdMax
Definition: TrackTruthMatchingBaseAlg.h:258
a
TList * a
Definition: liststreamerinfos.cxx:10
ActsTrk::TrackTruthMatchingBaseAlg::m_truthSelectionTool
ToolHandle< IAthSelectionTool > m_truthSelectionTool
Definition: TrackTruthMatchingBaseAlg.h:199
h
ActsTrk::TrackTruthMatchingBaseAlg::m_showRawCounts
Property< bool > m_showRawCounts
Definition: TrackTruthMatchingBaseAlg.h:193
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ActsTrk::TrackTruthMatchingBaseAlg::MissingTruthParticleHitCounts
@ MissingTruthParticleHitCounts
Definition: TrackTruthMatchingBaseAlg.h:237
ActsTrk::TrackTruthMatchingBaseAlg::kNTotalParticles
@ kNTotalParticles
Definition: TrackTruthMatchingBaseAlg.h:245
ActsTrk::TrackTruthMatchingBaseAlg::EventStatBase::doDetail
static constexpr bool doDetail
Definition: TrackTruthMatchingBaseAlg.h:80
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ActsTrk::TrackTruthMatchingBaseAlg::kNCategorisedStat
@ kNCategorisedStat
Definition: TrackTruthMatchingBaseAlg.h:255
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
ActsTrk::TrackTruthMatchingBaseAlg::m_truthHitCounts
SG::ReadHandleKey< TruthParticleHitCounts > m_truthHitCounts
Definition: TrackTruthMatchingBaseAlg.h:153
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ActsTrk::TrackTruthMatchingBaseAlg::m_weights
Gaudi::Property< std::vector< float > > m_weights
Definition: TrackTruthMatchingBaseAlg.h:159
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
ActsTrk::TrackTruthMatchingBaseAlg::m_debugCounter
DebugCounter< TrackFindingValidationDebugHists > m_debugCounter
Definition: TrackTruthMatchingBaseAlg.h:227
ActsTrk::TrackTruthMatchingBaseAlg::analyseTrackTruth
TruthMatchResult analyseTrackTruth(const TruthParticleHitCounts &truth_particle_hit_counts, const HitCountsPerTrack &track_hit_counts, EventStat &event_stat) const
Definition: TrackTruthMatchingBaseAlg.cxx:209
ActsTrk::TrackTruthMatchingBaseAlg::noiseCorrection
static double noiseCorrection(const ActsTrk::HitCounterArray &noise_counts, const std::vector< float > &weights)
Definition: TrackTruthMatchingBaseAlg.cxx:808
test_pyathena.counter
counter
Definition: test_pyathena.py:15
ActsTrk::TrackTruthMatchingBaseAlg::NoSelectedTruthParticle
@ NoSelectedTruthParticle
Definition: TrackTruthMatchingBaseAlg.h:239
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ActsTrk::TrackTruthMatchingBaseAlg::getTruthParticleHitCounts
const TruthParticleHitCounts & getTruthParticleHitCounts(const EventContext &ctx) const
Definition: TrackTruthMatchingBaseAlg.h:60
ActsTrk::TrackTruthMatchingBaseAlg::m_useAbsEtaForStat
bool m_useAbsEtaForStat
Definition: TrackTruthMatchingBaseAlg.h:261
ActsTrk::TrackTruthMatchingBaseAlg::perPdgIdSize
std::size_t perPdgIdSize() const
Definition: TrackTruthMatchingBaseAlg.h:74
ActsTrk::TrackTruthMatchingBaseAlg::m_pdgIdCategorisation
Property< bool > m_pdgIdCategorisation
Definition: TrackTruthMatchingBaseAlg.h:191
TableUtils::computeRatio
float computeRatio(std::size_t numerator, std::size_t denominator)
Definition: TableUtils.h:412
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
ActsTrk::TrackTruthMatchingBaseAlg::finalize
virtual StatusCode finalize() override
Definition: TrackTruthMatchingBaseAlg.cxx:173