ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
InDet::InDetRecStatisticsAlg Class Reference

#include <InDetRecStatisticsAlg.h>

Inheritance diagram for InDet::InDetRecStatisticsAlg:
Collaboration diagram for InDet::InDetRecStatisticsAlg:

Classes

struct  Counter
 

Public Member Functions

 InDetRecStatisticsAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Default Constructor. More...
 
StatusCode initialize ()
 Initialization of services, track collections, creates TrackStatHelper for each Track Collection. More...
 
StatusCode execute (const EventContext &ctx) const
 Calculation of statistics. More...
 
StatusCode finalize ()
 Statistics table printed, collection cleared. More...
 
StatusCode getServices ()
 Get various services such as StoreGate, dictionaries, detector managers etc. More...
 
StatusCode resetStatistics ()
 Clear statistics counters, called before each track collection is processed. More...
 
void printStatistics ()
 Print tracking statistics calculated with TrackStatHelper. More...
 
void printTrackSummary (MsgStream &out, enum eta_region)
 Print track statistics for all and low proability tracks. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

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

Private Types

enum  ECounter {
  kN_rec_tracks_without_perigee, kN_unknown_hits, kN_rec_tracks_processed, kN_gen_tracks_processed,
  kN_spacepoints_processed, kNCounter
}
 
using CounterLocal = Counter< int >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void selectGenSignal (const McEventCollection *, std::vector< std::pair< HepMC::ConstGenParticlePtr, int > > &, unsigned int, unsigned int, CounterLocal &counter) const
 Select charged,stable particles which pass pt and eta cuts for analysis. More...
 
void selectRecSignal (const TrackCollection *, std::vector< const Trk::Track * > &, std::vector< const Trk::Track * > &, CounterLocal &counter) const
 Select for analysis reconstructed tracks passing Pt and eta cuts. More...
 
const Trk::TrackParametersgetUnbiasedTrackParameters (const Trk::TrackParameters *, const Trk::MeasurementBase *)
 Get Unbiased Track Parameters. More...
 
Identifier getIdentifier (const Trk::MeasurementBase *measurement)
 
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 float calculatePull (const float, const float, const float)
 Calculate pull from residual, track and hit error. More...
 

Private Attributes

std::vector< class TrackStatHelper * > m_SignalCounters
 Vector of TrackStatHelper objects, one for each track collection. More...
 
const AtlasDetectorIDm_idHelper
 Used to find out the sub-det from PRD->identify(). More...
 
const PixelIDm_pixelID
 get pixel layer from hit ID More...
 
const SCT_IDm_sctID
 get sct layer from hit ID More...
 
const TRT_IDm_trtID
 get trt layer from hit ID More...
 
const IdDictManagerm_idDictMgr
 
ToolHandle< Trk::ITruthToTrackm_truthToTrack
 tool to create track parameters from a gen particle More...
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trkSummaryTool
 tool to get track summary information from track More...
 
ToolHandle< Trk::IUpdatorm_updatorHandle
 Tool handle of updator for unbiased states. More...
 
Trk::IUpdatorm_updator
 updator for unbiased states More...
 
ToolHandle< Trk::IResidualPullCalculatorm_residualPullCalculator
 The residual and pull calculator tool handle. More...
 
SG::ReadHandleKey< McEventCollectionm_McTrackCollection_key
 
ToolHandle< Trk::ITrackSelectorToolm_trackSelectorTool
 
bool m_UseTrackSummary
 Flag to print detailed statistics for each track collection. More...
 
bool m_printSecondary
 Flag to print hit information for secondary tracks. More...
 
float m_minPt
 Minimum Pt cut for tracks used by the algorithm. More...
 
float m_maxEta
 Maximum Eta cut for tracks used by the algorithm. More...
 
float m_maxEtaBarrel
 define max eta of barrel region More...
 
float m_maxEtaTransition
 define max eta of transition region More...
 
float m_maxEtaEndcap
 define max eta of eta region More...
 
float m_fakeTrackCut
 Maximum probability for which a track will be considered a fake. More...
 
float m_fakeTrackCut2
 Second definition of maximum probability for which a track will be considered a fake. More...
 
float m_matchTrackCut
 Minimum number of hits from a truth track to be considered a matched reco track. More...
 
float m_maxRStartPrimary
 Maximum R of start vertex to be considered primary. More...
 
float m_maxRStartSecondary
 Maximum R of start vertex to be considered secondary. More...
 
float m_maxZStartPrimary
 Maximum Z of start vertex to be considered primary. More...
 
float m_maxZStartSecondary
 Maximum Z of start vertex to be considered secondary. More...
 
float m_minREndPrimary
 If track has end vertex, this is min R of end vertex to be considered primary. More...
 
float m_minREndSecondary
 If track has end vertex, this is min R of end vertex to be considered secondary. More...
 
float m_minZEndPrimary
 If track has end vertex, this is min Z of end vertex to be considered primary. More...
 
float m_minZEndSecondary
 If track has end vertex, this is min Z of end vertex to be considered secondary. More...
 
bool m_useTrackSelection
 Use track selector tool. More...
 
bool m_doTruth
 Use truth information. More...
 
float m_minEtaFORWARD
 
float m_maxEtaFORWARD
 
SG::ReadHandleKeyArray< TrackCollectionm_RecTrackCollection_keys
 
SG::ReadHandleKeyArray< TrackTruthCollectionm_TrackTruthCollection_keys
 
std::atomic< bool > m_pullWarning {}
 warn only once, if pull cannot be calculated More...
 
std::atomic< bool > m_UpdatorWarning {}
 warn only once, if unbiased track states can not be calculated More...
 
std::atomic< int > m_isUnbiased
 if can get unbiased residuals More...
 
std::atomic< long > m_events_processed
 number of events processed More...
 
Counter< std::atomic< long > > m_counter 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
 

Detailed Description

Definition at line 46 of file InDetRecStatisticsAlg.h.

Member Typedef Documentation

◆ CounterLocal

Definition at line 79 of file InDetRecStatisticsAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ECounter

Enumerator
kN_rec_tracks_without_perigee 

number of tracks w/o perigee

kN_unknown_hits 

number of hits without track

kN_rec_tracks_processed 

number of reconstructed tracks processed

kN_gen_tracks_processed 

number of generated tracks processed

kN_spacepoints_processed 

number of space points processed

kNCounter 

Definition at line 147 of file InDetRecStatisticsAlg.h.

Constructor & Destructor Documentation

◆ InDetRecStatisticsAlg()

InDet::InDetRecStatisticsAlg::InDetRecStatisticsAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Default Constructor.

Definition at line 72 of file InDetRecStatisticsAlg.cxx.

72  :
73  AthReentrantAlgorithm(name, pSvcLocator),
74  m_trtID (nullptr),
75  m_idDictMgr (nullptr),
76  m_truthToTrack ("Trk::TruthToTrack"),
77  m_trkSummaryTool ("Trk::TrackSummaryTool/InDetTrackSummaryTool"),
78  m_updatorHandle ("Trk::KalmanUpdator/TrkKalmanUpdator"),
79  m_updator (nullptr),
80  m_residualPullCalculator ("Trk::ResidualPullCalculator/ResidualPullCalculator"),
81  m_McTrackCollection_key ("TruthEvent"),
82  m_trackSelectorTool ("InDet::InDetDetailedTrackSelectorTool"),
83  m_UseTrackSummary (true),
84  m_printSecondary (false),
85  m_minPt (1000),
86  m_maxEta (4.2),
87  m_maxEtaBarrel (0.8),
88  m_maxEtaTransition (1.6),
89  m_maxEtaEndcap (2.5),
90  m_fakeTrackCut (0.9),
91  m_fakeTrackCut2 (0.7),
92  m_matchTrackCut (0.5),
97  m_minREndPrimary ( 400.0*CLHEP::mm),
99  m_minZEndPrimary (2300.0*CLHEP::mm),
100  //m_maxZIndet (),
101  m_minZEndSecondary (3200.0*CLHEP::mm),
102  m_useTrackSelection (false),
103  m_doTruth (true),
104  m_minEtaFORWARD (2.5),
105  m_maxEtaFORWARD (4.2),
106  m_isUnbiased (0),
108 {
109  // m_RecTrackCollection_keys.push_back(std::string("Tracks"));
110  // m_TrackTruthCollection_keys.push_back(std::string("TrackTruthCollection"));
111 
112  // Algorithm properties
113  declareProperty("SummaryTool", m_trkSummaryTool);
114  declareProperty("TruthToTrackTool", m_truthToTrack);
115  declareProperty("UpdatorTool", m_updatorHandle,
116  "Measurement updator to calculate unbiased track states");
117  declareProperty("ResidualPullCalculatorTool", m_residualPullCalculator,
118  "Tool to calculate residuals and pulls");
119  declareProperty("TrackCollectionKeys", m_RecTrackCollection_keys);
120  declareProperty("McTrackCollectionKey", m_McTrackCollection_key);
121  declareProperty("TrackTruthCollectionKeys", m_TrackTruthCollection_keys);
122  declareProperty("UseTrackSelection" , m_useTrackSelection);
123  declareProperty("DoTruth" , m_doTruth);
124  declareProperty("TrackSelectorTool" , m_trackSelectorTool);
125  declareProperty("UseTrackSummary", m_UseTrackSummary);
126  declareProperty("PrintSecondary", m_printSecondary);
127  declareProperty("minPt", m_minPt);
128  declareProperty("maxEta", m_maxEta);
129  declareProperty("maxEtaBarrel", m_maxEtaBarrel );
130  declareProperty("maxEtaTransition", m_maxEtaTransition);
131  declareProperty("maxEtaEndcap", m_maxEtaEndcap);
132  declareProperty("maxEtaFORWARD", m_maxEtaFORWARD);
133  declareProperty("minEtaFORWARD", m_minEtaFORWARD);
134  declareProperty("fakeTrackCut", m_fakeTrackCut);
135  declareProperty("fakeTrackCut2", m_fakeTrackCut2);
136  declareProperty("matchTrackCut", m_matchTrackCut);
137  declareProperty("maxRStartPrimary", m_maxRStartPrimary);
138  declareProperty("maxRStartSecondary", m_maxRStartSecondary);
139  declareProperty("maxZStartPrimary", m_maxZStartPrimary);
140  declareProperty("maxZStartSecondary", m_maxZStartSecondary);
141  declareProperty("minREndPrimary", m_minREndPrimary);
142  declareProperty("minREndSecondary", m_minREndSecondary);
143  declareProperty("minZEndPrimary", m_minZEndPrimary);
144  declareProperty("minZEndSecondary", m_minZEndSecondary);
145  m_idHelper = nullptr;
146  m_pixelID = nullptr;
147  m_sctID = nullptr;
148  m_UpdatorWarning = false;
149  m_pullWarning = false;
150 }

Member Function Documentation

◆ calculatePull()

float InDet::InDetRecStatisticsAlg::calculatePull ( const float  residual,
const float  trkErr,
const float  hitErr 
)
staticprivate

Calculate pull from residual, track and hit error.

Definition at line 769 of file InDetRecStatisticsAlg.cxx.

771  {
772  double ErrorSum;
773  ErrorSum = sqrt(pow(trkErr, 2) + pow(hitErr, 2));
774  if (ErrorSum != 0) { return residual/ErrorSum; }
775  else { return 0; }
776 }

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

◆ 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 InDet::InDetRecStatisticsAlg::execute ( const EventContext &  ctx) const

Calculation of statistics.

Definition at line 263 of file InDetRecStatisticsAlg.cxx.

263  {
264 
265  ATH_MSG_DEBUG("entering execute()");
266 
267  // Get reconstructed tracks , generated tracks, and truth from storegate
268 
270 
271  if (m_doTruth) {
273  if (!SimTracks.isValid()) {
274  // @TODO warning ?
275  ATH_MSG_WARNING("Error retrieving collections !");
276  return StatusCode::SUCCESS;
277  }
278  }
279 
280  // Doesn't take account of pileup:
281  //m_gen_tracks_processed += (*(SimTracks->begin()))->particles_size();
284 
285  // select charged and stable generated tracks
286  // apply pt, eta etc cuts to generated tracks
287  // devide generated tracks into primary, truncated, secondary
288 
289  std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > GenSignal;
290  // GenSignalPrimary, GenSignalTruncated, GenSignalSecondary;
291  unsigned int inTimeStart = 0;
292  unsigned int inTimeEnd = 0;
293  if (m_doTruth) selectGenSignal ((SimTracks.isValid() ? &(*SimTracks) : nullptr), GenSignal, inTimeStart, inTimeEnd, counter);
294 
295  // step through the various reconstructed TrackCollections and
296  // corresponding TrackTruthCollections and produce statistics for each
297 
298  if (m_SignalCounters.empty()) {
299  ATH_MSG_ERROR("No reco track collection specified! Aborting.");
300  return StatusCode::FAILURE;
301  }
302 
303  std::vector< SG::ReadHandle<TrackCollection> > rec_track_collections = m_RecTrackCollection_keys.makeHandles(ctx);
304  std::vector< SG::ReadHandle<TrackTruthCollection> > truth_track_collections;
305  if (m_doTruth && !m_TrackTruthCollection_keys.empty()) {
306  truth_track_collections = m_TrackTruthCollection_keys.makeHandles(ctx);
307  if (truth_track_collections.size() != rec_track_collections.size()) {
308  ATH_MSG_ERROR("Different number of reco and truth track collections (" << rec_track_collections.size() << "!=" << truth_track_collections.size() << ")" );
309  }
310  }
311  if (m_SignalCounters.size() != rec_track_collections.size()) {
312  ATH_MSG_ERROR("Number expected reco track collections does not match the actual number of such collections ("
313  << m_SignalCounters.size() << "!=" << rec_track_collections.size() << ")" );
314  }
315 
316  std::vector< SG::ReadHandle<TrackCollection> >::iterator rec_track_collections_iter = rec_track_collections.begin();
317  std::vector< SG::ReadHandle<TrackTruthCollection> >::iterator truth_track_collections_iter = truth_track_collections.begin();
318  for (std::vector <class TrackStatHelper *>::const_iterator statHelper
319  = m_SignalCounters.begin();
320  statHelper != m_SignalCounters.end();
321  ++statHelper, ++rec_track_collections_iter) {
322  assert( rec_track_collections_iter != rec_track_collections.end());
323 
324  ATH_MSG_DEBUG("Acessing TrackCollection " << m_RecTrackCollection_keys.at(rec_track_collections_iter - rec_track_collections.begin()).key());
325  const TrackCollection * RecCollection = &(**rec_track_collections_iter);
326  const TrackTruthCollection * TruthMap = nullptr;
327 
328  if (RecCollection) ATH_MSG_DEBUG("Retrieved " << RecCollection->size() << " reconstructed tracks from storegate");
329 
330  if (m_doTruth) {
331  ATH_MSG_DEBUG("Acessing TrackTruthCollection " << m_TrackTruthCollection_keys.at(truth_track_collections_iter - truth_track_collections.begin()).key());
332  assert( truth_track_collections_iter != truth_track_collections.end());
333  TruthMap = &(**truth_track_collections_iter);
334  if (TruthMap) ATH_MSG_DEBUG("Retrieved " << TruthMap->size() << " TrackTruth elements from storegate");
335  ++truth_track_collections_iter;
336  }
337 
338  //start process of getting correct track summary
339 
340  std::vector <const Trk::Track *> RecTracks, RecSignal;
341  selectRecSignal (RecCollection, RecTracks,RecSignal,counter);
342 
344  " RecTracks.size()=" << RecTracks.size()
345  << ", GenSignal.size()=" << GenSignal.size());
346 
347  ATH_MSG_DEBUG("Accumulating Statistics...");
348  (*statHelper)->addEvent (RecCollection,
349  RecTracks,
350  GenSignal,
351  TruthMap,
352  m_idHelper,
353  m_pixelID,
354  m_sctID,
355  m_trkSummaryTool.operator->(),
357  &inTimeStart,
358  &inTimeEnd);
359 
360  counter.m_counter[kN_rec_tracks_processed] += RecCollection->size();
361 
362  for ( TrackCollection::const_iterator it = RecCollection->begin() ;
363  it < RecCollection->end(); ++ it){
364  std::vector<const Trk::RIO_OnTrack*> rioOnTracks;
365  Trk::RoT_Extractor::extract( rioOnTracks,
366  (*it)->measurementsOnTrack()->stdcont() );
367  counter.m_counter[kN_spacepoints_processed] += rioOnTracks.size();
368  }
369 
370  }
371  m_counter += counter;
372 
373  ATH_MSG_DEBUG("leaving execute()");
374  return StatusCode::SUCCESS;
375 }

◆ 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 InDet::InDetRecStatisticsAlg::finalize ( )

Statistics table printed, collection cleared.

Definition at line 380 of file InDetRecStatisticsAlg.cxx.

380  {
381 
382  // Part 1: Get the messaging service, print where you are
383  ATH_MSG_DEBUG("finalize()");
384 
385  printStatistics();
386 
387  for (std::vector <class TrackStatHelper *>::const_iterator collection =
388  m_SignalCounters.begin(); collection != m_SignalCounters.end();
389  ++collection) {
390  ATH_MSG_DEBUG(s_linestr2);
391  delete (*collection);
392  }
393  m_SignalCounters.clear();
394  return StatusCode::SUCCESS;
395 }

◆ getIdentifier()

Identifier InDet::InDetRecStatisticsAlg::getIdentifier ( const Trk::MeasurementBase measurement)
private

Definition at line 819 of file InDetRecStatisticsAlg.cxx.

819  {
820  Identifier id;
821  const Trk::CompetingRIOsOnTrack *comprot = nullptr;
822  // identify by ROT:
823  const Trk::RIO_OnTrack *rot =
824  dynamic_cast<const Trk::RIO_OnTrack*>(measurement);
825  if (rot) {
826  id = rot->identify();
827  } else {
828  // identify by CompetingROT:
829  comprot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(measurement);
830  if (comprot) {
831  rot = &comprot->rioOnTrack(comprot->indexOfMaxAssignProb());
832  id = rot->identify();
833  } else {
834  ATH_MSG_DEBUG("measurement is neither ROT nor competingROT:"
835  <<" can not determine detector type");
836  id.clear();
837  }
838  }
839  delete comprot;
840  return id;
841 }

◆ getServices()

StatusCode InDet::InDetRecStatisticsAlg::getServices ( )

Get various services such as StoreGate, dictionaries, detector managers etc.

Definition at line 398 of file InDetRecStatisticsAlg.cxx.

399 {
400  //Set up ATLAS ID helper to be able to identify the RIO's det-subsystem.
401 
402  // Get the dictionary manager from the detector store
403  const IdDictManager* idDictMgr = nullptr;
404  StatusCode sc = detStore()->retrieve(idDictMgr, "IdDict");
405  if (sc.isFailure()) {
406  ATH_MSG_FATAL("Could not get IdDictManager !");
407  return StatusCode::FAILURE;
408  }
409 
410  // Initialize the helper with the dictionary information.
411  sc = detStore()->retrieve(m_idHelper, "AtlasID");
412  if (sc.isFailure()) {
413  ATH_MSG_FATAL("Could not get AtlasDetectorID helper.");
414  return StatusCode::FAILURE;
415  }
416 
417  //get Pixel, SCT, TRT managers and helpers
418 
419  if (detStore()->retrieve(m_pixelID, "PixelID").isFailure()) {
420  msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg;
421  return StatusCode::FAILURE;
422  }
423  if (detStore()->retrieve(m_sctID, "SCT_ID").isFailure()) {
424  msg(MSG::FATAL) << "Could not get SCT ID helper" << endmsg;
425  return StatusCode::FAILURE;
426  }
427 
428  //retrieve the TRT helper only if not-SLHC layout used
429  sc = detStore()->retrieve(m_idDictMgr, "IdDict");
430  if (sc.isFailure()) {
431  ATH_MSG_FATAL("Could not get IdDictManager !");
432  return StatusCode::FAILURE;
433  }
434  const IdDictDictionary* dict = m_idDictMgr->manager()->find_dictionary("InnerDetector");
435  if(!dict) {
436  ATH_MSG_FATAL(" Cannot access InnerDetector dictionary ");
437  return StatusCode::FAILURE;
438  }
439 
440  bool isSLHC = false;
441  if (dict->file_name().find("SLHC")!=std::string::npos) isSLHC=true;
442 
443  if(!isSLHC){
444  if (detStore()->retrieve(m_trtID, "TRT_ID").isFailure()) {
445  msg(MSG::FATAL) << "Could not get TRT ID helper" << endmsg;
446  return StatusCode::FAILURE;
447  }
448  }
449  //
450 
451  if (m_UseTrackSummary) {
452  if (m_trkSummaryTool.retrieve().isFailure() ) {
453  ATH_MSG_FATAL("Failed to retrieve tool "
454  << m_trkSummaryTool);
455  return StatusCode::FAILURE;
456  } else {
457  ATH_MSG_INFO("Retrieved tool " << m_trkSummaryTool);
458  }
459  } else {
460  m_trkSummaryTool.disable();
461  }
462 
463  // AG: init truthToTrack
464  if (m_doTruth) {
465  if (m_truthToTrack.retrieve().isFailure() ) {
466  ATH_MSG_FATAL("Failed to retrieve tool " << m_truthToTrack);
467  return StatusCode::FAILURE;
468  } else {
469  ATH_MSG_INFO("Retrieved tool " << m_truthToTrack);
470  }
471  } else {
472  m_truthToTrack.disable();
473  }
474 
475  //adding track selector tool
477  if ( m_trackSelectorTool.retrieve().isFailure() ) {
478  ATH_MSG_FATAL("Failed to retrieve tool " << m_trackSelectorTool);
479  return StatusCode::FAILURE;
480  } else {
481  ATH_MSG_INFO("Retrieved tool " << m_trackSelectorTool);
482  }
483  } else {
484  m_trackSelectorTool.disable();
485  }
486  return StatusCode :: SUCCESS;
487 }

◆ getUnbiasedTrackParameters()

const Trk::TrackParameters * InDet::InDetRecStatisticsAlg::getUnbiasedTrackParameters ( const Trk::TrackParameters trkParameters,
const Trk::MeasurementBase measurement 
)
private

Get Unbiased Track Parameters.

Definition at line 778 of file InDetRecStatisticsAlg.cxx.

778  {
779 
780 
781  const Trk::TrackParameters *unbiasedTrkParameters = nullptr;
782 
783  // -----------------------------------------
784  // use unbiased track states or normal ones?
785  // unbiased track parameters are tried to retrieve if the updator tool
786  // is available and if unbiased track states could be produced before
787  // for the current track (ie. if one trial to get unbiased track states
788  // fail
789 
790  if (m_updator && (m_isUnbiased==1) ) {
791  if ( trkParameters->covariance() ) {
792  // Get unbiased state
793  ATH_MSG_VERBOSE(" getting unbiased params");
794  unbiasedTrkParameters =
795  m_updator->removeFromState( *trkParameters,
796  measurement->localParameters(),
797  measurement->localCovariance()).release();
798 
799  if (!unbiasedTrkParameters) {
800  ATH_MSG_WARNING("Could not get unbiased track parameters, "
801  <<"use normal parameters");
802  m_isUnbiased = 0;
803  }
804  } else if(!m_UpdatorWarning) {
805  // warn only once!
806  ATH_MSG_WARNING("TrackParameters contain no covariance: "
807  <<"Unbiased track states can not be calculated "
808  <<"(ie. pulls and residuals will be too small)");
809  m_UpdatorWarning = true;
810  m_isUnbiased = 0;
811  } else {
812  m_isUnbiased = 0;
813  }
814  } // end if no measured track parameter
815  return unbiasedTrkParameters;
816 }

◆ initialize()

StatusCode InDet::InDetRecStatisticsAlg::initialize ( )

Initialization of services, track collections, creates TrackStatHelper for each Track Collection.

Definition at line 154 of file InDetRecStatisticsAlg.cxx.

154  {
155 
156  // Part 1: Get the messaging service, print where you are
157  ATH_MSG_DEBUG("initialize()");
158 
159  StatusCode sc1 = getServices(); // retrieve store gate service etc
160  if (sc1.isFailure()) {
161  ATH_MSG_FATAL("Error retrieving services !");
162  return StatusCode::FAILURE;
163  }
164 
165  if (m_RecTrackCollection_keys.empty()) {
166  ATH_MSG_ERROR("No reco track collection specified! Aborting.");
167  return StatusCode::FAILURE;
168  }
169 
171  ATH_MSG_ERROR("You have specified "
172  << m_RecTrackCollection_keys.size()
173  << " TrackCollection keys, and " << m_TrackTruthCollection_keys.size()
174  << " TrackTruthCollection keys."
175  << " You have to specify one TrackTruthCollection for each"
176  << " TrackCollection! Exiting."
177  );
178  return StatusCode::FAILURE;
179  }
180 
181  // ----------------------------------
182  // use updator to get unbiased states
183  if ( ! m_updatorHandle.empty() ) {
184  if (m_updatorHandle.retrieve().isFailure()) {
185  ATH_MSG_FATAL("Could not retrieve measurement updator tool: "
186  << m_updatorHandle);
187  return StatusCode::FAILURE;
188  }
189  m_updator = &(*m_updatorHandle);
190  } else {
192  "No Updator for unbiased track states given, use normal states!");
193  m_updator = nullptr;
194  }
195 
196 
197  //get residual and pull calculator
198  if (m_residualPullCalculator.empty()) {
199  ATH_MSG_INFO(
200  "No residual/pull calculator for general hit residuals configured."
201  );
202  ATH_MSG_INFO(
203  "It is recommended to give R/P calculators to the det-specific tool"
204  << " handle lists then.");
205  } else if (m_residualPullCalculator.retrieve().isFailure()) {
206  ATH_MSG_FATAL("Could not retrieve "<< m_residualPullCalculator
207  <<" (to calculate residuals and pulls) ");
208 
209  } else {
210  ATH_MSG_INFO("Generic hit residuals&pulls will be calculated in one or both "
211  << "available local coordinates");
212  }
213 
214  // create one TrackStatHelper object of each trackCollection --- this is used to accumulate track and hit statistics
215 
216  struct cuts ct;
217  ct.maxEtaBarrel= m_maxEtaBarrel;
218  ct.maxEtaTransition= m_maxEtaTransition;
219  ct.maxEtaEndcap= m_maxEtaEndcap;
220  ct.fakeTrackCut= m_fakeTrackCut;
221  ct.fakeTrackCut2= m_fakeTrackCut2;
222  ct.matchTrackCut = m_matchTrackCut;
223  ct.maxRStartPrimary = m_maxRStartPrimary;
224  ct.maxRStartSecondary = m_maxRStartSecondary;
225  ct.maxZStartPrimary = m_maxZStartPrimary;
226  ct.maxZStartSecondary = m_maxZStartSecondary;
227  ct.minREndPrimary = m_minREndPrimary;
228  ct.minREndSecondary = m_minREndSecondary;
229  ct.minZEndPrimary = m_minZEndPrimary;
230  ct.minZEndSecondary = m_minZEndSecondary;
231  ct.minPt = m_minPt;
232  ct.minEtaFORWARD = m_minEtaFORWARD;
233  ct.maxEtaFORWARD = m_maxEtaFORWARD;
234 
235  unsigned int nCollections = 0;
237  it = m_RecTrackCollection_keys.begin();
238  it < m_RecTrackCollection_keys.end(); ++ it) {
239  InDet::TrackStatHelper * collection =
240  new TrackStatHelper(it->key(),(m_doTruth ? m_TrackTruthCollection_keys[nCollections].key() : ""), m_doTruth);
241  nCollections ++;
242  collection->SetCuts(ct);
243  m_SignalCounters.push_back(collection);
244  }
245 
246  StatusCode sc3 = resetStatistics(); // reset all statistic counters
247  if (sc3.isFailure()) {
248  ATH_MSG_FATAL("Error in resetStatistics !");
249  return StatusCode::FAILURE;
250  }
251 
252  ATH_CHECK( m_RecTrackCollection_keys.initialize() );
254  ATH_CHECK( m_TrackTruthCollection_keys.initialize() );
255 
256  return StatusCode :: SUCCESS;
257 
258 }

◆ inputHandles()

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

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printStatistics()

void InDet::InDetRecStatisticsAlg::printStatistics ( )

Print tracking statistics calculated with TrackStatHelper.

Definition at line 581 of file InDetRecStatisticsAlg.cxx.

581  {
582  if (!msgLvl(MSG::INFO)) return;
583 
584  ATH_MSG_INFO(" ********** Beginning InDetRecStatistics Statistics Table ***********");
585  ATH_MSG_INFO("For documentation see https://twiki.cern.ch/twiki/bin/view/Atlas/InDetRecStatistics");
586  ATH_MSG_INFO("(or for guaranteed latest version: http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/InnerDetector/InDetValidation/InDetRecStatistics/doc/mainpage.h?&view=markup )");
587  ATH_MSG_INFO(" ********************************************************************");
588 
589  std::stringstream outstr;
590  int def_precision(outstr.precision());
591  outstr << "\n"
592  << MSG::INFO
593  << std::setiosflags(std::ios::fixed | std::ios::showpoint)
594  << std::setw(7) << std::setprecision(2)
595  << s_linestr << "\n"
596  << "Summary" << "\n"
597  << "\tProcessed : " << m_events_processed
598  << " events, " << m_counter.m_counter[kN_rec_tracks_processed]
599  << " reconstructed tracks with " << m_counter.m_counter[kN_spacepoints_processed]
600  << " hits, and " << m_counter.m_counter[kN_gen_tracks_processed]
601  << " truth particles" << "\n"
602  << "\tProblem objects : " << m_counter.m_counter[kN_rec_tracks_without_perigee]
603  << " tracks without perigee, "
604  << m_counter.m_counter[kN_unknown_hits] << " unknown hits" << "\n"
605  << "\t" << "Reco TrackCollections : ";
606  bool first = true;
607  for (std::vector <class TrackStatHelper *>::const_iterator collection =
608  m_SignalCounters.begin();
609  collection != m_SignalCounters.end(); ++collection)
610  {
611  if (first) {
612  first = false;
613  }
614  else {
615  outstr << ", ";
616  }
617  outstr << "\"" << (*collection)->key() << "\"";
618  }
619  ATH_MSG_INFO(outstr.str());
620  outstr.str("");
621 
622  if (m_doTruth)
623  {
624  outstr.str("");
625  outstr << "\n"
626  << "\t" << "TrackTruthCollections : ";
627  first = true;
628  for (std::vector <class TrackStatHelper *>::const_iterator collection = m_SignalCounters.begin();
629  collection != m_SignalCounters.end(); ++collection)
630  {
631  if (first) {
632  first = false;
633  }
634  else {
635  outstr << ", ";
636  }
637  outstr << "\"" << (*collection)->Truthkey() << "\"";
638  }
639  ATH_MSG_INFO(outstr.str());
640  outstr.str("");
641  }
642  outstr.str("");
643  outstr << "\n"
644  << s_linestr2 << "\n"
645  << "Cuts and Settings for Statistics Table" << "\n"
646  << "\t" << "TrackSummary Statistics" << "\t"
647  << (m_UseTrackSummary ? "YES" : "NO") << "\n"
648  << "\t" << "Signal \t" << "pT > "
649  << m_minPt/1000 << " GeV/c, |eta| < " << m_maxEta << "\t\t"
650  << "\t" << "Primary track start \t" << "R < "
651  << m_maxRStartPrimary << "mm and |z| < "
652  << m_maxZStartPrimary << "mm" << "\n"
653  << "\t" << "Barrel \t" << 0.0
654  << "< |eta| < " << m_maxEtaBarrel << "\t\t\t"
655  << "\t" << "Primary track end \t" << "R > "
656  << m_minREndPrimary << "mm or |z| > " << m_minZEndPrimary
657  << "mm" << "\n"
658  << "\t" << "Transition Region \t" << m_maxEtaBarrel
659  << "< |eta| < " << m_maxEtaTransition << "\t\t\t"
660  << "\t" << "Secondary (non-Primary) start \t"
661  << " R < " << m_maxRStartSecondary << "mm and"
662  << " |z| < " << m_maxZStartSecondary << " mm" << "\n"
663  << "\t" << "Endcap \t" << m_maxEtaTransition
664  << "< |eta| < " << m_maxEtaEndcap << "\t\t\t"
665  << "\t" << "Secondary (non-primary) end \t"
666  << " R > " << m_minREndSecondary << "mm or"
667  << " |z| > " << m_minREndSecondary << "mm" << "\n"
668  << "\t" << "Forward \t"
669  << "|eta| > " << m_minEtaFORWARD << "\n"
670  << "\t" << "Low prob tracks #1 \t" << "< "
671  << m_fakeTrackCut << " of hits from single Truth Track "
672  << "\n"
673  << "\t" << "Low prob tracks #2 \t" << "< "
674  << m_fakeTrackCut2 << " of hits from single Truth Track "
675  << "\n"
676  << "\t" << "No link tracks \t Track has no link associated to an HepMC Particle" << "\n"
677  << "\t" << "Good reco tracks \t" << "> "
678  << m_matchTrackCut << " of hits from single Truth Track + a link !";
679  ATH_MSG_INFO(outstr.str());
680  outstr.str("");
681 
682  MsgStream &out = msg(MSG::INFO);
683  {
684  RestoreStream<MsgStream> restore(out);
685  out << "\n" << s_linestr2 << "\n";
686  m_SignalCounters.back()->print(out);
687 
688  if (m_UseTrackSummary) {
689  std::string track_stummary_type_header = TrackStatHelper::getSummaryTypeHeader();
690  out << "\n"
691  << s_linestr2 << "\n"
692  << "Detailed Statistics for Hits on Reconstructed tracks, using TrackSummary: (Preselection of tracks as described above.)" << "\n"
693  << s_linestr2 << "\n"
694  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
695  << " Reco Tracks .........................................hits/track....................................................... " << "\n"
696  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
697  << " in BARREL tracks/event " << track_stummary_type_header << "\n"
698  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
700 
701  out<< "\n"
702  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
703  << " in TRANSITION region tracks/event " << track_stummary_type_header << "\n"
704  << "----------------------------------------------------------------------------------------------------------------------------------------------------"
705  << "\n";
707 
708  out << "\n"
709  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
710  << " in ENDCAP tracks/event " << track_stummary_type_header << "\n"
711  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
713 
714  out << "\n"
715  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
716  << " in FORWARD region tracks/event " << track_stummary_type_header << "\n"
717  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
719  }
720 
721  if(m_printSecondary){
722  outstr.str("");
723  outstr << "\n" << std::setprecision(def_precision)
724  <<s_linestr<<"\n"
725  <<"Statistics for Secondaries (non-Primaries)"<<"\n"
726  << "\t" << "Secondary track start \t"
727  << " R < " << m_maxRStartSecondary << "mm and"
728  << " |z| < " << m_maxZStartSecondary << " mm" << "\n"
729  << "\t" << "Secondary track end \t"
730  << " R > " << m_minREndSecondary << "mm or"
731  << " |z| > " << m_minZEndSecondary << "mm";
732  ATH_MSG_INFO(outstr.str());
733  outstr.str("");
734  out << "\n" << s_linestr2 << "\n";
735  m_SignalCounters.back()->printSecondary(out);
736 
737  }
738  }
739  out << endmsg;
740 
741  ATH_MSG_INFO(" ********** Ending InDetRecStatistics Statistics Table ***********");
742  ATH_MSG_INFO( "\n"
743  << s_linestr );
744 }

◆ printTrackSummary()

void InDet::InDetRecStatisticsAlg::printTrackSummary ( MsgStream &  out,
enum eta_region  eta_reg 
)

Print track statistics for all and low proability tracks.

Definition at line 747 of file InDetRecStatisticsAlg.cxx.

748 {
749  bool printed = m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_ALL, eta_reg);
750 
751  if (printed) {
752  out << "\n"
753  << "----------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
754  }
755 
756  printed = m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_LOWTRUTHPROB, eta_reg);
757  if (printed) {
758  out << "\n"
759  << "----------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
760  }
761 
762  m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_LOWTRUTHPROB2, eta_reg);
763 
764 }

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

◆ resetStatistics()

StatusCode InDet::InDetRecStatisticsAlg::resetStatistics ( )

Clear statistics counters, called before each track collection is processed.

Definition at line 489 of file InDetRecStatisticsAlg.cxx.

489  {
490  m_counter.reset();
491  m_events_processed = 0;
492 
493  for (std::vector<InDet::TrackStatHelper *>::const_iterator counter =
494  m_SignalCounters.begin();
495  counter != m_SignalCounters.end(); ++ counter) {
496  (*counter)->reset();
497  }
498  return StatusCode :: SUCCESS;
499 }

◆ selectGenSignal()

void InDet::InDetRecStatisticsAlg::selectGenSignal ( const McEventCollection SimTracks,
std::vector< std::pair< HepMC::ConstGenParticlePtr, int > > &  GenSignal,
unsigned int  ,
unsigned int  ,
CounterLocal counter 
) const
private

Select charged,stable particles which pass pt and eta cuts for analysis.

Classify truth tracks as primary, secondary or truncated

Definition at line 527 of file InDetRecStatisticsAlg.cxx.

532 {
533  if (! SimTracks) return;
534 
535  unsigned int nb_mc_event = SimTracks->size();
536  std::unique_ptr<PileUpType> put = std::make_unique<PileUpType>(SimTracks);
537 
539  McEventCollection::const_iterator inTimeMBbegin;
540 
541  if (put)
542  {
543  inTimeMBbegin = put->in_time_minimum_bias_event_begin();
544  inTimeMBend = put->in_time_minimum_bias_event_end();
545  }
546 
547  for(unsigned int ievt=0; ievt<nb_mc_event; ++ievt)
548  {
549  const HepMC::GenEvent* genEvent = SimTracks->at(ievt);
550  counter.m_counter[kN_gen_tracks_processed] += genEvent->particles_size();
551  for (const auto& particle: *genEvent){
552  // require stable particle from generation or simulation
553  if (!MC::isStable(particle)) continue;
554  int pdgCode = particle->pdg_id();
555  if (MC::isNucleus(pdgCode)) continue; // ignore nuclei from hadronic interactions
556  float charge = MC::charge(pdgCode);
557  if (std::abs(charge)<0.5) continue;
558  if (std::abs(particle->momentum().perp()) > m_minPt &&
559  std::abs(particle->momentum().pseudoRapidity()) < m_maxEta ) {
560  std::pair<HepMC::ConstGenParticlePtr,int> thisPair(particle,ievt);
561  GenSignal.push_back(thisPair);
562  }
563  } // End of a particle iteration
564  } // End of one GenEvent iteration
565  }

◆ selectRecSignal()

void InDet::InDetRecStatisticsAlg::selectRecSignal ( const TrackCollection RecCollection,
std::vector< const Trk::Track * > &  RecTracks,
std::vector< const Trk::Track * > &  RecSignal,
CounterLocal counter 
) const
private

Select for analysis reconstructed tracks passing Pt and eta cuts.

Definition at line 501 of file InDetRecStatisticsAlg.cxx.

504  {
505 
506  for ( TrackCollection::const_iterator it = RecCollection->begin() ;
507  it != RecCollection->end(); ++ it){
508  RecTracks.push_back(*it);
509  const DataVector<const Trk::TrackParameters>* trackpara =
510  (*it)->trackParameters();
511 
512  if(!trackpara->empty()){
513  const Trk::TrackParameters* para = trackpara->front();
514  if (para){
515  if (para->pT() > m_minPt && std::abs(para->eta()) < m_maxEta) {
516  RecSignal.push_back(*it);
517  }
518  }
519  }
520  else {
522  }
523  }
524  }

◆ setFilterPassed()

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

Definition at line 139 of file AthReentrantAlgorithm.h.

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

◆ sysExecute()

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

Execute an algorithm.

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

Definition at line 67 of file AthReentrantAlgorithm.cxx.

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

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

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

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ ATLAS_THREAD_SAFE

Counter<std::atomic<long> > m_counter InDet::InDetRecStatisticsAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 170 of file InDetRecStatisticsAlg.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_doTruth

bool InDet::InDetRecStatisticsAlg::m_doTruth
private

Use truth information.

Definition at line 135 of file InDetRecStatisticsAlg.h.

◆ m_events_processed

std::atomic<long> InDet::InDetRecStatisticsAlg::m_events_processed
mutableprivate

number of events processed

Definition at line 145 of file InDetRecStatisticsAlg.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_fakeTrackCut

float InDet::InDetRecStatisticsAlg::m_fakeTrackCut
private

Maximum probability for which a track will be considered a fake.

Definition at line 122 of file InDetRecStatisticsAlg.h.

◆ m_fakeTrackCut2

float InDet::InDetRecStatisticsAlg::m_fakeTrackCut2
private

Second definition of maximum probability for which a track will be considered a fake.

Definition at line 123 of file InDetRecStatisticsAlg.h.

◆ m_idDictMgr

const IdDictManager* InDet::InDetRecStatisticsAlg::m_idDictMgr
private

Definition at line 103 of file InDetRecStatisticsAlg.h.

◆ m_idHelper

const AtlasDetectorID* InDet::InDetRecStatisticsAlg::m_idHelper
private

Used to find out the sub-det from PRD->identify().

Definition at line 98 of file InDetRecStatisticsAlg.h.

◆ m_isUnbiased

std::atomic<int> InDet::InDetRecStatisticsAlg::m_isUnbiased
mutableprivate

if can get unbiased residuals

Definition at line 143 of file InDetRecStatisticsAlg.h.

◆ m_matchTrackCut

float InDet::InDetRecStatisticsAlg::m_matchTrackCut
private

Minimum number of hits from a truth track to be considered a matched reco track.

Definition at line 124 of file InDetRecStatisticsAlg.h.

◆ m_maxEta

float InDet::InDetRecStatisticsAlg::m_maxEta
private

Maximum Eta cut for tracks used by the algorithm.

Definition at line 118 of file InDetRecStatisticsAlg.h.

◆ m_maxEtaBarrel

float InDet::InDetRecStatisticsAlg::m_maxEtaBarrel
private

define max eta of barrel region

Definition at line 119 of file InDetRecStatisticsAlg.h.

◆ m_maxEtaEndcap

float InDet::InDetRecStatisticsAlg::m_maxEtaEndcap
private

define max eta of eta region

Definition at line 121 of file InDetRecStatisticsAlg.h.

◆ m_maxEtaFORWARD

float InDet::InDetRecStatisticsAlg::m_maxEtaFORWARD
private

Definition at line 137 of file InDetRecStatisticsAlg.h.

◆ m_maxEtaTransition

float InDet::InDetRecStatisticsAlg::m_maxEtaTransition
private

define max eta of transition region

Definition at line 120 of file InDetRecStatisticsAlg.h.

◆ m_maxRStartPrimary

float InDet::InDetRecStatisticsAlg::m_maxRStartPrimary
private

Maximum R of start vertex to be considered primary.

Definition at line 126 of file InDetRecStatisticsAlg.h.

◆ m_maxRStartSecondary

float InDet::InDetRecStatisticsAlg::m_maxRStartSecondary
private

Maximum R of start vertex to be considered secondary.

Definition at line 127 of file InDetRecStatisticsAlg.h.

◆ m_maxZStartPrimary

float InDet::InDetRecStatisticsAlg::m_maxZStartPrimary
private

Maximum Z of start vertex to be considered primary.

Definition at line 128 of file InDetRecStatisticsAlg.h.

◆ m_maxZStartSecondary

float InDet::InDetRecStatisticsAlg::m_maxZStartSecondary
private

Maximum Z of start vertex to be considered secondary.

Definition at line 129 of file InDetRecStatisticsAlg.h.

◆ m_McTrackCollection_key

SG::ReadHandleKey<McEventCollection> InDet::InDetRecStatisticsAlg::m_McTrackCollection_key
private

Definition at line 112 of file InDetRecStatisticsAlg.h.

◆ m_minEtaFORWARD

float InDet::InDetRecStatisticsAlg::m_minEtaFORWARD
private

Definition at line 136 of file InDetRecStatisticsAlg.h.

◆ m_minPt

float InDet::InDetRecStatisticsAlg::m_minPt
private

Minimum Pt cut for tracks used by the algorithm.

Definition at line 117 of file InDetRecStatisticsAlg.h.

◆ m_minREndPrimary

float InDet::InDetRecStatisticsAlg::m_minREndPrimary
private

If track has end vertex, this is min R of end vertex to be considered primary.

Definition at line 130 of file InDetRecStatisticsAlg.h.

◆ m_minREndSecondary

float InDet::InDetRecStatisticsAlg::m_minREndSecondary
private

If track has end vertex, this is min R of end vertex to be considered secondary.

Definition at line 131 of file InDetRecStatisticsAlg.h.

◆ m_minZEndPrimary

float InDet::InDetRecStatisticsAlg::m_minZEndPrimary
private

If track has end vertex, this is min Z of end vertex to be considered primary.

Definition at line 132 of file InDetRecStatisticsAlg.h.

◆ m_minZEndSecondary

float InDet::InDetRecStatisticsAlg::m_minZEndSecondary
private

If track has end vertex, this is min Z of end vertex to be considered secondary.

Definition at line 133 of file InDetRecStatisticsAlg.h.

◆ m_pixelID

const PixelID* InDet::InDetRecStatisticsAlg::m_pixelID
private

get pixel layer from hit ID

Definition at line 99 of file InDetRecStatisticsAlg.h.

◆ m_printSecondary

bool InDet::InDetRecStatisticsAlg::m_printSecondary
private

Flag to print hit information for secondary tracks.

Definition at line 116 of file InDetRecStatisticsAlg.h.

◆ m_pullWarning

std::atomic<bool> InDet::InDetRecStatisticsAlg::m_pullWarning {}
mutableprivate

warn only once, if pull cannot be calculated

Definition at line 141 of file InDetRecStatisticsAlg.h.

◆ m_RecTrackCollection_keys

SG::ReadHandleKeyArray<TrackCollection> InDet::InDetRecStatisticsAlg::m_RecTrackCollection_keys
private

Definition at line 138 of file InDetRecStatisticsAlg.h.

◆ m_residualPullCalculator

ToolHandle<Trk::IResidualPullCalculator> InDet::InDetRecStatisticsAlg::m_residualPullCalculator
private

The residual and pull calculator tool handle.

Definition at line 109 of file InDetRecStatisticsAlg.h.

◆ m_sctID

const SCT_ID* InDet::InDetRecStatisticsAlg::m_sctID
private

get sct layer from hit ID

Definition at line 100 of file InDetRecStatisticsAlg.h.

◆ m_SignalCounters

std::vector<class TrackStatHelper *> InDet::InDetRecStatisticsAlg::m_SignalCounters
private

Vector of TrackStatHelper objects, one for each track collection.

Definition at line 97 of file InDetRecStatisticsAlg.h.

◆ m_trackSelectorTool

ToolHandle<Trk::ITrackSelectorTool> InDet::InDetRecStatisticsAlg::m_trackSelectorTool
private

Definition at line 113 of file InDetRecStatisticsAlg.h.

◆ m_TrackTruthCollection_keys

SG::ReadHandleKeyArray<TrackTruthCollection> InDet::InDetRecStatisticsAlg::m_TrackTruthCollection_keys
private

Definition at line 139 of file InDetRecStatisticsAlg.h.

◆ m_trkSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> InDet::InDetRecStatisticsAlg::m_trkSummaryTool
private

tool to get track summary information from track

Definition at line 105 of file InDetRecStatisticsAlg.h.

◆ m_trtID

const TRT_ID* InDet::InDetRecStatisticsAlg::m_trtID
private

get trt layer from hit ID

Definition at line 101 of file InDetRecStatisticsAlg.h.

◆ m_truthToTrack

ToolHandle<Trk::ITruthToTrack> InDet::InDetRecStatisticsAlg::m_truthToTrack
private

tool to create track parameters from a gen particle

Definition at line 104 of file InDetRecStatisticsAlg.h.

◆ m_updator

Trk::IUpdator* InDet::InDetRecStatisticsAlg::m_updator
private

updator for unbiased states

Definition at line 108 of file InDetRecStatisticsAlg.h.

◆ m_updatorHandle

ToolHandle<Trk::IUpdator> InDet::InDetRecStatisticsAlg::m_updatorHandle
private

Tool handle of updator for unbiased states.

Definition at line 107 of file InDetRecStatisticsAlg.h.

◆ m_UpdatorWarning

std::atomic<bool> InDet::InDetRecStatisticsAlg::m_UpdatorWarning {}
mutableprivate

warn only once, if unbiased track states can not be calculated

Definition at line 142 of file InDetRecStatisticsAlg.h.

◆ m_useTrackSelection

bool InDet::InDetRecStatisticsAlg::m_useTrackSelection
private

Use track selector tool.

Definition at line 134 of file InDetRecStatisticsAlg.h.

◆ m_UseTrackSummary

bool InDet::InDetRecStatisticsAlg::m_UseTrackSummary
private

Flag to print detailed statistics for each track collection.

Definition at line 115 of file InDetRecStatisticsAlg.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.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
InDet::InDetRecStatisticsAlg::CounterLocal
Counter< int > CounterLocal
Definition: InDetRecStatisticsAlg.h:79
InDet::InDetRecStatisticsAlg::m_pixelID
const PixelID * m_pixelID
get pixel layer from hit ID
Definition: InDetRecStatisticsAlg.h:99
InDet::InDetRecStatisticsAlg::m_idHelper
const AtlasDetectorID * m_idHelper
Used to find out the sub-det from PRD->identify().
Definition: InDetRecStatisticsAlg.h:98
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
InDet::TRACK_ALL
@ TRACK_ALL
Definition: TrackStatHelper.h:38
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
InDet::InDetRecStatisticsAlg::m_maxEtaFORWARD
float m_maxEtaFORWARD
Definition: InDetRecStatisticsAlg.h:137
InDet::InDetRecStatisticsAlg::kN_rec_tracks_processed
@ kN_rec_tracks_processed
number of reconstructed tracks processed
Definition: InDetRecStatisticsAlg.h:150
InDet::TrackStatHelper::getSummaryTypeHeader
static std::string getSummaryTypeHeader()
Definition: TrackStatHelper.cxx:81
isNucleus
bool isNucleus(const T &p)
Definition: AtlasPID.h:223
InDet::InDetRecStatisticsAlg::m_pullWarning
std::atomic< bool > m_pullWarning
warn only once, if pull cannot be calculated
Definition: InDetRecStatisticsAlg.h:141
InDet::InDetRecStatisticsAlg::m_minZEndSecondary
float m_minZEndSecondary
If track has end vertex, this is min Z of end vertex to be considered secondary.
Definition: InDetRecStatisticsAlg.h:133
InDet::InDetRecStatisticsAlg::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool handle.
Definition: InDetRecStatisticsAlg.h:109
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
InDet::InDetRecStatisticsAlg::m_trkSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
tool to get track summary information from track
Definition: InDetRecStatisticsAlg.h:105
InDet::InDetRecStatisticsAlg::resetStatistics
StatusCode resetStatistics()
Clear statistics counters, called before each track collection is processed.
Definition: InDetRecStatisticsAlg.cxx:489
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
InDet::InDetRecStatisticsAlg::m_maxRStartPrimary
float m_maxRStartPrimary
Maximum R of start vertex to be considered primary.
Definition: InDetRecStatisticsAlg.h:126
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::InDetRecStatisticsAlg::m_trtID
const TRT_ID * m_trtID
get trt layer from hit ID
Definition: InDetRecStatisticsAlg.h:101
InDet::InDetRecStatisticsAlg::getServices
StatusCode getServices()
Get various services such as StoreGate, dictionaries, detector managers etc.
Definition: InDetRecStatisticsAlg.cxx:398
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
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
InDet::InDetRecStatisticsAlg::m_UpdatorWarning
std::atomic< bool > m_UpdatorWarning
warn only once, if unbiased track states can not be calculated
Definition: InDetRecStatisticsAlg.h:142
InDet::InDetRecStatisticsAlg::selectGenSignal
void selectGenSignal(const McEventCollection *, std::vector< std::pair< HepMC::ConstGenParticlePtr, int > > &, unsigned int, unsigned int, CounterLocal &counter) const
Select charged,stable particles which pass pt and eta cuts for analysis.
Definition: InDetRecStatisticsAlg.cxx:528
skel.it
it
Definition: skel.GENtoEVGEN.py:396
InDet::InDetRecStatisticsAlg::kNCounter
@ kNCounter
Definition: InDetRecStatisticsAlg.h:153
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
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
InDet::InDetRecStatisticsAlg::kN_rec_tracks_without_perigee
@ kN_rec_tracks_without_perigee
number of tracks w/o perigee
Definition: InDetRecStatisticsAlg.h:148
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
InDet::ETA_BARREL
@ ETA_BARREL
Definition: TrackStatHelper.h:75
InDet::InDetRecStatisticsAlg::m_minREndSecondary
float m_minREndSecondary
If track has end vertex, this is min R of end vertex to be considered secondary.
Definition: InDetRecStatisticsAlg.h:131
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDet::InDetRecStatisticsAlg::m_UseTrackSummary
bool m_UseTrackSummary
Flag to print detailed statistics for each track collection.
Definition: InDetRecStatisticsAlg.h:115
InDet::InDetRecStatisticsAlg::printTrackSummary
void printTrackSummary(MsgStream &out, enum eta_region)
Print track statistics for all and low proability tracks.
Definition: InDetRecStatisticsAlg.cxx:747
InDet::InDetRecStatisticsAlg::m_useTrackSelection
bool m_useTrackSelection
Use track selector tool.
Definition: InDetRecStatisticsAlg.h:134
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::RoT_Extractor::extract
static void extract(std::vector< const RIO_OnTrack * > &rots, const std::vector< const MeasurementBase * > &measurements)
InDet::InDetRecStatisticsAlg::m_McTrackCollection_key
SG::ReadHandleKey< McEventCollection > m_McTrackCollection_key
Definition: InDetRecStatisticsAlg.h:112
InDet::TRACK_LOWTRUTHPROB2
@ TRACK_LOWTRUTHPROB2
Definition: TrackStatHelper.h:43
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
InDet::TrackStatHelper::SetCuts
void SetCuts(const struct cuts &)
Sets the cuts such as the eta regions (barrel, transition,endcap) and the hit fraction fake cuts and ...
Definition: TrackStatHelper.cxx:113
InDet::InDetRecStatisticsAlg::printStatistics
void printStatistics()
Print tracking statistics calculated with TrackStatHelper.
Definition: InDetRecStatisticsAlg.cxx:581
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:163
TrackTruthCollection
Definition: TrackTruthCollection.h:21
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::IUpdator::removeFromState
virtual std::unique_ptr< TrackParameters > removeFromState(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const =0
the reverse updating or inverse KalmanFilter removes a measurement from the track state,...
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
InDet::InDetRecStatisticsAlg::m_printSecondary
bool m_printSecondary
Flag to print hit information for secondary tracks.
Definition: InDetRecStatisticsAlg.h:116
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
InDet::InDetRecStatisticsAlg::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Tool handle of updator for unbiased states.
Definition: InDetRecStatisticsAlg.h:107
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDet::InDetRecStatisticsAlg::m_events_processed
std::atomic< long > m_events_processed
number of events processed
Definition: InDetRecStatisticsAlg.h:145
InDet::ETA_FORWARD
@ ETA_FORWARD
Definition: TrackStatHelper.h:79
InDet::InDetRecStatisticsAlg::m_sctID
const SCT_ID * m_sctID
get sct layer from hit ID
Definition: InDetRecStatisticsAlg.h:100
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
plotBeamSpotVert.cuts
string cuts
Definition: plotBeamSpotVert.py:93
InDet::InDetRecStatisticsAlg::m_truthToTrack
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
tool to create track parameters from a gen particle
Definition: InDetRecStatisticsAlg.h:104
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::InDetRecStatisticsAlg::m_SignalCounters
std::vector< class TrackStatHelper * > m_SignalCounters
Vector of TrackStatHelper objects, one for each track collection.
Definition: InDetRecStatisticsAlg.h:97
TrackStatHelper
InDet::InDetRecStatisticsAlg::m_maxEta
float m_maxEta
Maximum Eta cut for tracks used by the algorithm.
Definition: InDetRecStatisticsAlg.h:118
InDet::TRACK_LOWTRUTHPROB
@ TRACK_LOWTRUTHPROB
Definition: TrackStatHelper.h:42
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
InDet::InDetRecStatisticsAlg::m_matchTrackCut
float m_matchTrackCut
Minimum number of hits from a truth track to be considered a matched reco track.
Definition: InDetRecStatisticsAlg.h:124
InDet::InDetRecStatisticsAlg::m_updator
Trk::IUpdator * m_updator
updator for unbiased states
Definition: InDetRecStatisticsAlg.h:108
DataVector< Trk::Track >
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
calibdata.ct
ct
Definition: calibdata.py:418
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
PileUpType::in_time_minimum_bias_event_begin
McEventCollection::const_iterator in_time_minimum_bias_event_begin() const
extract the in-time minimum bias McEvent Particles from the McEventCollection A pair of iterators is ...
Definition: PileUpType.cxx:19
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
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
IdDictDictionary::file_name
const std::string & file_name(void) const
Access to file name.
Definition: IdDictDefs.h:657
InDet::InDetRecStatisticsAlg::m_maxEtaTransition
float m_maxEtaTransition
define max eta of transition region
Definition: InDetRecStatisticsAlg.h:120
Trk::ParametersBase::pT
double pT() const
Access method for transverse momentum.
InDet::InDetRecStatisticsAlg::m_minPt
float m_minPt
Minimum Pt cut for tracks used by the algorithm.
Definition: InDetRecStatisticsAlg.h:117
InDet::InDetRecStatisticsAlg::m_trackSelectorTool
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool
Definition: InDetRecStatisticsAlg.h:113
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
InDet::InDetRecStatisticsAlg::kN_gen_tracks_processed
@ kN_gen_tracks_processed
number of generated tracks processed
Definition: InDetRecStatisticsAlg.h:151
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
charge
double charge(const T &p)
Definition: AtlasPID.h:538
InDet::InDetRecStatisticsAlg::m_idDictMgr
const IdDictManager * m_idDictMgr
Definition: InDetRecStatisticsAlg.h:103
IdDictDictionary
Definition: IdDictDefs.h:97
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
InDet::ETA_TRANSITION
@ ETA_TRANSITION
Definition: TrackStatHelper.h:76
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
a
TList * a
Definition: liststreamerinfos.cxx:10
h
InDet::InDetRecStatisticsAlg::m_fakeTrackCut2
float m_fakeTrackCut2
Second definition of maximum probability for which a track will be considered a fake.
Definition: InDetRecStatisticsAlg.h:123
InDet::InDetRecStatisticsAlg::m_minZEndPrimary
float m_minZEndPrimary
If track has end vertex, this is min Z of end vertex to be considered primary.
Definition: InDetRecStatisticsAlg.h:132
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDet::InDetRecStatisticsAlg::m_maxRStartSecondary
float m_maxRStartSecondary
Maximum R of start vertex to be considered secondary.
Definition: InDetRecStatisticsAlg.h:127
PileUpType::in_time_minimum_bias_event_end
McEventCollection::const_iterator in_time_minimum_bias_event_end() const
Definition: PileUpType.cxx:30
InDet::InDetRecStatisticsAlg::m_maxZStartSecondary
float m_maxZStartSecondary
Maximum Z of start vertex to be considered secondary.
Definition: InDetRecStatisticsAlg.h:129
InDet::InDetRecStatisticsAlg::m_maxEtaEndcap
float m_maxEtaEndcap
define max eta of eta region
Definition: InDetRecStatisticsAlg.h:121
DeMoScan.first
bool first
Definition: DeMoScan.py:536
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
InDet::TrackStatHelper
Definition: TrackStatHelper.h:126
IdDictManager::manager
const IdDictMgr * manager(void) const
Definition: IdDictManager.cxx:37
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
InDet::InDetRecStatisticsAlg::m_TrackTruthCollection_keys
SG::ReadHandleKeyArray< TrackTruthCollection > m_TrackTruthCollection_keys
Definition: InDetRecStatisticsAlg.h:139
InDet::InDetRecStatisticsAlg::m_minEtaFORWARD
float m_minEtaFORWARD
Definition: InDetRecStatisticsAlg.h:136
Trk::ParametersBase::eta
double eta() const
Access method for pseudorapidity - from momentum.
InDet::InDetRecStatisticsAlg::m_doTruth
bool m_doTruth
Use truth information.
Definition: InDetRecStatisticsAlg.h:135
InDet::InDetRecStatisticsAlg::m_isUnbiased
std::atomic< int > m_isUnbiased
if can get unbiased residuals
Definition: InDetRecStatisticsAlg.h:143
InDet::InDetRecStatisticsAlg::m_maxZStartPrimary
float m_maxZStartPrimary
Maximum Z of start vertex to be considered primary.
Definition: InDetRecStatisticsAlg.h:128
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
InDet::InDetRecStatisticsAlg::m_fakeTrackCut
float m_fakeTrackCut
Maximum probability for which a track will be considered a fake.
Definition: InDetRecStatisticsAlg.h:122
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
InDet::InDetRecStatisticsAlg::m_maxEtaBarrel
float m_maxEtaBarrel
define max eta of barrel region
Definition: InDetRecStatisticsAlg.h:119
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
Trk::CompetingRIOsOnTrack::indexOfMaxAssignProb
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
Definition: CompetingRIOsOnTrack.cxx:101
test_pyathena.counter
counter
Definition: test_pyathena.py:15
InDet::InDetRecStatisticsAlg::kN_unknown_hits
@ kN_unknown_hits
number of hits without track
Definition: InDetRecStatisticsAlg.h:149
InDet::InDetRecStatisticsAlg::m_RecTrackCollection_keys
SG::ReadHandleKeyArray< TrackCollection > m_RecTrackCollection_keys
Definition: InDetRecStatisticsAlg.h:138
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::InDetRecStatisticsAlg::m_minREndPrimary
float m_minREndPrimary
If track has end vertex, this is min R of end vertex to be considered primary.
Definition: InDetRecStatisticsAlg.h:130
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
InDet::InDetRecStatisticsAlg::kN_spacepoints_processed
@ kN_spacepoints_processed
number of space points processed
Definition: InDetRecStatisticsAlg.h:152
InDet::ETA_ENDCAP
@ ETA_ENDCAP
Definition: TrackStatHelper.h:77
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
InDet::InDetRecStatisticsAlg::selectRecSignal
void selectRecSignal(const TrackCollection *, std::vector< const Trk::Track * > &, std::vector< const Trk::Track * > &, CounterLocal &counter) const
Select for analysis reconstructed tracks passing Pt and eta cuts.
Definition: InDetRecStatisticsAlg.cxx:501
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14