ATLAS Offline Software
InDetRecStatisticsAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // file: InDetRecStatisticsAlg.cxx
6 // author: Sven Vahsen (sevahsen AT lbl DOT gov), with contributions from Andrei Gaponenko and Laurent Vacavant
7 //
8 // to do-list:
9 // o write out percentage of tracks with bad tracksummary
10 // o add energy of mctracks for Michael
11 // o don't save intermediate newTracking track's to ntuple
12 // o statistics prints hit association purity, (holes in sct/pixels/b-layer, outliers, etc...)
13 // o navigation between hits and tracks
14 // X check Propagator defaults (check with Andrei regarding Tool)
15 // o count tracks with without associated hits, without truth, truth without beginvertex
16 // o improved navigation between truth and reconstructed tracks
17 // o follow atlas naming conventions for all variable and method names
18 
19 #include "GaudiKernel/SmartDataPtr.h"
20 #include "CLHEP/Units/SystemOfUnits.h"
22 #include <cmath>
23 #include <memory>
24 #include <ostream>
25 #include <iostream>
26 #include <sstream>
27 
29 #include "InDetIdentifier/SCT_ID.h"
30 #include "InDetIdentifier/TRT_ID.h"
35 #include "TrkSurfaces/Surface.h"
37 #include "TrkTrack/Track.h"
46 #include "TrkParameters/TrackParameters.h" //vv
52 
53 // Other
58 #include "VxVertex/VxContainer.h"
59 #include "VxVertex/RecVertex.h"
60 
63 #include "AtlasHepMC/GenParticle.h"
67 #include "IdDict/IdDictMgr.h"
68 
69 
70 
71 static const char * const s_linestr = "----------------------------------------------------------------------------------------------------------------------------------------------";
72 static const char * const s_linestr2 = "..............................................................................................................................................";
73 
74 InDet::InDetRecStatisticsAlg::InDetRecStatisticsAlg(const std::string& name, ISvcLocator* pSvcLocator) :
75  AthReentrantAlgorithm(name, pSvcLocator),
76  m_trtID (nullptr),
77  m_idDictMgr (nullptr),
78  m_truthToTrack ("Trk::TruthToTrack"),
79  m_trkSummaryTool ("Trk::TrackSummaryTool/InDetTrackSummaryTool"),
80  m_updatorHandle ("Trk::KalmanUpdator/TrkKalmanUpdator"),
81  m_updator (nullptr),
82  m_residualPullCalculator ("Trk::ResidualPullCalculator/ResidualPullCalculator"),
83  m_McTrackCollection_key ("TruthEvent"),
84  m_trackSelectorTool ("InDet::InDetDetailedTrackSelectorTool"),
85  m_UseTrackSummary (true),
86  m_printSecondary (false),
87  m_minPt (1000),
88  m_maxEta (4.2),
89  m_maxEtaBarrel (0.8),
90  m_maxEtaTransition (1.6),
91  m_maxEtaEndcap (2.5),
92  m_fakeTrackCut (0.9),
93  m_fakeTrackCut2 (0.7),
94  m_matchTrackCut (0.5),
95  m_maxRStartPrimary ( 25.0*CLHEP::mm),
96  m_maxRStartSecondary ( 360.0*CLHEP::mm),
97  m_maxZStartPrimary ( 200.0*CLHEP::mm),
98  m_maxZStartSecondary (2000.0*CLHEP::mm),
99  m_minREndPrimary ( 400.0*CLHEP::mm),
100  m_minREndSecondary (1000.0*CLHEP::mm),
101  m_minZEndPrimary (2300.0*CLHEP::mm),
102  //m_maxZIndet (),
103  m_minZEndSecondary (3200.0*CLHEP::mm),
104  m_useTrackSelection (false),
105  m_doTruth (true),
106  m_minEtaFORWARD (2.5),
107  m_maxEtaFORWARD (4.2),
108  m_isUnbiased (0),
109  m_events_processed (0)
110 {
111  // m_RecTrackCollection_keys.push_back(std::string("Tracks"));
112  // m_TrackTruthCollection_keys.push_back(std::string("TrackTruthCollection"));
113 
114  // Algorithm properties
115  declareProperty("SummaryTool", m_trkSummaryTool);
116  declareProperty("TruthToTrackTool", m_truthToTrack);
117  declareProperty("UpdatorTool", m_updatorHandle,
118  "Measurement updator to calculate unbiased track states");
119  declareProperty("ResidualPullCalculatorTool", m_residualPullCalculator,
120  "Tool to calculate residuals and pulls");
121  declareProperty("TrackCollectionKeys", m_RecTrackCollection_keys);
122  declareProperty("McTrackCollectionKey", m_McTrackCollection_key);
123  declareProperty("TrackTruthCollectionKeys", m_TrackTruthCollection_keys);
124  declareProperty("UseTrackSelection" , m_useTrackSelection);
125  declareProperty("DoTruth" , m_doTruth);
126  declareProperty("TrackSelectorTool" , m_trackSelectorTool);
127  declareProperty("UseTrackSummary", m_UseTrackSummary);
128  declareProperty("PrintSecondary", m_printSecondary);
129  declareProperty("minPt", m_minPt);
130  declareProperty("maxEta", m_maxEta);
131  declareProperty("maxEtaBarrel", m_maxEtaBarrel );
132  declareProperty("maxEtaTransition", m_maxEtaTransition);
133  declareProperty("maxEtaEndcap", m_maxEtaEndcap);
134  declareProperty("maxEtaFORWARD", m_maxEtaFORWARD);
135  declareProperty("minEtaFORWARD", m_minEtaFORWARD);
136  declareProperty("fakeTrackCut", m_fakeTrackCut);
137  declareProperty("fakeTrackCut2", m_fakeTrackCut2);
138  declareProperty("matchTrackCut", m_matchTrackCut);
139  declareProperty("maxRStartPrimary", m_maxRStartPrimary);
140  declareProperty("maxRStartSecondary", m_maxRStartSecondary);
141  declareProperty("maxZStartPrimary", m_maxZStartPrimary);
142  declareProperty("maxZStartSecondary", m_maxZStartSecondary);
143  declareProperty("minREndPrimary", m_minREndPrimary);
144  declareProperty("minREndSecondary", m_minREndSecondary);
145  declareProperty("minZEndPrimary", m_minZEndPrimary);
146  declareProperty("minZEndSecondary", m_minZEndSecondary);
147  m_idHelper = nullptr;
148  m_pixelID = nullptr;
149  m_sctID = nullptr;
150  m_UpdatorWarning = false;
151  m_pullWarning = false;
152 }
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
157 
158  // Part 1: Get the messaging service, print where you are
159  ATH_MSG_DEBUG("initialize()");
160 
161  StatusCode sc1 = getServices(); // retrieve store gate service etc
162  if (sc1.isFailure()) {
163  ATH_MSG_FATAL("Error retrieving services !");
164  return StatusCode::FAILURE;
165  }
166 
167  if (m_RecTrackCollection_keys.empty()) {
168  ATH_MSG_ERROR("No reco track collection specified! Aborting.");
169  return StatusCode::FAILURE;
170  }
171 
173  ATH_MSG_ERROR("You have specified "
174  << m_RecTrackCollection_keys.size()
175  << " TrackCollection keys, and " << m_TrackTruthCollection_keys.size()
176  << " TrackTruthCollection keys."
177  << " You have to specify one TrackTruthCollection for each"
178  << " TrackCollection! Exiting."
179  );
180  return StatusCode::FAILURE;
181  }
182 
183  // ----------------------------------
184  // use updator to get unbiased states
185  if ( ! m_updatorHandle.empty() ) {
186  if (m_updatorHandle.retrieve().isFailure()) {
187  ATH_MSG_FATAL("Could not retrieve measurement updator tool: "
188  << m_updatorHandle);
189  return StatusCode::FAILURE;
190  }
191  m_updator = &(*m_updatorHandle);
192  } else {
194  "No Updator for unbiased track states given, use normal states!");
195  m_updator = nullptr;
196  }
197 
198 
199  //get residual and pull calculator
200  if (m_residualPullCalculator.empty()) {
201  ATH_MSG_INFO(
202  "No residual/pull calculator for general hit residuals configured."
203  );
204  ATH_MSG_INFO(
205  "It is recommended to give R/P calculators to the det-specific tool"
206  << " handle lists then.");
207  } else if (m_residualPullCalculator.retrieve().isFailure()) {
208  ATH_MSG_FATAL("Could not retrieve "<< m_residualPullCalculator
209  <<" (to calculate residuals and pulls) ");
210 
211  } else {
212  ATH_MSG_INFO("Generic hit residuals&pulls will be calculated in one or both "
213  << "available local coordinates");
214  }
215 
216  // create one TrackStatHelper object of each trackCollection --- this is used to accumulate track and hit statistics
217 
218  struct cuts ct;
219  ct.maxEtaBarrel= m_maxEtaBarrel;
220  ct.maxEtaTransition= m_maxEtaTransition;
221  ct.maxEtaEndcap= m_maxEtaEndcap;
222  ct.fakeTrackCut= m_fakeTrackCut;
223  ct.fakeTrackCut2= m_fakeTrackCut2;
224  ct.matchTrackCut = m_matchTrackCut;
225  ct.maxRStartPrimary = m_maxRStartPrimary;
226  ct.maxRStartSecondary = m_maxRStartSecondary;
227  ct.maxZStartPrimary = m_maxZStartPrimary;
228  ct.maxZStartSecondary = m_maxZStartSecondary;
229  ct.minREndPrimary = m_minREndPrimary;
230  ct.minREndSecondary = m_minREndSecondary;
231  ct.minZEndPrimary = m_minZEndPrimary;
232  ct.minZEndSecondary = m_minZEndSecondary;
233  ct.minPt = m_minPt;
234  ct.minEtaFORWARD = m_minEtaFORWARD;
235  ct.maxEtaFORWARD = m_maxEtaFORWARD;
236 
237  unsigned int nCollections = 0;
239  it = m_RecTrackCollection_keys.begin();
240  it < m_RecTrackCollection_keys.end(); ++ it) {
241  InDet::TrackStatHelper * collection =
242  new TrackStatHelper(it->key(),(m_doTruth ? m_TrackTruthCollection_keys[nCollections].key() : ""), m_doTruth);
243  nCollections ++;
244  collection->SetCuts(ct);
245  m_SignalCounters.push_back(collection);
246  }
247 
248  StatusCode sc3 = resetStatistics(); // reset all statistic counters
249  if (sc3.isFailure()) {
250  ATH_MSG_FATAL("Error in resetStatistics !");
251  return StatusCode::FAILURE;
252  }
253 
254  ATH_CHECK( m_RecTrackCollection_keys.initialize() );
256  ATH_CHECK( m_TrackTruthCollection_keys.initialize() );
257 
258  return StatusCode :: SUCCESS;
259 
260 }
261 
262 
263 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
264 
265 StatusCode InDet::InDetRecStatisticsAlg::execute(const EventContext &ctx) const {
266 
267  ATH_MSG_DEBUG("entering execute()");
268 
269  // Get reconstructed tracks , generated tracks, and truth from storegate
270 
272 
273  if (m_doTruth) {
275  if (!SimTracks.isValid()) {
276  // @TODO warning ?
277  ATH_MSG_WARNING("Error retrieving collections !");
278  return StatusCode::SUCCESS;
279  }
280  }
281 
282  // Doesn't take account of pileup:
283  //m_gen_tracks_processed += (*(SimTracks->begin()))->particles_size();
286 
287  // select charged and stable generated tracks
288  // apply pt, eta etc cuts to generated tracks
289  // devide generated tracks into primary, truncated, secondary
290 
291  std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > GenSignal;
292  // GenSignalPrimary, GenSignalTruncated, GenSignalSecondary;
293  unsigned int inTimeStart = 0;
294  unsigned int inTimeEnd = 0;
295  if (m_doTruth) selectGenSignal ((SimTracks.isValid() ? &(*SimTracks) : nullptr), GenSignal, inTimeStart, inTimeEnd, counter);
296 
297  // step through the various reconstructed TrackCollections and
298  // corresponding TrackTruthCollections and produce statistics for each
299 
300  if (m_SignalCounters.empty()) {
301  ATH_MSG_ERROR("No reco track collection specified! Aborting.");
302  return StatusCode::FAILURE;
303  }
304 
305  std::vector< SG::ReadHandle<TrackCollection> > rec_track_collections = m_RecTrackCollection_keys.makeHandles(ctx);
306  std::vector< SG::ReadHandle<TrackTruthCollection> > truth_track_collections;
307  if (m_doTruth && !m_TrackTruthCollection_keys.empty()) {
308  truth_track_collections = m_TrackTruthCollection_keys.makeHandles(ctx);
309  if (truth_track_collections.size() != rec_track_collections.size()) {
310  ATH_MSG_ERROR("Different number of reco and truth track collections (" << rec_track_collections.size() << "!=" << truth_track_collections.size() << ")" );
311  }
312  }
313  if (m_SignalCounters.size() != rec_track_collections.size()) {
314  ATH_MSG_ERROR("Number expected reco track collections does not match the actual number of such collections ("
315  << m_SignalCounters.size() << "!=" << rec_track_collections.size() << ")" );
316  }
317 
318  std::vector< SG::ReadHandle<TrackCollection> >::iterator rec_track_collections_iter = rec_track_collections.begin();
319  std::vector< SG::ReadHandle<TrackTruthCollection> >::iterator truth_track_collections_iter = truth_track_collections.begin();
320  for (std::vector <class TrackStatHelper *>::const_iterator statHelper
321  = m_SignalCounters.begin();
322  statHelper != m_SignalCounters.end();
323  ++statHelper, ++rec_track_collections_iter) {
324  assert( rec_track_collections_iter != rec_track_collections.end());
325 
326  ATH_MSG_DEBUG("Acessing TrackCollection " << m_RecTrackCollection_keys.at(rec_track_collections_iter - rec_track_collections.begin()).key());
327  const TrackCollection * RecCollection = &(**rec_track_collections_iter);
328  const TrackTruthCollection * TruthMap = nullptr;
329 
330  if (RecCollection) ATH_MSG_DEBUG("Retrieved " << RecCollection->size() << " reconstructed tracks from storegate");
331 
332  if (m_doTruth) {
333  ATH_MSG_DEBUG("Acessing TrackTruthCollection " << m_TrackTruthCollection_keys.at(truth_track_collections_iter - truth_track_collections.begin()).key());
334  assert( truth_track_collections_iter != truth_track_collections.end());
335  TruthMap = &(**truth_track_collections_iter);
336  if (TruthMap) ATH_MSG_DEBUG("Retrieved " << TruthMap->size() << " TrackTruth elements from storegate");
337  ++truth_track_collections_iter;
338  }
339 
340  //start process of getting correct track summary
341 
342  std::vector <const Trk::Track *> RecTracks, RecSignal;
343  selectRecSignal (RecCollection, RecTracks,RecSignal,counter);
344 
346  " RecTracks.size()=" << RecTracks.size()
347  << ", GenSignal.size()=" << GenSignal.size());
348 
349  ATH_MSG_DEBUG("Accumulating Statistics...");
350  (*statHelper)->addEvent (RecCollection,
351  RecTracks,
352  GenSignal,
353  TruthMap,
354  m_idHelper,
355  m_pixelID,
356  m_sctID,
357  m_trkSummaryTool.operator->(),
359  &inTimeStart,
360  &inTimeEnd);
361 
362  counter.m_counter[kN_rec_tracks_processed] += RecCollection->size();
363 
364  for ( TrackCollection::const_iterator it = RecCollection->begin() ;
365  it < RecCollection->end(); ++ it){
366  std::vector<const Trk::RIO_OnTrack*> rioOnTracks;
367  Trk::RoT_Extractor::extract( rioOnTracks,
368  (*it)->measurementsOnTrack()->stdcont() );
369  counter.m_counter[kN_spacepoints_processed] += rioOnTracks.size();
370  }
371 
372  }
373  m_counter += counter;
374 
375  ATH_MSG_DEBUG("leaving execute()");
376  return StatusCode::SUCCESS;
377 }
378 
379 
380 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
381 
383 
384  // Part 1: Get the messaging service, print where you are
385  ATH_MSG_DEBUG("finalize()");
386 
387  printStatistics();
388 
389  for (std::vector <class TrackStatHelper *>::const_iterator collection =
390  m_SignalCounters.begin(); collection != m_SignalCounters.end();
391  ++collection) {
392  ATH_MSG_DEBUG(s_linestr2);
393  delete (*collection);
394  }
395  m_SignalCounters.clear();
396  return StatusCode::SUCCESS;
397 }
398 
399 
400 StatusCode InDet :: InDetRecStatisticsAlg :: getServices ()
401 {
402  //Set up ATLAS ID helper to be able to identify the RIO's det-subsystem.
403 
404  // Get the dictionary manager from the detector store
405  const IdDictManager* idDictMgr = nullptr;
406  StatusCode sc = detStore()->retrieve(idDictMgr, "IdDict");
407  if (sc.isFailure()) {
408  ATH_MSG_FATAL("Could not get IdDictManager !");
409  return StatusCode::FAILURE;
410  }
411 
412  // Initialize the helper with the dictionary information.
413  sc = detStore()->retrieve(m_idHelper, "AtlasID");
414  if (sc.isFailure()) {
415  ATH_MSG_FATAL("Could not get AtlasDetectorID helper.");
416  return StatusCode::FAILURE;
417  }
418 
419  //get Pixel, SCT, TRT managers and helpers
420 
421  if (detStore()->retrieve(m_pixelID, "PixelID").isFailure()) {
422  msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg;
423  return StatusCode::FAILURE;
424  }
425  if (detStore()->retrieve(m_sctID, "SCT_ID").isFailure()) {
426  msg(MSG::FATAL) << "Could not get SCT ID helper" << endmsg;
427  return StatusCode::FAILURE;
428  }
429 
430  //retrieve the TRT helper only if not-SLHC layout used
431  sc = detStore()->retrieve(m_idDictMgr, "IdDict");
432  if (sc.isFailure()) {
433  ATH_MSG_FATAL("Could not get IdDictManager !");
434  return StatusCode::FAILURE;
435  }
436  const IdDictDictionary* dict = m_idDictMgr->manager()->find_dictionary("InnerDetector");
437  if(!dict) {
438  ATH_MSG_FATAL(" Cannot access InnerDetector dictionary ");
439  return StatusCode::FAILURE;
440  }
441 
442  bool isSLHC = false;
443  if (dict->file_name().find("SLHC")!=std::string::npos) isSLHC=true;
444 
445  if(!isSLHC){
446  if (detStore()->retrieve(m_trtID, "TRT_ID").isFailure()) {
447  msg(MSG::FATAL) << "Could not get TRT ID helper" << endmsg;
448  return StatusCode::FAILURE;
449  }
450  }
451  //
452 
453  if (m_UseTrackSummary) {
454  if (m_trkSummaryTool.retrieve().isFailure() ) {
455  ATH_MSG_FATAL("Failed to retrieve tool "
456  << m_trkSummaryTool);
457  return StatusCode::FAILURE;
458  } else {
459  ATH_MSG_INFO("Retrieved tool " << m_trkSummaryTool);
460  }
461  } else {
462  m_trkSummaryTool.disable();
463  }
464 
465  // AG: init truthToTrack
466  if (m_doTruth) {
467  if (m_truthToTrack.retrieve().isFailure() ) {
468  ATH_MSG_FATAL("Failed to retrieve tool " << m_truthToTrack);
469  return StatusCode::FAILURE;
470  } else {
471  ATH_MSG_INFO("Retrieved tool " << m_truthToTrack);
472  }
473  } else {
474  m_truthToTrack.disable();
475  }
476 
477  //adding track selector tool
478  if(m_useTrackSelection){
479  if ( m_trackSelectorTool.retrieve().isFailure() ) {
480  ATH_MSG_FATAL("Failed to retrieve tool " << m_trackSelectorTool);
481  return StatusCode::FAILURE;
482  } else {
483  ATH_MSG_INFO("Retrieved tool " << m_trackSelectorTool);
484  }
485  } else {
486  m_trackSelectorTool.disable();
487  }
488  return StatusCode :: SUCCESS;
489 }
490 
491 StatusCode InDet :: InDetRecStatisticsAlg :: resetStatistics() {
492  m_counter.reset();
493  m_events_processed = 0;
494 
495  for (std::vector<InDet::TrackStatHelper *>::const_iterator counter =
496  m_SignalCounters.begin();
497  counter != m_SignalCounters.end(); ++ counter) {
498  (*counter)->reset();
499  }
500  return StatusCode :: SUCCESS;
501 }
502 
504  std::vector <const Trk::Track *> & RecTracks ,
505  std::vector <const Trk::Track *> & RecSignal,
507 
508  for ( TrackCollection::const_iterator it = RecCollection->begin() ;
509  it != RecCollection->end(); ++ it){
510  RecTracks.push_back(*it);
511  const DataVector<const Trk::TrackParameters>* trackpara =
512  (*it)->trackParameters();
513 
514  if(!trackpara->empty()){
515  const Trk::TrackParameters* para = trackpara->front();
516  if (para){
517  if (para->pT() > m_minPt && std::abs(para->eta()) < m_maxEta) {
518  RecSignal.push_back(*it);
519  }
520  }
521  }
522  else {
524  }
525  }
526  }
527 
528 // select charged, stable particles in allowed pt and eta range
529 void InDet :: InDetRecStatisticsAlg ::
530 selectGenSignal (const McEventCollection* SimTracks,
531  std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > & GenSignal,
532  unsigned int /*inTimeStart*/, unsigned int /*inTimeEnd*/,
533  InDet::InDetRecStatisticsAlg::CounterLocal &counter) const //'unused' compiler warning
534 {
535  if (! SimTracks) return;
536 
537  unsigned int nb_mc_event = SimTracks->size();
538  std::unique_ptr<PileUpType> put = std::make_unique<PileUpType>(SimTracks);
539 
541  McEventCollection::const_iterator inTimeMBbegin;
542 
543  if (put)
544  {
545  inTimeMBbegin = put->in_time_minimum_bias_event_begin();
546  inTimeMBend = put->in_time_minimum_bias_event_end();
547  }
548 
549  for(unsigned int ievt=0; ievt<nb_mc_event; ++ievt)
550  {
551  const HepMC::GenEvent* genEvent = SimTracks->at(ievt);
552  counter.m_counter[kN_gen_tracks_processed] += genEvent->particles_size();
553  for (const auto& particle: *genEvent){
554  // require stable particle from generation or simulation
555  if (!MC::isStable(particle)) continue;
556  int pdgCode = particle->pdg_id();
557  if (MC::isNucleus(pdgCode)) continue; // ignore nuclei from hadronic interactions
558  float charge = MC::charge(pdgCode);
559  if (std::abs(charge)<0.5) continue;
560  if (std::abs(particle->momentum().perp()) > m_minPt &&
561  std::abs(particle->momentum().pseudoRapidity()) < m_maxEta ) {
562  std::pair<HepMC::ConstGenParticlePtr,int> thisPair(particle,ievt);
563  GenSignal.push_back(thisPair);
564  }
565  } // End of a particle iteration
566  } // End of one GenEvent iteration
567  }
568 
569 namespace {
570 
571  template <class T_Stream>
572  class RestoreStream
573  {
574  public:
575  RestoreStream(T_Stream &out) : m_stream(&out),m_precision(out.precision()) { }
576  ~RestoreStream() { (*m_stream).precision(m_precision); }
577  private:
578  T_Stream *m_stream;
579  int m_precision;
580  };
581 }
582 
583 void InDet :: InDetRecStatisticsAlg :: printStatistics() {
584  if (!msgLvl(MSG::INFO)) return;
585 
586  ATH_MSG_INFO(" ********** Beginning InDetRecStatistics Statistics Table ***********");
587  ATH_MSG_INFO("For documentation see https://twiki.cern.ch/twiki/bin/view/Atlas/InDetRecStatistics");
588  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 )");
589  ATH_MSG_INFO(" ********************************************************************");
590 
591  std::stringstream outstr;
592  int def_precision(outstr.precision());
593  outstr << "\n"
594  << MSG::INFO
595  << std::setiosflags(std::ios::fixed | std::ios::showpoint)
596  << std::setw(7) << std::setprecision(2)
597  << s_linestr << "\n"
598  << "Summary" << "\n"
599  << "\tProcessed : " << m_events_processed
600  << " events, " << m_counter.m_counter[kN_rec_tracks_processed]
601  << " reconstructed tracks with " << m_counter.m_counter[kN_spacepoints_processed]
602  << " hits, and " << m_counter.m_counter[kN_gen_tracks_processed]
603  << " truth particles" << "\n"
604  << "\tProblem objects : " << m_counter.m_counter[kN_rec_tracks_without_perigee]
605  << " tracks without perigee, "
606  << m_counter.m_counter[kN_unknown_hits] << " unknown hits" << "\n"
607  << "\t" << "Reco TrackCollections : ";
608  bool first = true;
609  for (std::vector <class TrackStatHelper *>::const_iterator collection =
610  m_SignalCounters.begin();
611  collection != m_SignalCounters.end(); ++collection)
612  {
613  if (first) {
614  first = false;
615  }
616  else {
617  outstr << ", ";
618  }
619  outstr << "\"" << (*collection)->key() << "\"";
620  }
621  ATH_MSG_INFO(outstr.str());
622  outstr.str("");
623 
624  if (m_doTruth)
625  {
626  outstr.str("");
627  outstr << "\n"
628  << "\t" << "TrackTruthCollections : ";
629  first = true;
630  for (std::vector <class TrackStatHelper *>::const_iterator collection = m_SignalCounters.begin();
631  collection != m_SignalCounters.end(); ++collection)
632  {
633  if (first) {
634  first = false;
635  }
636  else {
637  outstr << ", ";
638  }
639  outstr << "\"" << (*collection)->Truthkey() << "\"";
640  }
641  ATH_MSG_INFO(outstr.str());
642  outstr.str("");
643  }
644  outstr.str("");
645  outstr << "\n"
646  << s_linestr2 << "\n"
647  << "Cuts and Settings for Statistics Table" << "\n"
648  << "\t" << "TrackSummary Statistics" << "\t"
649  << (m_UseTrackSummary ? "YES" : "NO") << "\n"
650  << "\t" << "Signal \t" << "pT > "
651  << m_minPt/1000 << " GeV/c, |eta| < " << m_maxEta << "\t\t"
652  << "\t" << "Primary track start \t" << "R < "
653  << m_maxRStartPrimary << "mm and |z| < "
654  << m_maxZStartPrimary << "mm" << "\n"
655  << "\t" << "Barrel \t" << 0.0
656  << "< |eta| < " << m_maxEtaBarrel << "\t\t\t"
657  << "\t" << "Primary track end \t" << "R > "
658  << m_minREndPrimary << "mm or |z| > " << m_minZEndPrimary
659  << "mm" << "\n"
660  << "\t" << "Transition Region \t" << m_maxEtaBarrel
661  << "< |eta| < " << m_maxEtaTransition << "\t\t\t"
662  << "\t" << "Secondary (non-Primary) start \t"
663  << " R < " << m_maxRStartSecondary << "mm and"
664  << " |z| < " << m_maxZStartSecondary << " mm" << "\n"
665  << "\t" << "Endcap \t" << m_maxEtaTransition
666  << "< |eta| < " << m_maxEtaEndcap << "\t\t\t"
667  << "\t" << "Secondary (non-primary) end \t"
668  << " R > " << m_minREndSecondary << "mm or"
669  << " |z| > " << m_minREndSecondary << "mm" << "\n"
670  << "\t" << "Forward \t"
671  << "|eta| > " << m_minEtaFORWARD << "\n"
672  << "\t" << "Low prob tracks #1 \t" << "< "
673  << m_fakeTrackCut << " of hits from single Truth Track "
674  << "\n"
675  << "\t" << "Low prob tracks #2 \t" << "< "
676  << m_fakeTrackCut2 << " of hits from single Truth Track "
677  << "\n"
678  << "\t" << "No link tracks \t Track has no link associated to an HepMC Particle" << "\n"
679  << "\t" << "Good reco tracks \t" << "> "
680  << m_matchTrackCut << " of hits from single Truth Track + a link !";
681  ATH_MSG_INFO(outstr.str());
682  outstr.str("");
683 
684  MsgStream &out = msg(MSG::INFO);
685  {
686  RestoreStream<MsgStream> restore(out);
687  out << "\n" << s_linestr2 << "\n";
688  m_SignalCounters.back()->print(out);
689 
690  if (m_UseTrackSummary) {
691  std::string track_stummary_type_header = TrackStatHelper::getSummaryTypeHeader();
692  out << "\n"
693  << s_linestr2 << "\n"
694  << "Detailed Statistics for Hits on Reconstructed tracks, using TrackSummary: (Preselection of tracks as described above.)" << "\n"
695  << s_linestr2 << "\n"
696  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
697  << " Reco Tracks .........................................hits/track....................................................... " << "\n"
698  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
699  << " in BARREL tracks/event " << track_stummary_type_header << "\n"
700  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
701  printTrackSummary (out, ETA_BARREL);
702 
703  out<< "\n"
704  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
705  << " in TRANSITION region tracks/event " << track_stummary_type_header << "\n"
706  << "----------------------------------------------------------------------------------------------------------------------------------------------------"
707  << "\n";
708  printTrackSummary (out, ETA_TRANSITION);
709 
710  out << "\n"
711  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
712  << " in ENDCAP tracks/event " << track_stummary_type_header << "\n"
713  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
714  printTrackSummary (out, ETA_ENDCAP);
715 
716  out << "\n"
717  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
718  << " in FORWARD region tracks/event " << track_stummary_type_header << "\n"
719  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
720  printTrackSummary (out, ETA_FORWARD);
721  }
722 
723  if(m_printSecondary){
724  outstr.str("");
725  outstr << "\n" << std::setprecision(def_precision)
726  <<s_linestr<<"\n"
727  <<"Statistics for Secondaries (non-Primaries)"<<"\n"
728  << "\t" << "Secondary track start \t"
729  << " R < " << m_maxRStartSecondary << "mm and"
730  << " |z| < " << m_maxZStartSecondary << " mm" << "\n"
731  << "\t" << "Secondary track end \t"
732  << " R > " << m_minREndSecondary << "mm or"
733  << " |z| > " << m_minZEndSecondary << "mm";
734  ATH_MSG_INFO(outstr.str());
735  outstr.str("");
736  out << "\n" << s_linestr2 << "\n";
737  m_SignalCounters.back()->printSecondary(out);
738 
739  }
740  }
741  out << endmsg;
742 
743  ATH_MSG_INFO(" ********** Ending InDetRecStatistics Statistics Table ***********");
744  ATH_MSG_INFO( "\n"
745  << s_linestr );
746 }
747 
748 
749 void InDet :: InDetRecStatisticsAlg ::printTrackSummary (MsgStream &out, enum eta_region eta_reg)
750 {
751  bool printed = m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_ALL, eta_reg);
752 
753  if (printed) {
754  out << "\n"
755  << "----------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
756  }
757 
758  printed = m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_LOWTRUTHPROB, eta_reg);
759  if (printed) {
760  out << "\n"
761  << "----------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
762  }
763 
764  m_SignalCounters.back()->printTrackSummaryRegion(out, TRACK_LOWTRUTHPROB2, eta_reg);
765 
766 }
767 
768 // =================================================================================================================
769 // calculatePull
770 // =================================================================================================================
771 float InDet :: InDetRecStatisticsAlg :: calculatePull(const float residual,
772  const float trkErr,
773  const float hitErr){
774  double ErrorSum;
775  ErrorSum = sqrt(pow(trkErr, 2) + pow(hitErr, 2));
776  if (ErrorSum != 0) { return residual/ErrorSum; }
777  else { return 0; }
778 }
779 
781 
782 
783  const Trk::TrackParameters *unbiasedTrkParameters = nullptr;
784 
785  // -----------------------------------------
786  // use unbiased track states or normal ones?
787  // unbiased track parameters are tried to retrieve if the updator tool
788  // is available and if unbiased track states could be produced before
789  // for the current track (ie. if one trial to get unbiased track states
790  // fail
791 
792  if (m_updator && (m_isUnbiased==1) ) {
793  if ( trkParameters->covariance() ) {
794  // Get unbiased state
795  ATH_MSG_VERBOSE(" getting unbiased params");
796  unbiasedTrkParameters =
797  m_updator->removeFromState( *trkParameters,
798  measurement->localParameters(),
799  measurement->localCovariance()).release();
800 
801  if (!unbiasedTrkParameters) {
802  ATH_MSG_WARNING("Could not get unbiased track parameters, "
803  <<"use normal parameters");
804  m_isUnbiased = 0;
805  }
806  } else if(!m_UpdatorWarning) {
807  // warn only once!
808  ATH_MSG_WARNING("TrackParameters contain no covariance: "
809  <<"Unbiased track states can not be calculated "
810  <<"(ie. pulls and residuals will be too small)");
811  m_UpdatorWarning = true;
812  m_isUnbiased = 0;
813  } else {
814  m_isUnbiased = 0;
815  }
816  } // end if no measured track parameter
817  return unbiasedTrkParameters;
818 }
819 
820 
822  Identifier id;
823  const Trk::CompetingRIOsOnTrack *comprot = nullptr;
824  // identify by ROT:
825  const Trk::RIO_OnTrack *rot =
826  dynamic_cast<const Trk::RIO_OnTrack*>(measurement);
827  if (rot) {
828  id = rot->identify();
829  } else {
830  // identify by CompetingROT:
831  comprot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(measurement);
832  if (comprot) {
833  rot = &comprot->rioOnTrack(comprot->indexOfMaxAssignProb());
834  id = rot->identify();
835  } else {
836  ATH_MSG_DEBUG("measurement is neither ROT nor competingROT:"
837  <<" can not determine detector type");
838  id.clear();
839  }
840  }
841  delete comprot;
842  return id;
843 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
IdDictMgr.h
RecVertex.h
InDet::eta_region
eta_region
Definition: TrackStatHelper.h:74
InDet::InDetRecStatisticsAlg::getIdentifier
Identifier getIdentifier(const Trk::MeasurementBase *measurement)
Definition: InDetRecStatisticsAlg.cxx:821
InDet::InDetRecStatisticsAlg::m_pixelID
const PixelID * m_pixelID
get pixel layer from hit ID
Definition: InDetRecStatisticsAlg.h:99
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
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
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
InDet::TRACK_ALL
@ TRACK_ALL
Definition: TrackStatHelper.h:38
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
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)
PDG rule 16 Nuclear codes are given as 10-digit numbers ±10LZZZAAAI.
Definition: AtlasPID.h:702
InDet::InDetRecStatisticsAlg::m_pullWarning
std::atomic< bool > m_pullWarning
warn only once, if pull cannot be calculated
Definition: InDetRecStatisticsAlg.h:141
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
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
TrackParameters.h
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PerigeeSurface.h
InDet::InDetRecStatisticsAlg::m_trkSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
tool to get track summary information from track
Definition: InDetRecStatisticsAlg.h:105
CompetingRIOsOnTrack.h
Surface.h
InDet::InDetRecStatisticsAlg::resetStatistics
StatusCode resetStatistics()
Clear statistics counters, called before each track collection is processed.
Definition: InDetRecStatisticsAlg.cxx:491
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 >
InDet::InDetRecStatisticsAlg::getServices
StatusCode getServices()
Get various services such as StoreGate, dictionaries, detector managers etc.
Definition: InDetRecStatisticsAlg.cxx:400
IdDictDictionary.h
InDet::cuts
Definition: TrackStatHelper.h:83
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:530
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
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:45
FitQualityOnSurface.h
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
IdDictManager.h
InDetRecStatisticsAlg.h
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
IdDictDictionary::file_name
const std::string & file_name() const
Access to file name.
Definition: IdDictDictionary.h:367
GenParticle.h
InDet::InDetRecStatisticsAlg::m_useTrackSelection
bool m_useTrackSelection
Use track selector tool.
Definition: InDetRecStatisticsAlg.h:134
InDet::InDetRecStatisticsAlg::execute
StatusCode execute(const EventContext &ctx) const
Calculation of statistics.
Definition: InDetRecStatisticsAlg.cxx:265
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
IUpdator.h
Trk::RoT_Extractor::extract
static void extract(std::vector< const RIO_OnTrack * > &rots, const std::vector< const MeasurementBase * > &measurements)
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
InDet::InDetRecStatisticsAlg::m_McTrackCollection_key
SG::ReadHandleKey< McEventCollection > m_McTrackCollection_key
Definition: InDetRecStatisticsAlg.h:112
InDet::TRACK_LOWTRUTHPROB2
@ TRACK_LOWTRUTHPROB2
Definition: TrackStatHelper.h:43
Track.h
RoT_Extractor.h
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
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
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.
TrackTruthCollection
Definition: TrackTruthCollection.h:21
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,...
ResidualPull.h
McEventCollection.h
TrackTruthCollection.h
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
PileUpType.h
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
CLHEP
STD'S.
Definition: CaloNoiseCompCondAlg.h:58
TrackCollection.h
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.
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
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
VxContainer.h
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT_DriftCircleOnTrack.h
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
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:32
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 >
JacobianThetaPToCotThetaPt.h
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
calibdata.ct
ct
Definition: calibdata.py:417
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
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
Definition: MeasurementBase.h:58
InDet::InDetRecStatisticsAlg::m_maxEtaTransition
float m_maxEtaTransition
define max eta of transition region
Definition: InDetRecStatisticsAlg.h:120
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
Trk::ParametersBase::pT
double pT() const
Access method for transverse momentum.
TrackTruth.h
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
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
RIO_OnTrack.h
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:26
charge
double charge(const T &p)
Definition: AtlasPID.h:997
LocalParameters.h
IdDictDictionary
Definition: IdDictDictionary.h:30
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
IResidualPullCalculator.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
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
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
ITruthToTrack.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IExtendedTrackSummaryTool.h
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
InDet::InDetRecStatisticsAlg::m_maxRStartSecondary
float m_maxRStartSecondary
Maximum R of start vertex to be considered secondary.
Definition: InDetRecStatisticsAlg.h:127
TrackStatHelper.h
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
InDet::InDetRecStatisticsAlg::initialize
StatusCode initialize()
Initialization of services, track collections, creates TrackStatHelper for each Track Collection.
Definition: InDetRecStatisticsAlg.cxx:156
PlaneSurface.h
DeMoScan.first
bool first
Definition: DeMoScan.py:534
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
InDet::TrackStatHelper
Definition: TrackStatHelper.h:126
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
InDet::InDetRecStatisticsAlg::m_fakeTrackCut
float m_fakeTrackCut
Maximum probability for which a track will be considered a fake.
Definition: InDetRecStatisticsAlg.h:122
InDet::InDetRecStatisticsAlg::m_maxEtaBarrel
float m_maxEtaBarrel
define max eta of barrel region
Definition: InDetRecStatisticsAlg.h:119
InDet::InDetRecStatisticsAlg::InDetRecStatisticsAlg
InDetRecStatisticsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Default Constructor.
Definition: InDetRecStatisticsAlg.cxx:74
FitQuality.h
ITrackSelectorTool.h
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
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
InDet::InDetRecStatisticsAlg::Counter
Definition: InDetRecStatisticsAlg.h:78
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.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
InDet::InDetRecStatisticsAlg::getUnbiasedTrackParameters
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *, const Trk::MeasurementBase *)
Get Unbiased Track Parameters.
Definition: InDetRecStatisticsAlg.cxx:780
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
HepMCHelpers.h
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
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:503
Identifier
Definition: IdentifierFieldParser.cxx:14