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