ATLAS Offline Software
InDetRecStatisticsAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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"
66 
67 
68 
69 static const char * const s_linestr = "----------------------------------------------------------------------------------------------------------------------------------------------";
70 static const char * const s_linestr2 = "..............................................................................................................................................";
71 
72 InDet::InDetRecStatisticsAlg::InDetRecStatisticsAlg(const std::string& name, ISvcLocator* pSvcLocator) :
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),
93  m_maxRStartPrimary ( 25.0*CLHEP::mm),
94  m_maxRStartSecondary ( 360.0*CLHEP::mm),
95  m_maxZStartPrimary ( 200.0*CLHEP::mm),
96  m_maxZStartSecondary (2000.0*CLHEP::mm),
97  m_minREndPrimary ( 400.0*CLHEP::mm),
98  m_minREndSecondary (1000.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),
107  m_events_processed (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 }
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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 }
259 
260 
261 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
262 
263 StatusCode InDet::InDetRecStatisticsAlg::execute(const EventContext &ctx) const {
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 }
376 
377 
378 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
379 
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 }
396 
397 
398 StatusCode InDet :: InDetRecStatisticsAlg :: getServices ()
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
476  if(m_useTrackSelection){
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 }
488 
489 StatusCode InDet :: InDetRecStatisticsAlg :: resetStatistics() {
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 }
500 
502  std::vector <const Trk::Track *> & RecTracks ,
503  std::vector <const Trk::Track *> & RecSignal,
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  }
525 
526 // select charged, stable particles in allowed pt and eta range
527 void InDet :: InDetRecStatisticsAlg ::
528 selectGenSignal (const McEventCollection* SimTracks,
529  std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > & GenSignal,
530  unsigned int /*inTimeStart*/, unsigned int /*inTimeEnd*/,
531  InDet::InDetRecStatisticsAlg::CounterLocal &counter) const //'unused' compiler warning
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  }
566 
567 namespace {
568 
569  template <class T_Stream>
570  class RestoreStream
571  {
572  public:
573  RestoreStream(T_Stream &out) : m_stream(&out),m_precision(out.precision()) { }
574  ~RestoreStream() { (*m_stream).precision(m_precision); }
575  private:
576  T_Stream *m_stream;
577  int m_precision;
578  };
579 }
580 
581 void InDet :: InDetRecStatisticsAlg :: printStatistics() {
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";
699  printTrackSummary (out, ETA_BARREL);
700 
701  out<< "\n"
702  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
703  << " in TRANSITION region tracks/event " << track_stummary_type_header << "\n"
704  << "----------------------------------------------------------------------------------------------------------------------------------------------------"
705  << "\n";
706  printTrackSummary (out, ETA_TRANSITION);
707 
708  out << "\n"
709  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
710  << " in ENDCAP tracks/event " << track_stummary_type_header << "\n"
711  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
712  printTrackSummary (out, ETA_ENDCAP);
713 
714  out << "\n"
715  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n"
716  << " in FORWARD region tracks/event " << track_stummary_type_header << "\n"
717  << "----------------------------------------------------------------------------------------------------------------------------------------------------" << "\n";
718  printTrackSummary (out, ETA_FORWARD);
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 }
745 
746 
747 void InDet :: InDetRecStatisticsAlg ::printTrackSummary (MsgStream &out, enum eta_region eta_reg)
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 }
765 
766 // =================================================================================================================
767 // calculatePull
768 // =================================================================================================================
769 float InDet :: InDetRecStatisticsAlg :: calculatePull(const float residual,
770  const float trkErr,
771  const float hitErr){
772  double ErrorSum;
773  ErrorSum = sqrt(pow(trkErr, 2) + pow(hitErr, 2));
774  if (ErrorSum != 0) { return residual/ErrorSum; }
775  else { return 0; }
776 }
777 
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 }
817 
818 
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 }
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...
RecVertex.h
InDet::eta_region
eta_region
Definition: TrackStatHelper.h:74
InDet::InDetRecStatisticsAlg::getIdentifier
Identifier getIdentifier(const Trk::MeasurementBase *measurement)
Definition: InDetRecStatisticsAlg.cxx:819
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: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
TrackParameters.h
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
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: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::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
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:528
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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:71
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
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
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:263
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:83
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
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
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:33
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:418
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
IdDictDictionary::file_name
const std::string & file_name(void) const
Access to file name.
Definition: IdDictDefs.h:657
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:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
RIO_OnTrack.h
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
charge
double charge(const T &p)
Definition: AtlasPID.h:538
LocalParameters.h
IdDictDictionary
Definition: IdDictDefs.h:97
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.
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
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
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:154
PlaneSurface.h
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
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:72
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
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:778
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:501
Identifier
Definition: IdentifierFieldParser.cxx:14