80 for (
auto& map : mTrueTracksMap) {
84 for (
const auto& trackLabel : mMFTTrackLabels) {
85 if (trackLabel.isCorrect()) {
86 mTrueTracksMap[trackLabel.getSourceID()][trackLabel.getEventID()].push_back(
id);
88 mFakeTracksVec.push_back(
id);
99 void setBz(
float bz) { mBz = bz; }
109 gsl::span<const o2::mft::TrackMFT> mMFTTracks;
110 gsl::span<const o2::itsmft::ROFRecord> mMFTTracksROF;
111 gsl::span<const int> mMFTTrackClusIdx;
112 gsl::span<const o2::itsmft::CompClusterExt> mMFTClusters;
113 gsl::span<const o2::itsmft::ROFRecord> mMFTClustersROF;
114 gsl::span<const unsigned char> mMFTClusterPatterns;
115 gsl::span<const unsigned char>::iterator pattIt;
116 std::vector<o2::BaseCluster<float>> mMFTClustersGlobal;
118 std::array<bool, 936> mUnusedChips;
125 std::unique_ptr<const o2::dataformats::MCTruthContainer<o2::MCCompLabel>> mMFTClusterLabels;
126 gsl::span<const o2::MCCompLabel> mMFTTrackLabels;
131 std::unique_ptr<TH1F> mTrackNumberOfClusters =
nullptr;
132 std::unique_ptr<TH1F> mCATrackNumberOfClusters =
nullptr;
133 std::unique_ptr<TH1F> mLTFTrackNumberOfClusters =
nullptr;
134 std::unique_ptr<TH1F> mTrackInvQPt =
nullptr;
135 std::unique_ptr<TH1F> mTrackChi2 =
nullptr;
136 std::unique_ptr<TH1F> mTrackCharge =
nullptr;
137 std::unique_ptr<TH1F> mTrackPhi =
nullptr;
138 std::unique_ptr<TH1F> mPositiveTrackPhi =
nullptr;
139 std::unique_ptr<TH1F> mNegativeTrackPhi =
nullptr;
140 std::unique_ptr<TH1F> mTrackEta =
nullptr;
141 std::unique_ptr<TH2F> mTrackChi2pT =
nullptr;
143 std::unique_ptr<TH1F> mMFTClsZ =
nullptr;
144 std::unique_ptr<TH1F> mMFTClsOfTracksZ =
nullptr;
146 std::array<std::unique_ptr<TH2F>, 10> mMFTClsXYinLayer = {
nullptr};
147 std::array<std::unique_ptr<TH1F>, 10> mMFTClsRinLayer = {
nullptr};
148 std::array<std::unique_ptr<TH2F>, 10> mMFTClsOfTracksXYinLayer = {
nullptr};
149 std::array<std::unique_ptr<TH2F>, 5> mMFTClsXYRedundantInDisk = {
nullptr};
151 std::array<std::unique_ptr<TH1F>, 7> mTrackEtaNCls = {
nullptr};
152 std::array<std::unique_ptr<TH1F>, 7> mTrackPhiNCls = {
nullptr};
153 std::array<std::unique_ptr<TH2F>, 7> mTrackXYNCls = {
nullptr};
154 std::array<std::unique_ptr<TH2F>, 7> mTrackEtaPhiNCls = {
nullptr};
155 std::unique_ptr<TH1F> mCATrackEta =
nullptr;
156 std::unique_ptr<TH1F> mLTFTrackEta =
nullptr;
157 std::unique_ptr<TH1F> mTrackCotl =
nullptr;
159 std::unique_ptr<TH1F> mTrackROFNEntries =
nullptr;
160 std::unique_ptr<TH1F> mClusterROFNEntries =
nullptr;
161 std::unique_ptr<TH1F> mTracksBC =
nullptr;
163 std::unique_ptr<TH1F> mNOfTracksTime =
nullptr;
164 std::unique_ptr<TH1F> mNOfClustersTime =
nullptr;
166 std::unique_ptr<TH1F> mClusterSensorIndex =
nullptr;
167 std::unique_ptr<TH1F> mClusterPatternIndex =
nullptr;
170 std::vector<std::string> mNameOfTrackTypes = {
"Rec",
177 std::unique_ptr<TH2F> mHistPhiRecVsPhiGen =
nullptr;
178 std::unique_ptr<TH2F> mHistEtaRecVsEtaGen =
nullptr;
190 std::unique_ptr<TEfficiency> mChargeMatchEff =
nullptr;
191 std::unique_ptr<TH2F> mHistVxtOffsetProjection =
nullptr;
193 enum TH3HistosCodes {
194 kTH3TrackDeltaXDeltaYEta,
195 kTH3TrackDeltaXDeltaYPt,
196 kTH3TrackDeltaXVertexPtEta,
197 kTH3TrackDeltaYVertexPtEta,
198 kTH3TrackInvQPtResolutionPtEta,
199 kTH3TrackInvQPtResSeedPtEta,
202 kTH3TrackPhiPullPtEta,
203 kTH3TrackCotlPullPtEta,
204 kTH3TrackInvQPtPullPtEta,
205 kTH3TrackReducedChi2PtEta,
209 std::map<int, const char*> TH3Names{
210 {kTH3TrackDeltaXDeltaYEta,
"TH3TrackDeltaXDeltaYEta"},
211 {kTH3TrackDeltaXDeltaYPt,
"TH3TrackDeltaXDeltaYPt"},
212 {kTH3TrackDeltaXVertexPtEta,
"TH3TrackDeltaXVertexPtEta"},
213 {kTH3TrackDeltaYVertexPtEta,
"TH3TrackDeltaYVertexPtEta"},
214 {kTH3TrackInvQPtResolutionPtEta,
"TH3TrackInvQPtResolutionPtEta"},
215 {kTH3TrackInvQPtResSeedPtEta,
"TH3TrackInvQPtResSeedPtEta"},
216 {kTH3TrackXPullPtEta,
"TH3TrackXPullPtEta"},
217 {kTH3TrackYPullPtEta,
"TH3TrackYPullPtEta"},
218 {kTH3TrackPhiPullPtEta,
"TH3TrackPhiPullPtEta"},
219 {kTH3TrackCotlPullPtEta,
"TH3TrackCotlPullPtEta"},
220 {kTH3TrackInvQPtPullPtEta,
"TH3TrackInvQPtPullPtEta"},
221 {kTH3TrackReducedChi2PtEta,
"TH3TrackReducedChi2PtEta"}};
223 std::map<int, const char*> TH3Titles{
224 {kTH3TrackDeltaXDeltaYEta,
"TH3TrackDeltaXDeltaYEta"},
225 {kTH3TrackDeltaXDeltaYPt,
"TH3TrackDeltaXDeltaYPt"},
226 {kTH3TrackDeltaXVertexPtEta,
"TH3TrackDeltaXVertexPtEta"},
227 {kTH3TrackDeltaYVertexPtEta,
"TH3TrackDeltaYVertexPtEta"},
228 {kTH3TrackInvQPtResolutionPtEta,
"TH3TrackInvQPtResolutionPtEta"},
229 {kTH3TrackInvQPtResSeedPtEta,
"TH3TrackInvQPtResSeedPtEta"},
230 {kTH3TrackXPullPtEta,
"TH3TrackXPullPtEta"},
231 {kTH3TrackYPullPtEta,
"TH3TrackYPullPtEta"},
232 {kTH3TrackPhiPullPtEta,
"TH3TrackPhiPullPtEta"},
233 {kTH3TrackCotlPullPtEta,
"TH3TrackCotlPullPtEta"},
234 {kTH3TrackInvQPtPullPtEta,
"TH3TrackInvQPtPullPtEta"},
235 {kTH3TrackReducedChi2PtEta,
"TH3TrackReducedChi2PtEta"}};
237 std::map<int, std::array<double, 9>> TH3Binning{
238 {kTH3TrackDeltaXDeltaYEta, {16, -3.8, -2.2, 1000, -1000, 1000, 1000, -1000, 1000}},
239 {kTH3TrackDeltaXDeltaYPt, {100, 0, 20, 1000, -1000, 1000, 1000, -1000, 1000}},
240 {kTH3TrackDeltaYVertexPtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, -1000, 1000}},
241 {kTH3TrackDeltaXVertexPtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, -1000, 1000}},
242 {kTH3TrackInvQPtResolutionPtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, -50, 50}},
243 {kTH3TrackInvQPtResSeedPtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, -50, 50}},
244 {kTH3TrackXPullPtEta, {100, 0, 20, 16, -3.8, -2.2, 200, -10, 10}},
245 {kTH3TrackYPullPtEta, {100, 0, 20, 16, -3.8, -2.2, 200, -10, 10}},
246 {kTH3TrackPhiPullPtEta, {100, 0, 20, 16, -3.8, -2.2, 200, -10, 10}},
247 {kTH3TrackCotlPullPtEta, {100, 0, 20, 16, -3.8, -2.2, 200, -10, 10}},
248 {kTH3TrackInvQPtPullPtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, -15, 15}},
249 {kTH3TrackReducedChi2PtEta, {100, 0, 20, 16, -3.8, -2.2, 1000, 0, 100}}};
251 std::map<int, const char*> TH3XaxisTitles{
252 {kTH3TrackDeltaXDeltaYEta, R
"(\\eta)"},
253 {kTH3TrackDeltaXDeltaYPt, R"(p_{t})"},
254 {kTH3TrackDeltaXVertexPtEta, R"(p_{t})"},
255 {kTH3TrackDeltaYVertexPtEta, R"(p_{t})"},
256 {kTH3TrackInvQPtResolutionPtEta, R"(p_{t})"},
257 {kTH3TrackInvQPtResSeedPtEta, R"(p_{t})"},
258 {kTH3TrackXPullPtEta, R"(p_{t})"},
259 {kTH3TrackYPullPtEta, R"(p_{t})"},
260 {kTH3TrackPhiPullPtEta, R"(p_{t})"},
261 {kTH3TrackCotlPullPtEta, R"(p_{t})"},
262 {kTH3TrackInvQPtPullPtEta, R"(p_{t})"},
263 {kTH3TrackReducedChi2PtEta, R"(p_{t})"}};
265 std::map<int, const char*> TH3YaxisTitles{
266 {kTH3TrackDeltaXDeltaYEta, R"(X_{residual \rightarrow vtx} (\mu m))"},
267 {kTH3TrackDeltaXDeltaYPt, R"(X_{residual \rightarrow vtx} (\mu m))"},
268 {kTH3TrackDeltaXVertexPtEta, R"(\eta)"},
269 {kTH3TrackDeltaYVertexPtEta, R"(\eta)"},
270 {kTH3TrackInvQPtResolutionPtEta, R"(\eta)"},
271 {kTH3TrackInvQPtResSeedPtEta, R"(\eta)"},
272 {kTH3TrackXPullPtEta, R"(\eta)"},
273 {kTH3TrackYPullPtEta, R"(\eta)"},
274 {kTH3TrackPhiPullPtEta, R"(\eta)"},
275 {kTH3TrackCotlPullPtEta, R"(\eta)"},
276 {kTH3TrackInvQPtPullPtEta, R"(\eta)"},
277 {kTH3TrackReducedChi2PtEta, R"(\eta)"}};
279 std::map<int, const char*> TH3ZaxisTitles{
280 {kTH3TrackDeltaXDeltaYEta, R"(Y_{residual \rightarrow vtx} (\mu m))"},
281 {kTH3TrackDeltaXDeltaYPt, R"(Y_{residual \rightarrow vtx} (\mu m))"},
282 {kTH3TrackDeltaXVertexPtEta, R"(X_{residual \rightarrow vtx} (\mu m))"},
283 {kTH3TrackDeltaYVertexPtEta, R"(Y_{residual \rightarrow vtx} (\mu m))"},
284 {kTH3TrackInvQPtResolutionPtEta, R"((q/p_{t})_{residual}/(q/p_{t}))"},
285 {kTH3TrackInvQPtResSeedPtEta, R"((q/p_{t})_{residual}/(q/p_{t}))"},
286 {kTH3TrackXPullPtEta, R"(\Delta X/\sigma_{X})"},
287 {kTH3TrackYPullPtEta, R"(\Delta Y/\sigma_{Y})"},
288 {kTH3TrackPhiPullPtEta, R"(\Delta \phi/\sigma_{\phi})"},
289 {kTH3TrackCotlPullPtEta, R"(\Delta \cot(\lambda)/\sigma_{cot(\lambda)})"},
290 {kTH3TrackInvQPtPullPtEta, R"((\Delta q/p_t)/\sigma_{q/p_{t}})"},
291 {kTH3TrackReducedChi2PtEta, R"(\chi^2/d.f.)"}};
293 enum TH3SlicedCodes {
315 std::map<int, const char*> TH3SlicedNames{
316 {kDeltaXVertexVsEta,
"DeltaXVertexVsEta"},
317 {kDeltaXVertexVsPt,
"DeltaXVertexVsPt"},
318 {kDeltaYVertexVsEta,
"DeltaYVertexVsEta"},
319 {kDeltaYVertexVsPt,
"DeltaYVertexVsPt"},
320 {kXPullVsEta,
"XPullVsEta"},
321 {kXPullVsPt,
"XPullVsPt"},
322 {kYPullVsEta,
"YPullVsEta"},
323 {kYPullVsPt,
"YPullVsPt"},
324 {kInvQPtResVsEta,
"InvQPtResVsEta"},
325 {kInvQPtResVsPt,
"InvQPtResVsPt"},
326 {kInvQPtResSeedVsEta,
"InvQPtResSeedVsEta"},
327 {kInvQPtResSeedVsPt,
"InvQPtResSeedVsPt"},
328 {kPhiPullVsEta,
"PhiPullVsEta"},
329 {kPhiPullVsPt,
"PhiPullVsPt"},
330 {kCotlPullVsEta,
"CotlPullVsEta"},
331 {kCotlPullVsPt,
"CotlPullVsPt"},
332 {kInvQPtPullVsEta,
"InvQPtPullVsEta"},
333 {kInvQPtPullVsPt,
"InvQPtPullVsPt"}};
335 std::map<int, int> TH3SlicedMap{
336 {kDeltaXVertexVsEta, kTH3TrackDeltaXVertexPtEta},
337 {kDeltaXVertexVsPt, kTH3TrackDeltaXVertexPtEta},
338 {kDeltaYVertexVsEta, kTH3TrackDeltaYVertexPtEta},
339 {kDeltaYVertexVsPt, kTH3TrackDeltaYVertexPtEta},
340 {kXPullVsEta, kTH3TrackXPullPtEta},
341 {kXPullVsPt, kTH3TrackXPullPtEta},
342 {kYPullVsEta, kTH3TrackYPullPtEta},
343 {kYPullVsPt, kTH3TrackYPullPtEta},
344 {kInvQPtResVsEta, kTH3TrackInvQPtResolutionPtEta},
345 {kInvQPtResVsPt, kTH3TrackInvQPtResolutionPtEta},
346 {kInvQPtResSeedVsEta, kTH3TrackInvQPtResSeedPtEta},
347 {kInvQPtResSeedVsPt, kTH3TrackInvQPtResSeedPtEta},
348 {kPhiPullVsEta, kTH3TrackPhiPullPtEta},
349 {kPhiPullVsPt, kTH3TrackPhiPullPtEta},
350 {kCotlPullVsEta, kTH3TrackCotlPullPtEta},
351 {kCotlPullVsPt, kTH3TrackCotlPullPtEta},
352 {kInvQPtPullVsEta, kTH3TrackInvQPtPullPtEta},
353 {kInvQPtPullVsPt, kTH3TrackInvQPtPullPtEta}};
355 std::array<std::unique_ptr<TH3F>, kNTH3Histos> mTH3Histos;
356 std::array<TCanvas*, kNSlicedTH3> mSlicedCanvas;
357 void TH3Slicer(TCanvas* canvas, std::unique_ptr<TH3F>& histo3D, std::vector<float>
list,
double window,
int iPar,
float marker_size = 1.5);
359 std::unordered_map<o2::MCCompLabel, bool> mMFTTrackables;
360 std::vector<std::vector<std::vector<int>>> mTrueTracksMap;
361 std::vector<int> mFakeTracksVec;
362 std::vector<std::vector<std::vector<o2::MCCompLabel>>> mTrackableTracksMap;
364 static constexpr std::array<short, 7> sMinNClustersList = {4, 5, 6, 7, 8, 9, 10};
365 uint32_t mRefOrbit = 0;
367 bool mFinalizeAnalysis =
false;