ATLAS Offline Software
TrackClusterAssValidationUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrackClusterAssValidationUtils_H
6 #define TrackClusterAssValidationUtils_H
7 
8 namespace InDet {
9 
11  // Header file for class PartPropCache
13 
15  {
17  // Public methods:
19  public:
23  PartPropCache(const PartPropCache&) = default;
25  PartPropCache(int uidCharge,int rapidity);
27  ~PartPropCache() = default;
31  int id () const {return abs(m_uidCharge);}
32 #if !defined(HEPMC3)
33  int barcode () const {return abs(m_uidCharge);}
34 #endif
35  int charge () const {return ((m_uidCharge>0) - (m_uidCharge<0));} //returns 1, -1 or 0 depending on sign
36  int rapidity() const {return m_rapidity;}
37 
38  protected:
39  int m_uidCharge{};
40  int m_rapidity{};
41  };
42 
44  // Inline methods
46 
47  inline PartPropCache::PartPropCache (int uidCharge,int rapidity)
48  {
49  m_uidCharge = uidCharge ;
51  }
52 
53 
55  public:
56  int m_efficiency [6]={} ;
57  int m_efficiencyN [6][5]={};
58  int m_efficiencyBTE[6][5][4]={};
59  int m_efficiencyPOS[6]={} ;
60  int m_efficiencyNEG[6]={} ;
61  int m_ntracksPOSB{} ;
62  int m_ntracksPOSE{} ;
64  int m_ntracksNEGB{} ;
65  int m_ntracksNEGE{} ;
67  int m_total [50]={} ;
68  int m_fake [50]={} ;
69  int m_events{} ;
70  int m_eventsPOS{} ;
71  int m_eventsNEG{} ;
72  int m_eventsBTE[4]={0} ;
73 
74 
76  for (int i=0; i<6; ++i) { m_efficiency[i]+=a_stat.m_efficiency[i];}
77  for (int i=0; i<6; ++i) { for (int j=0; j<5; ++j) { m_efficiencyN[i][j]+=a_stat.m_efficiencyN[i][j];}}
78  for (int i=0; i<6; ++i) { for (int j=0; j<5; ++j) { for (int k=0; k<4; ++k) { m_efficiencyBTE[i][j][k]+=a_stat.m_efficiencyBTE[i][j][k];} } }
79  for (int i=0; i<6; ++i) { m_efficiencyPOS[i]+=a_stat.m_efficiencyPOS[i];}
80  for (int i=0; i<6; ++i) { m_efficiencyNEG[i]+=a_stat.m_efficiencyNEG[i];}
87  for (int i=0; i<50; ++i) { m_total[i]+=a_stat.m_total[i];}
88  for (int i=0; i<50; ++i) { m_fake[i]+=a_stat.m_fake[i];}
89 
90  return *this;
91  }
92 
93  };
94 
95 
96  struct EventStat_t {
97  public:
98  int m_events{} ;
99  int m_eventsPOS{} ;
100  int m_eventsNEG{} ;
101  int m_eventsBTE[4]={};
102 
103  int m_particleClusters [50]={};
105  int m_particleClustersBTE [50][4]={};
107 
116  //
121 
122 
124  m_events += a_stat.m_events;
125  m_eventsPOS += a_stat.m_eventsPOS;
126  m_eventsNEG += a_stat.m_eventsNEG;
127  for (int i=0; i<4; ++i) { m_eventsBTE[i] += a_stat.m_eventsBTE[i]; }
128  for (int i=0; i<50; ++i) {m_particleClusters[i] += a_stat.m_particleClusters[i]; };
129  for (int i=0; i<50; ++i) {m_particleSpacePoints[i] += a_stat.m_particleSpacePoints[i]; };
130  for (int i=0; i<50; ++i) {for (int j=0; j<4; ++j) { m_particleClustersBTE[i][j] += a_stat.m_particleClustersBTE[i][j]; } }
131  for (int i=0; i<50; ++i) {for (int j=0; j<4; ++j) { m_particleSpacePointsBTE[i][j] += a_stat.m_particleSpacePointsBTE[i][j];} }
144  return *this;
145  }
146  };
147 
148 }
149 #endif // TrackClusterAssValidationUtils_H
150 
InDet::TrackCollectionStat_t::m_ntracksPOSB
int m_ntracksPOSB
Definition: TrackClusterAssValidationUtils.h:61
InDet::TrackCollectionStat_t::m_ntracksPOSE
int m_ntracksPOSE
Definition: TrackClusterAssValidationUtils.h:62
InDet::EventStat_t::m_nclustersNegEP
int m_nclustersNegEP
Definition: TrackClusterAssValidationUtils.h:114
InDet::TrackCollectionStat_t::m_ntracksPOSFWD
int m_ntracksPOSFWD
Definition: TrackClusterAssValidationUtils.h:63
InDet::EventStat_t::m_nclustersNegBP
int m_nclustersNegBP
Definition: TrackClusterAssValidationUtils.h:112
InDet::PartPropCache::PartPropCache
PartPropCache()
default c'tor
Definition: TrackClusterAssValidationUtils.h:21
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TrackCollectionStat_t::m_fake
int m_fake[50]
Definition: TrackClusterAssValidationUtils.h:68
InDet::EventStat_t::m_nclustersNegBS
int m_nclustersNegBS
Definition: TrackClusterAssValidationUtils.h:113
InDet::EventStat_t::m_nclustersSTOTt
int m_nclustersSTOTt
Definition: TrackClusterAssValidationUtils.h:120
InDet::EventStat_t::operator+=
EventStat_t & operator+=(const EventStat_t &a_stat)
Definition: TrackClusterAssValidationUtils.h:123
InDet::TrackCollectionStat_t
Definition: TrackClusterAssValidationUtils.h:54
InDet::EventStat_t::m_nclustersNegES
int m_nclustersNegES
Definition: TrackClusterAssValidationUtils.h:115
InDet::EventStat_t::m_particleClusters
int m_particleClusters[50]
Definition: TrackClusterAssValidationUtils.h:103
InDet::EventStat_t::m_particleSpacePointsBTE
int m_particleSpacePointsBTE[50][4]
Definition: TrackClusterAssValidationUtils.h:106
InDet::TrackCollectionStat_t::m_eventsPOS
int m_eventsPOS
Definition: TrackClusterAssValidationUtils.h:70
InDet::TrackCollectionStat_t::m_efficiency
int m_efficiency[6]
Definition: TrackClusterAssValidationUtils.h:56
InDet::PartPropCache::PartPropCache
PartPropCache(const PartPropCache &)=default
copy c'tor defaulted
InDet::TrackCollectionStat_t::m_eventsNEG
int m_eventsNEG
Definition: TrackClusterAssValidationUtils.h:71
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDet::PartPropCache
Definition: TrackClusterAssValidationUtils.h:15
InDet::TrackCollectionStat_t::m_efficiencyNEG
int m_efficiencyNEG[6]
Definition: TrackClusterAssValidationUtils.h:60
InDet::PartPropCache::barcode
int barcode() const
Definition: TrackClusterAssValidationUtils.h:33
InDet::PartPropCache::~PartPropCache
~PartPropCache()=default
destructor does nothing
InDet::TrackCollectionStat_t::m_efficiencyPOS
int m_efficiencyPOS[6]
Definition: TrackClusterAssValidationUtils.h:59
InDet::EventStat_t::m_nclustersPosES
int m_nclustersPosES
Definition: TrackClusterAssValidationUtils.h:111
InDet::TrackCollectionStat_t::m_ntracksNEGFWD
int m_ntracksNEGFWD
Definition: TrackClusterAssValidationUtils.h:66
InDet::TrackCollectionStat_t::m_events
int m_events
Definition: TrackClusterAssValidationUtils.h:69
InDet::EventStat_t::m_nclustersSTOT
int m_nclustersSTOT
Definition: TrackClusterAssValidationUtils.h:119
InDet::TrackCollectionStat_t::m_eventsBTE
int m_eventsBTE[4]
Definition: TrackClusterAssValidationUtils.h:72
InDet::TrackCollectionStat_t::m_ntracksNEGB
int m_ntracksNEGB
Definition: TrackClusterAssValidationUtils.h:64
InDet::PartPropCache::charge
int charge() const
Definition: TrackClusterAssValidationUtils.h:35
InDet::EventStat_t::m_eventsBTE
int m_eventsBTE[4]
Definition: TrackClusterAssValidationUtils.h:101
InDet::EventStat_t::m_nclustersPTOTt
int m_nclustersPTOTt
Definition: TrackClusterAssValidationUtils.h:118
InDet::EventStat_t::m_nclustersPosBP
int m_nclustersPosBP
Definition: TrackClusterAssValidationUtils.h:108
InDet::EventStat_t::m_events
int m_events
Definition: TrackClusterAssValidationUtils.h:98
InDet::EventStat_t
Definition: TrackClusterAssValidationUtils.h:96
InDet::PartPropCache::id
int id() const
getters
Definition: TrackClusterAssValidationUtils.h:31
InDet::EventStat_t::m_eventsPOS
int m_eventsPOS
Definition: TrackClusterAssValidationUtils.h:99
InDet::EventStat_t::m_eventsNEG
int m_eventsNEG
Definition: TrackClusterAssValidationUtils.h:100
InDet::EventStat_t::m_nclustersPTOT
int m_nclustersPTOT
Definition: TrackClusterAssValidationUtils.h:117
InDet::TrackCollectionStat_t::m_ntracksNEGE
int m_ntracksNEGE
Definition: TrackClusterAssValidationUtils.h:65
InDet::TrackCollectionStat_t::m_efficiencyBTE
int m_efficiencyBTE[6][5][4]
Definition: TrackClusterAssValidationUtils.h:58
InDet::TrackCollectionStat_t::m_total
int m_total[50]
Definition: TrackClusterAssValidationUtils.h:67
InDet::PartPropCache::m_uidCharge
int m_uidCharge
Definition: TrackClusterAssValidationUtils.h:39
InDet::EventStat_t::m_nclustersPosEP
int m_nclustersPosEP
Definition: TrackClusterAssValidationUtils.h:110
InDet::EventStat_t::m_nclustersPosBS
int m_nclustersPosBS
Definition: TrackClusterAssValidationUtils.h:109
InDet::TrackCollectionStat_t::m_efficiencyN
int m_efficiencyN[6][5]
Definition: TrackClusterAssValidationUtils.h:57
InDet::TrackCollectionStat_t::operator+=
TrackCollectionStat_t & operator+=(const TrackCollectionStat_t &a_stat)
Definition: TrackClusterAssValidationUtils.h:75
InDet::PartPropCache::m_rapidity
int m_rapidity
Definition: TrackClusterAssValidationUtils.h:40
InDet::PartPropCache::operator=
PartPropCache & operator=(const PartPropCache &)=default
assignment defaulted
InDet::EventStat_t::m_particleClustersBTE
int m_particleClustersBTE[50][4]
Definition: TrackClusterAssValidationUtils.h:105
fitman.k
k
Definition: fitman.py:528
InDet::PartPropCache::rapidity
int rapidity() const
Definition: TrackClusterAssValidationUtils.h:36
InDet::EventStat_t::m_particleSpacePoints
int m_particleSpacePoints[50]
Definition: TrackClusterAssValidationUtils.h:104