Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STrackMatcherComparatorHistDef.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file STrackMatcherComparatorHistDef.h
1 // ----------------------------------------------------------------------------
2 // 'STrackMatcherComparatorHistDef.h'
3 // Derek Anderson
4 // 02.01.2024
5 //
6 // Struct to hold histogram defintions/parameters for 'STrackMatcherComparator'
7 // module.
8 // ----------------------------------------------------------------------------
9 
10 #ifndef STRACKMATCHERCOMPARATORHISTDEF_H
11 #define STRACKMATCHERCOMPARATORHISTDEF_H
12 
13 // c++ utilities
14 #include <string>
15 #include <vector>
16 #include <utility>
17 
18 // make common namespaces implicit
19 using namespace std;
20 
21 
22 
23 // STrackMatcherComparatorHistDef definition ----------------------------------
24 
26 
27  // output histogram base names
28  vector<vector<string>> vecNameBase = {
29  {"hTruthNumTot", "hTrackNumTot", "hWeirdNumTot", "hNormNumTot"},
30  {"hTruthNumIntt", "hTrackNumIntt", "hWeirdNumIntt", "hNormNumIntt"},
31  {"hTruthNumMvtx", "hTrackNumMvtx", "hWeirdNumMvtx", "hNormNumMvtx"},
32  {"hTruthNumTpc", "hTrackNumTpc", "hWeirdNumTpc", "hNormNumTpc"},
33  {"hTruthRatTot", "hTrackRatTot", "hWeirdRatTot", "hNormRatTot"},
34  {"hTruthRatIntt", "hTrackRatIntt", "hWeirdRatIntt", "hNormRatIntt"},
35  {"hTruthRatMvtx", "hTrackRatMvtx", "hWeirdRatMvtx", "hNormRatMvtx"},
36  {"hTruthRatTpc", "hTrackRatTpc", "hWeirdRatTpc", "hNormRatTpc"},
37  {"hTruthPhi", "hTrackPhi", "hWeirdPhi", "hNormPhi"},
38  {"hTruthEta", "hTrackEta", "hWeirdEta", "hNormEta"},
39  {"hTruthPt", "hTrackPt", "hWeirdPt", "hNormPt"},
40  {"hTruthFrac", "hTrackFrac", "hWeirdFrac", "hNormFrac"},
41  {"hTruthQual", "hTrackQual", "hWeirdQual", "hNormQual"},
42  {"hTruthPtErr", "hTrackPtErr", "hWeirdPtErr", "hNormPtErr"},
43  {"hTruthEtaErr", "hTrackEtaErr", "hWeirdEtaErr", "hNormEtaErr"},
44  {"hTruthPhiErr", "hTrackPhiErr", "hWeirdPhiErr", "hNormPhiErr"},
45  {"hTruthPtRes", "hTrackPtRes", "hWeirdPtRes", "hNormPtRes"},
46  {"hTruthEtaRes", "hTrackEtaRes", "hWeirdEtaRes", "hNormEtaRes"},
47  {"hTruthPhiRes", "hTrackPhiRes", "hWeirdPhiRes", "hNormPhiRes"}
48  };
49 
50  // 2D histogram name modifiers
51  vector<string> vecVsModifiers = {
52  "VsTruthPt",
53  "VsNumTpc"
54  };
55 
56  // axis titles
57  vector<string> vecBaseAxisVars = {
58  "N^{tot} = N_{hit}^{mvtx} + N_{hit}^{intt} + N_{clust}^{tpc}",
59  "N_{hit}^{intt}",
60  "N_{hit}^{mvtx}",
61  "N_{clust}^{tpc}",
62  "N_{reco}^{tot} / N_{true}^{tot}",
63  "N_{reco}^{intt} / N_{true}^{intt}",
64  "N_{reco}^{mvtx} / N_{true}^{mvtx}",
65  "N_{reco}^{tpc} / N_{true}^{tpc}",
66  "#varphi",
67  "#eta",
68  "p_{T} [GeV/c]",
69  "p_{T}^{reco} / p_{T}^{true}",
70  "#chi^{2} / ndf",
71  "#deltap_{T} / p_{T}^{reco}",
72  "#delta#eta / #eta^{reco}",
73  "#delta#varphi / #varphi^{reco}",
74  "|p_{T}^{reco} - p_{T}^{true}| / p_{T}^{true}",
75  "|#eta^{reco} - #eta^{true}| / #eta^{true}",
76  "|#varphi^{reco} - #varphi^{true}| / #varphi^{true}"
77  };
78  vector<string> vecVsAxisVars = {
79  "p_{T}^{true} [GeV/c]",
80  "N_{clust}^{tpc}"
81  };
82 
83  // output histogram no. of bins
84  uint32_t nNumBins = 101;
85  uint32_t nRatBins = 120;
86  uint32_t nEtaBins = 80;
87  uint32_t nPhiBins = 360;
88  uint32_t nPtBins = 101;
89  uint32_t nFracBins = 220;
90  uint32_t nQualBins = 210;
91  uint32_t nResBins = 110;
92 
93  // output histogram bin ranges
94  pair<float, float> xNumBins = {-0.5, 100.5};
95  pair<float, float> xRatBins = {-0.5, 5.5};
96  pair<float, float> xEtaBins = {-2., 2.};
97  pair<float, float> xPhiBins = {-3.15, 3.15};
98  pair<float, float> xPtBins = {-0.5, 100.5};
99  pair<float, float> xFracBins = {-0.5, 10.5};
100  pair<float, float> xQualBins = {-0.5, 20.5};
101  pair<float, float> xResBins = {-5.5, 5.5};
102 
103  // construct list of 1d binning
104  vector<tuple<uint32_t, pair<float, float>>> GetVecHistBins() {
105 
106  vector<tuple<uint32_t, pair<float, float>>> vecBaseHistBins = {
107  make_tuple(nNumBins, xNumBins),
108  make_tuple(nNumBins, xNumBins),
109  make_tuple(nNumBins, xNumBins),
110  make_tuple(nNumBins, xNumBins),
111  make_tuple(nRatBins, xRatBins),
112  make_tuple(nRatBins, xRatBins),
113  make_tuple(nRatBins, xRatBins),
114  make_tuple(nRatBins, xRatBins),
115  make_tuple(nPhiBins, xPhiBins),
116  make_tuple(nEtaBins, xEtaBins),
117  make_tuple(nPtBins, xPtBins),
118  make_tuple(nFracBins, xFracBins),
119  make_tuple(nQualBins, xQualBins),
120  make_tuple(nResBins, xResBins),
121  make_tuple(nResBins, xResBins),
122  make_tuple(nResBins, xResBins),
123  make_tuple(nResBins, xResBins),
124  make_tuple(nResBins, xResBins),
125  make_tuple(nResBins, xResBins)
126  };
127  return vecBaseHistBins;
128 
129  } // end 'GetVecHistBins()'
130 
131  // contruct list of 2d x-axis binning
132  vector<tuple<uint32_t, pair<float, float>>> GetVecVsHistBins() {
133 
134  vector<tuple<uint32_t, pair<float, float>>> vecVsHistBins = {
135  make_tuple(nPtBins, xPtBins),
136  make_tuple(nNumBins, xNumBins)
137  };
138  return vecVsHistBins;
139 
140  } // end 'GetVecVsHistBins()'
141 
142 };
143 
144 #endif
145 
146 // end ------------------------------------------------------------------------
147