ATLAS Offline Software
TrackAnalysisCollections.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 #include "TrackParametersHelper.h" // also includes VertexParametersHelper.h
13 #include "TrackMatchingLookup.h"
14 
16 #include <algorithm> // for std::find
17 
18 
23  const std::string& anaTag ) :
24  AthMessaging( "TrackAnalysisCollections"+anaTag ),
25  m_anaTag( anaTag )
26 {
28  m_truthPartVec.resize( NStages );
29  m_offlTrackVec.resize( NStages );
30  m_trigTrackVec.resize( NStages );
31 
33  m_truthVertexVec.resize( NStages );
34  m_offlVertexVec.resize( NStages );
35  m_trigVertexVec.resize( NStages );
36 }
37 
42 {
44  m_trkAnaDefSvc = Gaudi::svcLocator()->service( "TrkAnaDefSvc"+m_anaTag );
45  ATH_CHECK( m_trkAnaDefSvc.isValid() );
46 
50  if( m_trkAnaDefSvc->isTestTruth() ) {
51  m_matches = std::make_unique< TrackMatchingLookup_truthTrk >( m_anaTag );
52  }
54  else if( m_trkAnaDefSvc->isReferenceTruth() ) {
55  m_matches = std::make_unique< TrackMatchingLookup_trkTruth >( m_anaTag );
56  }
58  else {
59  m_matches = std::make_unique< TrackMatchingLookup_trk >( m_anaTag );
60  }
61 
62  return StatusCode::SUCCESS;
63 }
64 
69  const SG::ReadHandleKey<xAOD::EventInfo>& eventInfoHandleKey,
70  const SG::ReadHandleKey< xAOD::TruthEventContainer >& truthEventHandleKey,
71  const SG::ReadHandleKey< xAOD::TruthPileupEventContainer >& truthPUEventHandleKey )
72 {
73  m_eventInfo = nullptr;
74  m_truthEventContainer = nullptr;
75  m_truthPUEventContainer = nullptr;
76 
78  SG::ReadHandle< xAOD::EventInfo > pie( eventInfoHandleKey );
79  if( not pie.isValid() ) {
80  ATH_MSG_WARNING( "Shouldn't happen. EventInfo is buggy" );
81  } else m_eventInfo = pie.ptr();
82 
83  if( not m_trkAnaDefSvc->useTruth() ) return StatusCode::SUCCESS;
84 
86  SG::ReadHandle< xAOD::TruthEventContainer > pTruthEventCont( truthEventHandleKey );
87  if( not pTruthEventCont.isValid() ) {
88  ATH_MSG_WARNING( "Non valid truth event collection: " << truthEventHandleKey.key() );
89  }
90  else m_truthEventContainer = pTruthEventCont.ptr();
91 
93  if( m_trkAnaDefSvc->hasFullPileupTruth() ) {
94  SG::ReadHandle< xAOD::TruthPileupEventContainer > pTruthPUEventCont( truthPUEventHandleKey );
95  if( not pTruthPUEventCont.isValid() ) {
96  ATH_MSG_WARNING( "Non valid truth pile up event collection: " << truthPUEventHandleKey.key() );
97  }
98  else m_truthPUEventContainer = pTruthPUEventCont.ptr();
99  }
100 
101  return StatusCode::SUCCESS;
102 }
103 
109  const SG::ReadHandleKey< xAOD::TruthParticleContainer >& truthPartHandleKey )
110 {
111  if( m_trkAnaDefSvc->useTruth() ) {
112  ATH_MSG_DEBUG( "Loading collection: " << truthPartHandleKey.key() );
113  SG::ReadHandle< xAOD::TruthParticleContainer > pTruthColl( truthPartHandleKey );
114  if( not pTruthColl.isValid() ) {
115  ATH_MSG_ERROR( "Non valid truth particles collection: " << truthPartHandleKey.key() );
116  return StatusCode::FAILURE;
117  }
118 
120  m_truthPartContainer = pTruthColl.ptr();
121 
123  m_truthPartVec[ FULL ].clear(); // clear to initialize it
124 
126  if( m_trkAnaDefSvc->pileupSwitch() == "All" ) {
127  m_truthPartVec[ FULL ].insert(
128  m_truthPartVec[ FULL ].begin(), pTruthColl->begin(), pTruthColl->end() );
129 
131  } else if( m_trkAnaDefSvc->pileupSwitch() == "HardScatter" ) {
132  if( m_truthEventContainer ) {
133  const xAOD::TruthEvent* event = m_truthEventContainer->at(0);
134  const auto& links = event->truthParticleLinks();
135  for( const auto& link : links ) {
136  if( link.isValid() ) m_truthPartVec[ FULL ].push_back( *link );
137  }
138  }
139 
141  } else if( m_trkAnaDefSvc->pileupSwitch() == "PileUp" ) {
142  if( m_truthPUEventContainer ) {
143  // loop over all pile up events
144  for( size_t ipu=0; ipu < m_truthPUEventContainer->size(); ipu++ ) {
145  const xAOD::TruthPileupEvent* eventPU = m_truthPUEventContainer->at( ipu );
146  const auto& links = eventPU->truthParticleLinks();
147  for( const auto& link : links ) {
148  if( link.isValid() ) m_truthPartVec[ FULL ].push_back( *link );
149  }
150  }
151  }
152 
153  } else {
154  ATH_MSG_ERROR( "Invalid pileupSwitch: " << m_trkAnaDefSvc->pileupSwitch() );
155  return StatusCode::FAILURE;
156  }
157  } else {
158  m_truthPartContainer = nullptr;
159  m_truthPartVec[ FULL ].clear();
160  }
161 
162  return StatusCode::SUCCESS;
163 }
164 
168 {
169  if( m_trkAnaDefSvc->useOffline() ) {
170  ATH_MSG_DEBUG( "Loading collection: " << handleKey.key() );
171 
173 
174  if( not pColl.isValid() ) {
175  ATH_MSG_ERROR( "Non valid offline tracks collection: " << handleKey.key() );
176  return StatusCode::FAILURE;
177  }
178 
180  m_offlTrackContainer = pColl.ptr();
181 
183  m_offlTrackVec[ FULL ].clear();
184  m_offlTrackVec[ FULL ].insert(
185  m_offlTrackVec[ FULL ].begin(),
186  pColl->begin(), pColl->end() );
187  } else {
188  m_offlTrackContainer = nullptr;
189  m_offlTrackVec[ FULL ].clear();
190  }
191 
192  return StatusCode::SUCCESS;
193 }
194 
198 {
199  if( m_trkAnaDefSvc->useTrigger()) {
200  ATH_MSG_DEBUG( "Loading collection: " << handleKey.key() );
201 
203 
204  if( not pColl.isValid() ) {
205  ATH_MSG_ERROR( "Non valid trigger tracks collection: " << handleKey.key() );
206  return StatusCode::FAILURE;
207  }
208 
210  m_trigTrackContainer = pColl.ptr();
211 
213  m_trigTrackVec[ FULL ].clear();
214  m_trigTrackVec[ FULL ].insert(
215  m_trigTrackVec[ FULL ].begin(),
216  pColl->begin(), pColl->end() );
217  } else {
218  m_trigTrackContainer = nullptr;
219  m_trigTrackVec[ FULL ].clear();
220  }
221 
222  return StatusCode::SUCCESS;
223 }
224 
230  const std::vector< const xAOD::TruthParticle* >& vec,
232 {
233  if( m_trkAnaDefSvc->isTestTruth() ) {
234  m_truthPartVec[ stage ].clear();
235  m_truthPartVec[ stage ].insert(
236  m_truthPartVec[ stage ].begin(),
237  vec.begin(), vec.end() );
238  return StatusCode::SUCCESS;
239  }
240 
241  ATH_MSG_DEBUG( "No TEST TruthParticle vector" );
242  return StatusCode::SUCCESS;
243 }
244 
247  const std::vector< const xAOD::TrackParticle* >& vec,
249 {
250  if( m_trkAnaDefSvc->isTestOffline() ) {
251  m_offlTrackVec[ stage ].clear();
252  m_offlTrackVec[ stage ].insert(
253  m_offlTrackVec[ stage ].begin(),
254  vec.begin(), vec.end() );
255  return StatusCode::SUCCESS;
256  }
257 
258  if( m_trkAnaDefSvc->isTestTrigger() ) {
259  m_trigTrackVec[ stage ].clear();
260  m_trigTrackVec[ stage ].insert(
261  m_trigTrackVec[ stage ].begin(),
262  vec.begin(), vec.end() );
263  return StatusCode::SUCCESS;
264  }
265 
266  ATH_MSG_DEBUG( "No TEST TrackParticle vector");
267  return StatusCode::SUCCESS;
268 }
269 
275  const std::vector< const xAOD::TruthParticle* >& vec,
277 {
278  if( m_trkAnaDefSvc->isReferenceTruth() ) {
279  m_truthPartVec[ stage ].clear();
280  m_truthPartVec[ stage ].insert(
281  m_truthPartVec[ stage ].begin(),
282  vec.begin(), vec.end() );
283  return StatusCode::SUCCESS;
284  }
285 
286  ATH_MSG_DEBUG( "No REFERENCE TruthParticle vector" );
287  return StatusCode::SUCCESS;
288 }
289 
292  const std::vector< const xAOD::TrackParticle* >& vec,
294 {
295  if( m_trkAnaDefSvc->isReferenceOffline() ) {
296  m_offlTrackVec[ stage ].clear();
297  m_offlTrackVec[ stage ].insert(
298  m_offlTrackVec[ stage ].begin(),
299  vec.begin(), vec.end() );
300  return StatusCode::SUCCESS;
301  }
302 
303  if( m_trkAnaDefSvc->isReferenceTrigger() ) {
304  m_trigTrackVec[ stage ].clear();
305  m_trigTrackVec[ stage ].insert(
306  m_trigTrackVec[ stage ].begin(),
307  vec.begin(), vec.end() );
308  return StatusCode::SUCCESS;
309  }
310 
311  ATH_MSG_DEBUG( "No REFERENCE TrackParticle vector" );
312  return StatusCode::SUCCESS;
313 }
314 
320  const std::vector< const xAOD::TruthParticle* >& vec,
322 {
323  if( m_trkAnaDefSvc->useTruth() ) {
324  m_truthPartVec[ stage ].clear();
325  m_truthPartVec[ stage ].insert(
326  m_truthPartVec[ stage ].begin(),
327  vec.begin(), vec.end() );
328  return StatusCode::SUCCESS;
329  }
330 
331  ATH_MSG_DEBUG( "No TruthParticle vector" );
332  return StatusCode::SUCCESS;
333 }
334 
337  const std::vector< const xAOD::TrackParticle* >& vec,
339 {
340  if( m_trkAnaDefSvc->useOffline() ) {
341  m_offlTrackVec[ stage ].clear();
342  m_offlTrackVec[ stage ].insert(
343  m_offlTrackVec[ stage ].begin(),
344  vec.begin(), vec.end() );
345  return StatusCode::SUCCESS;
346  }
347 
348  ATH_MSG_DEBUG( "No Offline TrackParticle vector" );
349  return StatusCode::SUCCESS;
350 }
351 
354  const std::vector< const xAOD::TrackParticle* >& vec,
356 {
357  if( m_trkAnaDefSvc->useTrigger() or m_trkAnaDefSvc->useEFTrigger() ) {
358  m_trigTrackVec[ stage ].clear();
359  m_trigTrackVec[ stage ].insert(
360  m_trigTrackVec[ stage ].begin(),
361  vec.begin(), vec.end() );
362  return StatusCode::SUCCESS;
363  }
364 
365  ATH_MSG_DEBUG( "No Trigger TrackParticle vector" );
366  return StatusCode::SUCCESS;
367 }
368 
374  const SG::ReadHandleKey< xAOD::TruthVertexContainer >& truthVertexHandleKey )
375 {
376  m_truthVertexContainer = nullptr;
377  m_truthVertexVec[ FULL ].clear();
378 
380  if( not m_trkAnaDefSvc->useTruth() or
381  truthVertexHandleKey.key().empty() ) return StatusCode::SUCCESS;
382 
383  ATH_MSG_DEBUG( "Loading collection: " << truthVertexHandleKey.key() );
384  SG::ReadHandle< xAOD::TruthVertexContainer > pTruthVertColl( truthVertexHandleKey );
385  if( not pTruthVertColl.isValid() ) {
386  ATH_MSG_ERROR( "Non valid truth vertex collection: " << truthVertexHandleKey.key() );
387  return StatusCode::FAILURE;
388  }
389 
391  m_truthVertexContainer = pTruthVertColl.ptr();
392 
394  m_truthVertexVec[ FULL ].insert(
395  m_truthVertexVec[ FULL ].begin(),
396  pTruthVertColl->begin(), pTruthVertColl->end() );
397 
399 
400  return StatusCode::SUCCESS;
401 }
402 
406 {
407  m_offlVertexContainer = nullptr;
408  m_offlVertexVec[ FULL ].clear();
409 
411  if( not m_trkAnaDefSvc->useOffline() or
412  handleKey.key().empty() ) return StatusCode::SUCCESS;
413 
414  ATH_MSG_DEBUG( "Loading collection: " << handleKey.key() );
415  SG::ReadHandle< xAOD::VertexContainer > pColl( handleKey );
416  if( not pColl.isValid() ) {
417  ATH_MSG_ERROR( "Non valid offline vertex collection: " << handleKey.key() );
418  return StatusCode::FAILURE;
419  }
420 
422  m_offlVertexContainer = pColl.ptr();
423 
425  m_offlVertexVec[ FULL ].insert(
426  m_offlVertexVec[ FULL ].begin(),
427  pColl->begin(), pColl->end() );
428 
429  return StatusCode::SUCCESS;
430 }
431 
435 {
436  m_trigVertexContainer = nullptr;
437  m_trigVertexVec[ FULL ].clear();
438 
440  if( not m_trkAnaDefSvc->useTrigger() or
441  handleKey.key().empty() ) return StatusCode::SUCCESS;
442 
443  ATH_MSG_DEBUG( "Loading collection: " << handleKey.key() );
444  SG::ReadHandle< xAOD::VertexContainer > pColl( handleKey );
445  if( not pColl.isValid() ) {
446  ATH_MSG_ERROR( "Non valid trigger vertex collection: " << handleKey.key() );
447  return StatusCode::FAILURE;
448  }
449 
451  m_trigVertexContainer = pColl.ptr();
452 
454  m_trigVertexVec[ FULL ].insert(
455  m_trigVertexVec[ FULL ].begin(),
456  pColl->begin(), pColl->end() );
457 
458  return StatusCode::SUCCESS;
459 }
460 
466  const std::vector< const xAOD::TruthVertex* >& vec,
468 {
469  if( m_trkAnaDefSvc->isTestTruth() ) {
470  m_truthVertexVec[ stage ].clear();
471  m_truthVertexVec[ stage ].insert(
472  m_truthVertexVec[ stage ].begin(),
473  vec.begin(), vec.end() );
474  return StatusCode::SUCCESS;
475  }
476 
477  ATH_MSG_DEBUG( "No TEST Truth vertex vector" );
478  return StatusCode::SUCCESS;
479 }
480 
483  const std::vector< const xAOD::Vertex* >& vec,
485 {
486  if( m_trkAnaDefSvc->isTestOffline() ) {
487  m_offlVertexVec[ stage ].clear();
488  m_offlVertexVec[ stage ].insert(
489  m_offlVertexVec[ stage ].begin(),
490  vec.begin(), vec.end() );
491  return StatusCode::SUCCESS;
492 
493  } else if( m_trkAnaDefSvc->isTestTrigger() ) {
494  m_trigVertexVec[ stage ].clear();
495  m_trigVertexVec[ stage ].insert(
496  m_trigVertexVec[ stage ].begin(),
497  vec.begin(), vec.end() );
498  return StatusCode::SUCCESS;
499  }
500 
501  ATH_MSG_DEBUG( "No TEST Reco vertex vector");
502  return StatusCode::SUCCESS;
503 }
504 
510  const std::vector< const xAOD::TruthVertex* >& vec,
512 {
513  if( m_trkAnaDefSvc->isReferenceTruth() ) {
514  m_truthVertexVec[ stage ].clear();
515  m_truthVertexVec[ stage ].insert(
516  m_truthVertexVec[ stage ].begin(),
517  vec.begin(), vec.end() );
518  return StatusCode::SUCCESS;
519  }
520 
521  ATH_MSG_DEBUG( "No REFERENCE Truth vertex vector" );
522  return StatusCode::SUCCESS;
523 }
524 
527  const std::vector< const xAOD::Vertex* >& vec,
529 {
530  if( m_trkAnaDefSvc->isReferenceOffline() ) {
531  m_offlVertexVec[ stage ].clear();
532  m_offlVertexVec[ stage ].insert(
533  m_offlVertexVec[ stage ].begin(),
534  vec.begin(), vec.end() );
535  return StatusCode::SUCCESS;
536 
537  } else if( m_trkAnaDefSvc->isReferenceTrigger() ) {
538  m_trigVertexVec[ stage ].clear();
539  m_trigVertexVec[ stage ].insert(
540  m_trigVertexVec[ stage ].begin(),
541  vec.begin(), vec.end() );
542  return StatusCode::SUCCESS;
543  }
544 
545  ATH_MSG_DEBUG( "No REFERENCE Reco vertex vector" );
546  return StatusCode::SUCCESS;
547 }
548 
554  const std::vector< const xAOD::TruthVertex* >& vec,
556 {
557  if( m_trkAnaDefSvc->useTruth() ) {
558  m_truthVertexVec[ stage ].clear();
559  m_truthVertexVec[ stage ].insert(
560  m_truthVertexVec[ stage ].begin(),
561  vec.begin(), vec.end() );
562  return StatusCode::SUCCESS;
563  }
564 
565  ATH_MSG_DEBUG( "No Truth vertex vector" );
566  return StatusCode::SUCCESS;
567 }
568 
571  const std::vector< const xAOD::Vertex* >& vec,
573 {
574  if( m_trkAnaDefSvc->useOffline() ) {
575  m_offlVertexVec[ stage ].clear();
576  m_offlVertexVec[ stage ].insert(
577  m_offlVertexVec[ stage ].begin(),
578  vec.begin(), vec.end() );
579  return StatusCode::SUCCESS;
580  }
581 
582  ATH_MSG_DEBUG( "No Offline vertex vector" );
583  return StatusCode::SUCCESS;
584 }
585 
588  const std::vector< const xAOD::Vertex* >& vec,
590 {
591  if( m_trkAnaDefSvc->useTrigger() or m_trkAnaDefSvc->useEFTrigger() ) {
592  m_trigVertexVec[ stage ].clear();
593  m_trigVertexVec[ stage ].insert(
594  m_trigVertexVec[ stage ].begin(),
595  vec.begin(), vec.end() );
596  return StatusCode::SUCCESS;
597  }
598 
599  ATH_MSG_DEBUG( "No Trigger vertex vector" );
600  return StatusCode::SUCCESS;
601 }
602 
609 {
612  bool isTrigEmpty = m_trkAnaDefSvc->useTrigger() and not m_trkAnaDefSvc->useEFTrigger() and
614  m_trigTrackVec[ stage ].empty() : false;
615  bool isEFTrigEmpty = m_trkAnaDefSvc->useEFTrigger() ?
616  m_trigTrackVec[ stage ].empty() : false;
617  bool isOfflEmpty = m_trkAnaDefSvc->useOffline() ?
618  m_offlTrackVec[ stage ].empty() : false;
619  bool isTruthEmpty = m_trkAnaDefSvc->useTruth() ?
620  m_truthPartVec[ stage ].empty() : false;
621 
622  if( isTrigEmpty or isEFTrigEmpty or isOfflEmpty or isTruthEmpty ) return true;
623 
624  return false;
625 }
626 
630 {
631  if( stage == FULL ) {
633  m_truthPartVec[ FULL ].clear();
634  m_offlTrackVec[ FULL ].clear();
635  m_trigTrackVec[ FULL ].clear();
637  m_truthVertexVec[ FULL ].clear();
638  m_offlVertexVec[ FULL ].clear();
639  m_trigVertexVec[ FULL ].clear();
640  }
641  if( stage == FULL or stage == FS ) {
643  m_truthPartVec[ FS ].clear();
644  m_offlTrackVec[ FS ].clear();
645  m_trigTrackVec[ FS ].clear();
647  m_truthVertexVec[ FS ].clear();
648  m_offlVertexVec[ FS ].clear();
649  m_trigVertexVec[ FS ].clear();
650  }
651  if( stage == FULL or stage == FS or stage == InRoI ) {
653  m_truthPartVec[ InRoI ].clear();
654  m_offlTrackVec[ InRoI ].clear();
655  m_trigTrackVec[ InRoI ].clear();
657  m_truthVertexVec[ InRoI ].clear();
658  m_offlVertexVec[ InRoI ].clear();
659  m_trigVertexVec[ InRoI ].clear();
660  }
661 }
662 
665 {
666  ATH_MSG_DEBUG( "Copying tracks in RoI" );
667 
670  m_offlTrackVec[ InRoI ].clear();
671  m_offlTrackVec[ InRoI ].insert(
672  m_offlTrackVec[ InRoI ].begin(),
673  m_offlTrackVec[ FS ].begin(),
674  m_offlTrackVec[ FS ].end() );
676  m_offlVertexVec[ InRoI ].clear();
677  m_offlVertexVec[ InRoI ].insert(
678  m_offlVertexVec[ InRoI ].begin(),
679  m_offlVertexVec[ FS ].begin(),
680  m_offlVertexVec[ FS ].end() );
681 
684  m_truthPartVec[ InRoI ].clear();
685  m_truthPartVec[ InRoI ].insert(
686  m_truthPartVec[ InRoI ].begin(),
687  m_truthPartVec[ FS ].begin(),
688  m_truthPartVec[ FS ].end() );
690  m_truthVertexVec[ InRoI ].clear();
691  m_truthVertexVec[ InRoI ].insert(
692  m_truthVertexVec[ InRoI ].begin(),
693  m_truthVertexVec[ FS ].begin(),
694  m_truthVertexVec[ FS ].end() );
695 
697  if( m_trkAnaDefSvc->useEFTrigger() ) {
699  m_trigTrackVec[ InRoI ].clear();
700  m_trigTrackVec[ InRoI ].insert(
701  m_trigTrackVec[ InRoI ].begin(),
702  m_trigTrackVec[ FS ].begin(),
703  m_trigTrackVec[ FS ].end() );
705  m_trigVertexVec[ InRoI ].clear();
706  m_trigVertexVec[ InRoI ].insert(
707  m_trigVertexVec[ InRoI ].begin(),
708  m_trigVertexVec[ FS ].begin(),
709  m_trigVertexVec[ FS ].end() );
710  }
711 
713  ATH_MSG_DEBUG( "Tracks and vertices after in RoI copy: " << printInfo( InRoI ) );
714 }
715 
722 {
723  if( m_trkAnaDefSvc->isTestTruth() ) {
724  return m_truthPartContainer;
725  }
726 
727  return nullptr;
728 }
729 
733 {
734  if( m_trkAnaDefSvc->isTestOffline() ) {
735  return m_offlTrackContainer;
736  }
737 
738  if( m_trkAnaDefSvc->isTestTrigger() ) {
739  return m_trigTrackContainer;
740  }
741 
742  return nullptr;
743 }
744 
748 {
749  if( m_trkAnaDefSvc->isReferenceTruth() ) {
750  return m_truthPartContainer;
751  }
752 
753  return nullptr;
754 }
755 
759 {
760  if( m_trkAnaDefSvc->isReferenceOffline() ) {
761  return m_offlTrackContainer;
762  }
763 
764  if( m_trkAnaDefSvc->isReferenceTrigger() ) {
765  return m_trigTrackContainer;
766  }
767 
768  return nullptr;
769 }
770 
775 const std::vector< const xAOD::TruthParticle* >&
778 {
779  if( m_trkAnaDefSvc->isTestTruth() ) {
780  return m_truthPartVec[ stage ];
781  }
782 
783  ATH_MSG_DEBUG( "No Test truth vector found" );
784  return m_nullTruthVec;
785 }
786 
788 const std::vector< const xAOD::TrackParticle* >&
791 {
792  if( m_trkAnaDefSvc->isTestOffline() ) {
793  return m_offlTrackVec[ stage ];
794  }
795 
796  if( m_trkAnaDefSvc->isTestTrigger() ) {
797  return m_trigTrackVec[ stage ];
798  }
799 
800  ATH_MSG_DEBUG( "No Test track vector found" );
801  return m_nullTrackVec;
802 }
803 
805 const std::vector< const xAOD::TruthParticle* >&
808 {
809  if( m_trkAnaDefSvc->isReferenceTruth() ) {
810  return m_truthPartVec[ stage ];
811  }
812 
813  ATH_MSG_DEBUG( "No Reference truth vector found" );
814  return m_nullTruthVec;
815 }
816 
818 const std::vector< const xAOD::TrackParticle* >&
821 {
822  if( m_trkAnaDefSvc->isReferenceOffline() ) {
823  return m_offlTrackVec[ stage ];
824  }
825 
826  if( m_trkAnaDefSvc->isReferenceTrigger() ) {
827  return m_trigTrackVec[ stage ];
828  }
829 
830  ATH_MSG_DEBUG( "No Test track vector found" );
831  return m_nullTrackVec;
832 }
833 
838 std::vector< size_t >
840 {
841  std::vector< size_t > counts( NCOUNTERS, 0 );
842  counts[ ALL ] = m_trkAnaDefSvc->isTestTruth() ?
843  testTruthVec( FULL ).size() :
844  testTrackVec( FULL ).size();
845  counts[ SELECTED ] = m_trkAnaDefSvc->isTestTruth() ?
846  testTruthVec( FS ).size() :
847  testTrackVec( FS ).size();
848  counts[ INROI ] = m_trkAnaDefSvc->isTestTruth() ?
849  testTruthVec( InRoI ).size() :
850  testTrackVec( InRoI ).size();
851  counts[ MATCHED ] = matches().getNmatches();
852  return counts;
853 }
854 
856 std::vector< size_t >
858 {
859  std::vector< size_t > counts( NCOUNTERS, 0 );
860  counts[ ALL ] = m_trkAnaDefSvc->isReferenceTruth() ?
861  refTruthVec( FULL ).size() :
862  refTrackVec( FULL ).size();
863  counts[ SELECTED ] = m_trkAnaDefSvc->isReferenceTruth() ?
864  refTruthVec( FS ).size() :
865  refTrackVec( FS ).size();
866  counts[ INROI ] = m_trkAnaDefSvc->isReferenceTruth() ?
867  refTruthVec( InRoI ).size() :
868  refTrackVec( InRoI ).size();
869  counts[ MATCHED ] = matches().getNmatches( true );
870  return counts;
871 }
872 
879 {
880  if( m_trkAnaDefSvc->isTestTruth() ) {
881  return m_truthVertexContainer;
882  }
883 
884  return nullptr;
885 }
886 
890 {
891  if( m_trkAnaDefSvc->isTestOffline() ) {
892  return m_offlVertexContainer;
893  }
894 
895  if( m_trkAnaDefSvc->isTestTrigger() ) {
896  return m_trigVertexContainer;
897  }
898 
899  return nullptr;
900 }
901 
905 {
906  if( m_trkAnaDefSvc->isReferenceTruth() ) {
907  return m_truthVertexContainer;
908  }
909 
910  return nullptr;
911 }
912 
916 {
917  if( m_trkAnaDefSvc->isReferenceOffline() ) {
918  return m_offlVertexContainer;
919  }
920 
921  if( m_trkAnaDefSvc->isReferenceTrigger() ) {
922  return m_trigVertexContainer;
923  }
924 
925  return nullptr;
926 }
927 
932 const std::vector< const xAOD::TruthVertex* >&
935 {
936  if( m_trkAnaDefSvc->isTestTruth() ) {
937  return m_truthVertexVec[ stage ];
938  }
939 
940  ATH_MSG_DEBUG( "No Test truth vertex vector found" );
941  return m_nullTruthVertVec;
942 }
943 
945 const std::vector< const xAOD::Vertex* >&
948 {
949  if( m_trkAnaDefSvc->isTestOffline() ) {
950  return m_offlVertexVec[ stage ];
951  }
952 
953  if( m_trkAnaDefSvc->isTestTrigger() ) {
954  return m_trigVertexVec[ stage ];
955  }
956 
957  ATH_MSG_DEBUG( "No Test reco vertex vector found" );
958  return m_nullRecoVertVec;
959 }
960 
962 const std::vector< const xAOD::TruthVertex* >&
965 {
966  if( m_trkAnaDefSvc->isReferenceTruth() ) {
967  return m_truthVertexVec[ stage ];
968  }
969 
970  ATH_MSG_DEBUG( "No Reference truth vertex vector found" );
971  return m_nullTruthVertVec;
972 }
973 
975 const std::vector< const xAOD::Vertex* >&
978 {
979  if( m_trkAnaDefSvc->isReferenceOffline() ) {
980  return m_offlVertexVec[ stage ];
981  }
982 
983  if( m_trkAnaDefSvc->isReferenceTrigger() ) {
984  return m_trigVertexVec[ stage ];
985  }
986 
987  ATH_MSG_DEBUG( "No Test reco vertex vector found" );
988  return m_nullRecoVertVec;
989 }
990 
995 std::vector< size_t >
997 {
998  std::vector< size_t > counts( NCOUNTERS, 0 );
999  counts[ ALL ] = m_trkAnaDefSvc->isTestTruth() ?
1000  testTruthVertexVec( FULL ).size() :
1001  testRecoVertexVec( FULL ).size();
1002  counts[ SELECTED ] = m_trkAnaDefSvc->isTestTruth() ?
1003  testTruthVertexVec( FS ).size() :
1004  testRecoVertexVec( FS ).size();
1005  counts[ INROI ] = m_trkAnaDefSvc->isTestTruth() ?
1006  testTruthVertexVec( InRoI ).size() :
1007  testRecoVertexVec( InRoI ).size();
1008  counts[ MATCHED ] = 0;
1009  return counts;
1010 }
1011 
1013 std::vector< size_t >
1015 {
1016  std::vector< size_t > counts( NCOUNTERS, 0 );
1017  counts[ ALL ] = m_trkAnaDefSvc->isReferenceTruth() ?
1018  refTruthVertexVec( FULL ).size() :
1019  refRecoVertexVec( FULL ).size();
1020  counts[ SELECTED ] = m_trkAnaDefSvc->isReferenceTruth() ?
1021  refTruthVertexVec( FS ).size() :
1022  refRecoVertexVec( FS ).size();
1023  counts[ INROI ] = m_trkAnaDefSvc->isReferenceTruth() ?
1024  refTruthVertexVec( InRoI ).size() :
1025  refRecoVertexVec( InRoI ).size();
1026  counts[ MATCHED ] = 0;
1027  return counts;
1028 }
1029 
1035  IDTPM::TrackAnalysisCollections::Stage stage, bool printVertex ) const
1036 {
1037  std::stringstream ss;
1038  ss << "\n==========================================" << std::endl;
1039 
1040  size_t it(0);
1041  for( const xAOD::TrackParticle* thisOfflineTrack : m_offlTrackVec[ stage ] ) {
1042  ss << "Offline track"
1043  << " : pt = " << pT( *thisOfflineTrack )
1044  << " : eta = " << eta( *thisOfflineTrack )
1045  << " : phi = " << phi( *thisOfflineTrack )
1046  << std::endl;
1047  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1048  it++;
1049  }
1050 
1051  if( not m_offlTrackVec[ stage ].empty() )
1052  ss << "==========================================" << std::endl;
1053 
1054  it = 0;
1055  for( const xAOD::TruthParticle* thisTruthParticle : m_truthPartVec[ stage ] ) {
1056  ss << "Truth particle"
1057  << " : pt = " << pT( *thisTruthParticle )
1058  << " : eta = " << eta( *thisTruthParticle )
1059  << " : phi = " << phi( *thisTruthParticle )
1060  << std::endl;
1061  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1062  it++;
1063  }
1064 
1065  if( not m_truthPartVec[ stage ].empty() )
1066  ss << "==========================================" << std::endl;
1067 
1068  it = 0;
1069  for( const xAOD::TrackParticle* thisTriggerTrack : m_trigTrackVec[ stage ] ) {
1070  ss << "Trigger track"
1071  << " : pt = " << pT( *thisTriggerTrack )
1072  << " : eta = " << eta( *thisTriggerTrack )
1073  << " : phi = " << phi( *thisTriggerTrack )
1074  << std::endl;
1075  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1076  it++;
1077  }
1078 
1079  if( not m_trigTrackVec[ stage ].empty() )
1080  ss << "==========================================" << std::endl;
1081 
1083  if( printVertex ) ss << "Vertices: " << printVertexInfo( stage );
1084 
1085  return ss.str();
1086 }
1087 
1091 {
1092  std::stringstream ss;
1093  ss << "\n==========================================" << std::endl;
1094 
1095  size_t it(0);
1096  for( const xAOD::Vertex* thisOfflineVertex : m_offlVertexVec[ stage ] ) {
1097  ss << "Offline vertex"
1098  << " : z = " << posZ( *thisOfflineVertex )
1099  << std::endl;
1100  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1101  it++;
1102  }
1103 
1104  if( not m_offlVertexVec[ stage ].empty() )
1105  ss << "==========================================" << std::endl;
1106 
1107  it = 0;
1108  for( const xAOD::TruthVertex* thisTruthVertex : m_truthVertexVec[ stage ] ) {
1109  ss << "Truth vertex"
1110  << " : z = " << posZ( *thisTruthVertex )
1111  << std::endl;
1112  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1113  it++;
1114  }
1115 
1116  if( not m_truthVertexVec[ stage ].empty() )
1117  ss << "==========================================" << std::endl;
1118 
1119  it = 0;
1120  for( const xAOD::Vertex* thisTriggerVertex : m_trigVertexVec[ stage ] ) {
1121  ss << "Trigger vertex"
1122  << " : z = " << posZ( *thisTriggerVertex )
1123  << std::endl;
1124  if( it > 20 ) { ss << "et al...." << std::endl; break; }
1125  it++;
1126  }
1127 
1128  if( not m_trigVertexVec[ stage ].empty() )
1129  ss << "==========================================" << std::endl;
1130 
1131  return ss.str();
1132 }
1133 
1138 {
1140  if( m_trkAnaDefSvc->isTestTruth() ) {
1141  return m_matches->printInfo( testTruthVec( InRoI ), refTrackVec( InRoI ) );
1142  }
1144  if( m_trkAnaDefSvc->isReferenceTruth() ) {
1145  return m_matches->printInfo( testTrackVec( InRoI ), refTruthVec( InRoI ) );
1146  }
1148  return m_matches->printInfo( testTrackVec( InRoI ), refTrackVec( InRoI ) );
1149 }
1150 
1151 
1156  const std::string& chainRoi, const std::string& roiStr )
1157 {
1158  ATH_MSG_DEBUG( "Updating TrackAnalysisCollection with ChainRoiName: " << chainRoi );
1159 
1160  std::pair< mapChainRoi_t::iterator, bool > result =
1161  m_chainRois.insert( mapChainRoi_t::value_type( chainRoi, roiStr ) );
1162 
1163  if( not result.second ) {
1164  ATH_MSG_WARNING( "ChainRoiName has already been cached. No update." );
1165  return false;
1166  }
1167 
1169  m_matches->clear();
1170  m_matches->chainRoiName( chainRoi );
1172 
1173  return result.second;
1174 }
IDTPM::TrackAnalysisCollections::printInfo
std::string printInfo(Stage stage=FULL, bool printVertex=true) const
print information about tracks in the collection(s)
Definition: TrackAnalysisCollections.cxx:1034
IDTPM::TrackAnalysisCollections::fillTrigTrackVec
StatusCode fillTrigTrackVec(const std::vector< const xAOD::TrackParticle * > &vec, Stage stage=FULL)
Trigger tracks.
Definition: TrackAnalysisCollections.cxx:353
IDTPM::TrackAnalysisCollections::fillOfflVertexContainer
StatusCode fillOfflVertexContainer(const SG::ReadHandleKey< xAOD::VertexContainer > &handleKey)
Offline vertices.
Definition: TrackAnalysisCollections.cxx:404
IDTPM::TrackAnalysisCollections::printVertexInfo
std::string printVertexInfo(Stage stage=FULL) const
print information about vertices in the collection(s)
Definition: TrackAnalysisCollections.cxx:1089
IDTPM::TrackAnalysisCollections::fillTruthVertexContainer
StatusCode fillTruthVertexContainer(const SG::ReadHandleKey< xAOD::TruthVertexContainer > &truthVertexHandleKey)
fill FULL vertex collections and vectors
Definition: TrackAnalysisCollections.cxx:373
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
python.FPGATrackSimAnalysisConfig.stage
stage
Definition: FPGATrackSimAnalysisConfig.py:558
IDTPM::TrackAnalysisCollections::NStages
@ NStages
Definition: TrackAnalysisCollections.h:54
correlationModel::FULL
@ FULL
Definition: AsgElectronEfficiencyCorrectionTool.cxx:49
IDTPM::TrackAnalysisCollections::testTruthVertexContainer
const xAOD::TruthVertexContainer * testTruthVertexContainer()
get full TEST vertex containers
Definition: TrackAnalysisCollections.cxx:878
IDTPM::TrackAnalysisCollections::updateChainRois
bool updateChainRois(const std::string &chainRoi, const std::string &roiStr)
update chainRois map
Definition: TrackAnalysisCollections.cxx:1155
IDTPM::TrackAnalysisCollections::m_offlTrackVec
std::vector< std::vector< const xAOD::TrackParticle * > > m_offlTrackVec
Definition: TrackAnalysisCollections.h:288
IDTPM::TrackAnalysisCollections::m_trigTrackVec
std::vector< std::vector< const xAOD::TrackParticle * > > m_trigTrackVec
Definition: TrackAnalysisCollections.h:289
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
IDTPM::TrackAnalysisCollections::m_trigVertexVec
std::vector< std::vector< const xAOD::Vertex * > > m_trigVertexVec
Definition: TrackAnalysisCollections.h:299
IDTPM::TrackAnalysisCollections::refRecoVertexContainer
const xAOD::VertexContainer * refRecoVertexContainer()
REFERENCE = Reco.
Definition: TrackAnalysisCollections.cxx:915
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
IDTPM::TrackAnalysisCollections::refTruthVertexContainer
const xAOD::TruthVertexContainer * refTruthVertexContainer()
get full REFERENCE vertex containers
Definition: TrackAnalysisCollections.cxx:904
xAOD::TruthPileupEvent_v1
Class describing a pile-up truth event in the MC record.
Definition: TruthPileupEvent_v1.h:23
IDTPM::TrackAnalysisCollections::fillRefTrackVec
StatusCode fillRefTrackVec(const std::vector< const xAOD::TrackParticle * > &vec, Stage stage=FULL)
REFERENCE = tracks.
Definition: TrackAnalysisCollections.cxx:291
IDTPM::TrackAnalysisCollections::testVertexCounts
std::vector< size_t > testVertexCounts()
get counts vectors for TEST/REFERENCE vertex vectors at all stages
Definition: TrackAnalysisCollections.cxx:996
IDTPM::TrackAnalysisCollections::fillTruthVertexVec
StatusCode fillTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill truth/offline/trigger vertex vector (TEST or REFERENCE)
Definition: TrackAnalysisCollections.cxx:553
IDTPM::TrackAnalysisCollections::refTruthVertexVec
const std::vector< const xAOD::TruthVertex * > & refTruthVertexVec(Stage stage=FULL)
get REFERENCE vertex vectors
Definition: TrackAnalysisCollections.cxx:963
IDTPM::TrackAnalysisCollections::TrackAnalysisCollections
TrackAnalysisCollections(const std::string &anaTag)
Constructor.
Definition: TrackAnalysisCollections.cxx:22
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
InDetVertexTruthMatchUtils::MATCHED
@ MATCHED
Definition: InDetVertexTruthMatchUtils.h:21
TrackAnalysisCollections.h
Class to hold for each event collections needed in the TrkAnalsis.
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::ReadHandleKey< xAOD::EventInfo >
IDTPM::TrackAnalysisCollections::testTruthContainer
const xAOD::TruthParticleContainer * testTruthContainer()
get full TEST track containers
Definition: TrackAnalysisCollections.cxx:721
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
IDTPM::phi
float phi(const U &p)
Definition: TrackParametersHelper.h:61
IDTPM::TrackAnalysisCollections::testRecoVertexContainer
const xAOD::VertexContainer * testRecoVertexContainer()
TEST = Reco.
Definition: TrackAnalysisCollections.cxx:889
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
IDTPM::TrackAnalysisCollections::fillTrigVertexVec
StatusCode fillTrigVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Trigger tracks.
Definition: TrackAnalysisCollections.cxx:587
IDTPM::TrackAnalysisCollections::fillOfflTrackVec
StatusCode fillOfflTrackVec(const std::vector< const xAOD::TrackParticle * > &vec, Stage stage=FULL)
Offline tracks.
Definition: TrackAnalysisCollections.cxx:336
IDTPM::TrackAnalysisCollections::fillTrigVertexContainer
StatusCode fillTrigVertexContainer(const SG::ReadHandleKey< xAOD::VertexContainer > &handleKey)
Trigger vertices.
Definition: TrackAnalysisCollections.cxx:433
IDTPM::TrackAnalysisCollections::printMatchInfo
std::string printMatchInfo()
print track matching information
Definition: TrackAnalysisCollections.cxx:1137
IDTPM::TrackAnalysisCollections::fillRefTruthVertexVec
StatusCode fillRefTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill REFERENCE vertex vectors
Definition: TrackAnalysisCollections.cxx:509
IDTPM::TrackAnalysisCollections::testTrackVec
const std::vector< const xAOD::TrackParticle * > & testTrackVec(Stage stage=FULL)
TEST = Track.
Definition: TrackAnalysisCollections.cxx:789
IDTPM::TrackAnalysisCollections::fillTruthPartVec
StatusCode fillTruthPartVec(const std::vector< const xAOD::TruthParticle * > &vec, Stage stage=FULL)
fill truth/offline/trigger track vector (TEST or REFERENCE)
Definition: TrackAnalysisCollections.cxx:319
IDTPM::TrackAnalysisCollections::clear
void clear(Stage stage=FULL)
Clear vectors.
Definition: TrackAnalysisCollections.cxx:628
TrackParametersHelper.h
Utility methods to access track/truth particles parmeters in a consitent way in this package.
TrackMatchingLookup.h
Look-up table (templated) class to store (internally to IDTPM) all the matches between test and refer...
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IDTPM::TrackAnalysisCollections::fillTruthPartContainer
StatusCode fillTruthPartContainer(const SG::ReadHandleKey< xAOD::TruthParticleContainer > &truthPartHandleKey)
fill FULL track collections and vectors
Definition: TrackAnalysisCollections.cxx:108
IDTPM::eta
float eta(const U &p)
Accessor utility function for getting the value of eta.
Definition: TrackParametersHelper.h:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DMTest::links
links
Definition: CLinks_v1.cxx:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IDTPM::TrackAnalysisCollections::FS
@ FS
Definition: TrackAnalysisCollections.h:54
IDTPM::TrackAnalysisCollections::testRecoVertexVec
const std::vector< const xAOD::Vertex * > & testRecoVertexVec(Stage stage=FULL)
TEST = Reco.
Definition: TrackAnalysisCollections.cxx:946
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
IDTPM::TrackAnalysisCollections::m_truthVertexVec
std::vector< std::vector< const xAOD::TruthVertex * > > m_truthVertexVec
vectors of reco/truth vertices at different stages of the selection/workflow
Definition: TrackAnalysisCollections.h:297
IDTPM::pT
float pT(const U &p)
Accessor utility function for getting the value of pT.
Definition: TrackParametersHelper.h:33
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
IDTPM::TrackAnalysisCollections::fillRefRecoVertexVec
StatusCode fillRefRecoVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
REFERENCE = reco.
Definition: TrackAnalysisCollections.cxx:526
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
IDTPM::TrackAnalysisCollections::testTrackCounts
std::vector< size_t > testTrackCounts()
get counts vectors for TEST/REFERENCE track vectors at all stages
Definition: TrackAnalysisCollections.cxx:839
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DataVector::insert
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
IDTPM::posZ
float posZ(const V &v)
Accessor utility function for getting the value of vertex position z.
Definition: VertexParametersHelper.h:37
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
DataVector::clear
void clear()
Erase all the elements in the collection.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
IDTPM::TrackAnalysisCollections::testTruthVertexVec
const std::vector< const xAOD::TruthVertex * > & testTruthVertexVec(Stage stage=FULL)
get TEST vertex vectors
Definition: TrackAnalysisCollections.cxx:933
IDTPM::TrackAnalysisCollections::fillEventInfo
StatusCode fillEventInfo(const SG::ReadHandleKey< xAOD::EventInfo > &eventInfoHandleKey, const SG::ReadHandleKey< xAOD::TruthEventContainer > &truthEventHandleKey, const SG::ReadHandleKey< xAOD::TruthPileupEventContainer > &truthPUEventHandleKey)
— Setter methods —
Definition: TrackAnalysisCollections.cxx:68
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
IDTPM::TrackAnalysisCollections::Stage
Stage
Enum for selection stages.
Definition: TrackAnalysisCollections.h:54
IDTPM::TrackAnalysisCollections::refTruthContainer
const xAOD::TruthParticleContainer * refTruthContainer()
get full REFERENCE track containers
Definition: TrackAnalysisCollections.cxx:747
IDTPM::TrackAnalysisCollections::testTrackContainer
const xAOD::TrackParticleContainer * testTrackContainer()
TEST = Track.
Definition: TrackAnalysisCollections.cxx:732
IDTPM::TrackAnalysisCollections::m_offlVertexVec
std::vector< std::vector< const xAOD::Vertex * > > m_offlVertexVec
Definition: TrackAnalysisCollections.h:298
IDTPM::TrackAnalysisCollections::refTrackCounts
std::vector< size_t > refTrackCounts()
REFERENCE.
Definition: TrackAnalysisCollections.cxx:857
IDTPM::TrackAnalysisCollections::fillTestTruthVertexVec
StatusCode fillTestTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill TEST vertex vectors
Definition: TrackAnalysisCollections.cxx:465
SG::ReadHandle::ptr
const_pointer_type ptr()
Dereference the pointer.
IDTPM::TrackAnalysisCollections::initialize
StatusCode initialize()
initialize
Definition: TrackAnalysisCollections.cxx:41
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
IDTPM::TrackAnalysisCollections::refTrackVec
const std::vector< const xAOD::TrackParticle * > & refTrackVec(Stage stage=FULL)
TEST = Track.
Definition: TrackAnalysisCollections.cxx:819
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
IDTPM::TrackAnalysisCollections::refVertexCounts
std::vector< size_t > refVertexCounts()
REFERENCE.
Definition: TrackAnalysisCollections.cxx:1014
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IDTPM::TrackAnalysisCollections::fillTestRecoVertexVec
StatusCode fillTestRecoVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
TEST = reco.
Definition: TrackAnalysisCollections.cxx:482
IDTPM::TrackAnalysisCollections::testTruthVec
const std::vector< const xAOD::TruthParticle * > & testTruthVec(Stage stage=FULL)
get TEST track vectors
Definition: TrackAnalysisCollections.cxx:776
IDTPM::TrackAnalysisCollections::empty
bool empty(Stage stage=FULL)
— Utility methods —
Definition: TrackAnalysisCollections.cxx:607
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IDTPM::TrackAnalysisCollections::fillTrigTrackContainer
StatusCode fillTrigTrackContainer(const SG::ReadHandleKey< xAOD::TrackParticleContainer > &handleKey)
Trigger track particles.
Definition: TrackAnalysisCollections.cxx:196
IDTPM::TrackAnalysisCollections::copyFS
void copyFS()
copy content of FS vectors to InRoI vectors
Definition: TrackAnalysisCollections.cxx:664
xAOD::TruthEventBase_v1::truthParticleLinks
const TruthParticleLinks_t & truthParticleLinks() const
Get all the truth particles.
IDTPM::TrackAnalysisCollections::refRecoVertexVec
const std::vector< const xAOD::Vertex * > & refRecoVertexVec(Stage stage=FULL)
REFERENCE = Reco.
Definition: TrackAnalysisCollections.cxx:976
IDTPM::TrackAnalysisCollections::refTrackContainer
const xAOD::TrackParticleContainer * refTrackContainer()
REFERENCE = Track.
Definition: TrackAnalysisCollections.cxx:758
IDTPM::TrackAnalysisCollections::fillTestTrackVec
StatusCode fillTestTrackVec(const std::vector< const xAOD::TrackParticle * > &vec, Stage stage=FULL)
TEST = tracks.
Definition: TrackAnalysisCollections.cxx:246
IDTPM::TrackAnalysisCollections::m_truthPartVec
std::vector< std::vector< const xAOD::TruthParticle * > > m_truthPartVec
vectors of track/truth particles at different stages of the selection/workflow
Definition: TrackAnalysisCollections.h:287
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
IDTPM::TrackAnalysisCollections::fillOfflVertexVec
StatusCode fillOfflVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Offline tracks.
Definition: TrackAnalysisCollections.cxx:570
IDTPM::TrackAnalysisCollections::refTruthVec
const std::vector< const xAOD::TruthParticle * > & refTruthVec(Stage stage=FULL)
get REFERENCE track vectors
Definition: TrackAnalysisCollections.cxx:806
IDTPM::TrackAnalysisCollections::fillRefTruthVec
StatusCode fillRefTruthVec(const std::vector< const xAOD::TruthParticle * > &vec, Stage stage=FULL)
fill REFERENCE track vectors
Definition: TrackAnalysisCollections.cxx:274
IDTPM::TrackAnalysisCollections::fillOfflTrackContainer
StatusCode fillOfflTrackContainer(const SG::ReadHandleKey< xAOD::TrackParticleContainer > &handleKey)
Offline track particles.
Definition: TrackAnalysisCollections.cxx:166
IDTPM::TrackAnalysisCollections::fillTestTruthVec
StatusCode fillTestTruthVec(const std::vector< const xAOD::TruthParticle * > &vec, Stage stage=FULL)
fill TEST track vectors
Definition: TrackAnalysisCollections.cxx:229