CbmRoot
CbmTofHitFinderQa.cxx
Go to the documentation of this file.
1 
6 #include "CbmTofHitFinderQa.h"
7 
8 // TOF Classes and includes
9 #include "CbmTofAddress.h" // in cbmdata/tof
10 #include "CbmTofCell.h" // in tof/TofData
11 #include "CbmTofDetectorId_v12b.h" // in cbmdata/tof
12 #include "CbmTofDetectorId_v14a.h" // in cbmdata/tof
13 #include "CbmTofDigi.h" // in cbmdata/tof
14 #include "CbmTofDigiBdfPar.h" // in tof/TofParam
15 #include "CbmTofDigiPar.h" // in tof/TofParam
16 #include "CbmTofGeoHandler.h" // in tof/TofTools
17 #include "CbmTofHit.h" // in cbmdata/tof
18 #include "CbmTofPoint.h" // in cbmdata/tof
19 
20 // CBMroot classes and includes
21 #include "CbmMCTrack.h"
22 #include "CbmMatch.h"
23 
24 // FAIR classes and includes
25 #include "FairLogger.h"
26 #include "FairMCEventHeader.h"
27 #include "FairRootManager.h"
28 #include "FairRunAna.h"
29 #include "FairRuntimeDb.h"
30 
31 // ROOT Classes and includes
32 #include "Riostream.h"
33 #include "TClonesArray.h"
34 #include "TFile.h"
35 #include "TH1.h"
36 #include "TH2.h"
37 #include "TH3.h"
38 #include "TMath.h"
39 #include "TProfile2D.h"
40 #include "TROOT.h"
41 #include "TRandom.h"
42 #include "TString.h"
43 
44 using std::cout;
45 using std::endl;
46 
47 //___________________________________________________________________
48 // Constants definitions: Particles list
49 const Int_t kiNbPart = 13;
50 const TString ksPartTag[kiNbPart] = {"others",
51  "ep",
52  "em",
53  "pip",
54  "pim",
55  "kp",
56  "km",
57  "p",
58  "pbar",
59  "d",
60  "t",
61  "he",
62  "a"};
63 const Int_t kiPartPdgCode[kiNbPart] = {0,
64  11,
65  -11,
66  211,
67  -211,
68  321,
69  -321,
70  2212,
71  -2212,
72  1000010020,
73  1000010030,
74  1000020030,
75  1000020040};
76 const TString ksPartName[kiNbPart] = {"any other part.",
77  "e+",
78  "e-",
79  "#pi+",
80  "#pi-",
81  "k+",
82  "k-",
83  "p",
84  "anti-p",
85  "d",
86  "t",
87  "he",
88  "#alpha"};
89 const Int_t kiMinNbStsPntAcc =
90  3; // Number of STS Pnt for Trk to be reconstructable
91 //___________________________________________________________________
92 
93 
94 //___________________________________________________________________
95 //
96 // CbmTofHitFinderQa
97 //
98 // Task for QA of TOF event based hit finders and digitizers
99 //
100 // ------------------------------------------------------------------
102  : FairTask("TofHitFinderQa")
103  , fEvents(0)
104  , fGeoHandler(new CbmTofGeoHandler())
105  , fTofId(NULL)
106  , fChannelInfo(NULL)
107  , iNbSmTot(0)
108  , fvTypeSmOffs()
109  , iNbRpcTot(0)
110  , fvSmRpcOffs()
111  , fiNbChTot(0)
112  , fvRpcChOffs()
113  , fDigiPar(NULL)
114  , fDigiBdfPar(NULL)
115  , fMCEventHeader(NULL)
116  , fTofPointsColl(NULL)
117  , fMcTracksColl(NULL)
118  , fTofDigisColl(NULL)
119  , fTofDigiMatchPointsColl(NULL)
120  , fTofHitsColl(NULL)
121  , fTofDigiMatchColl(NULL)
122  , fTofHitMatchColl(NULL)
123  , fbHitProducerSource(kFALSE)
124  , fRealTofPointsColl(NULL)
125  , fRealTofMatchColl(NULL)
126  , fbRealPointAvail(kFALSE)
127  , fbNormHistGenMode(kFALSE)
128  , fsHistoInNormCartFilename("")
129  , fsHistoInNormAngFilename("")
130  , fsHistoInNormSphFilename("")
131  , fsHistoOutFilename("./tofQa.hst.root")
132  , fdWallPosZ(1000)
133  , fuNbEventsForHitsNbPlots(30000)
134  , fhNbHitsPerEvent(NULL)
135  , fhNbHitsSingPntPerEvent(NULL)
136  , fhNbHitsMultPntPerEvent(NULL)
137  , fhNbHitsSingTrkPerEvent(NULL)
138  , fhNbHitsMultTrkPerEvent(NULL)
139  , fhNbDigisInHit(NULL)
140  , fhNbDigisInHitMapXY(NULL)
141  , fvhTrackAllStartZCent()
142  , // Beam pipe check
143  fvhTrackSecStartZCent()
144  , // Beam pipe check
145  fvhTrackAllStartXZCent()
146  , // Beam pipe check
147  fvhTrackAllStartXZ()
148  , // Beam pipe check
149  fvhTrackAllStartYZ()
150  , // Beam pipe check
151  fvhTofPntAllAngCent()
152  , // Beam pipe check
153  fhTrackMapXY(NULL)
154  , // Only when creating normalization histos
155  fhTrackMapXZ(NULL)
156  , // Only when creating normalization histos
157  fhTrackMapYZ(NULL)
158  , // Only when creating normalization histos
159  fhTrackMapAng(NULL)
160  , // Only when creating normalization histos
161  fhTrackMapSph(NULL)
162  , // Only when creating normalization histos
163  fhPointMapXY(NULL)
164  , fhPointMapXZ(NULL)
165  , fhPointMapYZ(NULL)
166  , fhPointMapAng(NULL)
167  , fhPointMapSph(NULL)
168  , fhRealPointMapXY(NULL)
169  , fhRealPointMapXZ(NULL)
170  , fhRealPointMapYZ(NULL)
171  , fhRealPointMapAng(NULL)
172  , fhRealPointMapSph(NULL)
173  , fhDigiMapXY(NULL)
174  , fhDigiMapXZ(NULL)
175  , fhDigiMapYZ(NULL)
176  , fhDigiMapAng(NULL)
177  , fhDigiMapSph(NULL)
178  , fhHitMapXY(NULL)
179  , fhHitMapXZ(NULL)
180  , fhHitMapYZ(NULL)
181  , fhHitMapAng(NULL)
182  , fhHitMapSph(NULL)
183  , fhLeftRightDigiMatch(NULL)
184  , fhNbPointsInHit(NULL)
185  , fhNbTracksInHit(NULL)
186  , fhHitMapSingPntXY(NULL)
187  , fhHitMapSingPntXZ(NULL)
188  , fhHitMapSingPntYZ(NULL)
189  , fhHitMapSingPntAng(NULL)
190  , fhHitMapSingPntSph(NULL)
191  , fhHitMapMultPntXY(NULL)
192  , fhHitMapMultPntXZ(NULL)
193  , fhHitMapMultPntYZ(NULL)
194  , fhHitMapMultPntAng(NULL)
195  , fhHitMapMultPntSph(NULL)
196  , fhHitMapSingTrkXY(NULL)
197  , fhHitMapSingTrkXZ(NULL)
198  , fhHitMapSingTrkYZ(NULL)
199  , fhHitMapSingTrkAng(NULL)
200  , fhHitMapSingTrkSph(NULL)
201  , fhHitMapMultTrkXY(NULL)
202  , fhHitMapMultTrkXZ(NULL)
203  , fhHitMapMultTrkYZ(NULL)
204  , fhHitMapMultTrkAng(NULL)
205  , fhHitMapMultTrkSph(NULL)
206  , fhSinglePointHitDeltaX(NULL)
207  , fhSinglePointHitDeltaY(NULL)
208  , fhSinglePointHitDeltaZ(NULL)
209  , fhSinglePointHitDeltaR(NULL)
210  , fhSinglePointHitDeltaT(NULL)
211  , fhSinglePointHitPullX(NULL)
212  , fhSinglePointHitPullY(NULL)
213  , fhSinglePointHitPullZ(NULL)
214  , fhSinglePointHitPullR(NULL)
215  , fhSinglePointHitPullT(NULL)
216  , fhCltSzSinglePointHitPullX(NULL)
217  , fhCltSzSinglePointHitPullY(NULL)
218  , fhCltSzSinglePointHitPullZ(NULL)
219  , fhCltSzSinglePointHitPullR(NULL)
220  , fhCltSzSinglePointHitPullT(NULL)
221  , fhMultiPntHitClosestDeltaX(NULL)
222  , fhMultiPntHitClosestDeltaY(NULL)
223  , fhMultiPntHitClosestDeltaZ(NULL)
224  , fhMultiPntHitClosestDeltaR(NULL)
225  , fhMultiPntHitClosestDeltaT(NULL)
226  , fhMultiPntHitClosestPullX(NULL)
227  , fhMultiPntHitClosestPullY(NULL)
228  , fhMultiPntHitClosestPullZ(NULL)
229  , fhMultiPntHitClosestPullR(NULL)
230  , fhMultiPntHitClosestPullT(NULL)
231  , fhMultiPntHitFurthestDeltaX(NULL)
232  , fhMultiPntHitFurthestDeltaY(NULL)
233  , fhMultiPntHitFurthestDeltaZ(NULL)
234  , fhMultiPntHitFurthestDeltaR(NULL)
235  , fhMultiPntHitFurthestDeltaT(NULL)
236  , fhMultiPntHitFurthestPullX(NULL)
237  , fhMultiPntHitFurthestPullY(NULL)
238  , fhMultiPntHitFurthestPullZ(NULL)
239  , fhMultiPntHitFurthestPullR(NULL)
240  , fhMultiPntHitFurthestPullT(NULL)
241  , fhMultiPntHitMeanDeltaX(NULL)
242  , fhMultiPntHitMeanDeltaY(NULL)
243  , fhMultiPntHitMeanDeltaZ(NULL)
244  , fhMultiPntHitMeanDeltaR(NULL)
245  , fhMultiPntHitMeanDeltaT(NULL)
246  , fhMultiPntHitMeanPullX(NULL)
247  , fhMultiPntHitMeanPullY(NULL)
248  , fhMultiPntHitMeanPullZ(NULL)
249  , fhMultiPntHitMeanPullR(NULL)
250  , fhMultiPntHitMeanPullT(NULL)
251  , fhMultiPntHitBestDeltaX(NULL)
252  , fhMultiPntHitBestDeltaY(NULL)
253  , fhMultiPntHitBestDeltaZ(NULL)
254  , fhMultiPntHitBestDeltaR(NULL)
255  , fhMultiPntHitBestDeltaT(NULL)
256  , fhMultiPntHitBestPullX(NULL)
257  , fhMultiPntHitBestPullY(NULL)
258  , fhMultiPntHitBestPullZ(NULL)
259  , fhMultiPntHitBestPullR(NULL)
260  , fhMultiPntHitBestPullT(NULL)
261  , fhSingleTrackHitDeltaX(NULL)
262  , fhSingleTrackHitDeltaY(NULL)
263  , fhSingleTrackHitDeltaZ(NULL)
264  , fhSingleTrackHitDeltaR(NULL)
265  , fhSingleTrackHitDeltaT(NULL)
266  , fhSingleTrackHitPullX(NULL)
267  , fhSingleTrackHitPullY(NULL)
268  , fhSingleTrackHitPullZ(NULL)
269  , fhSingleTrackHitPullR(NULL)
270  , fhSingleTrackHitPullT(NULL)
271  , fhSingTrkMultiPntHitDeltaX(NULL)
272  , fhSingTrkMultiPntHitDeltaY(NULL)
273  , fhSingTrkMultiPntHitDeltaZ(NULL)
274  , fhSingTrkMultiPntHitDeltaR(NULL)
275  , fhSingTrkMultiPntHitDeltaT(NULL)
276  , fhSingTrkMultiPntHitPullX(NULL)
277  , fhSingTrkMultiPntHitPullY(NULL)
278  , fhSingTrkMultiPntHitPullZ(NULL)
279  , fhSingTrkMultiPntHitPullR(NULL)
280  , fhSingTrkMultiPntHitPullT(NULL)
281  , fhMultiTrkHitClosestDeltaX(NULL)
282  , fhMultiTrkHitClosestDeltaY(NULL)
283  , fhMultiTrkHitClosestDeltaZ(NULL)
284  , fhMultiTrkHitClosestDeltaR(NULL)
285  , fhMultiTrkHitClosestDeltaT(NULL)
286  , fhMultiTrkHitClosestPullX(NULL)
287  , fhMultiTrkHitClosestPullY(NULL)
288  , fhMultiTrkHitClosestPullZ(NULL)
289  , fhMultiTrkHitClosestPullR(NULL)
290  , fhMultiTrkHitClosestPullT(NULL)
291  , fhMultiTrkHitFurthestDeltaX(NULL)
292  , fhMultiTrkHitFurthestDeltaY(NULL)
293  , fhMultiTrkHitFurthestDeltaZ(NULL)
294  , fhMultiTrkHitFurthestDeltaR(NULL)
295  , fhMultiTrkHitFurthestDeltaT(NULL)
296  , fhMultiTrkHitFurthestPullX(NULL)
297  , fhMultiTrkHitFurthestPullY(NULL)
298  , fhMultiTrkHitFurthestPullZ(NULL)
299  , fhMultiTrkHitFurthestPullR(NULL)
300  , fhMultiTrkHitFurthestPullT(NULL)
301  , fhMultiTrkHitMeanDeltaX(NULL)
302  , fhMultiTrkHitMeanDeltaY(NULL)
303  , fhMultiTrkHitMeanDeltaZ(NULL)
304  , fhMultiTrkHitMeanDeltaR(NULL)
305  , fhMultiTrkHitMeanDeltaT(NULL)
306  , fhMultiTrkHitMeanPullX(NULL)
307  , fhMultiTrkHitMeanPullY(NULL)
308  , fhMultiTrkHitMeanPullZ(NULL)
309  , fhMultiTrkHitMeanPullR(NULL)
310  , fhMultiTrkHitMeanPullT(NULL)
311  , fhMultiTrkHitBestDeltaX(NULL)
312  , fhMultiTrkHitBestDeltaY(NULL)
313  , fhMultiTrkHitBestDeltaZ(NULL)
314  , fhMultiTrkHitBestDeltaR(NULL)
315  , fhMultiTrkHitBestDeltaT(NULL)
316  , fhMultiTrkHitBestPullX(NULL)
317  , fhMultiTrkHitBestPullY(NULL)
318  , fhMultiTrkHitBestPullZ(NULL)
319  , fhMultiTrkHitBestPullR(NULL)
320  , fhMultiTrkHitBestPullT(NULL)
321  , fvhPtmRapGenTrk()
322  , fvhPtmRapStsPnt()
323  , fvhPtmRapTofPnt()
324  , fvhPtmRapTofHit()
325  , fvhPtmRapTofHitSinglePnt()
326  , fvhPtmRapTofHitSingleTrk()
327  , fvhPtmRapSecGenTrk()
328  , fvhPtmRapSecStsPnt()
329  , fvhPtmRapSecTofPnt()
330  , fvhPtmRapSecTofHit()
331  , fvhPtmRapSecTofHitSinglePnt()
332  , fvhPtmRapSecTofHitSingleTrk()
333  , fvhPlabGenTrk()
334  , fvhPlabStsPnt()
335  , fvhPlabTofPnt()
336  , fvhPlabTofHit()
337  , fvhPlabTofHitSinglePnt()
338  , fvhPlabTofHitSingleTrk()
339  , fvhPlabSecGenTrk()
340  , fvhPlabSecStsPnt()
341  , fvhPlabSecTofPnt()
342  , fvhPlabSecTofHit()
343  , fvhPlabSecTofHitSinglePnt()
344  , fvhPlabSecTofHitSingleTrk()
345  , fvhPtmRapGenTrkTofPnt()
346  , fvhPtmRapGenTrkTofHit()
347  , fvhPlabGenTrkTofPnt()
348  , fvhPlabGenTrkTofHit()
349  , fvhPlabStsTrkTofPnt()
350  , fvhPlabStsTrkTofHit()
351  , fvhPtmRapSecGenTrkTofPnt()
352  , fvhPtmRapSecGenTrkTofHit()
353  , fvhPlabSecGenTrkTofPnt()
354  , fvhPlabSecGenTrkTofHit()
355  , fvhPlabSecStsTrkTofPnt()
356  , fvhPlabSecStsTrkTofHit()
357  , fvulIdxTracksWithPnt()
358  , fvulIdxTracksWithHit()
359  , fhIntegratedHitPntEff(NULL)
360  , fvulIdxPrimTracksWithPnt()
361  , fvulIdxPrimTracksWithHit()
362  , fhIntegratedHitPntEffPrim(NULL)
363  , fvulIdxSecTracksWithPnt()
364  , fvulIdxSecTracksWithHit()
365  , fhIntegratedHitPntEffSec(NULL)
366  , fvulIdxHiddenTracksWithHit()
367  , fhIntegratedHiddenHitPntLoss(NULL)
368  , fvulIdxHiddenPrimTracksWithHit()
369  , fhIntegratedHiddenHitPntLossPrim(NULL)
370  , fvulIdxHiddenSecTracksWithHit()
371  , fhIntegratedHiddenHitPntLossSec(NULL)
372  , fvulIdxTracksWithPntGaps()
373  , fvulIdxTracksWithHitGaps()
374  , fhIntegratedHitPntEffGaps(NULL)
375  , fvulIdxPrimTracksWithPntGaps()
376  , fvulIdxPrimTracksWithHitGaps()
377  , fhIntegratedHitPntEffPrimGaps(NULL)
378  , fvulIdxSecTracksWithPntGaps()
379  , fvulIdxSecTracksWithHitGaps()
380  , fhIntegratedHitPntEffSecGaps(NULL)
381  , fhMcTrkStartPrimSingTrk(NULL)
382  , fhMcTrkStartSecSingTrk(NULL)
383  , fhMcTrkStartPrimMultiTrk(NULL)
384  , fhMcTrkStartSecMultiTrk(NULL)
385  , fhPointMatchWeight(NULL) {
386  cout << "CbmTofHitFinderQa: Task started " << endl;
387 }
388 // ------------------------------------------------------------------
389 
390 // ------------------------------------------------------------------
391 CbmTofHitFinderQa::CbmTofHitFinderQa(const char* name, Int_t verbose)
392  : FairTask(name, verbose)
393  , fEvents(0)
394  , fGeoHandler(new CbmTofGeoHandler())
395  , fTofId(NULL)
396  , fChannelInfo(NULL)
397  , iNbSmTot(0)
398  , fvTypeSmOffs()
399  , iNbRpcTot(0)
400  , fvSmRpcOffs()
401  , fiNbChTot(0)
402  , fvRpcChOffs()
403  , fDigiPar(NULL)
404  , fDigiBdfPar(NULL)
405  , fMCEventHeader(NULL)
406  , fTofPointsColl(NULL)
407  , fMcTracksColl(NULL)
408  , fTofDigisColl(NULL)
409  , fTofDigiMatchPointsColl(NULL)
410  , fTofHitsColl(NULL)
411  , fTofDigiMatchColl(NULL)
412  , fTofHitMatchColl(NULL)
413  , fbHitProducerSource(kFALSE)
414  , fRealTofPointsColl(NULL)
415  , fRealTofMatchColl(NULL)
416  , fbRealPointAvail(kFALSE)
417  , fbNormHistGenMode(kFALSE)
418  , fsHistoInNormCartFilename("")
419  , fsHistoInNormAngFilename("")
420  , fsHistoInNormSphFilename("")
421  , fsHistoOutFilename("./tofQa.hst.root")
422  , fdWallPosZ(1000)
423  , fuNbEventsForHitsNbPlots(30000)
424  , fhNbHitsPerEvent(NULL)
425  , fhNbHitsSingPntPerEvent(NULL)
426  , fhNbHitsMultPntPerEvent(NULL)
427  , fhNbHitsSingTrkPerEvent(NULL)
428  , fhNbHitsMultTrkPerEvent(NULL)
429  , fhNbDigisInHit(NULL)
430  , fhNbDigisInHitMapXY(NULL)
431  , fvhTrackAllStartZCent()
432  , // Beam pipe check
433  fvhTrackSecStartZCent()
434  , // Beam pipe check
435  fvhTrackAllStartXZCent()
436  , // Beam pipe check
437  fvhTrackAllStartXZ()
438  , // Beam pipe check
439  fvhTrackAllStartYZ()
440  , // Beam pipe check
441  fvhTofPntAllAngCent()
442  , // Beam pipe check
443  fhTrackMapXY(NULL)
444  , // Only when creating normalization histos
445  fhTrackMapXZ(NULL)
446  , // Only when creating normalization histos
447  fhTrackMapYZ(NULL)
448  , // Only when creating normalization histos
449  fhTrackMapAng(NULL)
450  , // Only when creating normalization histos
451  fhTrackMapSph(NULL)
452  , // Only when creating normalization histos
453  fhPointMapXY(NULL)
454  , fhPointMapXZ(NULL)
455  , fhPointMapYZ(NULL)
456  , fhPointMapAng(NULL)
457  , fhPointMapSph(NULL)
458  , fhRealPointMapXY(NULL)
459  , fhRealPointMapXZ(NULL)
460  , fhRealPointMapYZ(NULL)
461  , fhRealPointMapAng(NULL)
462  , fhRealPointMapSph(NULL)
463  , fhDigiMapXY(NULL)
464  , fhDigiMapXZ(NULL)
465  , fhDigiMapYZ(NULL)
466  , fhDigiMapAng(NULL)
467  , fhDigiMapSph(NULL)
468  , fhHitMapXY(NULL)
469  , fhHitMapXZ(NULL)
470  , fhHitMapYZ(NULL)
471  , fhHitMapAng(NULL)
472  , fhHitMapSph(NULL)
473  , fhLeftRightDigiMatch(NULL)
474  , fhNbPointsInHit(NULL)
475  , fhNbTracksInHit(NULL)
476  , fhHitMapSingPntXY(NULL)
477  , fhHitMapSingPntXZ(NULL)
478  , fhHitMapSingPntYZ(NULL)
479  , fhHitMapSingPntAng(NULL)
480  , fhHitMapSingPntSph(NULL)
481  , fhHitMapMultPntXY(NULL)
482  , fhHitMapMultPntXZ(NULL)
483  , fhHitMapMultPntYZ(NULL)
484  , fhHitMapMultPntAng(NULL)
485  , fhHitMapMultPntSph(NULL)
486  , fhHitMapSingTrkXY(NULL)
487  , fhHitMapSingTrkXZ(NULL)
488  , fhHitMapSingTrkYZ(NULL)
489  , fhHitMapSingTrkAng(NULL)
490  , fhHitMapSingTrkSph(NULL)
491  , fhHitMapMultTrkXY(NULL)
492  , fhHitMapMultTrkXZ(NULL)
493  , fhHitMapMultTrkYZ(NULL)
494  , fhHitMapMultTrkAng(NULL)
495  , fhHitMapMultTrkSph(NULL)
496  , fhSinglePointHitDeltaX(NULL)
497  , fhSinglePointHitDeltaY(NULL)
498  , fhSinglePointHitDeltaZ(NULL)
499  , fhSinglePointHitDeltaR(NULL)
500  , fhSinglePointHitDeltaT(NULL)
501  , fhSinglePointHitPullX(NULL)
502  , fhSinglePointHitPullY(NULL)
503  , fhSinglePointHitPullZ(NULL)
504  , fhSinglePointHitPullR(NULL)
505  , fhSinglePointHitPullT(NULL)
506  , fhCltSzSinglePointHitPullX(NULL)
507  , fhCltSzSinglePointHitPullY(NULL)
508  , fhCltSzSinglePointHitPullZ(NULL)
509  , fhCltSzSinglePointHitPullR(NULL)
510  , fhCltSzSinglePointHitPullT(NULL)
511  , fhMultiPntHitClosestDeltaX(NULL)
512  , fhMultiPntHitClosestDeltaY(NULL)
513  , fhMultiPntHitClosestDeltaZ(NULL)
514  , fhMultiPntHitClosestDeltaR(NULL)
515  , fhMultiPntHitClosestDeltaT(NULL)
516  , fhMultiPntHitClosestPullX(NULL)
517  , fhMultiPntHitClosestPullY(NULL)
518  , fhMultiPntHitClosestPullZ(NULL)
519  , fhMultiPntHitClosestPullR(NULL)
520  , fhMultiPntHitClosestPullT(NULL)
521  , fhMultiPntHitFurthestDeltaX(NULL)
522  , fhMultiPntHitFurthestDeltaY(NULL)
523  , fhMultiPntHitFurthestDeltaZ(NULL)
524  , fhMultiPntHitFurthestDeltaR(NULL)
525  , fhMultiPntHitFurthestDeltaT(NULL)
526  , fhMultiPntHitFurthestPullX(NULL)
527  , fhMultiPntHitFurthestPullY(NULL)
528  , fhMultiPntHitFurthestPullZ(NULL)
529  , fhMultiPntHitFurthestPullR(NULL)
530  , fhMultiPntHitFurthestPullT(NULL)
531  , fhMultiPntHitMeanDeltaX(NULL)
532  , fhMultiPntHitMeanDeltaY(NULL)
533  , fhMultiPntHitMeanDeltaZ(NULL)
534  , fhMultiPntHitMeanDeltaR(NULL)
535  , fhMultiPntHitMeanDeltaT(NULL)
536  , fhMultiPntHitMeanPullX(NULL)
537  , fhMultiPntHitMeanPullY(NULL)
538  , fhMultiPntHitMeanPullZ(NULL)
539  , fhMultiPntHitMeanPullR(NULL)
540  , fhMultiPntHitMeanPullT(NULL)
541  , fhMultiPntHitBestDeltaX(NULL)
542  , fhMultiPntHitBestDeltaY(NULL)
543  , fhMultiPntHitBestDeltaZ(NULL)
544  , fhMultiPntHitBestDeltaR(NULL)
545  , fhMultiPntHitBestDeltaT(NULL)
546  , fhMultiPntHitBestPullX(NULL)
547  , fhMultiPntHitBestPullY(NULL)
548  , fhMultiPntHitBestPullZ(NULL)
549  , fhMultiPntHitBestPullR(NULL)
550  , fhMultiPntHitBestPullT(NULL)
551  , fhSingleTrackHitDeltaX(NULL)
552  , fhSingleTrackHitDeltaY(NULL)
553  , fhSingleTrackHitDeltaZ(NULL)
554  , fhSingleTrackHitDeltaR(NULL)
555  , fhSingleTrackHitDeltaT(NULL)
556  , fhSingleTrackHitPullX(NULL)
557  , fhSingleTrackHitPullY(NULL)
558  , fhSingleTrackHitPullZ(NULL)
559  , fhSingleTrackHitPullR(NULL)
560  , fhSingleTrackHitPullT(NULL)
561  , fhSingTrkMultiPntHitDeltaX(NULL)
562  , fhSingTrkMultiPntHitDeltaY(NULL)
563  , fhSingTrkMultiPntHitDeltaZ(NULL)
564  , fhSingTrkMultiPntHitDeltaR(NULL)
565  , fhSingTrkMultiPntHitDeltaT(NULL)
566  , fhSingTrkMultiPntHitPullX(NULL)
567  , fhSingTrkMultiPntHitPullY(NULL)
568  , fhSingTrkMultiPntHitPullZ(NULL)
569  , fhSingTrkMultiPntHitPullR(NULL)
570  , fhSingTrkMultiPntHitPullT(NULL)
571  , fhMultiTrkHitClosestDeltaX(NULL)
572  , fhMultiTrkHitClosestDeltaY(NULL)
573  , fhMultiTrkHitClosestDeltaZ(NULL)
574  , fhMultiTrkHitClosestDeltaR(NULL)
575  , fhMultiTrkHitClosestDeltaT(NULL)
576  , fhMultiTrkHitClosestPullX(NULL)
577  , fhMultiTrkHitClosestPullY(NULL)
578  , fhMultiTrkHitClosestPullZ(NULL)
579  , fhMultiTrkHitClosestPullR(NULL)
580  , fhMultiTrkHitClosestPullT(NULL)
581  , fhMultiTrkHitFurthestDeltaX(NULL)
582  , fhMultiTrkHitFurthestDeltaY(NULL)
583  , fhMultiTrkHitFurthestDeltaZ(NULL)
584  , fhMultiTrkHitFurthestDeltaR(NULL)
585  , fhMultiTrkHitFurthestDeltaT(NULL)
586  , fhMultiTrkHitFurthestPullX(NULL)
587  , fhMultiTrkHitFurthestPullY(NULL)
588  , fhMultiTrkHitFurthestPullZ(NULL)
589  , fhMultiTrkHitFurthestPullR(NULL)
590  , fhMultiTrkHitFurthestPullT(NULL)
591  , fhMultiTrkHitMeanDeltaX(NULL)
592  , fhMultiTrkHitMeanDeltaY(NULL)
593  , fhMultiTrkHitMeanDeltaZ(NULL)
594  , fhMultiTrkHitMeanDeltaR(NULL)
595  , fhMultiTrkHitMeanDeltaT(NULL)
596  , fhMultiTrkHitMeanPullX(NULL)
597  , fhMultiTrkHitMeanPullY(NULL)
598  , fhMultiTrkHitMeanPullZ(NULL)
599  , fhMultiTrkHitMeanPullR(NULL)
600  , fhMultiTrkHitMeanPullT(NULL)
601  , fhMultiTrkHitBestDeltaX(NULL)
602  , fhMultiTrkHitBestDeltaY(NULL)
603  , fhMultiTrkHitBestDeltaZ(NULL)
604  , fhMultiTrkHitBestDeltaR(NULL)
605  , fhMultiTrkHitBestDeltaT(NULL)
606  , fhMultiTrkHitBestPullX(NULL)
607  , fhMultiTrkHitBestPullY(NULL)
608  , fhMultiTrkHitBestPullZ(NULL)
609  , fhMultiTrkHitBestPullR(NULL)
610  , fhMultiTrkHitBestPullT(NULL)
611  , fvhPtmRapGenTrk()
612  , fvhPtmRapStsPnt()
613  , fvhPtmRapTofPnt()
614  , fvhPtmRapTofHit()
615  , fvhPtmRapTofHitSinglePnt()
616  , fvhPtmRapTofHitSingleTrk()
617  , fvhPtmRapSecGenTrk()
618  , fvhPtmRapSecStsPnt()
619  , fvhPtmRapSecTofPnt()
620  , fvhPtmRapSecTofHit()
621  , fvhPtmRapSecTofHitSinglePnt()
622  , fvhPtmRapSecTofHitSingleTrk()
623  , fvhPlabGenTrk()
624  , fvhPlabStsPnt()
625  , fvhPlabTofPnt()
626  , fvhPlabTofHit()
627  , fvhPlabTofHitSinglePnt()
628  , fvhPlabTofHitSingleTrk()
629  , fvhPlabSecGenTrk()
630  , fvhPlabSecStsPnt()
631  , fvhPlabSecTofPnt()
632  , fvhPlabSecTofHit()
633  , fvhPlabSecTofHitSinglePnt()
634  , fvhPlabSecTofHitSingleTrk()
635  , fvhPtmRapGenTrkTofPnt()
636  , fvhPtmRapGenTrkTofHit()
637  , fvhPlabGenTrkTofPnt()
638  , fvhPlabGenTrkTofHit()
639  , fvhPlabStsTrkTofPnt()
640  , fvhPlabStsTrkTofHit()
641  , fvhPtmRapSecGenTrkTofPnt()
642  , fvhPtmRapSecGenTrkTofHit()
643  , fvhPlabSecGenTrkTofPnt()
644  , fvhPlabSecGenTrkTofHit()
645  , fvhPlabSecStsTrkTofPnt()
646  , fvhPlabSecStsTrkTofHit()
647  , fvulIdxTracksWithPnt()
648  , fvulIdxTracksWithHit()
649  , fhIntegratedHitPntEff(NULL)
650  , fvulIdxPrimTracksWithPnt()
651  , fvulIdxPrimTracksWithHit()
652  , fhIntegratedHitPntEffPrim(NULL)
653  , fvulIdxSecTracksWithPnt()
654  , fvulIdxSecTracksWithHit()
655  , fhIntegratedHitPntEffSec(NULL)
656  , fvulIdxHiddenTracksWithHit()
657  , fhIntegratedHiddenHitPntLoss(NULL)
658  , fvulIdxHiddenPrimTracksWithHit()
659  , fhIntegratedHiddenHitPntLossPrim(NULL)
660  , fvulIdxHiddenSecTracksWithHit()
661  , fhIntegratedHiddenHitPntLossSec(NULL)
662  , fvulIdxTracksWithPntGaps()
663  , fvulIdxTracksWithHitGaps()
664  , fhIntegratedHitPntEffGaps(NULL)
665  , fvulIdxPrimTracksWithPntGaps()
666  , fvulIdxPrimTracksWithHitGaps()
667  , fhIntegratedHitPntEffPrimGaps(NULL)
668  , fvulIdxSecTracksWithPntGaps()
669  , fvulIdxSecTracksWithHitGaps()
670  , fhIntegratedHitPntEffSecGaps(NULL)
671  , fhMcTrkStartPrimSingTrk(NULL)
672  , fhMcTrkStartSecSingTrk(NULL)
673  , fhMcTrkStartPrimMultiTrk(NULL)
674  , fhMcTrkStartSecMultiTrk(NULL)
675  , fhPointMatchWeight(NULL) {}
676 // ------------------------------------------------------------------
677 
678 // ------------------------------------------------------------------
680  // Destructor
681 }
682 // ------------------------------------------------------------------
683 /************************************************************************************/
684 // FairTasks inherited functions
686  if (kFALSE == RegisterInputs()) return kFATAL;
687 
688  // Initialize the TOF GeoHandler
689  Bool_t isSimulation = kFALSE;
690  Int_t iGeoVersion = fGeoHandler->Init(isSimulation);
691  LOG(info) << "CbmTofHitFinderQa::Init with GeoVersion " << iGeoVersion;
692 
693  if (k12b > iGeoVersion) {
694  LOG(error) << "CbmTofHitFinderQa::Init => Only compatible with geometries "
695  "after v12b !!!";
696  return kFATAL;
697  } // if( k12b > iGeoVersion )
698 
699  if (NULL != fTofId)
700  LOG(info) << "CbmTofHitFinderQa::Init with GeoVersion "
702  else {
703  switch (iGeoVersion) {
704  case k12b: fTofId = new CbmTofDetectorId_v12b(); break;
705  case k14a: fTofId = new CbmTofDetectorId_v14a(); break;
706  default:
707  LOG(error) << "CbmTofHitFinderQa::Init => Invalid geometry!!!"
708  << iGeoVersion;
709  return kFATAL;
710  } // switch(iGeoVersion)
711  } // else of if(NULL != fTofId)
712 
713  if (kFALSE == LoadGeometry()) return kFATAL;
714 
715  if (kFALSE == CreateHistos()) return kFATAL;
716 
717  return kSUCCESS;
718 }
719 
721  LOG(info) << " CbmTofHitFinderQa => Get the digi parameters for tof";
722 
723  // Get Base Container
724  FairRunAna* ana = FairRunAna::Instance();
725  FairRuntimeDb* rtdb = ana->GetRuntimeDb();
726 
727  fDigiPar = (CbmTofDigiPar*) (rtdb->getContainer("CbmTofDigiPar"));
728 
729  fDigiBdfPar = (CbmTofDigiBdfPar*) (rtdb->getContainer("CbmTofDigiBdfPar"));
730 }
731 
732 void CbmTofHitFinderQa::Exec(Option_t* /*option*/) {
733  // Task execution
734 
735  LOG(debug) << " CbmTofHitFinderQa => New event";
736 
737  FillHistos();
738 
739  if (0 == (fEvents % 100) && 0 < fEvents) {
740  cout << "-I- CbmTofHitFinderQa::Exec : "
741  << "event " << fEvents << " processed." << endl;
742  }
743  fEvents += 1;
744 }
745 
747  // Normalisations
748  cout << "CbmTofHitFinderQa::Finish up with " << fEvents << " analyzed events "
749  << endl;
750 
751  if (kFALSE == fbNormHistGenMode)
753  else
755 
756  WriteHistos();
757  // Prevent them from being sucked in by the CbmHadronAnalysis WriteHistograms method
758  DeleteHistos();
759 }
760 
761 /************************************************************************************/
762 // Functions common for all clusters approximations
764  FairRootManager* fManager = FairRootManager::Instance();
765 
766  fMCEventHeader = (FairMCEventHeader*) fManager->GetObject("MCEventHeader.");
767  if (NULL == fMCEventHeader) {
768  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
769  "MCEventHeader object!!!";
770  return kFALSE;
771  }
772 
773  fTofPointsColl = (TClonesArray*) fManager->GetObject("TofPoint");
774  if (NULL == fTofPointsColl) {
775  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
776  "TofPoint TClonesArray!!!";
777  return kFALSE;
778  } // if( NULL == fTofPointsColl)
779 
780  fMcTracksColl = (TClonesArray*) fManager->GetObject("MCTrack");
781  if (NULL == fMcTracksColl) {
782  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
783  "MCTrack TClonesArray!!!";
784  return kFALSE;
785  } // if( NULL == fMcTracksColl)
786 
787  fTofDigisColl = (TClonesArray*) fManager->GetObject("TofDigi");
788  if (NULL == fTofDigisColl) {
789  LOG(WARNING) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
790  "TofDigi TClonesArray!!!";
791  LOG(WARNING) << " => Assuming that the "
792  "CbmTofHitProducerNew is used!!!";
793  // return kFALSE;
794  } // if( NULL == fTofDigisColl)
796  (TClonesArray*) fManager->GetObject("TofDigiMatchPoints");
797  if (NULL == fTofDigiMatchPointsColl) {
798  LOG(WARNING) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
799  "TofDigiMatchPoints TClonesArray!!!";
800  LOG(WARNING) << " => Assuming that the "
801  "CbmTofHitProducerNew is used!!!";
802  // return kFALSE;
803  } // if( NULL == fTofDigiMatchPointsColl)
804 
805  fTofHitsColl = (TClonesArray*) fManager->GetObject("TofHit");
806  if (NULL == fTofHitsColl) {
807  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
808  "TofHit TClonesArray!!!";
809  return kFALSE;
810  } // if( NULL == fTofHitsColl)
811  fTofDigiMatchColl = (TClonesArray*) fManager->GetObject("TofDigiMatch");
812  if (NULL == fTofDigiMatchColl) {
813  LOG(WARNING) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
814  "TofDigiMatch TClonesArray!!!";
815  LOG(WARNING) << " => Assuming that the "
816  "CbmTofHitProducerNew is used!!!";
817  // return kFALSE;
818  } // if( NULL == fTofDigiMatchColl)
819 
820  fTofHitMatchColl = (TClonesArray*) fManager->GetObject("TofHitMatch");
821  if (NULL == fTofHitMatchColl) {
822  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
823  "TofHitMatch TClonesArray!!!";
824  return kFALSE;
825  } // if( NULL == fTofDigiMatchPointsColl)
826 
827  if (NULL == fTofDigisColl && NULL == fTofDigiMatchPointsColl
828  && NULL == fTofDigiMatchColl)
829  fbHitProducerSource = kTRUE;
830 
831  if ((kFALSE == fbHitProducerSource)
832  && (NULL == fTofDigisColl || NULL == fTofDigiMatchPointsColl
833  || NULL == fTofDigiMatchColl)) {
834  LOG(error) << "CbmTofHitFinderQa::RegisterInputs => fTofDigisColl or "
835  "fTofDigiMatchPointsColl or fTofDigiMatchColl present while "
836  "the other is missing";
837  LOG(error) << " => Cannot be the result "
838  "of CbmTofHitProducerNew use!!!";
839  return kFALSE;
840  } // if only one of fTofDigisColl and fTofDigiMatchColl is missing
841 
842  fRealTofPointsColl = (TClonesArray*) fManager->GetObject("RealisticTofPoint");
843  fRealTofMatchColl = (TClonesArray*) fManager->GetObject("TofRealPntMatch");
844  if (NULL != fRealTofPointsColl && NULL != fRealTofMatchColl) {
845  fbRealPointAvail = kTRUE;
846  LOG(info)
847  << "CbmTofHitFinderQa::RegisterInputs => Both fRealTofPointsColl & "
848  "fRealTofMatchColl there, realistic mean TOF MC point used for QA";
849  } // if( NULL != fRealTofPointsColl && NULL != fRealTofMatchColl )
850 
851  return kTRUE;
852 }
853 /************************************************************************************/
855  /*
856  Type 0: 5 RPC/SM, 24 SM, 32 ch/RPC => 3840 ch , 120 RPC ,
857  Type 1: 5 RPC/SM, 142 SM, 32 ch/RPC => 22720 ch => 26560 , 710 RPC => 830 , => 166
858  Type 3: 3 RPC/SM, 50 SM, 56 ch/RPC => 8400 ch => 34960 , 150 RPC => 980 , => 216
859  Type 4: 5 RPC/SM, 8 SM, 96 ch/RPC => 3840 ch => 38800 , 40 RPC => 1020 , => 224
860  Type 5: 5 RPC/SM, 8 SM, 96 ch/RPC => 3840 ch => 42640 , 40 RPC => 1060 , => 232
861  Type 6: 2 RPC/SM, 10 SM, 96 ch/RPC => 1920 ch => 44560 , 20 RPC => 1080 , => 242
862  */
863 
864  // Count the total number of channels and
865  // generate an array with the global channel index of the first channe in each RPC
866  Int_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
867  fvTypeSmOffs.resize(iNbSmTypes);
868  fvSmRpcOffs.resize(iNbSmTypes);
869  fvRpcChOffs.resize(iNbSmTypes);
870  iNbSmTot = 0;
871  iNbRpcTot = 0;
872  fiNbChTot = 0;
873  for (Int_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
874  Int_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
875  Int_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
876 
877  fvTypeSmOffs[iSmType] = iNbSmTot;
878  iNbSmTot += iNbSm;
879 
880  fvSmRpcOffs[iSmType].resize(iNbSm);
881  fvRpcChOffs[iSmType].resize(iNbSm);
882 
883  for (Int_t iSm = 0; iSm < iNbSm; iSm++) {
884  fvSmRpcOffs[iSmType][iSm] = iNbRpcTot;
885  iNbRpcTot += iNbRpc;
886 
887  fvRpcChOffs[iSmType][iSm].resize(iNbRpc);
888  for (Int_t iRpc = 0; iRpc < iNbRpc; iRpc++) {
889  fvRpcChOffs[iSmType][iSm][iRpc] = fiNbChTot;
890  fiNbChTot += fDigiBdfPar->GetNbChan(iSmType, iRpc);
891  } // for( Int_t iRpc = 0; iRpc < iNbRpc; iRpc++ )
892  } // for( Int_t iSm = 0; iSm < iNbSm; iSm++ )
893  } // for( Int_t iSmType = 0; iSmType < iNbSmTypes; iSmType++ )
894 
895  return kTRUE;
896 }
897 /************************************************************************************/
898 // ------------------------------------------------------------------
899 Bool_t CbmTofHitFinderQa::SetWallPosZ(Double_t dWallPosCm) {
900  fdWallPosZ = dWallPosCm;
901  LOG(info) << "CbmTofHitFinderQa::SetWallPosZ => Change histograms center on "
902  "Z axis to "
903  << dWallPosCm << " cm";
904  return kTRUE;
905 }
907  // Create histogramms
908 
909  TDirectory* oldir =
910  gDirectory; // <= To prevent histos from being sucked in by the param file of the TRootManager!
911  gROOT
912  ->cd(); // <= To prevent histos from being sucked in by the param file of the TRootManager !
913  /*
914  Double_t ymin=-1.;
915  Double_t ymax=4.;
916  Double_t ptmmax=2.5;
917  Int_t ptm_nbx=30;
918  Int_t ptm_nby=30;
919 
920  Double_t v1_nbx=20.;
921  Double_t v1_nby=20.;
922  Double_t yvmax=1.3;
923 */
924  // xy - hit densities and rates
925  Int_t nbinx = 1500;
926  Int_t nbiny = 1000;
927  Int_t nbinz = 1500;
928  Double_t xrange = 750.;
929  Double_t yrange = 500.;
930  Double_t zmin = fdWallPosZ - 50.;
931  Double_t zmax = fdWallPosZ + 150.;
932 
933  // angular densities for overlap check
934  Int_t iNbBinThetaX = 1200;
935  Double_t dThetaXMin = -60.0;
936  Double_t dThetaXMax = 60.0;
937  Int_t iNbBinThetaY = 900;
938  Double_t dThetaYMin = -45.0;
939  Double_t dThetaYMax = 45.0;
940 
941  Int_t iNbBinTheta = 180;
942  Double_t dThetaMin = 0;
943  Double_t dThetaMax = TMath::Pi() * 90 / 180;
944  Int_t iNbBinPhi = 180;
945  Double_t dPhiMin = -TMath::Pi();
946  Double_t dPhiMax = TMath::Pi();
947 
948  // Range hit deviation from MC
949  Int_t iNbBinsDeltaPos = 600;
950  Double_t dDeltaPosRange = 30; // cm
951  Int_t iNbBinsDeltaTime = 1000;
952  Double_t dDeltaTimeRange = 1000; // ps
953  Int_t iNbBinsMulti = 18;
954  Double_t iMinMulti = 2 - 0.5;
955  Double_t iMaxMulti = 19 + 0.5;
956  // Range pulls from MC
957  Int_t iNbBinsPullPos = 500;
958  Double_t dPullPosRange = 5;
959 
960  // Range Mapping
961  Int_t iNbBinsStartZ = 1250;
962  Double_t dMinStartZ = -50.0;
963  Double_t dMaxStartZ = 1200.0;
964  Int_t iNbBinsStartXY = 1200;
965  Double_t dMinStartXY = -600.0;
966  Double_t dMaxStartXY = 600.0;
967  Int_t iNbBinsCentr = 16;
968  Double_t dNbMinCentr = 0.0;
969  Double_t dNbMaxCentr = 16.0;
970 
971  // Nb Hits per event for first N events
973  new TH1I("TofTests_NbHitsPerEvent",
974  "Number of Hits per event; EventsIdx []; # [Hits]",
976  -0.5,
979  new TH1I("TofTests_NbHitsSingPntPerEvent",
980  "Number of Single Point Hits per event; EventsIdx []; # [Hits]",
982  -0.5,
985  new TH1I("TofTests_NbHitsMultPntPerEvent",
986  "Number of Multi Point Hits per event; EventsIdx []; # [Hits]",
988  -0.5,
991  new TH1I("TofTests_NbHitsSingTrkPerEvent",
992  "Number of Single Track Hits per event; EventsIdx []; # [Hits]",
994  -0.5,
997  new TH1I("TofTests_NbHitsMultTrkPerEvent",
998  "Number of Multi Track Hits per event; EventsIdx []; # [Hits]",
1000  -0.5,
1001  fuNbEventsForHitsNbPlots - 0.5);
1002  // Nb different TOF digis in Hit
1003  fhNbDigisInHit = new TH1I("TofTests_NbDigisInHit",
1004  "Number of Digis per Hit; # [Digis]",
1005  100,
1006  -0.5,
1007  100 - 0.5);
1008  fhNbDigisInHitMapXY = new TProfile2D(
1009  "TofTests_NbDigisInHitMapXY",
1010  "Number of Digis per Hit vs Position; X[cm]; Y[cm]; Mean [Digis/Hit]",
1011  nbinx,
1012  -xrange,
1013  xrange,
1014  nbiny,
1015  -yrange,
1016  yrange);
1017 
1018  // Mapping
1019  // Dependence of Track origin on centrality
1023  fvhTrackAllStartXZ.resize(kiNbPart);
1024  fvhTrackAllStartYZ.resize(kiNbPart);
1025  fvhTofPntAllAngCent.resize(kiNbPart);
1026  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
1027  // Track origin for tracks reaching TOF
1028  fvhTrackAllStartZCent[iPartIdx] = new TH2D(
1029  Form("TofTests_TrackAllStartZCent_%s", ksPartTag[iPartIdx].Data()),
1030  Form("Centrality vs Start Z distribution for MC tracks w/ TOF Pnt, %s, "
1031  "all tracks; Start Z [cm]; B [fm]; # []",
1032  ksPartName[iPartIdx].Data()),
1033  iNbBinsStartZ,
1034  dMinStartZ,
1035  dMaxStartZ,
1036  iNbBinsCentr,
1037  dNbMinCentr,
1038  dNbMaxCentr);
1039  fvhTrackSecStartZCent[iPartIdx] = new TH2D(
1040  Form("TofTests_TrackSecStartZCent_%s", ksPartTag[iPartIdx].Data()),
1041  Form("Centrality vs Start Z distribution for MC tracks w/ TOF Pnt, %s, "
1042  "secondary tracks; Start Z [cm]; B [fm]; # []",
1043  ksPartName[iPartIdx].Data()),
1044  iNbBinsStartZ,
1045  dMinStartZ,
1046  dMaxStartZ,
1047  iNbBinsCentr,
1048  dNbMinCentr,
1049  dNbMaxCentr);
1050  if (2 == iPartIdx) // 3D plot only for e-
1051  fvhTrackAllStartXZCent[iPartIdx] = new TH3D(
1052  Form("TofTests_TrackAllStartXZCent_%s", ksPartTag[iPartIdx].Data()),
1053  Form("Centrality vs Start Z distribution for MC tracks w/ TOF Pnt, %s, "
1054  "all tracks; Start X [cm]; Start Z [cm]; B [fm];",
1055  ksPartName[iPartIdx].Data()),
1056  iNbBinsStartXY / 2,
1057  dMinStartXY,
1058  dMaxStartXY,
1059  iNbBinsStartZ / 2,
1060  dMinStartZ,
1061  dMaxStartZ,
1062  iNbBinsCentr,
1063  dNbMinCentr,
1064  dNbMaxCentr);
1065  fvhTrackAllStartXZ[iPartIdx] =
1066  new TH2D(Form("TofTests_TrackAllStartXZ_%s", ksPartTag[iPartIdx].Data()),
1067  Form("Start X vs Z distribution for MC tracks w/ TOF Pnt, %s, "
1068  "all tracks; Start Z [cm]; Start X [cm]; # []",
1069  ksPartName[iPartIdx].Data()),
1070  iNbBinsStartZ / 2,
1071  dMinStartZ,
1072  dMaxStartZ,
1073  iNbBinsStartXY,
1074  dMinStartXY,
1075  dMaxStartXY);
1076  fvhTrackAllStartYZ[iPartIdx] =
1077  new TH2D(Form("TofTests_TrackAllStartYZ_%s", ksPartTag[iPartIdx].Data()),
1078  Form("Start Y vs Z distribution for MC tracks w/ TOF Pnt, %s, "
1079  "all tracks; Start Z [cm]; Start Y [cm]; # []",
1080  ksPartName[iPartIdx].Data()),
1081  iNbBinsStartZ / 2,
1082  dMinStartZ,
1083  dMaxStartZ,
1084  iNbBinsStartXY,
1085  dMinStartXY,
1086  dMaxStartXY);
1087  fvhTofPntAllAngCent[iPartIdx] =
1088  new TH3D(Form("TofTests_TofPntAllAngCent_%s", ksPartTag[iPartIdx].Data()),
1089  Form("Centrality vs Angular position of TOF Pnt, %s, all "
1090  "tracks; #theta_{x}[Deg.]; #theta_{y}[Deg.]; B [fm];",
1091  ksPartName[iPartIdx].Data()),
1092  iNbBinThetaX / 2,
1093  dThetaXMin,
1094  dThetaXMax,
1095  iNbBinThetaY / 2,
1096  dThetaYMin,
1097  dThetaYMax,
1098  iNbBinsCentr,
1099  dNbMinCentr,
1100  dNbMaxCentr);
1101  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
1102  // tracks: Only when creating normalization histos
1103  if (kTRUE == fbNormHistGenMode) {
1104  fhTrackMapXY = new TH2D("TofTests_TracksMapXY",
1105  "Position of the MC Tracks assuming along Z axis; "
1106  "X[cm]; Y[cm]; # [Tracks]",
1107  nbinx,
1108  -xrange,
1109  xrange,
1110  nbiny,
1111  -yrange,
1112  yrange);
1113  fhTrackMapXZ = new TH2D("TofTests_TracksMapXZ",
1114  "Position of the MC Tracks assuming along Z axis; "
1115  "X[cm]; Z[cm]; # [Tracks]",
1116  nbinx,
1117  -xrange,
1118  xrange,
1119  nbinz,
1120  zmin,
1121  zmax);
1122  fhTrackMapYZ = new TH2D("TofTests_TracksMapYZ",
1123  "Position of the MC Tracks assuming along Z axis; "
1124  "Y[cm]; Z[cm]; # [Tracks]",
1125  nbiny,
1126  -yrange,
1127  yrange,
1128  nbinz,
1129  zmin,
1130  zmax);
1131  fhTrackMapAng = new TH2D("TofTests_TracksMapAng",
1132  "Position of the MC Tracks assuming from origin; "
1133  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Tracks]",
1134  iNbBinThetaX,
1135  dThetaXMin,
1136  dThetaXMax,
1137  iNbBinThetaY,
1138  dThetaYMin,
1139  dThetaYMax);
1140  fhTrackMapSph = new TH2D("TofTests_TracksMapSph",
1141  "Position of the MC Tracks assuming from origin; "
1142  "#theta[rad.]; #phi[rad.]; # [Tracks]",
1143  iNbBinTheta,
1144  dThetaMin,
1145  dThetaMax,
1146  iNbBinPhi,
1147  dPhiMin,
1148  dPhiMax);
1149  } // if( kTRUE == fbNormHistGenMode )
1150  // points
1151  fhPointMapXY =
1152  new TH2D("TofTests_PointsMapXY",
1153  "Position of the Tof Points; X[cm]; Y[cm]; # [Points]",
1154  nbinx,
1155  -xrange,
1156  xrange,
1157  nbiny,
1158  -yrange,
1159  yrange);
1160  fhPointMapXZ =
1161  new TH2D("TofTests_PointsMapXZ",
1162  "Position of the Tof Points; X[cm]; Z[cm]; # [Points]",
1163  nbinx,
1164  -xrange,
1165  xrange,
1166  nbinz,
1167  zmin,
1168  zmax);
1169  fhPointMapYZ =
1170  new TH2D("TofTests_PointsMapYZ",
1171  "Position of the Tof Points; Y[cm]; Z[cm]; # [Points]",
1172  nbiny,
1173  -yrange,
1174  yrange,
1175  nbinz,
1176  zmin,
1177  zmax);
1178  fhPointMapAng = new TH2D("TofTests_PointsMapAng",
1179  "Position of the Tof Points; #theta_{x}[Deg.]; "
1180  "#theta_{y}[Deg.]; # [Points]",
1181  iNbBinThetaX,
1182  dThetaXMin,
1183  dThetaXMax,
1184  iNbBinThetaY,
1185  dThetaYMin,
1186  dThetaYMax);
1187  fhPointMapSph =
1188  new TH2D("TofTests_PointsMapSph",
1189  "Position of the Tof Points; #theta[rad.]; #phi[rad.]; # [Points]",
1190  iNbBinTheta,
1191  dThetaMin,
1192  dThetaMax,
1193  iNbBinPhi,
1194  dPhiMin,
1195  dPhiMax);
1196  // real (mean over all gaps) points
1197  fhRealPointMapXY = new TH2D(
1198  "TofTests_RealPointsMapXY",
1199  "Position of the Tof Points (mean o/ gaps); X[cm]; Y[cm]; # [Points]",
1200  nbinx,
1201  -xrange,
1202  xrange,
1203  nbiny,
1204  -yrange,
1205  yrange);
1206  fhRealPointMapXZ = new TH2D(
1207  "TofTests_RealPointsMapXZ",
1208  "Position of the Tof Points (mean o/ gaps); X[cm]; Z[cm]; # [Points]",
1209  nbinx,
1210  -xrange,
1211  xrange,
1212  nbinz,
1213  zmin,
1214  zmax);
1215  fhRealPointMapYZ = new TH2D(
1216  "TofTests_RealPointsMapYZ",
1217  "Position of the Tof Points (mean o/ gaps); Y[cm]; Z[cm]; # [Points]",
1218  nbiny,
1219  -yrange,
1220  yrange,
1221  nbinz,
1222  zmin,
1223  zmax);
1224  fhRealPointMapAng = new TH2D("TofTests_RealPointsMapAng",
1225  "Position of the Tof Points (mean o/ gaps); "
1226  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Points]",
1227  iNbBinThetaX,
1228  dThetaXMin,
1229  dThetaXMax,
1230  iNbBinThetaY,
1231  dThetaYMin,
1232  dThetaYMax);
1233  fhRealPointMapSph = new TH2D("TofTests_RealPointsMapSph",
1234  "Position of the Tof Points (mean o/ gaps); "
1235  "#theta[rad.]; #phi[rad.]; # [Points]",
1236  iNbBinTheta,
1237  dThetaMin,
1238  dThetaMax,
1239  iNbBinPhi,
1240  dPhiMin,
1241  dPhiMax);
1242  // Digis
1243  fhDigiMapXY = new TH2D("TofTests_DigisMapXY",
1244  "Position of the Tof Digis; X[cm]; Y[cm]; # [Digi]",
1245  nbinx,
1246  -xrange,
1247  xrange,
1248  nbiny,
1249  -yrange,
1250  yrange);
1251  fhDigiMapXZ = new TH2D("TofTests_DigisMapXZ",
1252  "Position of the Tof Digis; X[cm]; Z[cm]; # [Digi]",
1253  nbinx,
1254  -xrange,
1255  xrange,
1256  nbinz,
1257  zmin,
1258  zmax);
1259  fhDigiMapYZ = new TH2D("TofTests_DigisMapYZ",
1260  "Position of the Tof Digis; Y[cm]; Z[cm]; # [Digi]",
1261  nbiny,
1262  -yrange,
1263  yrange,
1264  nbinz,
1265  zmin,
1266  zmax);
1267  fhDigiMapAng = new TH2D(
1268  "TofTests_DigisMapAng",
1269  "Position of the Tof Digis; #theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Digi]",
1270  iNbBinThetaX,
1271  dThetaXMin,
1272  dThetaXMax,
1273  iNbBinThetaY,
1274  dThetaYMin,
1275  dThetaYMax);
1276  fhDigiMapSph =
1277  new TH2D("TofTests_DigisMapSph",
1278  "Position of the Tof Digis; #theta[rad.]; #phi[rad.]; # [Points]",
1279  iNbBinTheta,
1280  dThetaMin,
1281  dThetaMax,
1282  iNbBinPhi,
1283  dPhiMin,
1284  dPhiMax);
1285 
1286  // Hits
1287  fhHitMapXY = new TH2D("TofTests_HitsMapXY",
1288  "Position of the Tof Hits; X[cm]; Y[cm]; # [Hits]",
1289  nbinx,
1290  -xrange,
1291  xrange,
1292  nbiny,
1293  -yrange,
1294  yrange);
1295  fhHitMapXZ = new TH2D("TofTests_HitsMapXZ",
1296  "Position of the Tof Hits; X[cm]; Z[cm]; # [Hits]",
1297  nbinx,
1298  -xrange,
1299  xrange,
1300  nbinz,
1301  zmin,
1302  zmax);
1303  fhHitMapYZ = new TH2D("TofTests_HitsMapYZ",
1304  "Position of the Tof Hits; Y[cm]; Z[cm]; # [Hits]",
1305  nbiny,
1306  -yrange,
1307  yrange,
1308  nbinz,
1309  zmin,
1310  zmax);
1311  fhHitMapAng = new TH2D(
1312  "TofTests_HitsMapAng",
1313  "Position of the Tof Hits; #theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
1314  iNbBinThetaX,
1315  dThetaXMin,
1316  dThetaXMax,
1317  iNbBinThetaY,
1318  dThetaYMin,
1319  dThetaYMax);
1320  fhHitMapSph =
1321  new TH2D("TofTests_HitsMapSph",
1322  "Position of the Tof Hits; #theta[rad.]; #phi[rad.]; # [Points]",
1323  iNbBinTheta,
1324  dThetaMin,
1325  dThetaMax,
1326  iNbBinPhi,
1327  dPhiMin,
1328  dPhiMax);
1329 
1330  // L/R digis missmatch
1331  if (0 == fiNbChTot && kTRUE == fbHitProducerSource)
1332  fiNbChTot =
1333  1; // Should only happen when the HitProducer is used, set to 1 to avoid histogram warning
1334 
1335  fhLeftRightDigiMatch = new TH2D("TofTests_DigiMatchLR",
1336  "Matching between the left an right digi for "
1337  "strips added to hit; Global Strip Index []",
1338  fiNbChTot,
1339  0,
1340  fiNbChTot,
1341  3,
1342  -0.5,
1343  2.5);
1344  fhLeftRightDigiMatch->GetYaxis()->SetBinLabel(1, "Same MC Point");
1345  fhLeftRightDigiMatch->GetYaxis()->SetBinLabel(2, "Same MC Track");
1346  fhLeftRightDigiMatch->GetYaxis()->SetBinLabel(3, "Diff MC Track");
1347 
1348  // Nb different MC Points and Tracks in Hit
1349  fhNbPointsInHit =
1350  new TH1D("TofTests_NbPointsInHit",
1351  "Number of different MC Points in Hit; # [MC Points]",
1352  100,
1353  -0.5,
1354  99.5);
1355  fhNbTracksInHit =
1356  new TH1D("TofTests_NbTracksInHit",
1357  "Number of different MC Tracks in Hit; # [MC Tracks]",
1358  100,
1359  -0.5,
1360  99.5);
1361 
1362  // Mapping of position for hits coming from a single MC Point
1363  fhHitMapSingPntXY = new TH2D(
1364  "TofTests_HitsMapSingPntXY",
1365  "Position of the Tof Hits from a single MC Point; X[cm]; Y[cm]; # [Hits]",
1366  nbinx,
1367  -xrange,
1368  xrange,
1369  nbiny,
1370  -yrange,
1371  yrange);
1372  fhHitMapSingPntXZ = new TH2D(
1373  "TofTests_HitsMapSingPntXZ",
1374  "Position of the Tof Hits from a single MC Point; X[cm]; Z[cm]; # [Hits]",
1375  nbinx,
1376  -xrange,
1377  xrange,
1378  nbinz,
1379  zmin,
1380  zmax);
1381  fhHitMapSingPntYZ = new TH2D(
1382  "TofTests_HitsMapSingPntYZ",
1383  "Position of the Tof Hits from a single MC Point; Y[cm]; Z[cm]; # [Hits]",
1384  nbiny,
1385  -yrange,
1386  yrange,
1387  nbinz,
1388  zmin,
1389  zmax);
1391  new TH2D("TofTests_HitsMapSingPntAng",
1392  "Position of the Tof Hits from a single MC Point; "
1393  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
1394  iNbBinThetaX,
1395  dThetaXMin,
1396  dThetaXMax,
1397  iNbBinThetaY,
1398  dThetaYMin,
1399  dThetaYMax);
1400  fhHitMapSingPntSph = new TH2D("TofTests_HitsMapSingPntSph",
1401  "Position of the Tof Hits from a single MC "
1402  "Point; #theta[rad.]; #phi[rad.]; # [Points]",
1403  iNbBinTheta,
1404  dThetaMin,
1405  dThetaMax,
1406  iNbBinPhi,
1407  dPhiMin,
1408  dPhiMax);
1409  // Mapping of position for hits coming from multiple MC Points
1410  fhHitMapMultPntXY = new TH2D(
1411  "TofTests_HitsMapMultPntXY",
1412  "Position of the Tof Hits from multiple MC Points; X[cm]; Y[cm]; # [Hits]",
1413  nbinx,
1414  -xrange,
1415  xrange,
1416  nbiny,
1417  -yrange,
1418  yrange);
1419  fhHitMapMultPntXZ = new TH2D(
1420  "TofTests_HitsMapMultPntXZ",
1421  "Position of the Tof Hits from multiple MC Points; X[cm]; Z[cm]; # [Hits]",
1422  nbinx,
1423  -xrange,
1424  xrange,
1425  nbinz,
1426  zmin,
1427  zmax);
1428  fhHitMapMultPntYZ = new TH2D(
1429  "TofTests_HitsMapMultPntYZ",
1430  "Position of the Tof Hits from multiple MC Points; Y[cm]; Z[cm]; # [Hits]",
1431  nbiny,
1432  -yrange,
1433  yrange,
1434  nbinz,
1435  zmin,
1436  zmax);
1438  new TH2D("TofTests_HitsMapMultPntAng",
1439  "Position of the Tof Hits from multiple MC Points; "
1440  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
1441  iNbBinThetaX,
1442  dThetaXMin,
1443  dThetaXMax,
1444  iNbBinThetaY,
1445  dThetaYMin,
1446  dThetaYMax);
1447  fhHitMapMultPntSph = new TH2D("TofTests_HitsMapMultPntSph",
1448  "Position of the Tof Hits from multiple MC "
1449  "Points; #theta[rad.]; #phi[rad.]; # [Points]",
1450  iNbBinTheta,
1451  dThetaMin,
1452  dThetaMax,
1453  iNbBinPhi,
1454  dPhiMin,
1455  dPhiMax);
1456  // Mapping of position for hits coming from a single MC Track
1457  fhHitMapSingTrkXY = new TH2D(
1458  "TofTests_HitsMapSingTrkXY",
1459  "Position of the Tof Hits from a single MC Track; X[cm]; Y[cm]; # [Hits]",
1460  nbinx,
1461  -xrange,
1462  xrange,
1463  nbiny,
1464  -yrange,
1465  yrange);
1466  fhHitMapSingTrkXZ = new TH2D(
1467  "TofTests_HitsMapSingTrkXZ",
1468  "Position of the Tof Hits from a single MC Track; X[cm]; Z[cm]; # [Hits]",
1469  nbinx,
1470  -xrange,
1471  xrange,
1472  nbinz,
1473  zmin,
1474  zmax);
1475  fhHitMapSingTrkYZ = new TH2D(
1476  "TofTests_HitsMapSingTrkYZ",
1477  "Position of the Tof Hits from a single MC Track; Y[cm]; Z[cm]; # [Hits]",
1478  nbiny,
1479  -yrange,
1480  yrange,
1481  nbinz,
1482  zmin,
1483  zmax);
1485  new TH2D("TofTests_HitsMapSingTrkAng",
1486  "Position of the Tof Hits from a single MC Track; "
1487  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
1488  iNbBinThetaX,
1489  dThetaXMin,
1490  dThetaXMax,
1491  iNbBinThetaY,
1492  dThetaYMin,
1493  dThetaYMax);
1494  fhHitMapSingTrkSph = new TH2D("TofTests_HitsMapSingTrkSph",
1495  "Position of the Tof Hits from a single MC "
1496  "Track; #theta[rad.]; #phi[rad.]; # [Points]",
1497  iNbBinTheta,
1498  dThetaMin,
1499  dThetaMax,
1500  iNbBinPhi,
1501  dPhiMin,
1502  dPhiMax);
1503  // Mapping of position for hits coming from multiple MC Tracks
1504  fhHitMapMultTrkXY = new TH2D(
1505  "TofTests_HitsMapMultTrkXY",
1506  "Position of the Tof Hits from multiple MC Tracks; X[cm]; Y[cm]; # [Hits]",
1507  nbinx,
1508  -xrange,
1509  xrange,
1510  nbiny,
1511  -yrange,
1512  yrange);
1513  fhHitMapMultTrkXZ = new TH2D(
1514  "TofTests_HitsMapMultTrkXZ",
1515  "Position of the Tof Hits from multiple MC Tracks; X[cm]; Z[cm]; # [Hits]",
1516  nbinx,
1517  -xrange,
1518  xrange,
1519  nbinz,
1520  zmin,
1521  zmax);
1522  fhHitMapMultTrkYZ = new TH2D(
1523  "TofTests_HitsMapMultTrkYZ",
1524  "Position of the Tof Hits from multiple MC Tracks; Y[cm]; Z[cm]; # [Hits]",
1525  nbiny,
1526  -yrange,
1527  yrange,
1528  nbinz,
1529  zmin,
1530  zmax);
1532  new TH2D("TofTests_HitsMapMultTrkAng",
1533  "Position of the Tof Hits from multiple MC Tracks; "
1534  "#theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
1535  iNbBinThetaX,
1536  dThetaXMin,
1537  dThetaXMax,
1538  iNbBinThetaY,
1539  dThetaYMin,
1540  dThetaYMax);
1541  fhHitMapMultTrkSph = new TH2D("TofTests_HitsMapMultTrkSph",
1542  "Position of the Tof Hits from multiple MC "
1543  "Tracks; #theta[rad.]; #phi[rad.]; # [Points]",
1544  iNbBinTheta,
1545  dThetaMin,
1546  dThetaMax,
1547  iNbBinPhi,
1548  dPhiMin,
1549  dPhiMax);
1550 
1551 
1552  // Hit Quality for Hits coming from a single MC Point
1554  new TH1D("TofTests_SinglePointHitDeltaX",
1555  "Quality of the Tof Hits position on X axis, for hit coming from "
1556  "a single MC Point; X(Hit) - X(Point) [cm]; # [Hits]",
1557  iNbBinsDeltaPos,
1558  -dDeltaPosRange,
1559  dDeltaPosRange);
1561  new TH1D("TofTests_SinglePointHitDeltaY",
1562  "Quality of the Tof Hits position on Y axis, for hit coming from "
1563  "a single MC Point; Y(Hit) - Y(Point) [cm]; # [Hits]",
1564  iNbBinsDeltaPos,
1565  -dDeltaPosRange,
1566  dDeltaPosRange);
1568  new TH1D("TofTests_SinglePointHitDeltaZ",
1569  "Quality of the Tof Hits position on Z axis, for hit coming from "
1570  "a single MC Point; Z(Hit) - Z(Point) [cm]; # [Hits]",
1571  iNbBinsDeltaPos,
1572  -dDeltaPosRange,
1573  dDeltaPosRange);
1575  new TH1D("TofTests_SinglePointHitDeltaR",
1576  "Quality of the Tof Hits position, for hit coming from a single "
1577  "MC Point; R(Hit -> Point) [cm]; # [Hits]",
1578  iNbBinsDeltaPos,
1579  -dDeltaPosRange,
1580  dDeltaPosRange);
1582  new TH1D("TofTests_SinglePointHitDeltaT",
1583  "Quality of the Tof Hits Time, for hit coming from a single MC "
1584  "Point; T(hit) - T(Point) [ps]; # [Hits]",
1585  iNbBinsDeltaTime,
1586  -dDeltaTimeRange,
1587  dDeltaTimeRange);
1589  new TH1D("TofTests_SinglePointHitPullX",
1590  "Quality of the Tof Hits position error on X axis, for hit coming "
1591  "from a single MC Point; Pull X(Hit -> Point) []; # [Hits]",
1592  iNbBinsPullPos,
1593  -dPullPosRange,
1594  dPullPosRange);
1596  new TH1D("TofTests_SinglePointHitPullY",
1597  "Quality of the Tof Hits position error on Y axis, for hit coming "
1598  "from a single MC Point; Pull Y(Hit -> Point) []; # [Hits]",
1599  iNbBinsPullPos,
1600  -dPullPosRange,
1601  dPullPosRange);
1603  new TH1D("TofTests_SinglePointHitPullZ",
1604  "Quality of the Tof Hits position error on Z axis, for hit coming "
1605  "from a single MC Point; Pull Z(Hit -> Point) []; # [Hits]",
1606  iNbBinsPullPos,
1607  -dPullPosRange,
1608  dPullPosRange);
1610  new TH1D("TofTests_SinglePointHitPullR",
1611  "Quality of the Tof Hits position error, for hit coming from a "
1612  "single MC Point; Pull R(Hit -> Point) []; # [Hits]",
1613  iNbBinsPullPos,
1614  -dPullPosRange,
1615  dPullPosRange);
1617  new TH1D("TofTests_SinglePointHitPullT",
1618  "Quality of the Tof Hits time error, for hit coming from a single "
1619  "MC Point; Pull T(Hit -> Point) []; # [Hits]",
1620  iNbBinsPullPos,
1621  -dPullPosRange,
1622  dPullPosRange);
1624  new TH2D("TofTests_CltSzSinglePointHitPullX",
1625  "Quality of the Tof Hits position error on X axis, for hit coming "
1626  "from a single MC Point; Pull X(Hit -> Point) []; # [Hits]",
1627  iNbBinsPullPos,
1628  -dPullPosRange,
1629  dPullPosRange,
1630  32,
1631  1,
1632  33);
1634  new TH2D("TofTests_CltSzSinglePointHitPullY",
1635  "Quality of the Tof Hits position error on Y axis, for hit coming "
1636  "from a single MC Point; Pull Y(Hit -> Point) []; # [Hits]",
1637  iNbBinsPullPos,
1638  -dPullPosRange,
1639  dPullPosRange,
1640  32,
1641  1,
1642  33);
1644  new TH2D("TofTests_CltSzSinglePointHitPullZ",
1645  "Quality of the Tof Hits position error on Z axis, for hit coming "
1646  "from a single MC Point; Pull Z(Hit -> Point) []; # [Hits]",
1647  iNbBinsPullPos,
1648  -dPullPosRange,
1649  dPullPosRange,
1650  32,
1651  1,
1652  33);
1654  new TH2D("TofTests_CltSzSinglePointHitPullR",
1655  "Quality of the Tof Hits position error, for hit coming from a "
1656  "single MC Point; Pull R(Hit -> Point) []; # [Hits]",
1657  iNbBinsPullPos,
1658  -dPullPosRange,
1659  dPullPosRange,
1660  32,
1661  1,
1662  33);
1664  new TH2D("TofTests_CltSzSinglePointHitPullT",
1665  "Quality of the Tof Hits time error, for hit coming from a single "
1666  "MC Point; Pull T(Hit -> Point) []; # [Hits]",
1667  iNbBinsPullPos,
1668  -dPullPosRange,
1669  dPullPosRange,
1670  32,
1671  1,
1672  33);
1673 
1674  // Hit Quality for Hits coming from a multiple MC Points
1675  // To Point closest to Hit
1677  new TH2D("TofTests_MultiPntHitClosestDeltaX",
1678  "Quality of the Tof Hits position on X axis relative to closest "
1679  "Point, for hit coming from multiple MC Point; X(Hit) - X(Point) "
1680  "[cm]; # [Hits]; Multi [Pnt]",
1681  iNbBinsDeltaPos,
1682  -dDeltaPosRange,
1683  dDeltaPosRange,
1684  iNbBinsMulti,
1685  iMinMulti,
1686  iMaxMulti);
1688  new TH2D("TofTests_MultiPntHitClosestDeltaY",
1689  "Quality of the Tof Hits position on Y axis relative to closest "
1690  "Point, for hit coming from multiple MC Point; Y(Hit) - Y(Point) "
1691  "[cm]; # [Hits]; Multi [Pnt]",
1692  iNbBinsDeltaPos,
1693  -dDeltaPosRange,
1694  dDeltaPosRange,
1695  iNbBinsMulti,
1696  iMinMulti,
1697  iMaxMulti);
1699  new TH2D("TofTests_MultiPntHitClosestDeltaZ",
1700  "Quality of the Tof Hits position on Z axis relative to closest "
1701  "Point, for hit coming from multiple MC Point; Z(Hit) - Z(Point) "
1702  "[cm]; # [Hits]; Multi [Pnt]",
1703  iNbBinsDeltaPos,
1704  -dDeltaPosRange,
1705  dDeltaPosRange,
1706  iNbBinsMulti,
1707  iMinMulti,
1708  iMaxMulti);
1710  new TH2D("TofTests_MultiPntHitClosestDeltaR",
1711  "Quality of the Tof Hits position relative to closest Point, for "
1712  "hit coming from multiple MC Point; R(Hit -> Point) [cm]; # "
1713  "[Hits]; Multi [Pnt]",
1714  iNbBinsDeltaPos,
1715  -dDeltaPosRange,
1716  dDeltaPosRange,
1717  iNbBinsMulti,
1718  iMinMulti,
1719  iMaxMulti);
1720  fhMultiPntHitClosestDeltaT = new TH2D(
1721  "TofTests_MultiPntHitClosestDeltaT",
1722  "Quality of the Tof Hits Time relative to closest Point, for hit coming "
1723  "from multiple MC Point; T(hit) - T(Point) [ps]; # [Hits]; Multi [Pnt]",
1724  iNbBinsDeltaTime,
1725  -dDeltaTimeRange,
1726  dDeltaTimeRange,
1727  iNbBinsMulti,
1728  iMinMulti,
1729  iMaxMulti);
1731  new TH2D("TofTests_MultiPntHitClosestPullX",
1732  "Quality of the Tof Hits position error on X axis relative to "
1733  "closest Point, for hit coming from multiple MC Point; Pull X(Hit "
1734  "-> Point) []; # [Hits]; Multi [Pnt]",
1735  iNbBinsPullPos,
1736  -dPullPosRange,
1737  dPullPosRange,
1738  iNbBinsMulti,
1739  iMinMulti,
1740  iMaxMulti);
1742  new TH2D("TofTests_MultiPntHitClosestPullY",
1743  "Quality of the Tof Hits position error on Y axis relative to "
1744  "closest Point, for hit coming from multiple MC Point; Pull Y(Hit "
1745  "-> Point) []; # [Hits]; Multi [Pnt]",
1746  iNbBinsPullPos,
1747  -dPullPosRange,
1748  dPullPosRange,
1749  iNbBinsMulti,
1750  iMinMulti,
1751  iMaxMulti);
1753  new TH2D("TofTests_MultiPntHitClosestPullZ",
1754  "Quality of the Tof Hits position error on Z axis relative to "
1755  "closest Point, for hit coming from multiple MC Point; Pull Z(Hit "
1756  "-> Point) []; # [Hits]; Multi [Pnt]",
1757  iNbBinsPullPos,
1758  -dPullPosRange,
1759  dPullPosRange,
1760  iNbBinsMulti,
1761  iMinMulti,
1762  iMaxMulti);
1764  new TH2D("TofTests_MultiPntHitClosestPullR",
1765  "Quality of the Tof Hits position error relative to closest "
1766  "Point, for hit coming from multiple MC Point; Pull R(Hit -> "
1767  "Point) []; # [Hits]; Multi [Pnt]",
1768  iNbBinsPullPos,
1769  -dPullPosRange,
1770  dPullPosRange,
1771  iNbBinsMulti,
1772  iMinMulti,
1773  iMaxMulti);
1775  new TH2D("TofTests_MultiPntHitClosestPullT",
1776  "Quality of the Tof Hits time error relative to closest Point, "
1777  "for hit coming from multiple MC Point; Pull T(Hit -> Point) []; "
1778  "# [Hits]; Multi [Pnt]",
1779  iNbBinsPullPos,
1780  -dPullPosRange,
1781  dPullPosRange,
1782  iNbBinsMulti,
1783  iMinMulti,
1784  iMaxMulti);
1785  // To Point furthest from Hit
1787  new TH2D("TofTests_MultiPntHitFurthestDeltaX",
1788  "Quality of the Tof Hits position on X axis relative to furthest "
1789  "Point, for hit coming from multiple MC Point; X(Hit) - X(Point) "
1790  "[cm]; # [Hits]; Multi [Pnt]",
1791  iNbBinsDeltaPos,
1792  -dDeltaPosRange,
1793  dDeltaPosRange,
1794  iNbBinsMulti,
1795  iMinMulti,
1796  iMaxMulti);
1798  new TH2D("TofTests_MultiPntHitFurthestDeltaY",
1799  "Quality of the Tof Hits position on Y axis relative to furthest "
1800  "Point, for hit coming from multiple MC Point; Y(Hit) - Y(Point) "
1801  "[cm]; # [Hits]; Multi [Pnt]",
1802  iNbBinsDeltaPos,
1803  -dDeltaPosRange,
1804  dDeltaPosRange,
1805  iNbBinsMulti,
1806  iMinMulti,
1807  iMaxMulti);
1809  new TH2D("TofTests_MultiPntHitFurthestDeltaZ",
1810  "Quality of the Tof Hits position on Z axis relative to furthest "
1811  "Point, for hit coming from multiple MC Point; Z(Hit) - Z(Point) "
1812  "[cm]; # [Hits]; Multi [Pnt]",
1813  iNbBinsDeltaPos,
1814  -dDeltaPosRange,
1815  dDeltaPosRange,
1816  iNbBinsMulti,
1817  iMinMulti,
1818  iMaxMulti);
1820  new TH2D("TofTests_MultiPntHitFurthestDeltaR",
1821  "Quality of the Tof Hits position relative to furthest Point, for "
1822  "hit coming from multiple MC Point; R(Hit -> Point) [cm]; # "
1823  "[Hits]; Multi [Pnt]",
1824  iNbBinsDeltaPos,
1825  -dDeltaPosRange,
1826  dDeltaPosRange,
1827  iNbBinsMulti,
1828  iMinMulti,
1829  iMaxMulti);
1830  fhMultiPntHitFurthestDeltaT = new TH2D(
1831  "TofTests_MultiPntHitFurthestDeltaT",
1832  "Quality of the Tof Hits Time relative to furthest Point, for hit coming "
1833  "from multiple MC Point; T(hit) - T(Point) [ps]; # [Hits]; Multi [Pnt]",
1834  iNbBinsDeltaTime,
1835  -dDeltaTimeRange,
1836  dDeltaTimeRange,
1837  iNbBinsMulti,
1838  iMinMulti,
1839  iMaxMulti);
1841  new TH2D("TofTests_MultiPntHitFurthestPullX",
1842  "Quality of the Tof Hits position error on X axis relative to "
1843  "furthest Point, for hit coming from multiple MC Point; Pull "
1844  "X(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1845  iNbBinsPullPos,
1846  -dPullPosRange,
1847  dPullPosRange,
1848  iNbBinsMulti,
1849  iMinMulti,
1850  iMaxMulti);
1852  new TH2D("TofTests_MultiPntHitFurthestPullY",
1853  "Quality of the Tof Hits position error on Y axis relative to "
1854  "furthest Point, for hit coming from multiple MC Point; Pull "
1855  "Y(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1856  iNbBinsPullPos,
1857  -dPullPosRange,
1858  dPullPosRange,
1859  iNbBinsMulti,
1860  iMinMulti,
1861  iMaxMulti);
1863  new TH2D("TofTests_MultiPntHitFurthestPullZ",
1864  "Quality of the Tof Hits position error on Z axis relative to "
1865  "furthest Point, for hit coming from multiple MC Point; Pull "
1866  "Z(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1867  iNbBinsPullPos,
1868  -dPullPosRange,
1869  dPullPosRange,
1870  iNbBinsMulti,
1871  iMinMulti,
1872  iMaxMulti);
1874  new TH2D("TofTests_MultiPntHitFurthestPullR",
1875  "Quality of the Tof Hits position error relative to furthest "
1876  "Point, for hit coming from multiple MC Point; Pull R(Hit -> "
1877  "Point) []; # [Hits]; Multi [Pnt]",
1878  iNbBinsPullPos,
1879  -dPullPosRange,
1880  dPullPosRange,
1881  iNbBinsMulti,
1882  iMinMulti,
1883  iMaxMulti);
1885  new TH2D("TofTests_MultiPntHitFurthestPullT",
1886  "Quality of the Tof Hits time error relative to furthest Point, "
1887  "for hit coming from multiple MC Point; Pull T(Hit -> Point) []; "
1888  "# [Hits]; Multi [Pnt]",
1889  iNbBinsPullPos,
1890  -dPullPosRange,
1891  dPullPosRange,
1892  iNbBinsMulti,
1893  iMinMulti,
1894  iMaxMulti);
1895  // To mean Point position
1897  new TH2D("TofTests_MultiPntHitMeanDeltaX",
1898  "Quality of the Tof Hits position on X axis relative to mean "
1899  "Point position, for hit coming from multiple MC Point; X(Hit) - "
1900  "X(Point) [cm]; # [Hits]; Multi [Pnt]",
1901  iNbBinsDeltaPos,
1902  -dDeltaPosRange,
1903  dDeltaPosRange,
1904  iNbBinsMulti,
1905  iMinMulti,
1906  iMaxMulti);
1908  new TH2D("TofTests_MultiPntHitMeanDeltaY",
1909  "Quality of the Tof Hits position on Y axis relative to mean "
1910  "Point position, for hit coming from multiple MC Point; Y(Hit) - "
1911  "Y(Point) [cm]; # [Hits]; Multi [Pnt]",
1912  iNbBinsDeltaPos,
1913  -dDeltaPosRange,
1914  dDeltaPosRange,
1915  iNbBinsMulti,
1916  iMinMulti,
1917  iMaxMulti);
1919  new TH2D("TofTests_MultiPntHitMeanDeltaZ",
1920  "Quality of the Tof Hits position on Z axis relative to mean "
1921  "Point position, for hit coming from multiple MC Point; Z(Hit) - "
1922  "Z(Point) [cm]; # [Hits]; Multi [Pnt]",
1923  iNbBinsDeltaPos,
1924  -dDeltaPosRange,
1925  dDeltaPosRange,
1926  iNbBinsMulti,
1927  iMinMulti,
1928  iMaxMulti);
1930  new TH2D("TofTests_MultiPntHitMeanDeltaR",
1931  "Quality of the Tof Hits position relative to mean Point "
1932  "position, for hit coming from multiple MC Point; R(Hit -> Point) "
1933  "[cm]; # [Hits]; Multi [Pnt]",
1934  iNbBinsDeltaPos,
1935  -dDeltaPosRange,
1936  dDeltaPosRange,
1937  iNbBinsMulti,
1938  iMinMulti,
1939  iMaxMulti);
1940  fhMultiPntHitMeanDeltaT = new TH2D(
1941  "TofTests_MultiPntHitMeanDeltaT",
1942  "Quality of the Tof Hits Time relative to mean Point time, for hit coming "
1943  "from multiple MC Point; T(hit) - T(Point) [ps]; # [Hits]; Multi [Pnt]",
1944  iNbBinsDeltaTime,
1945  -dDeltaTimeRange,
1946  dDeltaTimeRange,
1947  iNbBinsMulti,
1948  iMinMulti,
1949  iMaxMulti);
1951  new TH2D("TofTests_MultiPntHitMeanPullX",
1952  "Quality of the Tof Hits position error on X axis relative to "
1953  "mean Point position, for hit coming from multiple MC Point; Pull "
1954  "X(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1955  iNbBinsPullPos,
1956  -dPullPosRange,
1957  dPullPosRange,
1958  iNbBinsMulti,
1959  iMinMulti,
1960  iMaxMulti);
1962  new TH2D("TofTests_MultiPntHitMeanPullY",
1963  "Quality of the Tof Hits position error on Y axis relative to "
1964  "mean Point position, for hit coming from multiple MC Point; Pull "
1965  "Y(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1966  iNbBinsPullPos,
1967  -dPullPosRange,
1968  dPullPosRange,
1969  iNbBinsMulti,
1970  iMinMulti,
1971  iMaxMulti);
1973  new TH2D("TofTests_MultiPntHitMeanPullZ",
1974  "Quality of the Tof Hits position error on Z axis relative to "
1975  "mean Point position, for hit coming from multiple MC Point; Pull "
1976  "Z(Hit -> Point) []; # [Hits]; Multi [Pnt]",
1977  iNbBinsPullPos,
1978  -dPullPosRange,
1979  dPullPosRange,
1980  iNbBinsMulti,
1981  iMinMulti,
1982  iMaxMulti);
1984  new TH2D("TofTests_MultiPntHitMeanPullR",
1985  "Quality of the Tof Hits position error relative to mean Point "
1986  "position, for hit coming from multiple MC Point; Pull R(Hit -> "
1987  "Point) []; # [Hits]; Multi [Pnt]",
1988  iNbBinsPullPos,
1989  -dPullPosRange,
1990  dPullPosRange,
1991  iNbBinsMulti,
1992  iMinMulti,
1993  iMaxMulti);
1995  new TH2D("TofTests_MultiPntHitMeanPullT",
1996  "Quality of the Tof Hits time error relative to mean Point time, "
1997  "for hit coming from multiple MC Point; Pull T(Hit -> Point) []; "
1998  "# [Hits]; Multi [Pnt]",
1999  iNbBinsPullPos,
2000  -dPullPosRange,
2001  dPullPosRange,
2002  iNbBinsMulti,
2003  iMinMulti,
2004  iMaxMulti);
2005  // To best Point (highest TOT contribution
2007  new TH2D("TofTests_MultiPntHitBestDeltaX",
2008  "Quality of the Tof Hits position on X axis relative to best "
2009  "Point position, for hit coming from multiple MC Point; X(Hit) - "
2010  "X(Point) [cm]; # [Hits]; Multi [Pnt]",
2011  iNbBinsDeltaPos,
2012  -dDeltaPosRange,
2013  dDeltaPosRange,
2014  iNbBinsMulti,
2015  iMinMulti,
2016  iMaxMulti);
2018  new TH2D("TofTests_MultiPntHitBestDeltaY",
2019  "Quality of the Tof Hits position on Y axis relative to best "
2020  "Point position, for hit coming from multiple MC Point; Y(Hit) - "
2021  "Y(Point) [cm]; # [Hits]; Multi [Pnt]",
2022  iNbBinsDeltaPos,
2023  -dDeltaPosRange,
2024  dDeltaPosRange,
2025  iNbBinsMulti,
2026  iMinMulti,
2027  iMaxMulti);
2029  new TH2D("TofTests_MultiPntHitBestDeltaZ",
2030  "Quality of the Tof Hits position on Z axis relative to best "
2031  "Point position, for hit coming from multiple MC Point; Z(Hit) - "
2032  "Z(Point) [cm]; # [Hits]; Multi [Pnt]",
2033  iNbBinsDeltaPos,
2034  -dDeltaPosRange,
2035  dDeltaPosRange,
2036  iNbBinsMulti,
2037  iMinMulti,
2038  iMaxMulti);
2040  new TH2D("TofTests_MultiPntHitBestDeltaR",
2041  "Quality of the Tof Hits position relative to best Point "
2042  "position, for hit coming from multiple MC Point; R(Hit -> Point) "
2043  "[cm]; # [Hits]; Multi [Pnt]",
2044  iNbBinsDeltaPos,
2045  -dDeltaPosRange,
2046  dDeltaPosRange,
2047  iNbBinsMulti,
2048  iMinMulti,
2049  iMaxMulti);
2050  fhMultiPntHitBestDeltaT = new TH2D(
2051  "TofTests_MultiPntHitBestDeltaT",
2052  "Quality of the Tof Hits Time relative to best Point time, for hit coming "
2053  "from multiple MC Point; T(hit) - T(Point) [ps]; # [Hits]; Multi [Pnt]",
2054  iNbBinsDeltaTime,
2055  -dDeltaTimeRange,
2056  dDeltaTimeRange,
2057  iNbBinsMulti,
2058  iMinMulti,
2059  iMaxMulti);
2061  new TH2D("TofTests_MultiPntHitBestPullX",
2062  "Quality of the Tof Hits position error on X axis relative to "
2063  "best Point position, for hit coming from multiple MC Point; Pull "
2064  "X(Hit -> Point) []; # [Hits]; Multi [Pnt]",
2065  iNbBinsPullPos,
2066  -dPullPosRange,
2067  dPullPosRange,
2068  iNbBinsMulti,
2069  iMinMulti,
2070  iMaxMulti);
2072  new TH2D("TofTests_MultiPntHitBestPullY",
2073  "Quality of the Tof Hits position error on Y axis relative to "
2074  "best Point position, for hit coming from multiple MC Point; Pull "
2075  "Y(Hit -> Point) []; # [Hits]; Multi [Pnt]",
2076  iNbBinsPullPos,
2077  -dPullPosRange,
2078  dPullPosRange,
2079  iNbBinsMulti,
2080  iMinMulti,
2081  iMaxMulti);
2083  new TH2D("TofTests_MultiPntHitBestPullZ",
2084  "Quality of the Tof Hits position error on Z axis relative to "
2085  "best Point position, for hit coming from multiple MC Point; Pull "
2086  "Z(Hit -> Point) []; # [Hits]; Multi [Pnt]",
2087  iNbBinsPullPos,
2088  -dPullPosRange,
2089  dPullPosRange,
2090  iNbBinsMulti,
2091  iMinMulti,
2092  iMaxMulti);
2094  new TH2D("TofTests_MultiPntHitBestPullR",
2095  "Quality of the Tof Hits position error relative to best Point "
2096  "position, for hit coming from multiple MC Point; Pull R(Hit -> "
2097  "Point) []; # [Hits]; Multi [Pnt]",
2098  iNbBinsPullPos,
2099  -dPullPosRange,
2100  dPullPosRange,
2101  iNbBinsMulti,
2102  iMinMulti,
2103  iMaxMulti);
2105  new TH2D("TofTests_MultiPntHitBestPullT",
2106  "Quality of the Tof Hits time error relative to best Point time, "
2107  "for hit coming from multiple MC Point; Pull T(Hit -> Point) []; "
2108  "# [Hits]; Multi [Pnt]",
2109  iNbBinsPullPos,
2110  -dPullPosRange,
2111  dPullPosRange,
2112  iNbBinsMulti,
2113  iMinMulti,
2114  iMaxMulti);
2115 
2116  // Hit Quality for Hits coming from a single MC Track
2118  new TH1D("TofTests_SingleTrackHitDeltaX",
2119  "Quality of the Tof Hits position on X axis, for hit coming from "
2120  "a single MC Track; X(Hit) - X(Track) [cm]; # [Hits]",
2121  iNbBinsDeltaPos,
2122  -dDeltaPosRange,
2123  dDeltaPosRange);
2125  new TH1D("TofTests_SingleTrackHitDeltaY",
2126  "Quality of the Tof Hits position on Y axis, for hit coming from "
2127  "a single MC Track; Y(Hit) - X(Track) [cm]; # [Hits]",
2128  iNbBinsDeltaPos,
2129  -dDeltaPosRange,
2130  dDeltaPosRange);
2132  new TH1D("TofTests_SingleTrackHitDeltaZ",
2133  "Quality of the Tof Hits position on Z axis, for hit coming from "
2134  "a single MC Track; Z(Hit) - X(Track) [cm]; # [Hits]",
2135  iNbBinsDeltaPos,
2136  -dDeltaPosRange,
2137  dDeltaPosRange);
2139  new TH1D("TofTests_SingleTrackHitDeltaR",
2140  "Quality of the Tof Hits position, for hit coming from a single "
2141  "MC Track; R(Hit -> Track) [cm]; # [Hits]",
2142  iNbBinsDeltaPos,
2143  -dDeltaPosRange,
2144  dDeltaPosRange);
2146  new TH1D("TofTests_SingleTrackHitDeltaT",
2147  "Quality of the Tof Hits Time, for hit coming from a single MC "
2148  "Track; T(hit) - T(Track) [ps]; # [Hits]",
2149  iNbBinsDeltaTime,
2150  -dDeltaTimeRange,
2151  dDeltaTimeRange);
2153  new TH1D("TofTests_SingleTrackHitPullX",
2154  "Quality of the Tof Hits position error on X axis, for hit coming "
2155  "from a single MC Track; Pull X(Hit -> Track) []; # [Hits]",
2156  iNbBinsPullPos,
2157  -dPullPosRange,
2158  dPullPosRange);
2160  new TH1D("TofTests_SingleTrackHitPullY",
2161  "Quality of the Tof Hits position error on Y axis, for hit coming "
2162  "from a single MC Track; Y(Hit) - X(Track) []; # [Hits]",
2163  iNbBinsPullPos,
2164  -dPullPosRange,
2165  dPullPosRange);
2167  new TH1D("TofTests_SingleTrackHitPullZ",
2168  "Quality of the Tof Hits position error on Z axis, for hit coming "
2169  "from a single MC Track; Z(Hit) - X(Track) []; # [Hits]",
2170  iNbBinsPullPos,
2171  -dPullPosRange,
2172  dPullPosRange);
2174  new TH1D("TofTests_SingleTrackHitPullR",
2175  "Quality of the Tof Hits position error, for hit coming from a "
2176  "single MC Track; Pull R(Hit -> Track) []; # [Hits]",
2177  iNbBinsPullPos,
2178  -dPullPosRange,
2179  dPullPosRange);
2181  new TH1D("TofTests_SingleTrackHitPullT",
2182  "Quality of the Tof Hits time error, for hit coming from a single "
2183  "MC Track; Pull T(Hit -> Track) []; # [Hits]",
2184  iNbBinsPullPos,
2185  -dPullPosRange,
2186  dPullPosRange);
2187 
2188  // Hit Quality for Hits coming from a single MC Track but multiple points
2190  new TH1D("TofTests_SingTrkMultiPntHitDeltaX",
2191  "Quality of the Tof Hits position on X axis, for hit coming from "
2192  "a single MC Track; X(Hit) - X(Track) [cm]; # [Hits]",
2193  iNbBinsDeltaPos,
2194  -dDeltaPosRange,
2195  dDeltaPosRange);
2197  new TH1D("TofTests_SingTrkMultiPntHitDeltaY",
2198  "Quality of the Tof Hits position on Y axis, for hit coming from "
2199  "a single MC Track; Y(Hit) - X(Track) [cm]; # [Hits]",
2200  iNbBinsDeltaPos,
2201  -dDeltaPosRange,
2202  dDeltaPosRange);
2204  new TH1D("TofTests_SingTrkMultiPntHitDeltaZ",
2205  "Quality of the Tof Hits position on Z axis, for hit coming from "
2206  "a single MC Track; Z(Hit) - X(Track) [cm]; # [Hits]",
2207  iNbBinsDeltaPos,
2208  -dDeltaPosRange,
2209  dDeltaPosRange);
2211  new TH1D("TofTests_SingTrkMultiPntHitDeltaR",
2212  "Quality of the Tof Hits position, for hit coming from a single "
2213  "MC Track; R(Hit -> Track) [cm]; # [Hits]",
2214  iNbBinsDeltaPos,
2215  -dDeltaPosRange,
2216  dDeltaPosRange);
2218  new TH1D("TofTests_SingTrkMultiPntHitDeltaT",
2219  "Quality of the Tof Hits Time, for hit coming from a single MC "
2220  "Track; T(hit) - T(Track) [ps]; # [Hits]",
2221  iNbBinsDeltaTime,
2222  -dDeltaTimeRange,
2223  dDeltaTimeRange);
2225  new TH1D("TofTests_SingTrkMultiPntHitPullX",
2226  "Quality of the Tof Hits position error on X axis, for hit coming "
2227  "from a single MC Track; Pull X(Hit -> Track) []; # [Hits]",
2228  iNbBinsPullPos,
2229  -dPullPosRange,
2230  dPullPosRange);
2232  new TH1D("TofTests_SingTrkMultiPntHitPullY",
2233  "Quality of the Tof Hits position error on Y axis, for hit coming "
2234  "from a single MC Track; Y(Hit) - X(Track) []; # [Hits]",
2235  iNbBinsPullPos,
2236  -dPullPosRange,
2237  dPullPosRange);
2239  new TH1D("TofTests_SingTrkMultiPntHitPullZ",
2240  "Quality of the Tof Hits position error on Z axis, for hit coming "
2241  "from a single MC Track; Z(Hit) - X(Track) []; # [Hits]",
2242  iNbBinsPullPos,
2243  -dPullPosRange,
2244  dPullPosRange);
2246  new TH1D("TofTests_SingTrkMultiPntHitPullR",
2247  "Quality of the Tof Hits position error, for hit coming from a "
2248  "single MC Track; Pull R(Hit -> Track) []; # [Hits]",
2249  iNbBinsPullPos,
2250  -dPullPosRange,
2251  dPullPosRange);
2253  new TH1D("TofTests_SingTrkMultiPntHitPullT",
2254  "Quality of the Tof Hits time error, for hit coming from a single "
2255  "MC Track; Pull T(Hit -> Track) []; # [Hits]",
2256  iNbBinsPullPos,
2257  -dPullPosRange,
2258  dPullPosRange);
2259 
2260  // Hit Quality for Hits coming from a multiple MC Tracks
2261  // To Point closest to Hit
2263  new TH2D("TofTests_MultiTrkHitClosestDeltaX",
2264  "Quality of the Tof Hits position on X axis relative to closest "
2265  "Track, for hit coming from multiple MC Track; X(Hit) - X(Track) "
2266  "[cm]; # [Hits]; Multi [Trk]",
2267  iNbBinsDeltaPos,
2268  -dDeltaPosRange,
2269  dDeltaPosRange,
2270  iNbBinsMulti,
2271  iMinMulti,
2272  iMaxMulti);
2274  new TH2D("TofTests_MultiTrkHitClosestDeltaY",
2275  "Quality of the Tof Hits position on Y axis relative to closest "
2276  "Track, for hit coming from multiple MC Track; Y(Hit) - Y(Track) "
2277  "[cm]; # [Hits]; Multi [Trk]",
2278  iNbBinsDeltaPos,
2279  -dDeltaPosRange,
2280  dDeltaPosRange,
2281  iNbBinsMulti,
2282  iMinMulti,
2283  iMaxMulti);
2285  new TH2D("TofTests_MultiTrkHitClosestDeltaZ",
2286  "Quality of the Tof Hits position on Z axis relative to closest "
2287  "Track, for hit coming from multiple MC Track; Z(Hit) - Z(Track) "
2288  "[cm]; # [Hits]; Multi [Trk]",
2289  iNbBinsDeltaPos,
2290  -dDeltaPosRange,
2291  dDeltaPosRange,
2292  iNbBinsMulti,
2293  iMinMulti,
2294  iMaxMulti);
2296  new TH2D("TofTests_MultiTrkHitClosestDeltaR",
2297  "Quality of the Tof Hits position relative to closest Track, for "
2298  "hit coming from multiple MC Track; R(Hit -> Track) [cm]; # "
2299  "[Hits]; Multi [Trk]",
2300  iNbBinsDeltaPos,
2301  -dDeltaPosRange,
2302  dDeltaPosRange,
2303  iNbBinsMulti,
2304  iMinMulti,
2305  iMaxMulti);
2306  fhMultiTrkHitClosestDeltaT = new TH2D(
2307  "TofTests_MultiTrkHitClosestDeltaT",
2308  "Quality of the Tof Hits Time relative to closest Track, for hit coming "
2309  "from multiple MC Track; T(hit) - T(Track) [ps]; # [Hits]; Multi [Trk]",
2310  iNbBinsDeltaTime,
2311  -dDeltaTimeRange,
2312  dDeltaTimeRange,
2313  iNbBinsMulti,
2314  iMinMulti,
2315  iMaxMulti);
2317  new TH2D("TofTests_MultiTrkHitClosestPullX",
2318  "Quality of the Tof Hits position error on X axis relative to "
2319  "closest Track, for hit coming from multiple MC Track; Pull X(Hit "
2320  "-> Track) []; # [Hits]; Multi [Trk]",
2321  iNbBinsPullPos,
2322  -dPullPosRange,
2323  dPullPosRange,
2324  iNbBinsMulti,
2325  iMinMulti,
2326  iMaxMulti);
2328  new TH2D("TofTests_MultiTrkHitClosestPullY",
2329  "Quality of the Tof Hits position error on Y axis relative to "
2330  "closest Track, for hit coming from multiple MC Track; Pull Y(Hit "
2331  "-> Track) []; # [Hits]; Multi [Trk]",
2332  iNbBinsPullPos,
2333  -dPullPosRange,
2334  dPullPosRange,
2335  iNbBinsMulti,
2336  iMinMulti,
2337  iMaxMulti);
2339  new TH2D("TofTests_MultiTrkHitClosestPullZ",
2340  "Quality of the Tof Hits position error on Z axis relative to "
2341  "closest Track, for hit coming from multiple MC Track; Pull Z(Hit "
2342  "-> Track) []; # [Hits]; Multi [Trk]",
2343  iNbBinsPullPos,
2344  -dPullPosRange,
2345  dPullPosRange,
2346  iNbBinsMulti,
2347  iMinMulti,
2348  iMaxMulti);
2350  new TH2D("TofTests_MultiTrkHitClosestPullR",
2351  "Quality of the Tof Hits position error relative to closest "
2352  "Track, for hit coming from multiple MC Track; Pull R(Hit -> "
2353  "Track) []; # [Hits]; Multi [Trk]",
2354  iNbBinsPullPos,
2355  -dPullPosRange,
2356  dPullPosRange,
2357  iNbBinsMulti,
2358  iMinMulti,
2359  iMaxMulti);
2361  new TH2D("TofTests_MultiTrkHitClosestPullT",
2362  "Quality of the Tof Hits time error relative to closest Track, "
2363  "for hit coming from multiple MC Track; Pull T(Hit -> Track) []; "
2364  "# [Hits]; Multi [Trk]",
2365  iNbBinsPullPos,
2366  -dPullPosRange,
2367  dPullPosRange,
2368  iNbBinsMulti,
2369  iMinMulti,
2370  iMaxMulti);
2371  // To Track furthest from Hit
2373  new TH2D("TofTests_MultiTrkHitFurthestDeltaX",
2374  "Quality of the Tof Hits position on X axis relative to furthest "
2375  "Track, for hit coming from multiple MC Track; X(Hit) - X(Track) "
2376  "[cm]; # [Hits]; Multi [Trk]",
2377  iNbBinsDeltaPos,
2378  -dDeltaPosRange,
2379  dDeltaPosRange,
2380  iNbBinsMulti,
2381  iMinMulti,
2382  iMaxMulti);
2384  new TH2D("TofTests_MultiTrkHitFurthestDeltaY",
2385  "Quality of the Tof Hits position on Y axis relative to furthest "
2386  "Track, for hit coming from multiple MC Track; Y(Hit) - Y(Track) "
2387  "[cm]; # [Hits]; Multi [Trk]",
2388  iNbBinsDeltaPos,
2389  -dDeltaPosRange,
2390  dDeltaPosRange,
2391  iNbBinsMulti,
2392  iMinMulti,
2393  iMaxMulti);
2395  new TH2D("TofTests_MultiTrkHitFurthestDeltaZ",
2396  "Quality of the Tof Hits position on Z axis relative to furthest "
2397  "Track, for hit coming from multiple MC Track; Z(Hit) - Z(Track) "
2398  "[cm]; # [Hits]; Multi [Trk]",
2399  iNbBinsDeltaPos,
2400  -dDeltaPosRange,
2401  dDeltaPosRange,
2402  iNbBinsMulti,
2403  iMinMulti,
2404  iMaxMulti);
2406  new TH2D("TofTests_MultiTrkHitFurthestDeltaR",
2407  "Quality of the Tof Hits position relative to furthest Track, for "
2408  "hit coming from multiple MC Track; R(Hit -> Track) [cm]; # "
2409  "[Hits]; Multi [Trk]",
2410  iNbBinsDeltaPos,
2411  -dDeltaPosRange,
2412  dDeltaPosRange,
2413  iNbBinsMulti,
2414  iMinMulti,
2415  iMaxMulti);
2416  fhMultiTrkHitFurthestDeltaT = new TH2D(
2417  "TofTests_MultiTrkHitFurthestDeltaT",
2418  "Quality of the Tof Hits Time relative to furthest Track, for hit coming "
2419  "from multiple MC Track; T(hit) - T(Track) [ps]; # [Hits]; Multi [Trk]",
2420  iNbBinsDeltaTime,
2421  -dDeltaTimeRange,
2422  dDeltaTimeRange,
2423  iNbBinsMulti,
2424  iMinMulti,
2425  iMaxMulti);
2427  new TH2D("TofTests_MultiTrkHitFurthestPullX",
2428  "Quality of the Tof Hits position error on X axis relative to "
2429  "furthest Track, for hit coming from multiple MC Track; Pull "
2430  "X(Hit -> Track) []; # [Hits]; Multi [Trk]",
2431  iNbBinsPullPos,
2432  -dPullPosRange,
2433  dPullPosRange,
2434  iNbBinsMulti,
2435  iMinMulti,
2436  iMaxMulti);
2438  new TH2D("TofTests_MultiTrkHitFurthestPullY",
2439  "Quality of the Tof Hits position error on Y axis relative to "
2440  "furthest Track, for hit coming from multiple MC Track; Pull "
2441  "Y(Hit -> Track) []; # [Hits]; Multi [Trk]",
2442  iNbBinsPullPos,
2443  -dPullPosRange,
2444  dPullPosRange,
2445  iNbBinsMulti,
2446  iMinMulti,
2447  iMaxMulti);
2449  new TH2D("TofTests_MultiTrkHitFurthestPullZ",
2450  "Quality of the Tof Hits position error on Z axis relative to "
2451  "furthest Track, for hit coming from multiple MC Track; Pull "
2452  "Z(Hit -> Track) []; # [Hits]; Multi [Trk]",
2453  iNbBinsPullPos,
2454  -dPullPosRange,
2455  dPullPosRange,
2456  iNbBinsMulti,
2457  iMinMulti,
2458  iMaxMulti);
2460  new TH2D("TofTests_MultiTrkHitFurthestPullR",
2461  "Quality of the Tof Hits position error relative to furthest "
2462  "Track, for hit coming from multiple MC Track; Pull R(Hit -> "
2463  "Track) []; # [Hits]; Multi [Trk]",
2464  iNbBinsPullPos,
2465  -dPullPosRange,
2466  dPullPosRange,
2467  iNbBinsMulti,
2468  iMinMulti,
2469  iMaxMulti);
2471  new TH2D("TofTests_MultiTrkHitFurthestPullT",
2472  "Quality of the Tof Hits time error relative to furthest Track, "
2473  "for hit coming from multiple MC Track; Pull T(Hit -> Track) []; "
2474  "# [Hits]; Multi [Trk]",
2475  iNbBinsPullPos,
2476  -dPullPosRange,
2477  dPullPosRange,
2478  iNbBinsMulti,
2479  iMinMulti,
2480  iMaxMulti);
2481  // To mean Track position
2483  new TH2D("TofTests_MultiTrkHitMeanDeltaX",
2484  "Quality of the Tof Hits position on X axis relative to mean "
2485  "Track position, for hit coming from multiple MC Track; X(Hit) - "
2486  "X(Track) [cm]; # [Hits]; Multi [Trk]",
2487  iNbBinsDeltaPos,
2488  -dDeltaPosRange,
2489  dDeltaPosRange,
2490  iNbBinsMulti,
2491  iMinMulti,
2492  iMaxMulti);
2494  new TH2D("TofTests_MultiTrkHitMeanDeltaY",
2495  "Quality of the Tof Hits position on Y axis relative to mean "
2496  "Track position, for hit coming from multiple MC Track; Y(Hit) - "
2497  "Y(Track) [cm]; # [Hits]; Multi [Trk]",
2498  iNbBinsDeltaPos,
2499  -dDeltaPosRange,
2500  dDeltaPosRange,
2501  iNbBinsMulti,
2502  iMinMulti,
2503  iMaxMulti);
2505  new TH2D("TofTests_MultiTrkHitMeanDeltaZ",
2506  "Quality of the Tof Hits position on Z axis relative to mean "
2507  "Track position, for hit coming from multiple MC Track; Z(Hit) - "
2508  "Z(Track) [cm]; # [Hits]; Multi [Trk]",
2509  iNbBinsDeltaPos,
2510  -dDeltaPosRange,
2511  dDeltaPosRange,
2512  iNbBinsMulti,
2513  iMinMulti,
2514  iMaxMulti);
2516  new TH2D("TofTests_MultiTrkHitMeanDeltaR",
2517  "Quality of the Tof Hits position relative to mean Track "
2518  "position, for hit coming from multiple MC Track; R(Hit -> Track) "
2519  "[cm]; # [Hits]; Multi [Trk]",
2520  iNbBinsDeltaPos,
2521  -dDeltaPosRange,
2522  dDeltaPosRange,
2523  iNbBinsMulti,
2524  iMinMulti,
2525  iMaxMulti);
2526  fhMultiTrkHitMeanDeltaT = new TH2D(
2527  "TofTests_MultiTrkHitMeanDeltaT",
2528  "Quality of the Tof Hits Time relative to mean Track time, for hit coming "
2529  "from multiple MC Track; T(hit) - T(Track) [ps]; # [Hits]; Multi [Trk]",
2530  iNbBinsDeltaTime,
2531  -dDeltaTimeRange,
2532  dDeltaTimeRange,
2533  iNbBinsMulti,
2534  iMinMulti,
2535  iMaxMulti);
2537  new TH2D("TofTests_MultiTrkHitMeanPullX",
2538  "Quality of the Tof Hits position error on X axis relative to "
2539  "mean Track position, for hit coming from multiple MC Track; Pull "
2540  "X(Hit -> Track) []; # [Hits]; Multi [Trk]",
2541  iNbBinsPullPos,
2542  -dPullPosRange,
2543  dPullPosRange,
2544  iNbBinsMulti,
2545  iMinMulti,
2546  iMaxMulti);
2548  new TH2D("TofTests_MultiTrkHitMeanPullY",
2549  "Quality of the Tof Hits position error on Y axis relative to "
2550  "mean Track position, for hit coming from multiple MC Track; Pull "
2551  "Y(Hit -> Track) []; # [Hits]; Multi [Trk]",
2552  iNbBinsPullPos,
2553  -dPullPosRange,
2554  dPullPosRange,
2555  iNbBinsMulti,
2556  iMinMulti,
2557  iMaxMulti);
2559  new TH2D("TofTests_MultiTrkHitMeanPullZ",
2560  "Quality of the Tof Hits position error on Z axis relative to "
2561  "mean Track position, for hit coming from multiple MC Track; Pull "
2562  "Z(Hit -> Track) []; # [Hits]; Multi [Trk]",
2563  iNbBinsPullPos,
2564  -dPullPosRange,
2565  dPullPosRange,
2566  iNbBinsMulti,
2567  iMinMulti,
2568  iMaxMulti);
2570  new TH2D("TofTests_MultiTrkHitMeanPullR",
2571  "Quality of the Tof Hits position error relative to mean Track "
2572  "position, for hit coming from multiple MC Track; Pull R(Hit -> "
2573  "Track) []; # [Hits]; Multi [Trk]",
2574  iNbBinsPullPos,
2575  -dPullPosRange,
2576  dPullPosRange,
2577  iNbBinsMulti,
2578  iMinMulti,
2579  iMaxMulti);
2581  new TH2D("TofTests_MultiTrkHitMeanPullT",
2582  "Quality of the Tof Hits time error relative to mean Track "
2583  "position, for hit coming from multiple MC Track; Pull T(Hit -> "
2584  "Track) []; # [Hits]; Multi [Trk]",
2585  iNbBinsPullPos,
2586  -dPullPosRange,
2587  dPullPosRange,
2588  iNbBinsMulti,
2589  iMinMulti,
2590  iMaxMulti);
2591  // To best Track (Highest TOT contribution)
2593  new TH2D("TofTests_MultiTrkHitBestDeltaX",
2594  "Quality of the Tof Hits position on X axis relative to best "
2595  "Track position, for hit coming from multiple MC Track; X(Hit) - "
2596  "X(Track) [cm]; # [Hits]; Multi [Trk]",
2597  iNbBinsDeltaPos,
2598  -dDeltaPosRange,
2599  dDeltaPosRange,
2600  iNbBinsMulti,
2601  iMinMulti,
2602  iMaxMulti);
2604  new TH2D("TofTests_MultiTrkHitBestDeltaY",
2605  "Quality of the Tof Hits position on Y axis relative to best "
2606  "Track position, for hit coming from multiple MC Track; Y(Hit) - "
2607  "Y(Track) [cm]; # [Hits]; Multi [Trk]",
2608  iNbBinsDeltaPos,
2609  -dDeltaPosRange,
2610  dDeltaPosRange,
2611  iNbBinsMulti,
2612  iMinMulti,
2613  iMaxMulti);
2615  new TH2D("TofTests_MultiTrkHitBestDeltaZ",
2616  "Quality of the Tof Hits position on Z axis relative to best "
2617  "Track position, for hit coming from multiple MC Track; Z(Hit) - "
2618  "Z(Track) [cm]; # [Hits]; Multi [Trk]",
2619  iNbBinsDeltaPos,
2620  -dDeltaPosRange,
2621  dDeltaPosRange,
2622  iNbBinsMulti,
2623  iMinMulti,
2624  iMaxMulti);
2626  new TH2D("TofTests_MultiTrkHitBestDeltaR",
2627  "Quality of the Tof Hits position relative to best Track "
2628  "position, for hit coming from multiple MC Track; R(Hit -> Track) "
2629  "[cm]; # [Hits]; Multi [Trk]",
2630  iNbBinsDeltaPos,
2631  -dDeltaPosRange,
2632  dDeltaPosRange,
2633  iNbBinsMulti,
2634  iMinMulti,
2635  iMaxMulti);
2636  fhMultiTrkHitBestDeltaT = new TH2D(
2637  "TofTests_MultiTrkHitBestDeltaT",
2638  "Quality of the Tof Hits Time relative to best Track time, for hit coming "
2639  "from multiple MC Track; T(hit) - T(Track) [ps]; # [Hits]; Multi [Trk]",
2640  iNbBinsDeltaTime,
2641  -dDeltaTimeRange,
2642  dDeltaTimeRange,
2643  iNbBinsMulti,
2644  iMinMulti,
2645  iMaxMulti);
2647  new TH2D("TofTests_MultiTrkHitBestPullX",
2648  "Quality of the Tof Hits position error on X axis relative to "
2649  "best Track position, for hit coming from multiple MC Track; Pull "
2650  "X(Hit -> Track) []; # [Hits]; Multi [Trk]",
2651  iNbBinsPullPos,
2652  -dPullPosRange,
2653  dPullPosRange,
2654  iNbBinsMulti,
2655  iMinMulti,
2656  iMaxMulti);
2658  new TH2D("TofTests_MultiTrkHitBestPullY",
2659  "Quality of the Tof Hits position error on Y axis relative to "
2660  "best Track position, for hit coming from multiple MC Track; Pull "
2661  "Y(Hit -> Track) []; # [Hits]; Multi [Trk]",
2662  iNbBinsPullPos,
2663  -dPullPosRange,
2664  dPullPosRange,
2665  iNbBinsMulti,
2666  iMinMulti,
2667  iMaxMulti);
2669  new TH2D("TofTests_MultiTrkHitBestPullZ",
2670  "Quality of the Tof Hits position error on Z axis relative to "
2671  "best Track position, for hit coming from multiple MC Track; Pull "
2672  "Z(Hit -> Track) []; # [Hits]; Multi [Trk]",
2673  iNbBinsPullPos,
2674  -dPullPosRange,
2675  dPullPosRange,
2676  iNbBinsMulti,
2677  iMinMulti,
2678  iMaxMulti);
2680  new TH2D("TofTests_MultiTrkHitBestPullR",
2681  "Quality of the Tof Hits position error relative to best Track "
2682  "position, for hit coming from multiple MC Track; Pull R(Hit -> "
2683  "Track) []; # [Hits]; Multi [Trk]",
2684  iNbBinsPullPos,
2685  -dPullPosRange,
2686  dPullPosRange,
2687  iNbBinsMulti,
2688  iMinMulti,
2689  iMaxMulti);
2691  new TH2D("TofTests_MultiTrkHitBestPullT",
2692  "Quality of the Tof Hits time error relative to best Track "
2693  "position, for hit coming from multiple MC Track; Pull T(Hit -> "
2694  "Track) []; # [Hits]; Multi [Trk]",
2695  iNbBinsPullPos,
2696  -dPullPosRange,
2697  dPullPosRange,
2698  iNbBinsMulti,
2699  iMinMulti,
2700  iMaxMulti);
2701 
2702  // Physics coord mapping, 1 per particle type
2703  // Phase space
2704  Int_t iNbBinsY = 30;
2705  Double_t dMinY = -1.;
2706  Double_t dMaxY = 4.;
2707  Int_t iNbBNinsPtm = 30;
2708  Double_t dMinPtm = 0.0;
2709  Double_t dMaxPtm = 2.5;
2710  fvhPtmRapGenTrk.resize(kiNbPart);
2711  fvhPtmRapStsPnt.resize(kiNbPart);
2712  fvhPtmRapTofPnt.resize(kiNbPart);
2713  fvhPtmRapTofHit.resize(kiNbPart);
2716  fvhPtmRapSecGenTrk.resize(kiNbPart);
2717  fvhPtmRapSecStsPnt.resize(kiNbPart);
2718  fvhPtmRapSecTofPnt.resize(kiNbPart);
2719  fvhPtmRapSecTofHit.resize(kiNbPart);
2722  // PLab
2723  Int_t iNbBinsPlab = 100;
2724  Double_t dMinPlab = 0.0;
2725  Double_t dMaxPlab = 10.0;
2726  fvhPlabGenTrk.resize(kiNbPart);
2727  fvhPlabStsPnt.resize(kiNbPart);
2728  fvhPlabTofPnt.resize(kiNbPart);
2729  fvhPlabTofHit.resize(kiNbPart);
2732  fvhPlabSecGenTrk.resize(kiNbPart);
2733  fvhPlabSecStsPnt.resize(kiNbPart);
2734  fvhPlabSecTofPnt.resize(kiNbPart);
2735  fvhPlabSecTofHit.resize(kiNbPart);
2738  // MC Tracks losses
2741  fvhPlabGenTrkTofPnt.resize(kiNbPart);
2742  fvhPlabGenTrkTofHit.resize(kiNbPart);
2743  fvhPlabStsTrkTofPnt.resize(kiNbPart);
2744  fvhPlabStsTrkTofHit.resize(kiNbPart);
2751  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
2752  // Phase space
2753  fvhPtmRapGenTrk[iPartIdx] =
2754  new TH2D(Form("TofTests_PtmRapGenTrk_%s", ksPartTag[iPartIdx].Data()),
2755  Form("P_{t}/M vs y distribution for MC tracks, %s, primary "
2756  "tracks; y; P_{t}/M; # []",
2757  ksPartName[iPartIdx].Data()),
2758  iNbBinsY,
2759  dMinY,
2760  dMaxY,
2761  iNbBNinsPtm,
2762  dMinPtm,
2763  dMaxPtm);
2764  fvhPtmRapStsPnt[iPartIdx] =
2765  new TH2D(Form("TofTests_PtmRapStsPnt_%s", ksPartTag[iPartIdx].Data()),
2766  Form("P_{t}/M vs y distribution from MC Track with STS points, "
2767  "%s, primary tracks; y; P_{t}/M; # []",
2768  ksPartName[iPartIdx].Data()),
2769  iNbBinsY,
2770  dMinY,
2771  dMaxY,
2772  iNbBNinsPtm,
2773  dMinPtm,
2774  dMaxPtm);
2775  fvhPtmRapTofPnt[iPartIdx] =
2776  new TH2D(Form("TofTests_PtmRapTofPnt_%s", ksPartTag[iPartIdx].Data()),
2777  Form("P_{t}/M vs y distribution from MC Track for TOF points, "
2778  "%s, primary tracks; y; P_{t}/M; # []",
2779  ksPartName[iPartIdx].Data()),
2780  iNbBinsY,
2781  dMinY,
2782  dMaxY,
2783  iNbBNinsPtm,
2784  dMinPtm,
2785  dMaxPtm);
2786  fvhPtmRapTofHit[iPartIdx] =
2787  new TH2D(Form("TofTests_PtmRapTofHit_%s", ksPartTag[iPartIdx].Data()),
2788  Form("P_{t}/M vs y distribution from MC Track for TOF Hits, %s, "
2789  "primary tracks; y; P_{t}/M; # []",
2790  ksPartName[iPartIdx].Data()),
2791  iNbBinsY,
2792  dMinY,
2793  dMaxY,
2794  iNbBNinsPtm,
2795  dMinPtm,
2796  dMaxPtm);
2797  fvhPtmRapTofHitSinglePnt[iPartIdx] = new TH2D(
2798  Form("TofTests_PtmRapTofHitSinglePnt_%s", ksPartTag[iPartIdx].Data()),
2799  Form("P_{t}/M vs y distribution from MC Track for TOF Hits from a single "
2800  "TOF Point, %s, primary tracks; y; P_{t}/M; # []",
2801  ksPartName[iPartIdx].Data()),
2802  iNbBinsY,
2803  dMinY,
2804  dMaxY,
2805  iNbBNinsPtm,
2806  dMinPtm,
2807  dMaxPtm);
2808  fvhPtmRapTofHitSingleTrk[iPartIdx] = new TH2D(
2809  Form("TofTests_PtmRapTofHitSingleTrk_%s", ksPartTag[iPartIdx].Data()),
2810  Form("P_{t}/M vs y distribution from MC Track for TOF Hits from a single "
2811  "MC track, %s, primary tracks; y; P_{t}/M; # []",
2812  ksPartName[iPartIdx].Data()),
2813  iNbBinsY,
2814  dMinY,
2815  dMaxY,
2816  iNbBNinsPtm,
2817  dMinPtm,
2818  dMaxPtm);
2819  // PLab
2820  fvhPlabGenTrk[iPartIdx] =
2821  new TH1D(Form("TofTests_PlabGenTrk_%s", ksPartTag[iPartIdx].Data()),
2822  Form("P_{lab} distribution for MC tracks, %s, primary tracks; "
2823  "P_{lab} [GeV/c]; # []",
2824  ksPartName[iPartIdx].Data()),
2825  iNbBinsPlab,
2826  dMinPlab,
2827  dMaxPlab);
2828  fvhPlabStsPnt[iPartIdx] =
2829  new TH1D(Form("TofTests_PlabStsPnt_%s", ksPartTag[iPartIdx].Data()),
2830  Form("P_{lab} distribution from MC Track with STS points, %s, "
2831  "primary tracks; P_{lab} [GeV/c]; # []",
2832  ksPartName[iPartIdx].Data()),
2833  iNbBinsPlab,
2834  dMinPlab,
2835  dMaxPlab);
2836  fvhPlabTofPnt[iPartIdx] =
2837  new TH1D(Form("TofTests_PlabTofPnt_%s", ksPartTag[iPartIdx].Data()),
2838  Form("P_{lab} distribution from MC Track for TOF points, %s, "
2839  "primary tracks; P_{lab} [GeV/c]; # []",
2840  ksPartName[iPartIdx].Data()),
2841  iNbBinsPlab,
2842  dMinPlab,
2843  dMaxPlab);
2844  fvhPlabTofHit[iPartIdx] =
2845  new TH1D(Form("TofTests_PlabTofHit_%s", ksPartTag[iPartIdx].Data()),
2846  Form("P_{lab} distribution from MC Track for TOF Hits, %s, "
2847  "primary tracks; P_{lab} [GeV/c]; # []",
2848  ksPartName[iPartIdx].Data()),
2849  iNbBinsPlab,
2850  dMinPlab,
2851  dMaxPlab);
2852  fvhPlabTofHitSinglePnt[iPartIdx] = new TH1D(
2853  Form("TofTests_PlabTofHitSinglePnt_%s", ksPartTag[iPartIdx].Data()),
2854  Form("P_{lab} distribution from MC Track for TOF Hits from a single TOF "
2855  "Point, %s, primary tracks; P_{lab} [GeV/c]; # []",
2856  ksPartName[iPartIdx].Data()),
2857  iNbBinsPlab,
2858  dMinPlab,
2859  dMaxPlab);
2860  fvhPlabTofHitSingleTrk[iPartIdx] = new TH1D(
2861  Form("TofTests_PlabTofHitSingleTrk_%s", ksPartTag[iPartIdx].Data()),
2862  Form("P_{lab} distribution from MC Track for TOF Hits from a single MC "
2863  "tracks, %s, primary tracks; P_{lab} [GeV/c]; # []",
2864  ksPartName[iPartIdx].Data()),
2865  iNbBinsPlab,
2866  dMinPlab,
2867  dMaxPlab);
2868 
2869 
2870  // MC Tracks losses
2871  fvhPtmRapGenTrkTofPnt[iPartIdx] = new TH2D(
2872  Form("TofTests_PtmRapGenTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
2873  Form("P_{t}/M vs y distribution for MC tracks with TOF Point(s), %s, "
2874  "primary tracks; y; P_{t}/M; # []",
2875  ksPartName[iPartIdx].Data()),
2876  iNbBinsY,
2877  dMinY,
2878  dMaxY,
2879  iNbBNinsPtm,
2880  dMinPtm,
2881  dMaxPtm);
2882  fvhPtmRapGenTrkTofHit[iPartIdx] = new TH2D(
2883  Form("TofTests_PtmRapGenTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
2884  Form("P_{t}/M vs y distribution for MC tracks with TOF Hit(s), %s, "
2885  "primary tracks; y; P_{t}/M; # []",
2886  ksPartName[iPartIdx].Data()),
2887  iNbBinsY,
2888  dMinY,
2889  dMaxY,
2890  iNbBNinsPtm,
2891  dMinPtm,
2892  dMaxPtm);
2893 
2894  fvhPlabGenTrkTofPnt[iPartIdx] =
2895  new TH1D(Form("TofTests_PlabGenTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
2896  Form("P_{lab} distribution for MC tracks with TOF Point(s), %s, "
2897  "primary tracks; P_{lab} [GeV/c]; # []",
2898  ksPartName[iPartIdx].Data()),
2899  iNbBinsPlab,
2900  dMinPlab,
2901  dMaxPlab);
2902  fvhPlabGenTrkTofHit[iPartIdx] =
2903  new TH1D(Form("TofTests_PlabGenTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
2904  Form("P_{lab} distribution from MC Track with TOF Hit(s), %s, "
2905  "primary tracks; P_{lab} [GeV/c]; # []",
2906  ksPartName[iPartIdx].Data()),
2907  iNbBinsPlab,
2908  dMinPlab,
2909  dMaxPlab);
2910  fvhPlabStsTrkTofPnt[iPartIdx] =
2911  new TH1D(Form("TofTests_PlabStsTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
2912  Form("P_{lab} distribution for MC tracks with STS and TOF "
2913  "Point(s), %s, primary tracks; P_{lab} [GeV/c]; # []",
2914  ksPartName[iPartIdx].Data()),
2915  iNbBinsPlab,
2916  dMinPlab,
2917  dMaxPlab);
2918  fvhPlabStsTrkTofHit[iPartIdx] =
2919  new TH1D(Form("TofTests_PlabStsTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
2920  Form("P_{lab} distribution from MC Track with STS points and "
2921  "TOF Hit(s), %s, primary tracks; P_{lab} [GeV/c]; # []",
2922  ksPartName[iPartIdx].Data()),
2923  iNbBinsPlab,
2924  dMinPlab,
2925  dMaxPlab);
2926 
2927  // Secondary tracks
2928  // Phase space
2929  fvhPtmRapSecGenTrk[iPartIdx] =
2930  new TH2D(Form("TofTests_PtmRapSecGenTrk_%s", ksPartTag[iPartIdx].Data()),
2931  Form("P_{t}/M vs y distribution for MC tracks, %s, secondary "
2932  "tracks; y; P_{t}/M; # []",
2933  ksPartName[iPartIdx].Data()),
2934  iNbBinsY,
2935  dMinY,
2936  dMaxY,
2937  iNbBNinsPtm,
2938  dMinPtm,
2939  dMaxPtm);
2940  fvhPtmRapSecStsPnt[iPartIdx] =
2941  new TH2D(Form("TofTests_PtmRapSecStsPnt_%s", ksPartTag[iPartIdx].Data()),
2942  Form("P_{t}/M vs y distribution from MC Track with STS points, "
2943  "%s, secondary tracks; y; P_{t}/M; # []",
2944  ksPartName[iPartIdx].Data()),
2945  iNbBinsY,
2946  dMinY,
2947  dMaxY,
2948  iNbBNinsPtm,
2949  dMinPtm,
2950  dMaxPtm);
2951  fvhPtmRapSecTofPnt[iPartIdx] =
2952  new TH2D(Form("TofTests_PtmRapSecTofPnt_%s", ksPartTag[iPartIdx].Data()),
2953  Form("P_{t}/M vs y distribution from MC Track for TOF points, "
2954  "%s, secondary tracks; y; P_{t}/M; # []",
2955  ksPartName[iPartIdx].Data()),
2956  iNbBinsY,
2957  dMinY,
2958  dMaxY,
2959  iNbBNinsPtm,
2960  dMinPtm,
2961  dMaxPtm);
2962  fvhPtmRapSecTofHit[iPartIdx] =
2963  new TH2D(Form("TofTests_PtmRapSecTofHit_%s", ksPartTag[iPartIdx].Data()),
2964  Form("P_{t}/M vs y distribution from MC Track for TOF Hits, %s, "
2965  "secondary tracks; y; P_{t}/M; # []",
2966  ksPartName[iPartIdx].Data()),
2967  iNbBinsY,
2968  dMinY,
2969  dMaxY,
2970  iNbBNinsPtm,
2971  dMinPtm,
2972  dMaxPtm);
2973  fvhPtmRapSecTofHitSinglePnt[iPartIdx] = new TH2D(
2974  Form("TofTests_PtmRapSecTofHitSinglePnt_%s", ksPartTag[iPartIdx].Data()),
2975  Form("P_{t}/M vs y distribution from MC Track for TOF Hits from a single "
2976  "TOF Point, %s, secondary tracks; y; P_{t}/M; # []",
2977  ksPartName[iPartIdx].Data()),
2978  iNbBinsY,
2979  dMinY,
2980  dMaxY,
2981  iNbBNinsPtm,
2982  dMinPtm,
2983  dMaxPtm);
2984  fvhPtmRapSecTofHitSingleTrk[iPartIdx] = new TH2D(
2985  Form("TofTests_PtmRapSecTofHitSingleTrk_%s", ksPartTag[iPartIdx].Data()),
2986  Form("P_{t}/M vs y distribution from MC Track for TOF Hits from a single "
2987  "MC track, %s, secondary tracks; y; P_{t}/M; # []",
2988  ksPartName[iPartIdx].Data()),
2989  iNbBinsY,
2990  dMinY,
2991  dMaxY,
2992  iNbBNinsPtm,
2993  dMinPtm,
2994  dMaxPtm);
2995  // PLab
2996  fvhPlabSecGenTrk[iPartIdx] =
2997  new TH1D(Form("TofTests_PlabSecGenTrk_%s", ksPartTag[iPartIdx].Data()),
2998  Form("P_{lab} distribution for MC tracks, %s, secondary tracks; "
2999  "P_{lab} [GeV/c]; # []",
3000  ksPartName[iPartIdx].Data()),
3001  iNbBinsPlab,
3002  dMinPlab,
3003  dMaxPlab);
3004  fvhPlabSecStsPnt[iPartIdx] =
3005  new TH1D(Form("TofTests_PlabSecStsPnt_%s", ksPartTag[iPartIdx].Data()),
3006  Form("P_{lab} distribution from MC Track with STS points, %s, "
3007  "secondary tracks; P_{lab} [GeV/c]; # []",
3008  ksPartName[iPartIdx].Data()),
3009  iNbBinsPlab,
3010  dMinPlab,
3011  dMaxPlab);
3012  fvhPlabSecTofPnt[iPartIdx] =
3013  new TH1D(Form("TofTests_PlabSecTofPnt_%s", ksPartTag[iPartIdx].Data()),
3014  Form("P_{lab} distribution from MC Track for TOF points, %s, "
3015  "secondary tracks; P_{lab} [GeV/c]; # []",
3016  ksPartName[iPartIdx].Data()),
3017  iNbBinsPlab,
3018  dMinPlab,
3019  dMaxPlab);
3020  fvhPlabSecTofHit[iPartIdx] =
3021  new TH1D(Form("TofTests_PlabSecTofHit_%s", ksPartTag[iPartIdx].Data()),
3022  Form("P_{lab} distribution from MC Track for TOF Hits, %s, "
3023  "secondary tracks; P_{lab} [GeV/c]; # []",
3024  ksPartName[iPartIdx].Data()),
3025  iNbBinsPlab,
3026  dMinPlab,
3027  dMaxPlab);
3028  fvhPlabSecTofHitSinglePnt[iPartIdx] = new TH1D(
3029  Form("TofTests_PlabSecTofHitSinglePnt_%s", ksPartTag[iPartIdx].Data()),
3030  Form("P_{lab} distribution from MC Track for TOF Hits from a single TOF "
3031  "Point, %s, secondary tracks; P_{lab} [GeV/c]; # []",
3032  ksPartName[iPartIdx].Data()),
3033  iNbBinsPlab,
3034  dMinPlab,
3035  dMaxPlab);
3036  fvhPlabSecTofHitSingleTrk[iPartIdx] = new TH1D(
3037  Form("TofTests_PlabSecTofHitSingleTrk_%s", ksPartTag[iPartIdx].Data()),
3038  Form("P_{lab} distribution from MC Track for TOF Hits from a single MC "
3039  "tracks, %s, secondary tracks; P_{lab} [GeV/c]; # []",
3040  ksPartName[iPartIdx].Data()),
3041  iNbBinsPlab,
3042  dMinPlab,
3043  dMaxPlab);
3044 
3045 
3046  // MC Tracks losses
3047  fvhPtmRapSecGenTrkTofPnt[iPartIdx] = new TH2D(
3048  Form("TofTests_PtmRapSecGenTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
3049  Form("P_{t}/M vs y distribution for MC tracks with TOF Point(s), %s, "
3050  "secondary tracks; y; P_{t}/M; # []",
3051  ksPartName[iPartIdx].Data()),
3052  iNbBinsY,
3053  dMinY,
3054  dMaxY,
3055  iNbBNinsPtm,
3056  dMinPtm,
3057  dMaxPtm);
3058  fvhPtmRapSecGenTrkTofHit[iPartIdx] = new TH2D(
3059  Form("TofTests_PtmRapSecGenTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
3060  Form("P_{t}/M vs y distribution for MC tracks with TOF Hit(s), %s, "
3061  "secondary tracks; y; P_{t}/M; # []",
3062  ksPartName[iPartIdx].Data()),
3063  iNbBinsY,
3064  dMinY,
3065  dMaxY,
3066  iNbBNinsPtm,
3067  dMinPtm,
3068  dMaxPtm);
3069 
3070  fvhPlabSecGenTrkTofPnt[iPartIdx] = new TH1D(
3071  Form("TofTests_PlabSecGenTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
3072  Form("P_{lab} distribution for MC tracks with TOF Point(s), %s, "
3073  "secondary tracks; P_{lab} [GeV/c]; # []",
3074  ksPartName[iPartIdx].Data()),
3075  iNbBinsPlab,
3076  dMinPlab,
3077  dMaxPlab);
3078  fvhPlabSecGenTrkTofHit[iPartIdx] = new TH1D(
3079  Form("TofTests_PlabSecGenTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
3080  Form("P_{lab} distribution from MC Track with TOF Hit(s), %s, secondary "
3081  "tracks; P_{lab} [GeV/c]; # []",
3082  ksPartName[iPartIdx].Data()),
3083  iNbBinsPlab,
3084  dMinPlab,
3085  dMaxPlab);
3086 
3087  fvhPlabSecStsTrkTofPnt[iPartIdx] = new TH1D(
3088  Form("TofTests_PlabSecStsTrkTofPnt_%s", ksPartTag[iPartIdx].Data()),
3089  Form("P_{lab} distribution for MC tracks with STS and TOF Point(s), %s, "
3090  "secondary tracks; P_{lab} [GeV/c]; # []",
3091  ksPartName[iPartIdx].Data()),
3092  iNbBinsPlab,
3093  dMinPlab,
3094  dMaxPlab);
3095  fvhPlabSecStsTrkTofHit[iPartIdx] = new TH1D(
3096  Form("TofTests_PlabSecStsTrkTofHit_%s", ksPartTag[iPartIdx].Data()),
3097  Form("P_{lab} distribution from MC Track with STS points and TOF Hit(s), "
3098  "%s, secondary tracks; P_{lab} [GeV/c]; # []",
3099  ksPartName[iPartIdx].Data()),
3100  iNbBinsPlab,
3101  dMinPlab,
3102  dMaxPlab);
3103  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
3104 
3105  // Integrated TofHit Efficiency
3107  new TH1D("TofTests_IntegratedHitPntEff",
3108  "Efficiency of TOF hit generation, all tracks; Eff = Nb_{Trk w/ "
3109  "Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3110  202,
3111  -0.5,
3112  100.5);
3114  new TH1D("TofTests_IntegratedHitPntEffPrim",
3115  "Efficiency of TOF hit generation, primary tracks; Eff = Nb_{Trk "
3116  "w/ Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3117  202,
3118  -0.5,
3119  100.5);
3121  new TH1D("TofTests_IntegratedHitPntEffSec",
3122  "Efficiency of TOF hit generation, secondary tracks; Eff = "
3123  "Nb_{Trk w/ Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3124  202,
3125  -0.5,
3126  100.5);
3127 
3128 
3129  // Integrated TofHit Efficiency: Tracks firing channel but not going to Digi/Hit
3131  new TH1D("TofTests_IntegratedHiddenHitPntLoss",
3132  "Losses of TOF hit generation due to multiplicity, all tracks; "
3133  "Loss = Nb_{Trk w/ Hidden Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3134  202,
3135  -0.5,
3136  100.5);
3138  "TofTests_IntegratedHiddenHitPntLossPrim",
3139  "Efficiency of TOF hit generation due to multiplicity, primary tracks; "
3140  "Loss = Nb_{Trk w/ Hidden Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3141  202,
3142  -0.5,
3143  100.5);
3145  "TofTests_IntegratedHiddenHitPntLossSec",
3146  "Efficiency of TOF hit generation due to multiplicity, secondary tracks; "
3147  "Loss = Nb_{Trk w/ Hidden Hit}/Nb_{Trk w/ Pnt} [\%]; # [Events]",
3148  202,
3149  -0.5,
3150  100.5);
3151 
3152  // Efficiency dependence on nb crossed gaps
3159  fhIntegratedHitPntEffGaps = new TH2D(
3160  "TofTests_IntegratedHitPntEffGaps",
3161  "Efficiency of TOF hit generation VS gaps crossed, all tracks; Eff = "
3162  "Nb_{Trk w/ Hit}/Nb_{Trk w/ Pnt} [\%]; Nb TofPoint (gaps) []; # [Events]",
3163  202,
3164  -0.5,
3165  100.5,
3167  0.5,
3168  fuMaxCrossedGaps + 0.5);
3169  fhIntegratedHitPntEffPrimGaps = new TH2D(
3170  "TofTests_IntegratedHitPntEffPrimGaps",
3171  "Efficiency of TOF hit generation VS gaps crossed, primary tracks; Eff = "
3172  "Nb_{Trk w/ Hit}/Nb_{Trk w/ Pnt} [\%]; Nb TofPoint (gaps) []; # [Events]",
3173  202,
3174  -0.5,
3175  100.5,
3177  0.5,
3178  fuMaxCrossedGaps + 0.5);
3179  fhIntegratedHitPntEffSecGaps = new TH2D(
3180  "TofTests_IntegratedHitPntEffSecGaps",
3181  "Efficiency of TOF hit generation VS gaps crossed, secondary tracks; Eff = "
3182  "Nb_{Trk w/ Hit}/Nb_{Trk w/ Pnt} [\%]; Nb TofPoint (gaps) []; # [Events]",
3183  202,
3184  -0.5,
3185  100.5,
3187  0.5,
3188  fuMaxCrossedGaps + 0.5);
3189 
3190  Float_t fMaxCbmLen = 1500;
3192  new TH2D("TofTests_McTrkStartPrimSingTrk",
3193  "Origin in Z of the MC primary tracks in hits with a single "
3194  "track; MC trk Start Z [cm]; ; # [Events]",
3195  fMaxCbmLen + 1,
3196  -1,
3197  fMaxCbmLen,
3198  kiNbPart,
3199  -0.5,
3200  kiNbPart - 0.5);
3202  new TH2D("TofTests_McTrkStartSecSingTrk",
3203  "Origin in Z of the MC secondary tracks in hits with a single "
3204  "track; MC trk Start Z [cm]; ; # [Events]",
3205  fMaxCbmLen + 1,
3206  -1,
3207  fMaxCbmLen,
3208  kiNbPart,
3209  -0.5,
3210  kiNbPart - 0.5);
3212  new TH2D("TofTests_McTrkStartPrimMultiTrk",
3213  "Origin in Z of the MC primary tracks in hits with multiple "
3214  "tracks; MC trk Start Z [cm]; ; # [Events]",
3215  fMaxCbmLen + 1,
3216  -1,
3217  fMaxCbmLen,
3218  kiNbPart,
3219  -0.5,
3220  kiNbPart - 0.5);
3222  new TH2D("TofTests_McTrkStartSecMultiTrk",
3223  "Origin in Z of the MC secondary tracks in hits with multiple "
3224  "tracks; MC trk Start Z [cm]; ; # [Events]",
3225  fMaxCbmLen + 1,
3226  -1,
3227  fMaxCbmLen,
3228  kiNbPart,
3229  -0.5,
3230  kiNbPart - 0.5);
3231  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
3232  fhMcTrkStartPrimSingTrk->GetYaxis()->SetBinLabel(1 + iPartIdx,
3233  ksPartTag[iPartIdx]);
3234  fhMcTrkStartSecSingTrk->GetYaxis()->SetBinLabel(1 + iPartIdx,
3235  ksPartTag[iPartIdx]);
3236  fhMcTrkStartPrimMultiTrk->GetYaxis()->SetBinLabel(1 + iPartIdx,
3237  ksPartTag[iPartIdx]);
3238  fhMcTrkStartSecMultiTrk->GetYaxis()->SetBinLabel(1 + iPartIdx,
3239  ksPartTag[iPartIdx]);
3240  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
3241 
3243  new TH1I("TofTests_PointMatchWeight",
3244  "Weigth of TofPoints contributing to Hits; w [Prop. or ps]; #",
3245  1000,
3246  -0.05,
3247  100 - 0.05);
3248 
3249  gDirectory->cd(
3250  oldir
3251  ->GetPath()); // <= To prevent histos from being sucked in by the param file of the TRootManager!
3252 
3253  return kTRUE;
3254 }
3255 
3256 // ------------------------------------------------------------------
3258  // Declare variables outside the loop
3259  CbmMCTrack* pMcTrk;
3260  CbmTofPoint* pTofPoint;
3261  CbmMatch* pMatchDigiPnt;
3262  CbmMatch* pMatchDigiPntB;
3263  CbmTofHit* pTofHit;
3264  CbmMatch* pMatchHitDigi;
3265  CbmMatch* pMatchHitPnt;
3266 
3267  Int_t iNbTracks, iNbTofPts, iNbTofRealPts, iNbTofDigisMatch, iNbTofHits,
3268  iNbTofHitsMatch;
3269  Int_t iNbTofDigis = 0;
3270 
3271  iNbTracks = fMcTracksColl->GetEntriesFast();
3272  iNbTofPts = fTofPointsColl->GetEntriesFast();
3273  if (kTRUE == fbRealPointAvail)
3274  iNbTofRealPts = fRealTofPointsColl->GetEntriesFast();
3275  else
3276  iNbTofRealPts = 0;
3277  iNbTofHits = fTofHitsColl->GetEntriesFast();
3278  if (kFALSE == fbHitProducerSource) {
3279  iNbTofDigis = fTofDigisColl->GetEntriesFast();
3280  iNbTofDigisMatch = fTofDigiMatchPointsColl->GetEntriesFast();
3281  iNbTofHitsMatch = fTofDigiMatchColl->GetEntriesFast();
3282  if (iNbTofDigis != iNbTofDigisMatch)
3283  LOG(fatal)
3284  << "CbmTofHitFinderQa::FillHistos => Nb entries in TofDigiMatchPoints "
3285  "TClonesArray doe not match nb entries in TofDigi!!!";
3286  if (iNbTofHits != iNbTofHitsMatch)
3287  LOG(fatal)
3288  << "CbmTofHitFinderQa::FillHistos => Nb entries in TofDigiMatch "
3289  "TClonesArray doe not match nb entries in TofHit!!! "
3290  << iNbTofHits << " VS " << iNbTofHitsMatch
3291  << " (Prev step: " << iNbTofDigis << " VS " << iNbTofDigisMatch << " )";
3292  } // if( kFALSE == fbHitProducerSource )
3293 
3294  fvulIdxTracksWithPnt.clear();
3295  fvulIdxTracksWithHit.clear();
3296  fvulIdxPrimTracksWithPnt.clear();
3297  fvulIdxPrimTracksWithHit.clear();
3298  fvulIdxSecTracksWithPnt.clear();
3299  fvulIdxSecTracksWithHit.clear();
3303  for (UInt_t uNbGaps = 0; uNbGaps < fuMaxCrossedGaps; uNbGaps++) {
3304  fvulIdxTracksWithPntGaps[uNbGaps].clear();
3305  fvulIdxTracksWithHitGaps[uNbGaps].clear();
3306  fvulIdxPrimTracksWithPntGaps[uNbGaps].clear();
3307  fvulIdxPrimTracksWithHitGaps[uNbGaps].clear();
3308  fvulIdxSecTracksWithPntGaps[uNbGaps].clear();
3309  fvulIdxSecTracksWithHitGaps[uNbGaps].clear();
3310  } // for( UInt_t uNbGaps = 0; uNbGaps < fuMaxCrossedGaps; uNbGaps++)
3311 
3312  // Tracks Info
3313  Int_t iNbTofTracks = 0;
3314  Int_t iNbTofTracksPrim = 0;
3315  std::vector<Bool_t> vbTrackHasHit(iNbTracks, kFALSE);
3316  // Are MC tracks reconstructable in STS?
3317  // std::vector< Bool_t > vbTrackStsRecOk( iNbTracks kFALSE);
3318  for (Int_t iTrkInd = 0; iTrkInd < iNbTracks; iTrkInd++) {
3319  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(iTrkInd);
3320 
3321  // Is track reconstructable in STS
3322  /*
3323  UInt_t uNbStsPnts = pMcTrk->GetNPoints(ECbmModuleId::kSts);
3324 
3325  // True criterium is whether enough STS stations are crossed
3326  // but if already less STS points, can escape looping
3327  if( kiMinNbStsPntAcc <= uNbStsPnts )
3328  {
3329  std::vector< UInt_t > vStsStationsId();
3330  for( UInt_t uStsPntIdx = 0; uStsPntIdx < uNbStsPnts; uStsPntIdx++)
3331  {
3332  UInt_t uStation = CbmStsAddress::GetElementId(
3333  (dynamic_cast<CbmStsPoint*>fStsPointsColl->At( uStsPntIdx ))->GetDetectorID(), 1);
3334  if( kiMinNbStsPntAcc <= vStsStationsId.size() )
3335  {
3336  vbTrackStsRecOk[iTrkInd] = kTRUE;
3337  break;
3338  }
3339  } // for( UInt_t uStsPntIdx = 0; uStsPntIdx < uNbStsPnts; uStsPntIdx++)
3340  } // if( kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts) )
3341  */
3342 
3343  if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof)) {
3344  iNbTofTracks++;
3345  // Keep track of MC tracks with at least one TOF Point
3346  fvulIdxTracksWithPnt.push_back(iTrkInd);
3347 
3348  UInt_t uNbTofPnt = pMcTrk->GetNPoints(ECbmModuleId::kTof) - 1;
3349  if (uNbTofPnt < fuMaxCrossedGaps)
3350  fvulIdxTracksWithPntGaps[uNbTofPnt].push_back(iTrkInd);
3351 
3352  if (-1 == pMcTrk->GetMotherId()) {
3353  iNbTofTracksPrim++;
3354  fvulIdxPrimTracksWithPnt.push_back(iTrkInd);
3355  if (uNbTofPnt < fuMaxCrossedGaps)
3356  fvulIdxPrimTracksWithPntGaps[uNbTofPnt].push_back(iTrkInd);
3357  } // if( -1 == pMcTrk->GetMotherId() )
3358  else {
3359  fvulIdxSecTracksWithPnt.push_back(iTrkInd);
3360 
3361  if (uNbTofPnt < fuMaxCrossedGaps)
3362  fvulIdxSecTracksWithPntGaps[uNbTofPnt].push_back(iTrkInd);
3363  } // else of if( -1 == pMcTrk->GetMotherId() )
3364  } // if( 0 < pMcTrk->GetNPoints(ECbmModuleId::kTof) )
3365 
3366  // tracks mapping: Only when creating normalization histos
3367  // Assume only TOF in setup, no field (only straight tracks)
3368  // and all tracks reach TOF (protons)
3369  if (kTRUE == fbNormHistGenMode) {
3370  // XYZ mapping: assume tracks along Z axis
3371  if (pMcTrk->GetPz() == pMcTrk->GetP()) {
3372  fhTrackMapXY->Fill(pMcTrk->GetStartX(), pMcTrk->GetStartY());
3373  // fhTrackMapXZ->Fill( pMcTrk->GetStartX(), fdWallPosZ ); // Not sure how to get Z here
3374  // fhTrackMapYZ->Fill( pMcTrk->GetStartY(), fdWallPosZ ); // Not sure how to get Z here
3375  } // if( pMcTrk->GetPz() == pMcTrk->GetP() )
3376 
3377  // Angular mapping: assume tracks all coming from origin and not necess. along Z axis
3378  if (0 != pMcTrk->GetPz()
3379  && ((0 != pMcTrk->GetPx()) || (0 != pMcTrk->GetPy())))
3380  fhTrackMapAng->Fill(
3381  TMath::ATan2(pMcTrk->GetPx(), pMcTrk->GetPz()) * 180.0 / TMath::Pi(),
3382  TMath::ATan2(pMcTrk->GetPy(), pMcTrk->GetPz()) * 180.0 / TMath::Pi());
3383 
3384  // Spherical mapping: assume tracks all coming from origin and not necess. along Z axis
3385  if (0 != pMcTrk->GetPz() && 0 != pMcTrk->GetPx())
3386  fhTrackMapSph->Fill(TMath::ATan2(pMcTrk->GetPt(), pMcTrk->GetPz()),
3387  TMath::ATan2(pMcTrk->GetPy(), pMcTrk->GetPx()));
3388  } // if( kTRUE == fbNormHistGenMode )
3389 
3390  // Physics coord mapping, 1 per particle type
3391  Int_t iPdgCode = pMcTrk->GetPdgCode();
3392  Int_t iPartIdx = -1;
3393  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
3394  if (kiPartPdgCode[iPart] == iPdgCode) {
3395  iPartIdx = iPart;
3396  break;
3397  } // if( kiPartPdgCode[iPart] == iPdgCode )
3398  if (-1 == iPartIdx) iPartIdx = 0;
3399 
3400  // Dependence of Track origin on centrality or position
3401  if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof)) {
3402  fvhTrackAllStartZCent[iPartIdx]->Fill(pMcTrk->GetStartZ(),
3403  fMCEventHeader->GetB());
3404  if (2 == iPartIdx) // 3D plot only for e-
3405  fvhTrackAllStartXZCent[iPartIdx]->Fill(
3406  pMcTrk->GetStartX(), pMcTrk->GetStartZ(), fMCEventHeader->GetB());
3407  fvhTrackAllStartXZ[iPartIdx]->Fill(pMcTrk->GetStartZ(),
3408  pMcTrk->GetStartX());
3409  fvhTrackAllStartYZ[iPartIdx]->Fill(pMcTrk->GetStartZ(),
3410  pMcTrk->GetStartY());
3411  }
3412 
3413  if (-1 == pMcTrk->GetMotherId()) {
3414  // primary track
3415  // Phase space
3416  fvhPtmRapGenTrk[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3417  pMcTrk->GetPt() / pMcTrk->GetMass());
3418  // PLab
3419  fvhPlabGenTrk[iPartIdx]->Fill(pMcTrk->GetP());
3420  // Do the same for tracks within STS acceptance
3421  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts)) {
3422  fvhPtmRapStsPnt[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3423  pMcTrk->GetPt() / pMcTrk->GetMass());
3424  fvhPlabStsPnt[iPartIdx]->Fill(pMcTrk->GetP());
3425  } // if( 0 < pMcTrk->GetNPoints(ECbmModuleId::kSts) )
3426  // Do the same for tracks within STS acceptance
3427  if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof)) {
3428  fvhPtmRapGenTrkTofPnt[iPartIdx]->Fill(
3429  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
3430  fvhPlabGenTrkTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3431 
3432  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts))
3433  fvhPlabStsTrkTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3434  } // if( 0 < pMcTrk->GetNPoints(kTof) )
3435  } // if( -1 == pMcTrk->GetMotherId() )
3436  else {
3437  // secondary track
3438  // Dependence of Track origin on centrality
3439  if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof))
3440  fvhTrackSecStartZCent[iPartIdx]->Fill(pMcTrk->GetStartZ(),
3441  fMCEventHeader->GetB());
3442 
3443  // Phase space
3444  fvhPtmRapSecGenTrk[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3445  pMcTrk->GetPt() / pMcTrk->GetMass());
3446  // PLab
3447  fvhPlabSecGenTrk[iPartIdx]->Fill(pMcTrk->GetP());
3448  // Do the same for tracks within STS acceptance
3449  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts)) {
3450  fvhPtmRapSecStsPnt[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3451  pMcTrk->GetPt() / pMcTrk->GetMass());
3452  fvhPlabSecStsPnt[iPartIdx]->Fill(pMcTrk->GetP());
3453  } // if( 0 < pMcTrk->GetNPoints(ECbmModuleId::kSts) )
3454  // Do the same for tracks within STS acceptance
3455  if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof)) {
3456  fvhPtmRapSecGenTrkTofPnt[iPartIdx]->Fill(
3457  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
3458  fvhPlabSecGenTrkTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3459 
3460  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts))
3461  fvhPlabSecStsTrkTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3462  } // if( 0 < pMcTrk->GetNPoints(ECbmModuleId::kTof) )
3463  } // else of if( -1 == pMcTrk->GetMotherId() )
3464  } // for(Int_t iTrkInd = 0; iTrkInd < nMcTracks; iTrkInd++)
3465 
3466  // Loop over Points and map them?
3467  for (Int_t iPntInd = 0; iPntInd < iNbTofPts; iPntInd++) {
3468  // Get a pointer to the TOF point
3469  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPntInd);
3470  // Get a pointer to the corresponding MC Track
3471  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(pTofPoint->GetTrackID());
3472 
3473  // Obtain position
3474  TVector3 vPntPos;
3475  pTofPoint->Position(vPntPos);
3476 
3477  Double_t dX = vPntPos.X();
3478  Double_t dY = vPntPos.Y();
3479  Double_t dZ = vPntPos.Z();
3480 
3481  // tracks mapping: Only when creating normalization histos
3482  // Assume only TOF in setup, no field (only straight tracks)
3483  // and all tracks reach TOF (protons)
3484  if (kTRUE == fbNormHistGenMode) {
3485  // XYZ mapping: assume tracks along Z axis
3486  if (pMcTrk->GetPz() == pMcTrk->GetP() && pMcTrk->GetStartX() == dX
3487  && pMcTrk->GetStartY() == dY) {
3488  fhTrackMapXZ->Fill(dX, dZ); // only way to get Z here?
3489  fhTrackMapYZ->Fill(dY, dZ); // only way to get Z here?
3490  } // if( pMcTrk->GetPz() == pMcTrk->GetP() )
3491  } // if( kTRUE == fbNormHistGenMode )
3492 
3493  fhPointMapXY->Fill(dX, dY);
3494  fhPointMapXZ->Fill(dX, dZ);
3495  fhPointMapYZ->Fill(dY, dZ);
3496 
3497  Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
3498  Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
3499  fhPointMapAng->Fill(dThetaX, dThetaY);
3500 
3501  Double_t dTheta =
3502  TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY), dZ); // *180.0/TMath::Pi();
3503  Double_t dPhi = TMath::ATan2(dY, dX); // *180.0/TMath::Pi();
3504  fhPointMapSph->Fill(dTheta, dPhi);
3505 
3506  // Physics coord mapping, 1 per particle type
3507  Int_t iPdgCode = pMcTrk->GetPdgCode();
3508  Int_t iPartIdx = -1;
3509  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
3510  if (kiPartPdgCode[iPart] == iPdgCode) {
3511  iPartIdx = iPart;
3512  break;
3513  } // if( kiPartPdgCode[iPart] == iPdgCode )
3514  if (-1 == iPartIdx) iPartIdx = 0;
3515 
3516  // Beam pipe check
3517  fvhTofPntAllAngCent[iPartIdx]->Fill(
3518  dThetaX, dThetaY, fMCEventHeader->GetB());
3519 
3520  if (-1 == pMcTrk->GetMotherId()) {
3521  // primary track
3522  // Phase space
3523  fvhPtmRapTofPnt[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3524  pMcTrk->GetPt() / pMcTrk->GetMass());
3525  // PLab
3526  fvhPlabTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3527  } // if( -1 == pMcTrk->GetMotherId() )
3528  else {
3529  // secondary track
3530  // Phase space
3531  fvhPtmRapSecTofPnt[iPartIdx]->Fill(pMcTrk->GetRapidity(),
3532  pMcTrk->GetPt() / pMcTrk->GetMass());
3533  // PLab
3534  fvhPlabSecTofPnt[iPartIdx]->Fill(pMcTrk->GetP());
3535  } // else of if( -1 == pMcTrk->GetMotherId() )
3536  } // for (Int_t iPntInd = 0; iPntInd < nTofPoint; iPntInd++ )
3537 
3538  // Loop over Real Points and map them, only in case of protons
3539  if (kTRUE == fbRealPointAvail)
3540  for (Int_t iPntInd = 0; iPntInd < iNbTofRealPts; iPntInd++) {
3541  // Get a pointer to the TOF point
3542  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iPntInd);
3543  // Get a pointer to the corresponding MC Track
3544  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(pTofPoint->GetTrackID());
3545 
3546  // Physics coord mapping, 1 per particle type
3547  // Int_t iPdgCode = pMcTrk->GetPdgCode();
3548  // if( 2212 == iPdgCode ) // Protons cut, comment to get all
3549  {
3550  // Obtain position
3551  TVector3 vPntPos;
3552  pTofPoint->Position(vPntPos);
3553 
3554  Double_t dX = vPntPos.X();
3555  Double_t dY = vPntPos.Y();
3556  Double_t dZ = vPntPos.Z();
3557 
3558  fhRealPointMapXY->Fill(dX, dY);
3559  fhRealPointMapXZ->Fill(dX, dZ);
3560  fhRealPointMapYZ->Fill(dY, dZ);
3561 
3562  Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
3563  Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
3564  fhRealPointMapAng->Fill(dThetaX, dThetaY);
3565 
3566  Double_t dTheta = TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY),
3567  dZ); // *180.0/TMath::Pi();
3568  Double_t dPhi = TMath::ATan2(dY, dX); // *180.0/TMath::Pi();
3569  fhRealPointMapSph->Fill(dTheta, dPhi);
3570  } // if( 2212 == iPdgCode )
3571  } // for (Int_t iPntInd = 0; iPntInd < iNbTofRealPts; iPntInd++ )
3572 
3573  // Loop over Digis and map them?
3574  if (kFALSE == fbHitProducerSource) {
3575  if (kTRUE == fDigiBdfPar->UseExpandedDigi()) {
3576  CbmTofDigi* pTofDigi;
3577  for (Int_t iDigInd = 0; iDigInd < iNbTofDigis; iDigInd++) {
3578  pTofDigi = (CbmTofDigi*) fTofDigisColl->At(iDigInd);
3579 
3580  Int_t iSmType = pTofDigi->GetType();
3581  Int_t iSm = pTofDigi->GetSm();
3582  Int_t iRpc = pTofDigi->GetRpc();
3583  Int_t iCh = pTofDigi->GetChannel();
3584  // First Get X/Y position info
3585  if (fGeoHandler->GetGeoVersion() < k14a)
3586  iCh = iCh + 1; //FIXME: Due to change in tofGeoHandler
3587  CbmTofDetectorInfo xDetInfo(
3588  ECbmModuleId::kTof, iSmType, iSm, iRpc, 0, iCh);
3589  Int_t iChId = fTofId->SetDetectorInfo(xDetInfo);
3590  fChannelInfo = fDigiPar->GetCell(iChId);
3591 
3592  Double_t dX = fChannelInfo->GetX();
3593  Double_t dY = fChannelInfo->GetY();
3594  Double_t dZ = fChannelInfo->GetZ();
3595 
3596  fhDigiMapXY->Fill(dX, dY);
3597  fhDigiMapXZ->Fill(dX, dZ);
3598  fhDigiMapYZ->Fill(dY, dZ);
3599 
3600  Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
3601  Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
3602  fhDigiMapAng->Fill(dThetaX, dThetaY);
3603 
3604  Double_t dTheta = TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY),
3605  dZ); // *180.0/TMath::Pi();
3606  Double_t dPhi = TMath::ATan2(dY, dX); // *180.0/TMath::Pi();
3607  fhDigiMapSph->Fill(dTheta, dPhi);
3608  } // for( Int_t iDigInd = 0; iDigInd < iNbTofDigis; iDigInd++ )
3609  } // if( kTRUE == fDigiBdfPar->UseExpandedDigi() )
3610  } // if( kFALSE == fbHitProducerSource )
3611 
3612  // Loop Over Hits
3613  Int_t iNbTofHitsSingPnt = 0;
3614  Int_t iNbTofHitsMultPnt = 0;
3615  Int_t iNbTofHitsSingTrk = 0;
3616  Int_t iNbTofHitsMultTrk = 0;
3617  for (Int_t iHitInd = 0; iHitInd < iNbTofHits; iHitInd++) {
3618  std::vector<Int_t> vTofPointsId;
3619  std::vector<Int_t> vTofTracksId;
3620  std::vector<Double_t> vTofTracksWeight;
3621  std::vector<Int_t> vTofTracksFirstPntId;
3622  Double_t dPntMeanPosX = 0;
3623  Double_t dPntMeanPosY = 0;
3624  Double_t dPntMeanPosZ = 0;
3625  Double_t dPntMeanTime = 0;
3626  Double_t dTrkMeanPosX = 0;
3627  Double_t dTrkMeanPosY = 0;
3628  Double_t dTrkMeanPosZ = 0;
3629  Double_t dTrkMeanTime = 0;
3630  Int_t iClosestPntIdx = -1;
3631  Double_t dClosestPntDr = 1e18;
3632  Int_t iFurthestPntIdx = -1;
3633  Double_t dFurthestPntDr = -1;
3634  Int_t iClosestTrkIdx = -1;
3635  Double_t dClosestTrkDr = 1e18;
3636  Int_t iFurthestTrkIdx = -1;
3637  Double_t dFurthestTrkDr = -1;
3638 
3639  pTofHit = (CbmTofHit*) fTofHitsColl->At(iHitInd);
3640  pMatchHitPnt = (CbmMatch*) fTofHitMatchColl->At(iHitInd);
3641  Int_t iNbPntHit = pMatchHitPnt->GetNofLinks();
3642 
3643  Double_t dX = pTofHit->GetX();
3644  Double_t dY = pTofHit->GetY();
3645  Double_t dZ = pTofHit->GetZ();
3646  Double_t dErrX = pTofHit->GetDx();
3647  Double_t dErrY = pTofHit->GetDy();
3648  Double_t dErrZ = pTofHit->GetDz();
3649  Double_t dErrT = pTofHit->GetTimeError() * 1000.0;
3650  // Double_t dErrR = TMath::Sqrt( dErrX*dErrX + dErrY*dErrY + dErrZ*dErrZ );
3651  Double_t dErrR = TMath::Sqrt(dErrX * dErrX + dErrY * dErrY);
3652 
3653  Int_t iClusterSize = pTofHit->GetClusterSize();
3654  /*
3655  LOG(info) << "Hit errors = X "
3656  << dErrX << " Y " << dErrY << " Z " << dErrZ
3657  << " T " << dErrT
3658  << " R " << dErrR
3659  ;
3660 */
3661  fhHitMapXY->Fill(dX, dY);
3662  fhHitMapXZ->Fill(dX, dZ);
3663  fhHitMapYZ->Fill(dY, dZ);
3664 
3665  Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
3666  Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
3667  fhHitMapAng->Fill(dThetaX, dThetaY);
3668 
3669  Double_t dTheta =
3670  TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY), dZ); // *180.0/TMath::Pi();
3671  Double_t dPhi = TMath::ATan2(dY, dX); // *180.0/TMath::Pi();
3672  fhHitMapSph->Fill(dTheta, dPhi);
3673 
3674  if (kFALSE == fbNormHistGenMode) {
3675  // Tests using the Digis as data
3676  if (kFALSE == fbHitProducerSource) {
3677  pMatchHitDigi = (CbmMatch*) fTofDigiMatchColl->At(iHitInd);
3678  Int_t iNbDigisHit = pMatchHitDigi->GetNofLinks();
3679  if (0 != iNbDigisHit % 2)
3680  LOG(fatal)
3681  << "CbmTofHitFinderQa::FillHistos => Nb of digis matching Hit #"
3682  << iHitInd << " in event #" << fEvents
3683  << " is not a multiple of 2 => should not happen as both ends of "
3684  "strp required!!!";
3685 
3686  // Nb different TOF digis in Hit
3687  fhNbDigisInHit->Fill(iNbDigisHit);
3688  fhNbDigisInHitMapXY->Fill(dX, dY, iNbDigisHit);
3689 
3690  // Loop over Digis inside Hit
3691  if (kTRUE == fDigiBdfPar->UseExpandedDigi()) {
3692  CbmTofDigi* pTofDigi;
3693  for (Int_t iDigi = 0; iDigi < iNbDigisHit; iDigi++) {
3694  CbmLink lDigi = pMatchHitDigi->GetLink(iDigi);
3695  Int_t iDigiIdx = lDigi.GetIndex();
3696 
3697  if (iNbTofDigis <= iDigiIdx) {
3698  LOG(error)
3699  << "CbmTofHitFinderQa::FillHistos => Digi index from Hit #"
3700  << iHitInd << " in event #" << fEvents
3701  << " is bigger than nb entries in Digis arrays => ignore it!!!";
3702  continue;
3703  } // if( iNbTofDigis <= iDigiIdx )
3704 
3705  pTofDigi = (CbmTofDigi*) fTofDigisColl->At(iDigiIdx);
3706  pMatchDigiPnt = (CbmMatch*) fTofDigiMatchPointsColl->At(iDigiIdx);
3707 
3708  CbmLink lPt = pMatchDigiPnt->GetMatchedLink();
3709  Int_t iPtIdx = lPt.GetIndex();
3710  Int_t iTrkId =
3711  ((CbmTofPoint*) fTofPointsColl->At(iPtIdx))->GetTrackID();
3712 
3713  Int_t iSmType = pTofDigi->GetType();
3714  Int_t iSm = pTofDigi->GetSm();
3715  Int_t iRpc = pTofDigi->GetRpc();
3716  Int_t iCh = pTofDigi->GetChannel();
3717  Int_t iGlobalChan = iCh + fvRpcChOffs[iSmType][iSm][iRpc];
3718 
3719  // Check Left-Right MC missmatch (digis match always stored by pairs)
3720  if (0 == iDigi % 2) {
3721  // Get Info about the other end of the strip
3722  pMatchDigiPntB =
3723  (CbmMatch*) fTofDigiMatchPointsColl->At(iDigiIdx + 1);
3724 
3725  CbmLink lPtB = pMatchDigiPntB->GetMatchedLink();
3726  Int_t iPtIdxB = lPtB.GetIndex();
3727 
3728  // Check Left-Right missmatch for MC Point
3729  if (iPtIdx != iPtIdxB) {
3730  // Check Left-Right missmatch for MC Track
3731  if (iTrkId
3732  != ((CbmTofPoint*) fTofPointsColl->At(iPtIdxB))
3733  ->GetTrackID()) {
3734  fhLeftRightDigiMatch->Fill(iGlobalChan, 2);
3735  } // if( iTrkId != ((CbmTofPoint*) fTofPointsColl->At(iPtIdxB))->GetTrackID() )
3736  else
3737  fhLeftRightDigiMatch->Fill(iGlobalChan, 1);
3738  } // if( iPtIdx != iPtIdxB )
3739  else
3740  fhLeftRightDigiMatch->Fill(iGlobalChan, 0);
3741 
3742  } // if( 0 == iDigi%2 )
3743  } // for( Int_t iDigiIdx = 0; iDigiIdx < iNbDigisHit; iDigiIdx++)
3744  } // if( kTRUE == fDigiBdfPar->UseExpandedDigi() )
3745  } // if( kFALSE == fbHitProducerSource )
3746 
3747  // Tests independent of the Digis
3748  for (Int_t iPnt = 0; iPnt < iNbPntHit; iPnt++) {
3749  CbmLink lPnt = pMatchHitPnt->GetLink(iPnt);
3750  Int_t iPtIdx = lPnt.GetIndex();
3751 
3752  if (iNbTofPts <= iPtIdx) {
3753  LOG(error)
3754  << "CbmTofHitFinderQa::FillHistos => Pnt index from Hit #"
3755  << iHitInd << " in event #" << fEvents
3756  << " is bigger than nb entries in TofPoints arrays => ignore it!!!";
3757  continue;
3758  } // if( iNbTofDigis <= iDigiIdx )
3759 
3760  fhPointMatchWeight->Fill(lPnt.GetWeight());
3761 
3762  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPtIdx);
3763  if (kTRUE == fbRealPointAvail) {
3764  // Always only one mean MC Point Index per MC TofPoint
3765  // Weight always 1.0 so just read the index
3766  Int_t iRealPntIdx =
3767  (((CbmMatch*) fRealTofMatchColl->At(iPtIdx))->GetLink(0))
3768  .GetIndex();
3769  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iRealPntIdx);
3770  iPtIdx = iRealPntIdx;
3771  } // if( kTRUE == fbRealPointAvail )
3772 
3773  Int_t iTrkId = pTofPoint->GetTrackID();
3774 
3775  // MC Track losses
3776  if (kFALSE == vbTrackHasHit[iTrkId]) vbTrackHasHit[iTrkId] = kTRUE;
3777 
3778  // Count Nb different MC Points in Hit
3779  Bool_t bPointFound = kFALSE;
3780  for (UInt_t uPrevPtIdx = 0; uPrevPtIdx < vTofPointsId.size();
3781  uPrevPtIdx++)
3782  if (iPtIdx == vTofPointsId[uPrevPtIdx]) {
3783  bPointFound = kTRUE;
3784  break;
3785  } // if( iPtIdx == vTofPointsId[uPrevPtIdx] )
3786  if (kFALSE == bPointFound) {
3787  vTofPointsId.push_back(iPtIdx);
3788 
3789  // Obtain Point position
3790  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPtIdx);
3791  TVector3 vPntPos;
3792  pTofPoint->Position(vPntPos);
3793 
3794  // Compute mean MC Points position (X, Y, Z, T)
3795  dPntMeanPosX += vPntPos.X();
3796  dPntMeanPosY += vPntPos.Y();
3797  dPntMeanPosZ += vPntPos.Z();
3798  dPntMeanTime += pTofPoint->GetTime();
3799 
3800  // Check if closest MC Point to Hit position
3801  Double_t dPntDeltaR =
3802  TMath::Sqrt((dX - vPntPos.X()) * (dX - vPntPos.X())
3803  + (dY - vPntPos.Y()) * (dY - vPntPos.Y()));
3804  // + (dZ - vPntPos.Z())*(dZ - vPntPos.Z()) );
3805  if (dPntDeltaR < dClosestPntDr) {
3806  iClosestPntIdx = iPtIdx;
3807  dClosestPntDr = dPntDeltaR;
3808  } // if( dPntDeltaR < dClosestPntDr )
3809  // Check if furthest MC Point to Hit position
3810  if (dFurthestPntDr < dPntDeltaR) {
3811  iFurthestPntIdx = iPtIdx;
3812  dFurthestPntDr = dPntDeltaR;
3813  } // if( dFurthestPntDr < dPntDeltaR )
3814  } // if( kFALSE == bPointFound )
3815 
3816  // Count Nb different MC Tracks in Hit
3817  // Build a list of Track weigths
3818  Bool_t bTrackFound = kFALSE;
3819  for (UInt_t uPrevTrkIdx = 0; uPrevTrkIdx < vTofTracksId.size();
3820  uPrevTrkIdx++)
3821  if (iTrkId == vTofTracksId[uPrevTrkIdx]) {
3822  bTrackFound = kTRUE;
3823  vTofTracksWeight[uPrevTrkIdx] += lPnt.GetWeight();
3824  break;
3825  } // if( iTrkId == vTofPointsId[uPrevTrkIdx] )
3826  if (kFALSE == bTrackFound) {
3827  vTofTracksId.push_back(iTrkId);
3828  vTofTracksWeight.push_back(lPnt.GetWeight());
3829  vTofTracksFirstPntId.push_back(iPtIdx);
3830 
3831  // Obtain Point position (Consider 1st Pnt of each Trk is approximate coord)
3832  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPtIdx);
3833  TVector3 vPntPos;
3834  pTofPoint->Position(vPntPos);
3835 
3836  // Compute mean MC Tracks position (X, Y, Z, T)
3837  dTrkMeanPosX += vPntPos.X();
3838  dTrkMeanPosY += vPntPos.Y();
3839  dTrkMeanPosZ += vPntPos.Z();
3840  dTrkMeanTime += pTofPoint->GetTime();
3841 
3842  // Check if closest MC track to Hit position
3843  Double_t dTrkDeltaR =
3844  TMath::Sqrt((dX - vPntPos.X()) * (dX - vPntPos.X())
3845  + (dY - vPntPos.Y()) * (dY - vPntPos.Y()));
3846  // + (dZ - vPntPos.Z())*(dZ - vPntPos.Z()) );
3847  if (dTrkDeltaR < dClosestTrkDr) {
3848  iClosestTrkIdx = iPtIdx;
3849  dClosestTrkDr = dTrkDeltaR;
3850  } // if( dTrkDeltaR < dClosestTrkDr )
3851  // Check if furthest MC track to Hit position
3852  if (dFurthestTrkDr < dTrkDeltaR) {
3853  iFurthestTrkIdx = iPtIdx;
3854  dFurthestTrkDr = dTrkDeltaR;
3855  } // if( dFurthestTrkDr < dTrkDeltaR )
3856  } // if( kFALSE == bTrackFound )
3857  } // for( Int_t iPnt = 0; iPnt < iNbPntHit; iPnt++)
3858 
3859  // Count Nb different MC Points in Hit
3860  UInt_t uNbPointsInHit = vTofPointsId.size();
3861  fhNbPointsInHit->Fill(uNbPointsInHit);
3862  // Count Nb different MC Tracks in Hit
3863  UInt_t uNbTracksInHit = vTofTracksId.size();
3864  fhNbTracksInHit->Fill(uNbTracksInHit);
3865 
3866  // Keep track of MC tracks part of at least one TOF Hit
3867  UInt_t uHitTrk;
3868  for (UInt_t uTrkInHit = 0; uTrkInHit < vTofTracksId.size(); uTrkInHit++) {
3869  for (uHitTrk = 0; uHitTrk < fvulIdxTracksWithHit.size(); uHitTrk++)
3870  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3871  == fvulIdxTracksWithHit[uHitTrk])
3872  break;
3873  if (fvulIdxTracksWithHit.size() == uHitTrk)
3874  fvulIdxTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3875 
3876  // Get a pointer to the corresponding MC Track
3877  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(vTofTracksId[uTrkInHit]);
3878 
3879  if (-1 == pMcTrk->GetMotherId()) {
3880  for (uHitTrk = 0; uHitTrk < fvulIdxPrimTracksWithHit.size();
3881  uHitTrk++)
3882  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3883  == fvulIdxPrimTracksWithHit[uHitTrk])
3884  break;
3885  if (fvulIdxPrimTracksWithHit.size() == uHitTrk)
3886  fvulIdxPrimTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3887  } // if( -1 == pMcTrk->GetMotherId() )
3888  else {
3889  for (uHitTrk = 0; uHitTrk < fvulIdxSecTracksWithHit.size(); uHitTrk++)
3890  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3891  == fvulIdxSecTracksWithHit[uHitTrk])
3892  break;
3893  if (fvulIdxSecTracksWithHit.size() == uHitTrk)
3894  fvulIdxSecTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3895  } // else of if( -1 == pMcTrk->GetMotherId() )
3896 
3897  // Check as function of Nb gaps crossed
3898  UInt_t uNbTofPnt = pMcTrk->GetNPoints(ECbmModuleId::kTof) - 1;
3899  if (uNbTofPnt < fuMaxCrossedGaps) {
3900  for (uHitTrk = 0;
3901  uHitTrk < fvulIdxTracksWithHitGaps[uNbTofPnt].size();
3902  uHitTrk++)
3903  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3904  == fvulIdxTracksWithHitGaps[uNbTofPnt][uHitTrk])
3905  break;
3906  if (fvulIdxTracksWithHitGaps[uNbTofPnt].size() == uHitTrk)
3907  fvulIdxTracksWithHitGaps[uNbTofPnt].push_back(
3908  vTofTracksId[uTrkInHit]);
3909 
3910  if (-1 == pMcTrk->GetMotherId()) {
3911  for (uHitTrk = 0;
3912  uHitTrk < fvulIdxPrimTracksWithHitGaps[uNbTofPnt].size();
3913  uHitTrk++)
3914  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3915  == fvulIdxPrimTracksWithHitGaps[uNbTofPnt][uHitTrk])
3916  break;
3917  if (fvulIdxPrimTracksWithHitGaps[uNbTofPnt].size() == uHitTrk)
3918  fvulIdxPrimTracksWithHitGaps[uNbTofPnt].push_back(
3919  vTofTracksId[uTrkInHit]);
3920  } // if( -1 == pMcTrk->GetMotherId() )
3921  else {
3922  for (uHitTrk = 0;
3923  uHitTrk < fvulIdxSecTracksWithHitGaps[uNbTofPnt].size();
3924  uHitTrk++)
3925  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3926  == fvulIdxSecTracksWithHitGaps[uNbTofPnt][uHitTrk])
3927  break;
3928  if (fvulIdxSecTracksWithHitGaps[uNbTofPnt].size() == uHitTrk)
3929  fvulIdxSecTracksWithHitGaps[uNbTofPnt].push_back(
3930  vTofTracksId[uTrkInHit]);
3931  } // else of if( -1 == pMcTrk->GetMotherId() )
3932  } // if( static_cast<UInt_t>(pMcTrk->GetNPoints(ECbmModuleId::kTof)) < fuMaxCrossedGaps + 1 )
3933 
3934  if (0 == vTofTracksWeight[uTrkInHit]) {
3935  // Tracks generating only signal hidden under signal from other tracks!
3936 
3937  for (uHitTrk = 0; uHitTrk < fvulIdxHiddenTracksWithHit.size();
3938  uHitTrk++)
3939  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3940  == fvulIdxHiddenTracksWithHit[uHitTrk])
3941  break;
3942  if (fvulIdxHiddenTracksWithHit.size() == uHitTrk)
3943  fvulIdxHiddenTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3944 
3945  // Get a pointer to the corresponding MC Track
3946  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(vTofTracksId[uTrkInHit]);
3947 
3948  if (-1 == pMcTrk->GetMotherId()) {
3949  for (uHitTrk = 0; uHitTrk < fvulIdxHiddenPrimTracksWithHit.size();
3950  uHitTrk++)
3951  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3952  == fvulIdxHiddenPrimTracksWithHit[uHitTrk])
3953  break;
3954  if (fvulIdxHiddenPrimTracksWithHit.size() == uHitTrk)
3955  fvulIdxHiddenPrimTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3956  } // if( -1 == pMcTrk->GetMotherId() )
3957  else {
3958  for (uHitTrk = 0; uHitTrk < fvulIdxHiddenSecTracksWithHit.size();
3959  uHitTrk++)
3960  if (static_cast<ULong64_t>(vTofTracksId[uTrkInHit])
3961  == fvulIdxHiddenSecTracksWithHit[uHitTrk])
3962  break;
3963  if (fvulIdxHiddenSecTracksWithHit.size() == uHitTrk)
3964  fvulIdxHiddenSecTracksWithHit.push_back(vTofTracksId[uTrkInHit]);
3965  } // else of if( -1 == pMcTrk->GetMotherId() )
3966  } // if( 0 == vTofTracksWeight[uTrkInHit] )
3967  } // for( UInt_t uTrkInHit = 0; uTrkInHit < vTofTracksId.size(); uTrkInHit ++)
3968 
3969  // Check Hit Quality for Hits coming from a single MC Point
3970  if (1 == uNbPointsInHit) {
3971  iNbTofHitsSingPnt++;
3972 
3973  fhHitMapSingPntXY->Fill(dX, dY);
3974  fhHitMapSingPntXZ->Fill(dX, dZ);
3975  fhHitMapSingPntYZ->Fill(dY, dZ);
3976  fhHitMapSingPntAng->Fill(dThetaX, dThetaY);
3977  fhHitMapSingPntSph->Fill(dTheta, dPhi);
3978 
3979  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(vTofPointsId[0]);
3980  if (kTRUE == fbRealPointAvail)
3981  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(vTofPointsId[0]);
3982  else
3983  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(vTofPointsId[0]);
3984 
3985  // Obtain Point position
3986  TVector3 vPntPos;
3987  pTofPoint->Position(vPntPos);
3988 
3989  Double_t dDeltaX = dX - vPntPos.X();
3990  Double_t dDeltaY = dY - vPntPos.Y();
3991  Double_t dDeltaZ = dZ - vPntPos.Z();
3992  Double_t dDeltaR = TMath::Sqrt(dDeltaX * dDeltaX + dDeltaY * dDeltaY);
3993  Double_t dDeltaT = 1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
3994 
3995  fhSinglePointHitDeltaX->Fill(dDeltaX);
3996  fhSinglePointHitDeltaY->Fill(dDeltaY);
3997  fhSinglePointHitDeltaZ->Fill(dDeltaZ);
3998  fhSinglePointHitDeltaR->Fill(dDeltaR);
3999  fhSinglePointHitDeltaT->Fill(dDeltaT);
4000  fhSinglePointHitPullX->Fill(dDeltaX / dErrX);
4001  fhSinglePointHitPullY->Fill(dDeltaY / dErrY);
4002  fhSinglePointHitPullZ->Fill(
4003  dDeltaZ / dErrZ); // Offset(s) bec. hit assigned to middle of det.
4004  fhSinglePointHitPullR->Fill(dDeltaR / dErrR);
4005  fhSinglePointHitPullT->Fill(dDeltaT / dErrT);
4006 
4007  fhCltSzSinglePointHitPullX->Fill(dDeltaX / dErrX, iClusterSize);
4008  fhCltSzSinglePointHitPullY->Fill(dDeltaY / dErrY, iClusterSize);
4010  dDeltaZ / dErrZ,
4011  iClusterSize); // Offset(s) bec. hit assigned to middle of det.
4012  fhCltSzSinglePointHitPullR->Fill(dDeltaR / dErrR, iClusterSize);
4013  fhCltSzSinglePointHitPullT->Fill(dDeltaT / dErrT, iClusterSize);
4014  } // if( 1 == vTofPointsId.size() )
4015  // For Hits with multiple MC Points
4016  else {
4017  iNbTofHitsMultPnt++;
4018 
4019  fhHitMapMultPntXY->Fill(dX, dY);
4020  fhHitMapMultPntXZ->Fill(dX, dZ);
4021  fhHitMapMultPntYZ->Fill(dY, dZ);
4022  fhHitMapMultPntAng->Fill(dThetaX, dThetaY);
4023  fhHitMapMultPntSph->Fill(dTheta, dPhi);
4024 
4025  // Check Hit Quality relative to mean of all MC Points
4026  dPntMeanPosX /= vTofPointsId.size();
4027  dPntMeanPosY /= vTofPointsId.size();
4028  dPntMeanPosZ /= vTofPointsId.size();
4029  dPntMeanTime /= vTofPointsId.size();
4030 
4031  Double_t dDeltaMeanX = dX - dPntMeanPosX;
4032  Double_t dDeltaMeanY = dY - dPntMeanPosY;
4033  Double_t dDeltaMeanZ = dZ - dPntMeanPosZ;
4034  Double_t dDeltaMeanR =
4035  TMath::Sqrt(dDeltaMeanX * dDeltaMeanX + dDeltaMeanY * dDeltaMeanY);
4036  Double_t dDeltaMeanT = 1000.0 * (pTofHit->GetTime() - dPntMeanTime);
4037 
4038  fhMultiPntHitMeanDeltaX->Fill(dDeltaMeanX, uNbPointsInHit);
4039  fhMultiPntHitMeanDeltaY->Fill(dDeltaMeanY, uNbPointsInHit);
4040  fhMultiPntHitMeanDeltaZ->Fill(dDeltaMeanZ, uNbPointsInHit);
4041  fhMultiPntHitMeanDeltaR->Fill(dDeltaMeanR, uNbPointsInHit);
4042  fhMultiPntHitMeanDeltaT->Fill(dDeltaMeanT, uNbPointsInHit);
4043  fhMultiPntHitMeanPullX->Fill(dDeltaMeanX / dErrX, uNbPointsInHit);
4044  fhMultiPntHitMeanPullY->Fill(dDeltaMeanY / dErrY, uNbPointsInHit);
4045  fhMultiPntHitMeanPullZ->Fill(
4046  dDeltaMeanZ / dErrZ,
4047  uNbPointsInHit); // Offset(s) bec. hit assigned to middle of det.
4048  fhMultiPntHitMeanPullR->Fill(dDeltaMeanR / dErrR, uNbPointsInHit);
4049  fhMultiPntHitMeanPullT->Fill(dDeltaMeanT / dErrT, uNbPointsInHit);
4050 
4051  // Check Hit Quality relative to closest MC Point
4052  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iClosestPntIdx);
4053  if (kTRUE == fbRealPointAvail)
4054  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iClosestPntIdx);
4055  else
4056  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iClosestPntIdx);
4057 
4058  // Obtain Point position
4059  TVector3 vPntPosClo;
4060  pTofPoint->Position(vPntPosClo);
4061 
4062  Double_t dDeltaCloX = dX - vPntPosClo.X();
4063  Double_t dDeltaCloY = dY - vPntPosClo.Y();
4064  Double_t dDeltaCloZ = dZ - vPntPosClo.Z();
4065  Double_t dDeltaCloR =
4066  TMath::Sqrt(dDeltaCloX * dDeltaCloX + dDeltaCloY * dDeltaCloY);
4067  Double_t dDeltaCloT =
4068  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4069 
4070  fhMultiPntHitClosestDeltaX->Fill(dDeltaCloX, uNbPointsInHit);
4071  fhMultiPntHitClosestDeltaY->Fill(dDeltaCloY, uNbPointsInHit);
4072  fhMultiPntHitClosestDeltaZ->Fill(dDeltaCloZ, uNbPointsInHit);
4073  fhMultiPntHitClosestDeltaR->Fill(dDeltaCloR, uNbPointsInHit);
4074  fhMultiPntHitClosestDeltaT->Fill(dDeltaCloT, uNbPointsInHit);
4075  fhMultiPntHitClosestPullX->Fill(dDeltaCloX / dErrX, uNbPointsInHit);
4076  fhMultiPntHitClosestPullY->Fill(dDeltaCloY / dErrY, uNbPointsInHit);
4078  dDeltaCloZ / dErrZ,
4079  uNbPointsInHit); // Offset(s) bec. hit assigned to middle of det.
4080  fhMultiPntHitClosestPullR->Fill(dDeltaCloR / dErrR, uNbPointsInHit);
4081  fhMultiPntHitClosestPullT->Fill(dDeltaCloT / dErrT, uNbPointsInHit);
4082 
4083  // Check Hit Quality relative to furthest MC Point
4084  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iFurthestPntIdx);
4085  if (kTRUE == fbRealPointAvail)
4086  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iFurthestPntIdx);
4087  else
4088  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iFurthestPntIdx);
4089 
4090  // Obtain Point position
4091  TVector3 vPntPosFar;
4092  pTofPoint->Position(vPntPosFar);
4093 
4094  Double_t dDeltaFarX = dX - vPntPosFar.X();
4095  Double_t dDeltaFarY = dY - vPntPosFar.Y();
4096  Double_t dDeltaFarZ = dZ - vPntPosFar.Z();
4097  Double_t dDeltaFarR =
4098  TMath::Sqrt(dDeltaFarX * dDeltaFarX + dDeltaFarY * dDeltaFarY);
4099  Double_t dDeltaFarT =
4100  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4101 
4102  fhMultiPntHitFurthestDeltaX->Fill(dDeltaFarX, uNbPointsInHit);
4103  fhMultiPntHitFurthestDeltaY->Fill(dDeltaFarY, uNbPointsInHit);
4104  fhMultiPntHitFurthestDeltaZ->Fill(dDeltaFarZ, uNbPointsInHit);
4105  fhMultiPntHitFurthestDeltaR->Fill(dDeltaFarR, uNbPointsInHit);
4106  fhMultiPntHitFurthestDeltaT->Fill(dDeltaFarT, uNbPointsInHit);
4107  fhMultiPntHitFurthestPullX->Fill(dDeltaFarX / dErrX, uNbPointsInHit);
4108  fhMultiPntHitFurthestPullY->Fill(dDeltaFarY / dErrY, uNbPointsInHit);
4110  dDeltaFarZ / dErrZ,
4111  uNbPointsInHit); // Offset(s) bec. hit assigned to middle of det.
4112  fhMultiPntHitFurthestPullR->Fill(dDeltaFarR / dErrR, uNbPointsInHit);
4113  fhMultiPntHitFurthestPullT->Fill(dDeltaFarT / dErrT, uNbPointsInHit);
4114 
4115  // Check Quality to best Point match (highest sum of TOT)
4116  // Do not fill it in Hit producer case as both strip ends receive a same weigth of 1/2
4117  if (kFALSE == fbHitProducerSource) {
4118  CbmLink lPnt = pMatchHitPnt->GetMatchedLink();
4119  Int_t iPtIdx = lPnt.GetIndex();
4120  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPtIdx);
4121  if (kTRUE == fbRealPointAvail) {
4122  // Always only one mean MC Point Index per MC TofPoint
4123  // Weight always 1.0 so just read the index
4124  Int_t iRealPntIdx =
4125  (((CbmMatch*) fRealTofMatchColl->At(iPtIdx))->GetLink(0))
4126  .GetIndex();
4127  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iRealPntIdx);
4128  iPtIdx = iRealPntIdx;
4129  } // if( kTRUE == fbRealPointAvail )
4130 
4131  // Obtain Point position
4132  TVector3 vPntPosBest;
4133  pTofPoint->Position(vPntPosBest);
4134 
4135  Double_t dDeltaBestX = dX - vPntPosBest.X();
4136  Double_t dDeltaBestY = dY - vPntPosBest.Y();
4137  Double_t dDeltaBestZ = dZ - vPntPosBest.Z();
4138  Double_t dDeltaBestR =
4139  TMath::Sqrt(dDeltaBestX * dDeltaBestX + dDeltaBestY * dDeltaBestY);
4140  Double_t dDeltaBestT =
4141  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4142 
4143  fhMultiPntHitBestDeltaX->Fill(dDeltaBestX, uNbPointsInHit);
4144  fhMultiPntHitBestDeltaY->Fill(dDeltaBestY, uNbPointsInHit);
4145  fhMultiPntHitBestDeltaZ->Fill(dDeltaBestZ, uNbPointsInHit);
4146  fhMultiPntHitBestDeltaR->Fill(dDeltaBestR, uNbPointsInHit);
4147  fhMultiPntHitBestDeltaT->Fill(dDeltaBestT, uNbPointsInHit);
4148  fhMultiPntHitBestPullX->Fill(dDeltaBestX / dErrX, uNbPointsInHit);
4149  fhMultiPntHitBestPullY->Fill(dDeltaBestY / dErrY, uNbPointsInHit);
4150  fhMultiPntHitBestPullZ->Fill(
4151  dDeltaBestZ / dErrZ,
4152  uNbPointsInHit); // Offset(s) bec. hit assigned to middle of det.
4153  fhMultiPntHitBestPullR->Fill(dDeltaBestR / dErrR, uNbPointsInHit);
4154  fhMultiPntHitBestPullT->Fill(dDeltaBestT / dErrT, uNbPointsInHit);
4155  } // if( kFALSE == fbHitProducerSource )
4156  } // else of if( 1 == vTofPointsId.size() )
4157 
4158  // Check Hit Quality for Hits coming from a single MC Track
4159  if (1 == uNbTracksInHit) {
4160  iNbTofHitsSingTrk++;
4161 
4162  fhHitMapSingTrkXY->Fill(dX, dY);
4163  fhHitMapSingTrkXZ->Fill(dX, dZ);
4164  fhHitMapSingTrkYZ->Fill(dY, dZ);
4165  fhHitMapSingTrkAng->Fill(dThetaX, dThetaY);
4166  fhHitMapSingTrkSph->Fill(dTheta, dPhi);
4167 
4168  // => If all points come from the same track, any of them should give
4169  // the approximate position and time of the track at the detector level
4170  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(vTofPointsId[0]);
4171  if (kTRUE == fbRealPointAvail)
4172  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(vTofPointsId[0]);
4173  else
4174  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(vTofPointsId[0]);
4175 
4176  // Obtain Point position
4177  TVector3 vPntPos;
4178  pTofPoint->Position(vPntPos);
4179 
4180  Double_t dDeltaX = dX - vPntPos.X();
4181  Double_t dDeltaY = dY - vPntPos.Y();
4182  Double_t dDeltaZ = dZ - vPntPos.Z();
4183  Double_t dDeltaR = TMath::Sqrt(dDeltaX * dDeltaX + dDeltaY * dDeltaY);
4184  Double_t dDeltaT = 1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4185 
4186  fhSingleTrackHitDeltaX->Fill(dDeltaX);
4187  fhSingleTrackHitDeltaY->Fill(dDeltaY);
4188  fhSingleTrackHitDeltaZ->Fill(dDeltaZ);
4189  fhSingleTrackHitDeltaR->Fill(dDeltaR);
4190  fhSingleTrackHitDeltaT->Fill(dDeltaT);
4191  fhSingleTrackHitPullX->Fill(dDeltaX / dErrX);
4192  fhSingleTrackHitPullY->Fill(dDeltaY / dErrY);
4193  fhSingleTrackHitPullZ->Fill(
4194  dDeltaZ / dErrZ); // Offset(s) bec. hit assigned to middle of det.
4195  fhSingleTrackHitPullR->Fill(dDeltaR / dErrR);
4196  fhSingleTrackHitPullT->Fill(dDeltaT / dErrT);
4197 
4198  if (1 < uNbPointsInHit) {
4199  fhSingTrkMultiPntHitDeltaX->Fill(dDeltaX);
4200  fhSingTrkMultiPntHitDeltaY->Fill(dDeltaY);
4201  fhSingTrkMultiPntHitDeltaZ->Fill(dDeltaZ);
4202  fhSingTrkMultiPntHitDeltaR->Fill(dDeltaR);
4204  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime()));
4205  fhSingTrkMultiPntHitPullX->Fill(dDeltaX / dErrX);
4206  fhSingTrkMultiPntHitPullY->Fill(dDeltaY / dErrY);
4208  dDeltaZ / dErrZ); // Offset(s) bec. hit assigned to middle of det.
4209  fhSingTrkMultiPntHitPullR->Fill(dDeltaR / dErrR);
4210  fhSingTrkMultiPntHitPullT->Fill(dDeltaT / dErrT);
4211  } // if( 1 < uNbPointsInHit )
4212 
4213  // Get the MC track and fill its length up to the TOF point in the proper histo
4214  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(pTofPoint->GetTrackID());
4215 
4216  Int_t iPdgCode = pMcTrk->GetPdgCode();
4217  Int_t iPartIdx = -1;
4218  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
4219  if (kiPartPdgCode[iPart] == iPdgCode) {
4220  iPartIdx = iPart;
4221  break;
4222  } // if( kiPartPdgCode[iPart] == iPdgCode )
4223  if (-1 == iPartIdx) iPartIdx = 0;
4224  if (-1 == pMcTrk->GetMotherId())
4225  fhMcTrkStartPrimSingTrk->Fill(pMcTrk->GetStartZ(), iPartIdx);
4226  else
4227  fhMcTrkStartSecSingTrk->Fill(pMcTrk->GetStartZ(), iPartIdx);
4228  } // if( 1 == vTofTracksId.size() )
4229  // For Hits with multiple MC Tracks
4230  else {
4231  iNbTofHitsMultTrk++;
4232 
4233  fhHitMapMultTrkXY->Fill(dX, dY);
4234  fhHitMapMultTrkXZ->Fill(dX, dZ);
4235  fhHitMapMultTrkYZ->Fill(dY, dZ);
4236  fhHitMapMultTrkAng->Fill(dThetaX, dThetaY);
4237  fhHitMapMultTrkSph->Fill(dTheta, dPhi);
4238 
4239  // Check Hit Quality relative to mean of all MC Tracks
4240  dTrkMeanPosX /= vTofTracksId.size();
4241  dTrkMeanPosY /= vTofTracksId.size();
4242  dTrkMeanPosZ /= vTofTracksId.size();
4243  dTrkMeanTime /= vTofTracksId.size();
4244 
4245  Double_t dDeltaMeanX = dX - dTrkMeanPosX;
4246  Double_t dDeltaMeanY = dY - dTrkMeanPosY;
4247  Double_t dDeltaMeanZ = dZ - dTrkMeanPosZ;
4248  Double_t dDeltaMeanR =
4249  TMath::Sqrt(dDeltaMeanX * dDeltaMeanX + dDeltaMeanY * dDeltaMeanY);
4250  Double_t dDeltaMeanT = 1000.0 * (pTofHit->GetTime() - dTrkMeanTime);
4251 
4252  fhMultiTrkHitMeanDeltaX->Fill(dDeltaMeanX, uNbTracksInHit);
4253  fhMultiTrkHitMeanDeltaY->Fill(dDeltaMeanY, uNbTracksInHit);
4254  fhMultiTrkHitMeanDeltaZ->Fill(dDeltaMeanZ, uNbTracksInHit);
4255  fhMultiTrkHitMeanDeltaR->Fill(dDeltaMeanR, uNbTracksInHit);
4256  fhMultiTrkHitMeanDeltaT->Fill(dDeltaMeanT, uNbTracksInHit);
4257  fhMultiTrkHitMeanPullX->Fill(dDeltaMeanX / dErrX, uNbTracksInHit);
4258  fhMultiTrkHitMeanPullY->Fill(dDeltaMeanY / dErrY, uNbTracksInHit);
4259  fhMultiTrkHitMeanPullZ->Fill(
4260  dDeltaMeanZ / dErrZ,
4261  uNbTracksInHit); // Offset(s) bec. hit assigned to middle of det.
4262  fhMultiTrkHitMeanPullR->Fill(dDeltaMeanR / dErrR, uNbTracksInHit);
4263  fhMultiTrkHitMeanPullT->Fill(dDeltaMeanT / dErrT, uNbTracksInHit);
4264 
4265  // Check Hit Quality relative to closest MC Tracks
4266  // Obtain Point position (Consider 1st Pnt of each Trk is approximate coord)
4267  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iClosestTrkIdx);
4268  if (kTRUE == fbRealPointAvail)
4269  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iClosestTrkIdx);
4270  else
4271  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iClosestTrkIdx);
4272 
4273  TVector3 vPntPosClo;
4274  pTofPoint->Position(vPntPosClo);
4275 
4276  Double_t dDeltaCloX = dX - vPntPosClo.X();
4277  Double_t dDeltaCloY = dY - vPntPosClo.Y();
4278  Double_t dDeltaCloZ = dZ - vPntPosClo.Z();
4279  Double_t dDeltaCloR =
4280  TMath::Sqrt(dDeltaCloX * dDeltaCloX + dDeltaCloY * dDeltaCloY);
4281  Double_t dDeltaCloT =
4282  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4283 
4284  fhMultiTrkHitClosestDeltaX->Fill(dDeltaCloX, uNbTracksInHit);
4285  fhMultiTrkHitClosestDeltaY->Fill(dDeltaCloY, uNbTracksInHit);
4286  fhMultiTrkHitClosestDeltaZ->Fill(dDeltaCloZ, uNbTracksInHit);
4287  fhMultiTrkHitClosestDeltaR->Fill(dDeltaCloR, uNbTracksInHit);
4288  fhMultiTrkHitClosestDeltaT->Fill(dDeltaCloT, uNbTracksInHit);
4289  fhMultiTrkHitClosestPullX->Fill(dDeltaCloX / dErrX, uNbTracksInHit);
4290  fhMultiTrkHitClosestPullY->Fill(dDeltaCloY / dErrY, uNbTracksInHit);
4292  dDeltaCloZ / dErrZ,
4293  uNbTracksInHit); // Offset(s) bec. hit assigned to middle of det.
4294  fhMultiTrkHitClosestPullR->Fill(dDeltaCloR / dErrR, uNbTracksInHit);
4295  fhMultiTrkHitClosestPullT->Fill(dDeltaCloT / dErrT, uNbTracksInHit);
4296 
4297  // Check Hit Quality relative to furthest MC Tracks
4298  // Obtain Point position (Consider 1st Pnt of each Trk is approximate coord)
4299  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iFurthestTrkIdx);
4300  if (kTRUE == fbRealPointAvail)
4301  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(iFurthestTrkIdx);
4302  else
4303  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iFurthestTrkIdx);
4304 
4305  TVector3 vPntPosFar;
4306  pTofPoint->Position(vPntPosFar);
4307 
4308  Double_t dDeltaFarX = dX - vPntPosFar.X();
4309  Double_t dDeltaFarY = dY - vPntPosFar.Y();
4310  Double_t dDeltaFarZ = dZ - vPntPosFar.Z();
4311  Double_t dDeltaFarR =
4312  TMath::Sqrt(dDeltaFarX * dDeltaFarX + dDeltaFarY * dDeltaFarY);
4313  Double_t dDeltaFarT =
4314  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4315 
4316  fhMultiTrkHitFurthestDeltaX->Fill(dDeltaFarX, uNbTracksInHit);
4317  fhMultiTrkHitFurthestDeltaY->Fill(dDeltaFarY, uNbTracksInHit);
4318  fhMultiTrkHitFurthestDeltaZ->Fill(dDeltaFarZ, uNbTracksInHit);
4319  fhMultiTrkHitFurthestDeltaR->Fill(dDeltaFarR, uNbTracksInHit);
4320  fhMultiTrkHitFurthestDeltaT->Fill(dDeltaFarT, uNbTracksInHit);
4321  fhMultiTrkHitFurthestPullX->Fill(dDeltaFarX / dErrX, uNbTracksInHit);
4322  fhMultiTrkHitFurthestPullY->Fill(dDeltaFarY / dErrY, uNbTracksInHit);
4324  dDeltaFarZ / dErrZ,
4325  uNbTracksInHit); // Offset(s) bec. hit assigned to middle of det.
4326  fhMultiTrkHitFurthestPullR->Fill(dDeltaFarR / dErrR, uNbTracksInHit);
4327  fhMultiTrkHitFurthestPullT->Fill(dDeltaFarT / dErrT, uNbTracksInHit);
4328 
4329  // Check Quality to best Track match (highest sum of TOT)
4330  // Do not fill it in Hit producer case as both strip ends receive a same weigth of 1/2
4331  if (kFALSE == fbHitProducerSource) {
4332  // Loop on tracks to find the one with the highest weight
4333  UInt_t uBestTrackIdx = 0;
4334  Double_t dBestTrackWeight = -1.0;
4335  for (UInt_t uTrkIdx = 0; uTrkIdx < vTofTracksId.size(); uTrkIdx++)
4336  if (dBestTrackWeight < vTofTracksWeight[uTrkIdx]) {
4337  uBestTrackIdx = uTrkIdx;
4338  dBestTrackWeight = vTofTracksWeight[uTrkIdx];
4339  } // if( dBestTrackWeight < vTofTracksWeight[uTrkIdx] )
4340 
4341  // Obtain Point position (Consider 1st Pnt of each Trk is approximate coord)
4342  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At( vTofTracksFirstPntId[uBestTrackIdx] );
4343  if (kTRUE == fbRealPointAvail)
4344  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(
4345  vTofTracksFirstPntId[uBestTrackIdx]);
4346  else
4347  pTofPoint = (CbmTofPoint*) fTofPointsColl->At(
4348  vTofTracksFirstPntId[uBestTrackIdx]);
4349 
4350  TVector3 vPntPosBest;
4351  pTofPoint->Position(vPntPosBest);
4352 
4353  Double_t dDeltaBestX = dX - vPntPosBest.X();
4354  Double_t dDeltaBestY = dY - vPntPosBest.Y();
4355  Double_t dDeltaBestZ = dZ - vPntPosBest.Z();
4356  Double_t dDeltaBestR =
4357  TMath::Sqrt(dDeltaBestX * dDeltaBestX + dDeltaBestY * dDeltaBestY);
4358  Double_t dDeltaBestT =
4359  1000.0 * (pTofHit->GetTime() - pTofPoint->GetTime());
4360 
4361  fhMultiTrkHitBestDeltaX->Fill(dDeltaBestX, uNbTracksInHit);
4362  fhMultiTrkHitBestDeltaY->Fill(dDeltaBestY, uNbTracksInHit);
4363  fhMultiTrkHitBestDeltaZ->Fill(dDeltaBestZ, uNbTracksInHit);
4364  fhMultiTrkHitBestDeltaR->Fill(dDeltaBestR, uNbTracksInHit);
4365  fhMultiTrkHitBestDeltaT->Fill(dDeltaBestT, uNbTracksInHit);
4366  fhMultiTrkHitBestPullX->Fill(dDeltaBestX / dErrX, uNbTracksInHit);
4367  fhMultiTrkHitBestPullY->Fill(dDeltaBestY / dErrY, uNbTracksInHit);
4368  fhMultiTrkHitBestPullZ->Fill(
4369  dDeltaBestZ / dErrZ,
4370  uNbTracksInHit); // Offset(s) bec. hit assigned to middle of det.
4371  fhMultiTrkHitBestPullR->Fill(dDeltaBestR / dErrR, uNbTracksInHit);
4372  fhMultiTrkHitBestPullT->Fill(dDeltaBestT / dErrT, uNbTracksInHit);
4373  } // if( kFALSE == fbHitProducerSource )
4374 
4375  // Get each MC track and fill its length up to the 1at TOF point in the proper histo
4376  for (UInt_t uTrkIdx = 0; uTrkIdx < vTofTracksId.size(); uTrkIdx++) {
4377  // pTofPoint = (CbmTofPoint*) fTofPointsColl->At( vTofTracksFirstPntId[uTrkIdx] );
4378  if (kTRUE == fbRealPointAvail)
4379  pTofPoint = (CbmTofPoint*) fRealTofPointsColl->At(
4380  vTofTracksFirstPntId[uTrkIdx]);
4381  else
4382  pTofPoint =
4383  (CbmTofPoint*) fTofPointsColl->At(vTofTracksFirstPntId[uTrkIdx]);
4384 
4385  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(pTofPoint->GetTrackID());
4386 
4387  Int_t iPdgCode = pMcTrk->GetPdgCode();
4388  Int_t iPartIdx = -1;
4389  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
4390  if (kiPartPdgCode[iPart] == iPdgCode) {
4391  iPartIdx = iPart;
4392  break;
4393  } // if( kiPartPdgCode[iPart] == iPdgCode )
4394  if (-1 == iPartIdx) iPartIdx = 0;
4395  if (-1 == pMcTrk->GetMotherId())
4396  fhMcTrkStartPrimMultiTrk->Fill(pMcTrk->GetStartZ(), iPartIdx);
4397  else
4398  fhMcTrkStartSecMultiTrk->Fill(pMcTrk->GetStartZ(), iPartIdx);
4399  } // for( UInt_t uTrkIdx = 0; uTrkIdx < vTofTracksId.size(); uTrkIdx++)
4400  } // else of if( 1 == vTofTracksId.size() )
4401 
4402  // Physics coord mapping, 1 per particle type
4403  /*
4404  // Do as in CbmHadronAna: Take the MC Point of the first Digi matched with the hit
4405  pMatchHitDigi = (CbmMatch*) fTofDigiMatchColl->At( iHitInd );
4406  // Get index of first digi
4407  CbmLink lDigi = pMatchHitDigi->GetLink(0);
4408  Int_t iDigiIdx = lDigi.GetIndex();
4409  if( iNbTofDigis <= iDigiIdx )
4410  {
4411  LOG(error)<<"CbmTofHitFinderQa::FillHistos => Digi index from Hit #"
4412  <<iHitInd<<" in event #"<<fEvents
4413  <<" is bigger than nb entries in Digis arrays => ignore it!!!";
4414  continue;
4415  } // if( iNbTofDigis <= iDigiIdx )
4416  // Get pointer on match of first digi
4417  pMatchDigiPnt = (CbmMatch*) fTofDigiMatchPointsColl->At( iDigiIdx );
4418  // Get index of tof point corresponding to the first digi
4419  CbmLink lPt = pMatchDigiPnt->GetMatchedLink();
4420 */
4421  // Get point with the best match (highest weight), in HitProd this returns the left Pnt
4422  CbmLink lPt = pMatchHitPnt->GetMatchedLink();
4423  Int_t iPtIdx = lPt.GetIndex();
4424  // Get index of corresponding MC track
4425  Int_t iTrkId = ((CbmTofPoint*) fTofPointsColl->At(iPtIdx))->GetTrackID();
4426  if (kTRUE == fbRealPointAvail) {
4427  // Always only one mean MC Point Index per MC TofPoint
4428  // Weight always 1.0 so just read the index
4429  Int_t iRealPntIdx =
4430  (((CbmMatch*) fRealTofMatchColl->At(iPtIdx))->GetLink(0)).GetIndex();
4431  iTrkId =
4432  ((CbmTofPoint*) fRealTofPointsColl->At(iRealPntIdx))->GetTrackID();
4433  iPtIdx = iRealPntIdx;
4434  } // if( kTRUE == fbRealPointAvail )
4435 
4436  // Get a pointer to the corresponding MC Track
4437  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(iTrkId);
4438 
4439  Int_t iPdgCode = pMcTrk->GetPdgCode();
4440  Int_t iPartIdx = -1;
4441  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
4442  if (kiPartPdgCode[iPart] == iPdgCode) {
4443  iPartIdx = iPart;
4444  break;
4445  } // if( kiPartPdgCode[iPart] == iPdgCode )
4446  if (-1 == iPartIdx) iPartIdx = 0;
4447  if (-1 == pMcTrk->GetMotherId()) {
4448  // primary track
4449  // Phase space
4450  fvhPtmRapTofHit[iPartIdx]->Fill(pMcTrk->GetRapidity(),
4451  pMcTrk->GetPt() / pMcTrk->GetMass());
4452  // PLab
4453  fvhPlabTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4454  if (1 == vTofPointsId.size()) {
4455  fvhPtmRapTofHitSinglePnt[iPartIdx]->Fill(
4456  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4457  fvhPlabTofHitSinglePnt[iPartIdx]->Fill(pMcTrk->GetP());
4458  } // if( 1 == vTofPointsId.size() )
4459  if (1 == vTofTracksId.size()) {
4460  fvhPtmRapTofHitSingleTrk[iPartIdx]->Fill(
4461  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4462  fvhPlabTofHitSingleTrk[iPartIdx]->Fill(pMcTrk->GetP());
4463  } // if( 1 == vTofTracksId.size() )
4464  } // if( -1 == pMcTrk->GetMotherId() )
4465  else {
4466  // secondary track
4467  // Phase space
4468  fvhPtmRapSecTofHit[iPartIdx]->Fill(pMcTrk->GetRapidity(),
4469  pMcTrk->GetPt() / pMcTrk->GetMass());
4470  // PLab
4471  fvhPlabSecTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4472  if (1 == vTofPointsId.size()) {
4473  fvhPtmRapSecTofHitSinglePnt[iPartIdx]->Fill(
4474  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4475  fvhPlabSecTofHitSinglePnt[iPartIdx]->Fill(pMcTrk->GetP());
4476  } // if( 1 == vTofPointsId.size() )
4477  if (1 == vTofTracksId.size()) {
4478  fvhPtmRapSecTofHitSingleTrk[iPartIdx]->Fill(
4479  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4480  fvhPlabSecTofHitSingleTrk[iPartIdx]->Fill(pMcTrk->GetP());
4481  } // if( 1 == vTofTracksId.size() )
4482  } // else of if( -1 == pMcTrk->GetMotherId() )
4483  // clear storage of point and track IDs
4484  vTofPointsId.clear();
4485  vTofTracksId.clear();
4486  } // if( kFALSE == fbNormHistGenMode )
4487  } // for( Int_t iHitInd = 0; iHitInd < iNbTofHits; iHitInd++ )
4488 
4489  // Nb Hits per event for first N events
4490  fhNbHitsPerEvent->Fill(fEvents, iNbTofHits);
4491  fhNbHitsSingPntPerEvent->Fill(fEvents, iNbTofHitsSingPnt);
4492  fhNbHitsMultPntPerEvent->Fill(fEvents, iNbTofHitsMultPnt);
4493  fhNbHitsSingTrkPerEvent->Fill(fEvents, iNbTofHitsSingTrk);
4494  fhNbHitsMultTrkPerEvent->Fill(fEvents, iNbTofHitsMultTrk);
4495 
4496  // MC Tracks losses
4497  for (Int_t iTrkInd = 0; iTrkInd < iNbTracks; iTrkInd++) {
4498  pMcTrk = (CbmMCTrack*) fMcTracksColl->At(iTrkInd);
4499 
4500  if (kTRUE == vbTrackHasHit[iTrkInd]) {
4501  // Physics coord mapping, 1 per particle type
4502  Int_t iPdgCode = pMcTrk->GetPdgCode();
4503  Int_t iPartIdx = -1;
4504  for (Int_t iPart = 0; iPart < kiNbPart; iPart++)
4505  if (kiPartPdgCode[iPart] == iPdgCode) {
4506  iPartIdx = iPart;
4507  break;
4508  } // if( kiPartPdgCode[iPart] == iPdgCode )
4509  if (-1 == iPartIdx) iPartIdx = 0;
4510  if (-1 == pMcTrk->GetMotherId()) {
4511  // primary track
4512  fvhPtmRapGenTrkTofHit[iPartIdx]->Fill(
4513  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4514  fvhPlabGenTrkTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4515 
4516  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts))
4517  fvhPlabStsTrkTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4518  } // if( -1 == pMcTrk->GetMotherId() )
4519  else {
4520  // secondary track
4521  fvhPtmRapSecGenTrkTofHit[iPartIdx]->Fill(
4522  pMcTrk->GetRapidity(), pMcTrk->GetPt() / pMcTrk->GetMass());
4523  fvhPlabSecGenTrkTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4524 
4525  if (kiMinNbStsPntAcc <= pMcTrk->GetNPoints(ECbmModuleId::kSts))
4526  fvhPlabSecStsTrkTofHit[iPartIdx]->Fill(pMcTrk->GetP());
4527  } // else of if( -1 == pMcTrk->GetMotherId() )
4528  } // if( kTRUE == vbTrackHasHit[iTrkId] )
4529  } // for(Int_t iTrkInd = 0; iTrkInd < nMcTracks; iTrkInd++)
4530  vbTrackHasHit.clear();
4531 
4532  // Integrated TofHit Efficiency
4533  if (0 < fvulIdxTracksWithPnt.size())
4534  fhIntegratedHitPntEff->Fill(
4535  100.0 * (static_cast<Double_t>(fvulIdxTracksWithHit.size()))
4536  / (static_cast<Double_t>(fvulIdxTracksWithPnt.size())));
4537  if (0 < fvulIdxPrimTracksWithPnt.size())
4539  100.0 * (static_cast<Double_t>(fvulIdxPrimTracksWithHit.size()))
4540  / (static_cast<Double_t>(fvulIdxPrimTracksWithPnt.size())));
4541  if (0 < fvulIdxSecTracksWithPnt.size())
4543  100.0 * (static_cast<Double_t>(fvulIdxSecTracksWithHit.size()))
4544  / (static_cast<Double_t>(fvulIdxSecTracksWithPnt.size())));
4545 
4546  // Integrated TofHit Efficiency: Tracks firing channel but not going to Digi/Hit
4547  if (0 < fvulIdxTracksWithPnt.size())
4549  100.0 * (static_cast<Double_t>(fvulIdxHiddenTracksWithHit.size()))
4550  / (static_cast<Double_t>(fvulIdxTracksWithPnt.size())));
4551  if (0 < fvulIdxPrimTracksWithPnt.size())
4553  100.0 * (static_cast<Double_t>(fvulIdxHiddenPrimTracksWithHit.size()))
4554  / (static_cast<Double_t>(fvulIdxPrimTracksWithPnt.size())));
4555  if (0 < fvulIdxSecTracksWithPnt.size())
4557  100.0 * (static_cast<Double_t>(fvulIdxHiddenSecTracksWithHit.size()))
4558  / (static_cast<Double_t>(fvulIdxSecTracksWithPnt.size())));
4559 
4560  LOG(debug2) << "CbmTofHitFinderQa::FillHistos => nb prim trk w/ pnt: "
4561  << fvulIdxPrimTracksWithPnt.size()
4562  << " nb prim trk w/ hit: " << fvulIdxPrimTracksWithHit.size()
4563  << " ";
4564  // Efficiency dependence on nb crossed gaps
4565  TString sHead =
4566  "CbmTofHitFinderQa::FillHistos => N pnt: ";
4567  TString sPnt =
4568  "CbmTofHitFinderQa::FillHistos => nb prim trk w/ N pnt: ";
4569  TString sHit =
4570  "CbmTofHitFinderQa::FillHistos => nb prim trk w/ N pnt & hit: ";
4571  for (UInt_t uNbGaps = 0; uNbGaps < fuMaxCrossedGaps; uNbGaps++) {
4572  sHead += Form("%4u ", uNbGaps);
4573  sPnt += Form("%4lu ", fvulIdxPrimTracksWithPntGaps[uNbGaps].size());
4574  sHit += Form("%4lu ", fvulIdxPrimTracksWithHitGaps[uNbGaps].size());
4575 
4576  if (0 < fvulIdxTracksWithPntGaps[uNbGaps].size())
4578  100.0
4579  * (static_cast<Double_t>(fvulIdxTracksWithHitGaps[uNbGaps].size()))
4580  / (static_cast<Double_t>(fvulIdxTracksWithPntGaps[uNbGaps].size())),
4581  uNbGaps + 1);
4582  if (0 < fvulIdxPrimTracksWithPntGaps[uNbGaps].size())
4584  100.0
4585  * (static_cast<Double_t>(
4586  fvulIdxPrimTracksWithHitGaps[uNbGaps].size()))
4587  / (static_cast<Double_t>(
4588  fvulIdxPrimTracksWithPntGaps[uNbGaps].size())),
4589  uNbGaps + 1);
4590  if (0 < fvulIdxSecTracksWithPntGaps[uNbGaps].size())
4592  100.0
4593  * (static_cast<Double_t>(fvulIdxSecTracksWithHitGaps[uNbGaps].size()))
4594  / (static_cast<Double_t>(
4595  fvulIdxSecTracksWithPntGaps[uNbGaps].size())),
4596  uNbGaps + 1);
4597  } // for( UInt_t uNbGaps = 0; uNbGaps < fuMaxCrossedGaps; uNbGaps++)
4598  LOG(debug2) << sHead;
4599  LOG(debug2) << sPnt;
4600  LOG(debug2) << sHit;
4601 
4602  return kTRUE;
4603 }
4604 // ------------------------------------------------------------------
4605 
4607  fsHistoInNormCartFilename = sFilenameIn;
4608  return kTRUE;
4609 }
4611  fsHistoInNormAngFilename = sFilenameIn;
4612  return kTRUE;
4613 }
4615  fsHistoInNormSphFilename = sFilenameIn;
4616  return kTRUE;
4617 }
4619  // TIP: Normalization files can (should?) be generated using the FairBoxGenerator
4620  // to get uniform distributions with the right density in the desired coords.
4621  // Normalization of Cartesian coordinates maps
4622  if ("" != fsHistoInNormCartFilename) {
4623  // Open file and set folders properly to avoid creating objects in uncontrolled places
4624  TDirectory* oldir = gDirectory;
4625  TFile* fHistNorm = new TFile(fsHistoInNormCartFilename, "READ");
4626  if (NULL == fHistNorm) {
4627  LOG(error)
4628  << "CbmTofHitFinderQa::NormalizeMapHistos => Could not open file"
4629  << " with Normalization histos of Cartesian coordinates maps with name "
4630  << fsHistoInNormCartFilename << " => Stopping normalization here!";
4631  return kFALSE;
4632  } // if( NULL == fHistNorm )
4633  gROOT->cd();
4634 
4635  // Prepare pointers to access normalization histos
4636  TH2* fhPointMapNormXY = NULL;
4637  TH2* fhPointMapNormXZ = NULL;
4638  TH2* fhPointMapNormYZ = NULL;
4639  TH2* fhDigiMapNormXY = NULL;
4640  TH2* fhDigiMapNormXZ = NULL;
4641  TH2* fhDigiMapNormYZ = NULL;
4642  TH2* fhHitMapNormXY = NULL;
4643  TH2* fhHitMapNormXZ = NULL;
4644  TH2* fhHitMapNormYZ = NULL;
4645 
4646  // Get pointers for norm histos from file if they exist
4647  fhPointMapNormXY =
4648  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_PointsMapXY"));
4649  fhPointMapNormXZ =
4650  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_PointsMapXZ"));
4651  fhPointMapNormYZ =
4652  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_PointsMapYZ"));
4653 
4654  fhDigiMapNormXY =
4655  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_DigisMapXY"));
4656  fhDigiMapNormXZ =
4657  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_DigisMapXZ"));
4658  fhDigiMapNormYZ =
4659  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_DigisMapYZ"));
4660 
4661  fhHitMapNormXY =
4662  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_HitsMapXY"));
4663  fhHitMapNormXZ =
4664  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_HitsMapXZ"));
4665  fhHitMapNormYZ =
4666  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_HitsMapYZ"));
4667  LOG(info) << "CbmTofHitFinderQa::NormalizeMapHistos => XY norm histos: "
4668  << fhPointMapNormXY << " " << fhDigiMapNormXY << " "
4669  << fhHitMapNormXY << " ";
4670  LOG(info) << "CbmTofHitFinderQa::NormalizeMapHistos => XZ norm histos: "
4671  << fhPointMapNormXZ << " " << fhDigiMapNormXZ << " "
4672  << fhHitMapNormXZ << " ";
4673  LOG(info) << "CbmTofHitFinderQa::NormalizeMapHistos => YZ norm histos: "
4674  << fhPointMapNormYZ << " " << fhDigiMapNormYZ << " "
4675  << fhHitMapNormYZ << " ";
4676 
4677  // If norm histo found, normalize corresponding map
4678  if (NULL != fhPointMapNormXY) {
4679  fhPointMapXY->Divide(fhPointMapNormXY);
4680  } // if( NULL != fhPointMapNormXY )
4681  if (NULL != fhPointMapNormXZ) {
4682  fhPointMapXZ->Divide(fhPointMapNormXZ);
4683  } // if( NULL != fhPointMapNormXZ )
4684  if (NULL != fhPointMapNormYZ) {
4685  fhPointMapYZ->Divide(fhPointMapNormYZ);
4686  } // if( NULL != fhPointMapNormYZ )
4687  if (NULL != fhDigiMapNormXY) {
4688  fhDigiMapXY->Divide(fhDigiMapNormXY);
4689  } // if( NULL != fhDigiMapNormXY )
4690  if (NULL != fhDigiMapNormXZ) {
4691  fhDigiMapXZ->Divide(fhDigiMapNormXZ);
4692  } // if( NULL != fhDigiMapNormXZ )
4693  if (NULL != fhDigiMapNormYZ) {
4694  fhDigiMapYZ->Divide(fhDigiMapNormYZ);
4695  } // if( NULL != fhDigiMapNormYZ )
4696  if (NULL != fhHitMapNormXY) {
4697  fhHitMapXY->Divide(fhHitMapNormXY);
4698  fhHitMapSingPntXY->Divide(fhHitMapNormXY);
4699  fhHitMapMultPntXY->Divide(fhHitMapNormXY);
4700  fhHitMapSingTrkXY->Divide(fhHitMapNormXY);
4701  fhHitMapMultTrkXY->Divide(fhHitMapNormXY);
4702  } // if( NULL != fhHitMapNormXY )
4703  if (NULL != fhHitMapNormXZ) {
4704  fhHitMapXZ->Divide(fhHitMapNormXZ);
4705  fhHitMapSingPntXZ->Divide(fhHitMapNormXZ);
4706  fhHitMapMultPntXZ->Divide(fhHitMapNormXZ);
4707  fhHitMapSingTrkXZ->Divide(fhHitMapNormXZ);
4708  fhHitMapMultTrkXZ->Divide(fhHitMapNormXZ);
4709  } // if( NULL != fhHitMapNormXZ )
4710  if (NULL != fhHitMapNormYZ) {
4711  fhHitMapYZ->Divide(fhHitMapNormYZ);
4712  fhHitMapSingPntYZ->Divide(fhHitMapNormYZ);
4713  fhHitMapMultPntYZ->Divide(fhHitMapNormYZ);
4714  fhHitMapSingTrkYZ->Divide(fhHitMapNormYZ);
4715  fhHitMapMultTrkYZ->Divide(fhHitMapNormYZ);
4716  } // if( NULL != fhHitMapNormYZ )
4717 
4718  // Go back to original folder, whereever it is
4719  gDirectory->cd(oldir->GetPath());
4720 
4721  fHistNorm->Close();
4722  } // if( "" != fsHistoInNormCartFilename )
4723  else
4724  LOG(info)
4725  << "CbmTofHitFinderQa::NormalizeMapHistos => Name of input file for"
4726  << " Normalization of Cartesian coordinates maps not given"
4727  << " => no normalization for these maps!";
4728  // Normalization of Angular coordinates maps
4729  if ("" != fsHistoInNormAngFilename) {
4730  // Open file and set folders properly to avoid creating objects in uncontrolled places
4731  TDirectory* oldir = gDirectory;
4732  TFile* fHistNorm = new TFile(fsHistoInNormAngFilename, "READ");
4733  if (NULL == fHistNorm) {
4734  LOG(error)
4735  << "CbmTofHitFinderQa::NormalizeMapHistos => Could not open file"
4736  << " with Normalization histos of Angular coordinates maps with name "
4737  << fsHistoInNormAngFilename << " => Stopping normalization here!";
4738  return kFALSE;
4739  } // if( NULL == fHistNorm )
4740  gROOT->cd();
4741 
4742  // Prepare pointers to access normalization histos
4743  TH2* fhPointMapNormAng = NULL;
4744  TH2* fhDigiMapNormAng = NULL;
4745  TH2* fhHitMapNormAng = NULL;
4746 
4747  // Get pointers for norm histos from file if they exist
4748  fhPointMapNormAng =
4749  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_PointsMapAng"));
4750  fhDigiMapNormAng =
4751  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_DigisMapAng"));
4752  fhHitMapNormAng =
4753  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_HitsMapAng"));
4754  LOG(info)
4755  << "CbmTofHitFinderQa::NormalizeMapHistos => Angular norm histos: "
4756  << fhPointMapNormAng << " " << fhDigiMapNormAng << " " << fhHitMapNormAng
4757  << " ";
4758 
4759  // If norm histo found, normalize corresponding map
4760  if (NULL != fhPointMapNormAng) fhPointMapAng->Divide(fhPointMapNormAng);
4761  if (NULL != fhDigiMapNormAng) fhDigiMapAng->Divide(fhDigiMapNormAng);
4762  if (NULL != fhHitMapNormAng) {
4763  fhHitMapAng->Divide(fhHitMapNormAng);
4764  fhHitMapSingPntAng->Divide(fhHitMapNormAng);
4765  fhHitMapMultPntAng->Divide(fhHitMapNormAng);
4766  fhHitMapSingTrkAng->Divide(fhHitMapNormAng);
4767  fhHitMapMultTrkAng->Divide(fhHitMapNormAng);
4768  }
4769 
4770  // Go back to original folder, whereever it is
4771  gDirectory->cd(oldir->GetPath());
4772 
4773  fHistNorm->Close();
4774  } // if( "" != fsHistoInNormAngFilename )
4775  else
4776  LOG(info)
4777  << "CbmTofHitFinderQa::NormalizeMapHistos => Name of input file for"
4778  << " Normalization of Angular coordinates maps not given"
4779  << " => no normalization for these maps!";
4780  // Normalization of Spherical coordinates maps
4781  if ("" != fsHistoInNormSphFilename) {
4782  // Open file and set folders properly to avoid creating objects in uncontrolled places
4783  TDirectory* oldir = gDirectory;
4784  TFile* fHistNorm = new TFile(fsHistoInNormSphFilename, "READ");
4785  if (NULL == fHistNorm) {
4786  LOG(error)
4787  << "CbmTofHitFinderQa::NormalizeMapHistos => Could not open file"
4788  << " with Normalization histos of Spherical coordinates maps with name "
4789  << fsHistoInNormSphFilename << " => Stopping normalization here!";
4790  return kFALSE;
4791  } // if( NULL == fHistNorm )
4792  gROOT->cd();
4793 
4794  // Prepare pointers to access normalization histos
4795  TH2* fhPointMapNormSph = NULL;
4796  TH2* fhDigiMapNormSph = NULL;
4797  TH2* fhHitMapNormSph = NULL;
4798 
4799  // Get pointers for norm histos from file if they exist
4800  fhPointMapNormSph =
4801  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_PointsMapSph"));
4802  fhDigiMapNormSph =
4803  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_DigisMapSph"));
4804  fhHitMapNormSph =
4805  static_cast<TH2*>(fHistNorm->FindObjectAny("TofTests_HitsMapSph"));
4806  LOG(info)
4807  << "CbmTofHitFinderQa::NormalizeMapHistos => Spherical norm histos: "
4808  << fhPointMapNormSph << " " << fhDigiMapNormSph << " " << fhHitMapNormSph
4809  << " ";
4810 
4811  // If norm histo found, normalize corresponding map
4812  if (NULL != fhPointMapNormSph) fhPointMapSph->Divide(fhPointMapNormSph);
4813  if (NULL != fhDigiMapNormSph) fhDigiMapSph->Divide(fhDigiMapNormSph);
4814  if (NULL != fhHitMapNormSph) {
4815  fhHitMapSph->Divide(fhHitMapNormSph);
4816  fhHitMapSingPntSph->Divide(fhHitMapNormSph);
4817  fhHitMapMultPntSph->Divide(fhHitMapNormSph);
4818  fhHitMapSingTrkSph->Divide(fhHitMapNormSph);
4819  fhHitMapMultTrkSph->Divide(fhHitMapNormSph);
4820  }
4821 
4822  // Go back to original folder, whereever it is
4823  gDirectory->cd(oldir->GetPath());
4824 
4825  fHistNorm->Close();
4826  } // if( "" != fsHistoInNormSphFilename )
4827  else
4828  LOG(info)
4829  << "CbmTofHitFinderQa::NormalizeMapHistos => Name of input file for"
4830  << " Normalization of Spherical coordinates maps not given"
4831  << " => no normalization for these maps!";
4832  return kTRUE;
4833 }
4835  if (0 < fhTrackMapXY->GetEntries()) {
4836  fhPointMapXY->Divide(fhTrackMapXY);
4837  fhDigiMapXY->Divide(fhTrackMapXY);
4838  fhHitMapXY->Divide(fhTrackMapXY);
4839  } // if( 0 < fhTrackMapXY->GetEntries())
4840  if (0 < fhTrackMapXZ->GetEntries()) {
4841  fhPointMapXZ->Divide(fhTrackMapXZ);
4842  fhDigiMapXZ->Divide(fhTrackMapXZ);
4843  fhHitMapXZ->Divide(fhTrackMapXZ);
4844  } // if( 0 < fhTrackMapXZ->GetEntries())
4845  if (0 < fhTrackMapYZ->GetEntries()) {
4846  fhPointMapYZ->Divide(fhTrackMapYZ);
4847  fhDigiMapYZ->Divide(fhTrackMapYZ);
4848  fhHitMapYZ->Divide(fhTrackMapYZ);
4849  } // if( 0 < fhTrackMapYZ->GetEntries())
4850  if (0 < fhTrackMapAng->GetEntries()) {
4851  fhPointMapAng->Divide(fhTrackMapAng);
4852  fhDigiMapAng->Divide(fhTrackMapAng);
4853  fhHitMapAng->Divide(fhTrackMapAng);
4854  } // if( 0 < fhTrackMapAng->GetEntries())
4855  if (0 < fhTrackMapSph->GetEntries()) {
4856  fhPointMapSph->Divide(fhTrackMapSph);
4857  fhDigiMapSph->Divide(fhTrackMapSph);
4858  fhHitMapSph->Divide(fhTrackMapSph);
4859  } // if( 0 < fhTrackMapSph->GetEntries())
4860 
4861  return kTRUE;
4862 }
4863 // ------------------------------------------------------------------
4864 
4865 Bool_t CbmTofHitFinderQa::SetHistoFileName(TString sFilenameIn) {
4866  fsHistoOutFilename = sFilenameIn;
4867  return kTRUE;
4868 }
4870  // TODO: add sub-folders ?
4871 
4872  // Write histogramms to the file
4873  TDirectory* oldir = gDirectory;
4874  TFile* fHist = new TFile(fsHistoOutFilename, "RECREATE");
4875  fHist->cd();
4876 
4877  // Nb Hits per event for first N events
4878  fhNbHitsPerEvent->Write();
4879  fhNbHitsSingPntPerEvent->Write();
4880  fhNbHitsMultPntPerEvent->Write();
4881  fhNbHitsSingTrkPerEvent->Write();
4882  fhNbHitsMultTrkPerEvent->Write();
4883  // Nb different TOF digis in Hit
4884  fhNbDigisInHit->Write();
4885  fhNbDigisInHitMapXY->Write();
4886 
4887  // Mapping
4888  TDirectory* cdGeomMap = fHist->mkdir("GeomMap");
4889  cdGeomMap->cd(); // make the "GeomMap" directory the current directory
4890  if (kTRUE == fbNormHistGenMode) {
4891  fhTrackMapXY->Write();
4892  fhTrackMapXZ->Write();
4893  fhTrackMapYZ->Write();
4894  fhTrackMapAng->Write();
4895  fhTrackMapSph->Write();
4896  } // if( kTRUE == fbNormHistGenMode )
4897  fhPointMapXY->Write();
4898  fhPointMapXZ->Write();
4899  fhPointMapYZ->Write();
4900  fhPointMapAng->Write();
4901  fhPointMapSph->Write();
4902  fhRealPointMapXY->Write();
4903  fhRealPointMapXZ->Write();
4904  fhRealPointMapYZ->Write();
4905  fhRealPointMapAng->Write();
4906  fhRealPointMapSph->Write();
4907  fhDigiMapXY->Write();
4908  fhDigiMapXZ->Write();
4909  fhDigiMapYZ->Write();
4910  fhDigiMapAng->Write();
4911  fhDigiMapSph->Write();
4912  fhHitMapXY->Write();
4913  fhHitMapXZ->Write();
4914  fhHitMapYZ->Write();
4915  fhHitMapAng->Write();
4916  fhHitMapSph->Write();
4917 
4918  if (kFALSE == fbNormHistGenMode) {
4919  fHist->cd(); // make the file root the current directory
4920  // L/R digis missmatch
4921  fhLeftRightDigiMatch->Write();
4922  // Nb different MC Points and Tracks in Hit
4923  fhNbPointsInHit->Write();
4924  fhNbTracksInHit->Write();
4925 
4926  TDirectory* cdStartZ = fHist->mkdir("StartZ");
4927  cdStartZ->cd(); // make the "MixMap" directory the current directory
4928  // Dependence of Track origin on centrality
4929  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
4930  fvhTrackAllStartZCent[iPartIdx]->Write();
4931  fvhTrackSecStartZCent[iPartIdx]->Write();
4932  if (2 == iPartIdx) // 3D plot only for e-
4933  fvhTrackAllStartXZCent[iPartIdx]->Write();
4934  fvhTrackAllStartXZ[iPartIdx]->Write();
4935  fvhTrackAllStartYZ[iPartIdx]->Write();
4936  fvhTofPntAllAngCent[iPartIdx]->Write();
4937  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
4938 
4939  TDirectory* cdMixMap = fHist->mkdir("MixMap");
4940  cdMixMap->cd(); // make the "MixMap" directory the current directory
4941  // Mapping of position for hits coming from a single MC Point
4942  fhHitMapSingPntXY->Write();
4943  fhHitMapSingPntXZ->Write();
4944  fhHitMapSingPntYZ->Write();
4945  fhHitMapSingPntAng->Write();
4946  fhHitMapSingPntSph->Write();
4947  // Mapping of position for hits coming from multiple MC Points
4948  fhHitMapMultPntXY->Write();
4949  fhHitMapMultPntXZ->Write();
4950  fhHitMapMultPntYZ->Write();
4951  fhHitMapMultPntAng->Write();
4952  fhHitMapMultPntSph->Write();
4953  // Mapping of position for hits coming from a single MC Track
4954  fhHitMapSingTrkXY->Write();
4955  fhHitMapSingTrkXZ->Write();
4956  fhHitMapSingTrkYZ->Write();
4957  fhHitMapSingTrkAng->Write();
4958  fhHitMapSingTrkSph->Write();
4959  // Mapping of position for hits coming from multiple MC Tracks
4960  fhHitMapMultTrkXY->Write();
4961  fhHitMapMultTrkXZ->Write();
4962  fhHitMapMultTrkYZ->Write();
4963  fhHitMapMultTrkAng->Write();
4964  fhHitMapMultTrkSph->Write();
4965 
4966  TDirectory* cdHitQual = fHist->mkdir("HitQual");
4967  cdHitQual->cd(); // make the "HitQual" directory the current directory
4968  // Hit Quality for Hits coming from a single MC Point
4969  fhSinglePointHitDeltaX->Write();
4970  fhSinglePointHitDeltaY->Write();
4971  fhSinglePointHitDeltaZ->Write();
4972  fhSinglePointHitDeltaR->Write();
4973  fhSinglePointHitDeltaT->Write();
4974  fhSinglePointHitPullX->Write();
4975  fhSinglePointHitPullY->Write();
4976  fhSinglePointHitPullZ->Write();
4977  fhSinglePointHitPullR->Write();
4978  fhSinglePointHitPullT->Write();
4979 
4980  fhCltSzSinglePointHitPullX->Write();
4981  fhCltSzSinglePointHitPullY->Write();
4982  fhCltSzSinglePointHitPullZ->Write();
4983  fhCltSzSinglePointHitPullR->Write();
4984  fhCltSzSinglePointHitPullT->Write();
4985  // Hit Quality for Hits coming from a multiple MC Points
4986  // To Point closest to Hit
4987  fhMultiPntHitClosestDeltaX->Write();
4988  fhMultiPntHitClosestDeltaY->Write();
4989  fhMultiPntHitClosestDeltaZ->Write();
4990  fhMultiPntHitClosestDeltaR->Write();
4991  fhMultiPntHitClosestDeltaT->Write();
4992  fhMultiPntHitClosestPullX->Write();
4993  fhMultiPntHitClosestPullY->Write();
4994  fhMultiPntHitClosestPullZ->Write();
4995  fhMultiPntHitClosestPullR->Write();
4996  fhMultiPntHitClosestPullT->Write();
4997  // To Point furthest from Hit
4998  fhMultiPntHitFurthestDeltaX->Write();
4999  fhMultiPntHitFurthestDeltaY->Write();
5000  fhMultiPntHitFurthestDeltaZ->Write();
5001  fhMultiPntHitFurthestDeltaR->Write();
5002  fhMultiPntHitFurthestDeltaT->Write();
5003  fhMultiPntHitFurthestPullX->Write();
5004  fhMultiPntHitFurthestPullY->Write();
5005  fhMultiPntHitFurthestPullZ->Write();
5006  fhMultiPntHitFurthestPullR->Write();
5007  fhMultiPntHitFurthestPullT->Write();
5008  // To mean Point position
5009  fhMultiPntHitMeanDeltaX->Write();
5010  fhMultiPntHitMeanDeltaY->Write();
5011  fhMultiPntHitMeanDeltaZ->Write();
5012  fhMultiPntHitMeanDeltaR->Write();
5013  fhMultiPntHitMeanDeltaT->Write();
5014  fhMultiPntHitMeanPullX->Write();
5015  fhMultiPntHitMeanPullY->Write();
5016  fhMultiPntHitMeanPullZ->Write();
5017  fhMultiPntHitMeanPullR->Write();
5018  fhMultiPntHitMeanPullT->Write();
5019  // To best Point position
5020  fhMultiPntHitBestDeltaX->Write();
5021  fhMultiPntHitBestDeltaY->Write();
5022  fhMultiPntHitBestDeltaZ->Write();
5023  fhMultiPntHitBestDeltaR->Write();
5024  fhMultiPntHitBestDeltaT->Write();
5025  fhMultiPntHitBestPullX->Write();
5026  fhMultiPntHitBestPullY->Write();
5027  fhMultiPntHitBestPullZ->Write();
5028  fhMultiPntHitBestPullR->Write();
5029  fhMultiPntHitBestPullT->Write();
5030  // Hit Quality for Hits coming from a single MC Track
5031  fhSingleTrackHitDeltaX->Write();
5032  fhSingleTrackHitDeltaY->Write();
5033  fhSingleTrackHitDeltaZ->Write();
5034  fhSingleTrackHitDeltaR->Write();
5035  fhSingleTrackHitDeltaT->Write();
5036  fhSingleTrackHitPullX->Write();
5037  fhSingleTrackHitPullY->Write();
5038  fhSingleTrackHitPullZ->Write();
5039  fhSingleTrackHitPullR->Write();
5040  fhSingleTrackHitPullT->Write();
5041  // Hit Quality for Hits coming from a single MC Track but multiple points
5042  fhSingTrkMultiPntHitDeltaX->Write();
5043  fhSingTrkMultiPntHitDeltaY->Write();
5044  fhSingTrkMultiPntHitDeltaZ->Write();
5045  fhSingTrkMultiPntHitDeltaR->Write();
5046  fhSingTrkMultiPntHitDeltaT->Write();
5047  fhSingTrkMultiPntHitPullX->Write();
5048  fhSingTrkMultiPntHitPullY->Write();
5049  fhSingTrkMultiPntHitPullZ->Write();
5050  fhSingTrkMultiPntHitPullR->Write();
5051  fhSingTrkMultiPntHitPullT->Write();
5052  // Hit Quality for Hits coming from a multiple MC Points
5053  // To Track closest to Hit
5054  fhMultiTrkHitClosestDeltaX->Write();
5055  fhMultiTrkHitClosestDeltaY->Write();
5056  fhMultiTrkHitClosestDeltaZ->Write();
5057  fhMultiTrkHitClosestDeltaR->Write();
5058  fhMultiTrkHitClosestDeltaT->Write();
5059  fhMultiTrkHitClosestPullX->Write();
5060  fhMultiTrkHitClosestPullY->Write();
5061  fhMultiTrkHitClosestPullZ->Write();
5062  fhMultiTrkHitClosestPullR->Write();
5063  fhMultiTrkHitClosestPullT->Write();
5064  // To Track furthest from Hit
5065  fhMultiTrkHitFurthestDeltaX->Write();
5066  fhMultiTrkHitFurthestDeltaY->Write();
5067  fhMultiTrkHitFurthestDeltaZ->Write();
5068  fhMultiTrkHitFurthestDeltaR->Write();
5069  fhMultiTrkHitFurthestDeltaT->Write();
5070  fhMultiTrkHitFurthestPullX->Write();
5071  fhMultiTrkHitFurthestPullY->Write();
5072  fhMultiTrkHitFurthestPullZ->Write();
5073  fhMultiTrkHitFurthestPullR->Write();
5074  fhMultiTrkHitFurthestPullT->Write();
5075  // To mean Track position
5076  fhMultiTrkHitMeanDeltaX->Write();
5077  fhMultiTrkHitMeanDeltaY->Write();
5078  fhMultiTrkHitMeanDeltaZ->Write();
5079  fhMultiTrkHitMeanDeltaR->Write();
5080  fhMultiTrkHitMeanDeltaT->Write();
5081  fhMultiTrkHitMeanPullX->Write();
5082  fhMultiTrkHitMeanPullY->Write();
5083  fhMultiTrkHitMeanPullZ->Write();
5084  fhMultiTrkHitMeanPullR->Write();
5085  fhMultiTrkHitMeanPullT->Write();
5086  // To best Track position
5087  fhMultiTrkHitBestDeltaX->Write();
5088  fhMultiTrkHitBestDeltaY->Write();
5089  fhMultiTrkHitBestDeltaZ->Write();
5090  fhMultiTrkHitBestDeltaR->Write();
5091  fhMultiTrkHitBestDeltaT->Write();
5092  fhMultiTrkHitBestPullX->Write();
5093  fhMultiTrkHitBestPullY->Write();
5094  fhMultiTrkHitBestPullZ->Write();
5095  fhMultiTrkHitBestPullR->Write();
5096  fhMultiTrkHitBestPullT->Write();
5097 
5098  TDirectory* cdPhysMap = fHist->mkdir("PhysMap");
5099  cdPhysMap->cd(); // make the "PhysMap" directory the current directory
5100  // Physics coord mapping, 1 per particle type
5101  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
5102  // Phase space
5103  fvhPtmRapGenTrk[iPartIdx]->Write();
5104  fvhPtmRapStsPnt[iPartIdx]->Write();
5105  fvhPtmRapTofPnt[iPartIdx]->Write();
5106  fvhPtmRapTofHit[iPartIdx]->Write();
5107  fvhPtmRapTofHitSinglePnt[iPartIdx]->Write();
5108  fvhPtmRapTofHitSingleTrk[iPartIdx]->Write();
5109  // PLab
5110  fvhPlabGenTrk[iPartIdx]->Write();
5111  fvhPlabStsPnt[iPartIdx]->Write();
5112  fvhPlabTofPnt[iPartIdx]->Write();
5113  fvhPlabTofHit[iPartIdx]->Write();
5114  fvhPlabTofHitSinglePnt[iPartIdx]->Write();
5115  fvhPlabTofHitSingleTrk[iPartIdx]->Write();
5116  // MC Tracks losses
5117  fvhPtmRapGenTrkTofPnt[iPartIdx]->Write();
5118  fvhPtmRapGenTrkTofHit[iPartIdx]->Write();
5119  fvhPlabGenTrkTofPnt[iPartIdx]->Write();
5120  fvhPlabGenTrkTofHit[iPartIdx]->Write();
5121  fvhPlabStsTrkTofPnt[iPartIdx]->Write();
5122  fvhPlabStsTrkTofHit[iPartIdx]->Write();
5123  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
5124 
5125  TDirectory* cdPhysMapSec = fHist->mkdir("PhysMapSec");
5126  cdPhysMapSec->cd(); // make the "PhysMap" directory the current directory
5127  // Physics coord mapping, 1 per particle type
5128  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
5129  // Phase space
5130  fvhPtmRapSecGenTrk[iPartIdx]->Write();
5131  fvhPtmRapSecStsPnt[iPartIdx]->Write();
5132  fvhPtmRapSecTofPnt[iPartIdx]->Write();
5133  fvhPtmRapSecTofHit[iPartIdx]->Write();
5134  fvhPtmRapSecTofHitSinglePnt[iPartIdx]->Write();
5135  fvhPtmRapSecTofHitSingleTrk[iPartIdx]->Write();
5136  // PLab
5137  fvhPlabSecGenTrk[iPartIdx]->Write();
5138  fvhPlabSecStsPnt[iPartIdx]->Write();
5139  fvhPlabSecTofPnt[iPartIdx]->Write();
5140  fvhPlabSecTofHit[iPartIdx]->Write();
5141  fvhPlabSecTofHitSinglePnt[iPartIdx]->Write();
5142  fvhPlabSecTofHitSingleTrk[iPartIdx]->Write();
5143  // MC Tracks losses
5144  fvhPtmRapSecGenTrkTofPnt[iPartIdx]->Write();
5145  fvhPtmRapSecGenTrkTofHit[iPartIdx]->Write();
5146  fvhPlabSecGenTrkTofPnt[iPartIdx]->Write();
5147  fvhPlabSecGenTrkTofHit[iPartIdx]->Write();
5148  fvhPlabSecStsTrkTofPnt[iPartIdx]->Write();
5149  fvhPlabSecStsTrkTofHit[iPartIdx]->Write();
5150  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
5151 
5152  fHist->cd();
5153  fhIntegratedHitPntEff->Write();
5154  fhIntegratedHitPntEffPrim->Write();
5155  fhIntegratedHitPntEffSec->Write();
5159  fhIntegratedHitPntEffGaps->Write();
5162 
5163  fhMcTrkStartPrimSingTrk->Write();
5164  fhMcTrkStartSecSingTrk->Write();
5165  fhMcTrkStartPrimMultiTrk->Write();
5166  fhMcTrkStartSecMultiTrk->Write();
5167  } // if( kFALSE == fbNormHistGenMode )
5168 
5169  fHist->cd(); // make the file root the current directory
5170  fhPointMatchWeight->Write();
5171 
5172  gDirectory->cd(oldir->GetPath());
5173 
5174  fHist->Close();
5175 
5176  return kTRUE;
5177 }
5179  // Nb Hits per event for first N events
5180  delete fhNbHitsPerEvent;
5181  delete fhNbHitsSingPntPerEvent;
5182  delete fhNbHitsMultPntPerEvent;
5183  delete fhNbHitsSingTrkPerEvent;
5184  delete fhNbHitsMultTrkPerEvent;
5185  // Nb different TOF digis in Hit
5186  delete fhNbDigisInHit;
5187  delete fhNbDigisInHitMapXY;
5188 
5189  // Mapping
5190  // Physics coord mapping, 1 per particle type
5191  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
5192  delete fvhTrackAllStartZCent[iPartIdx];
5193  delete fvhTrackSecStartZCent[iPartIdx];
5194  if (2 == iPartIdx) // 3D plot only for e-
5195  delete fvhTrackAllStartXZCent[iPartIdx];
5196  delete fvhTrackAllStartXZ[iPartIdx];
5197  delete fvhTrackAllStartYZ[iPartIdx];
5198  delete fvhTofPntAllAngCent[iPartIdx];
5199  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
5200  fvhTrackAllStartZCent.clear();
5201  fvhTrackSecStartZCent.clear();
5202  fvhTrackAllStartXZCent.clear();
5203  fvhTrackAllStartXZ.clear();
5204  fvhTrackAllStartYZ.clear();
5205  fvhTofPntAllAngCent.clear();
5206  if (kTRUE == fbNormHistGenMode) {
5207  delete fhTrackMapXY;
5208  delete fhTrackMapXZ;
5209  delete fhTrackMapYZ;
5210  delete fhTrackMapAng;
5211  delete fhTrackMapSph;
5212  } // if( kTRUE == fbNormHistGenMode )
5213  delete fhPointMapXY;
5214  delete fhPointMapXZ;
5215  delete fhPointMapYZ;
5216  delete fhPointMapAng;
5217  delete fhPointMapSph;
5218  delete fhRealPointMapXY;
5219  delete fhRealPointMapXZ;
5220  delete fhRealPointMapYZ;
5221  delete fhRealPointMapAng;
5222  delete fhRealPointMapSph;
5223  delete fhDigiMapXY;
5224  delete fhDigiMapXZ;
5225  delete fhDigiMapYZ;
5226  delete fhDigiMapAng;
5227  delete fhDigiMapSph;
5228  delete fhHitMapXY;
5229  delete fhHitMapXZ;
5230  delete fhHitMapYZ;
5231  delete fhHitMapAng;
5232  delete fhHitMapSph;
5233  // L/R digis missmatch
5234  delete fhLeftRightDigiMatch;
5235  // Nb different MC Points and Tracks in Hit
5236  delete fhNbPointsInHit;
5237  delete fhNbTracksInHit;
5238  // Mapping of position for hits coming from a single MC Point
5239  delete fhHitMapSingPntXY;
5240  delete fhHitMapSingPntXZ;
5241  delete fhHitMapSingPntYZ;
5242  delete fhHitMapSingPntAng;
5243  delete fhHitMapSingPntSph;
5244  // Mapping of position for hits coming from multiple MC Points
5245  delete fhHitMapMultPntXY;
5246  delete fhHitMapMultPntXZ;
5247  delete fhHitMapMultPntYZ;
5248  delete fhHitMapMultPntAng;
5249  delete fhHitMapMultPntSph;
5250  // Mapping of position for hits coming from a single MC Track
5251  delete fhHitMapSingTrkXY;
5252  delete fhHitMapSingTrkXZ;
5253  delete fhHitMapSingTrkYZ;
5254  delete fhHitMapSingTrkAng;
5255  delete fhHitMapSingTrkSph;
5256  // Mapping of position for hits coming from multiple MC Tracks
5257  delete fhHitMapMultTrkXY;
5258  delete fhHitMapMultTrkXZ;
5259  delete fhHitMapMultTrkYZ;
5260  delete fhHitMapMultTrkAng;
5261  delete fhHitMapMultTrkSph;
5262  // Hit Quality for Hits coming from a single MC Point
5263  delete fhSinglePointHitDeltaX;
5264  delete fhSinglePointHitDeltaY;
5265  delete fhSinglePointHitDeltaZ;
5266  delete fhSinglePointHitDeltaR;
5267  delete fhSinglePointHitDeltaT;
5268  delete fhSinglePointHitPullX;
5269  delete fhSinglePointHitPullY;
5270  delete fhSinglePointHitPullZ;
5271  delete fhSinglePointHitPullR;
5272  delete fhSinglePointHitPullT;
5273 
5279  // Hit Quality for Hits coming from a multiple MC Points
5280  // To Point closest to Hit
5291  // To Point furthest from Hit
5302  // To mean Point position
5303  delete fhMultiPntHitMeanDeltaX;
5304  delete fhMultiPntHitMeanDeltaY;
5305  delete fhMultiPntHitMeanDeltaZ;
5306  delete fhMultiPntHitMeanDeltaR;
5307  delete fhMultiPntHitMeanDeltaT;
5308  delete fhMultiPntHitMeanPullX;
5309  delete fhMultiPntHitMeanPullY;
5310  delete fhMultiPntHitMeanPullZ;
5311  delete fhMultiPntHitMeanPullR;
5312  delete fhMultiPntHitMeanPullT;
5313  // To best Point position
5314  delete fhMultiPntHitBestDeltaX;
5315  delete fhMultiPntHitBestDeltaY;
5316  delete fhMultiPntHitBestDeltaZ;
5317  delete fhMultiPntHitBestDeltaR;
5318  delete fhMultiPntHitBestDeltaT;
5319  delete fhMultiPntHitBestPullX;
5320  delete fhMultiPntHitBestPullY;
5321  delete fhMultiPntHitBestPullZ;
5322  delete fhMultiPntHitBestPullR;
5323  delete fhMultiPntHitBestPullT;
5324  // Hit Quality for Hits coming from a single MC Track
5325  delete fhSingleTrackHitDeltaX;
5326  delete fhSingleTrackHitDeltaY;
5327  delete fhSingleTrackHitDeltaZ;
5328  delete fhSingleTrackHitDeltaR;
5329  delete fhSingleTrackHitDeltaT;
5330  delete fhSingleTrackHitPullX;
5331  delete fhSingleTrackHitPullY;
5332  delete fhSingleTrackHitPullZ;
5333  delete fhSingleTrackHitPullR;
5334  delete fhSingleTrackHitPullT;
5335  // Hit Quality for Hits coming from a single MC Track but multiple points
5346 
5347  // Hit Quality for Hits coming from a multiple MC Points
5348  // To Track closest to Hit
5359  // To Track furthest from Hit
5370  // To mean Track position
5371  delete fhMultiTrkHitMeanDeltaX;
5372  delete fhMultiTrkHitMeanDeltaY;
5373  delete fhMultiTrkHitMeanDeltaZ;
5374  delete fhMultiTrkHitMeanDeltaR;
5375  delete fhMultiTrkHitMeanDeltaT;
5376  delete fhMultiTrkHitMeanPullX;
5377  delete fhMultiTrkHitMeanPullY;
5378  delete fhMultiTrkHitMeanPullZ;
5379  delete fhMultiTrkHitMeanPullR;
5380  delete fhMultiTrkHitMeanPullT;
5381  // To best Track position
5382  delete fhMultiTrkHitBestDeltaX;
5383  delete fhMultiTrkHitBestDeltaY;
5384  delete fhMultiTrkHitBestDeltaZ;
5385  delete fhMultiTrkHitBestDeltaR;
5386  delete fhMultiTrkHitBestDeltaT;
5387  delete fhMultiTrkHitBestPullX;
5388  delete fhMultiTrkHitBestPullY;
5389  delete fhMultiTrkHitBestPullZ;
5390  delete fhMultiTrkHitBestPullR;
5391  delete fhMultiTrkHitBestPullT;
5392 
5393  // Physics coord mapping, 1 per particle type
5394  for (Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++) {
5395  // Phase space
5396  delete fvhPtmRapGenTrk[iPartIdx];
5397  delete fvhPtmRapStsPnt[iPartIdx];
5398  delete fvhPtmRapTofPnt[iPartIdx];
5399  delete fvhPtmRapTofHit[iPartIdx];
5400  delete fvhPtmRapTofHitSinglePnt[iPartIdx];
5401  delete fvhPtmRapTofHitSingleTrk[iPartIdx];
5402  // PLab
5403  delete fvhPlabGenTrk[iPartIdx];
5404  delete fvhPlabStsPnt[iPartIdx];
5405  delete fvhPlabTofPnt[iPartIdx];
5406  delete fvhPlabTofHit[iPartIdx];
5407  delete fvhPlabTofHitSinglePnt[iPartIdx];
5408  delete fvhPlabTofHitSingleTrk[iPartIdx];
5409  // MC Tracks losses
5410  delete fvhPtmRapGenTrkTofPnt[iPartIdx];
5411  delete fvhPtmRapGenTrkTofHit[iPartIdx];
5412  delete fvhPlabGenTrkTofPnt[iPartIdx];
5413  delete fvhPlabGenTrkTofHit[iPartIdx];
5414  delete fvhPlabStsTrkTofPnt[iPartIdx];
5415  delete fvhPlabStsTrkTofHit[iPartIdx];
5416 
5417  // Secondary tracks
5418  // Phase space
5419  delete fvhPtmRapSecGenTrk[iPartIdx];
5420  delete fvhPtmRapSecStsPnt[iPartIdx];
5421  delete fvhPtmRapSecTofPnt[iPartIdx];
5422  delete fvhPtmRapSecTofHit[iPartIdx];
5423  delete fvhPtmRapSecTofHitSinglePnt[iPartIdx];
5424  delete fvhPtmRapSecTofHitSingleTrk[iPartIdx];
5425  // PLab
5426  delete fvhPlabSecGenTrk[iPartIdx];
5427  delete fvhPlabSecStsPnt[iPartIdx];
5428  delete fvhPlabSecTofPnt[iPartIdx];
5429  delete fvhPlabSecTofHit[iPartIdx];
5430  delete fvhPlabSecTofHitSinglePnt[iPartIdx];
5431  delete fvhPlabSecTofHitSingleTrk[iPartIdx];
5432  // MC Tracks losses
5433  delete fvhPtmRapSecGenTrkTofPnt[iPartIdx];
5434  delete fvhPtmRapSecGenTrkTofHit[iPartIdx];
5435  delete fvhPlabSecGenTrkTofPnt[iPartIdx];
5436  delete fvhPlabSecGenTrkTofHit[iPartIdx];
5437  delete fvhPlabSecStsTrkTofPnt[iPartIdx];
5438  delete fvhPlabSecStsTrkTofHit[iPartIdx];
5439  } // for( Int_t iPartIdx = 0; iPartIdx < kiNbPart; iPartIdx++)
5440  // Phase space
5441  fvhPtmRapGenTrk.clear();
5442  fvhPtmRapStsPnt.clear();
5443  fvhPtmRapTofPnt.clear();
5444  fvhPtmRapTofHit.clear();
5445  fvhPtmRapTofHitSinglePnt.clear();
5446  fvhPtmRapTofHitSingleTrk.clear();
5447  // PLab
5448  fvhPlabGenTrk.clear();
5449  fvhPlabStsPnt.clear();
5450  fvhPlabTofPnt.clear();
5451  fvhPlabTofHit.clear();
5452  fvhPlabTofHitSinglePnt.clear();
5453  fvhPlabTofHitSingleTrk.clear();
5454  // MC Tracks losses
5455  fvhPtmRapGenTrkTofPnt.clear();
5456  fvhPtmRapGenTrkTofHit.clear();
5457  fvhPlabGenTrkTofPnt.clear();
5458  fvhPlabGenTrkTofHit.clear();
5459  fvhPlabStsTrkTofPnt.clear();
5460  fvhPlabStsTrkTofHit.clear();
5461 
5462  // Secondary tracks
5463  // Phase space
5464  fvhPtmRapSecGenTrk.clear();
5465  fvhPtmRapSecStsPnt.clear();
5466  fvhPtmRapSecTofPnt.clear();
5467  fvhPtmRapSecTofHit.clear();
5470  // PLab
5471  fvhPlabSecGenTrk.clear();
5472  fvhPlabSecStsPnt.clear();
5473  fvhPlabSecTofPnt.clear();
5474  fvhPlabSecTofHit.clear();
5475  fvhPlabSecTofHitSinglePnt.clear();
5476  fvhPlabSecTofHitSingleTrk.clear();
5477  // MC Tracks losses
5478  fvhPtmRapSecGenTrkTofPnt.clear();
5479  fvhPtmRapSecGenTrkTofHit.clear();
5480  fvhPlabSecGenTrkTofPnt.clear();
5481  fvhPlabSecGenTrkTofHit.clear();
5482  fvhPlabSecStsTrkTofPnt.clear();
5483  fvhPlabSecStsTrkTofHit.clear();
5484 
5485  delete fhIntegratedHitPntEff;
5487  delete fhIntegratedHitPntEffSec;
5488 
5492 
5496 
5497  delete fhMcTrkStartPrimSingTrk;
5498  delete fhMcTrkStartSecSingTrk;
5499  delete fhMcTrkStartPrimMultiTrk;
5500  delete fhMcTrkStartSecMultiTrk;
5501 
5502  delete fhPointMatchWeight;
5503 
5504  return kTRUE;
5505 }
5506 
5507 
CbmTofDigiBdfPar.h
CbmTofHitFinderQa::fhSinglePointHitPullX
TH1 * fhSinglePointHitPullX
Definition: CbmTofHitFinderQa.h:213
CbmTofHitFinderQa::fhMultiPntHitBestDeltaY
TH2 * fhMultiPntHitBestDeltaY
Definition: CbmTofHitFinderQa.h:260
CbmTofHitFinderQa::fvhPlabStsPnt
std::vector< TH1 * > fvhPlabStsPnt
Definition: CbmTofHitFinderQa.h:357
CbmTofCell::GetZ
Double_t GetZ() const
Definition: CbmTofCell.h:38
ksPartName
const TString ksPartName[kiNbPart]
Definition: CbmTofHitFinderQa.cxx:76
CbmTofHitFinderQa::fhMultiTrkHitBestDeltaY
TH2 * fhMultiTrkHitBestDeltaY
Definition: CbmTofHitFinderQa.h:327
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmMatch::GetMatchedLink
const CbmLink & GetMatchedLink() const
Definition: CbmMatch.h:37
CbmTofGeoHandler::GetGeoVersion
Int_t GetGeoVersion()
Definition: CbmTofGeoHandler.h:45
CbmTofHitFinderQa::fvulIdxTracksWithHitGaps
std::vector< std::vector< ULong64_t > > fvulIdxTracksWithHitGaps
Definition: CbmTofHitFinderQa.h:408
CbmTofHitFinderQa::fhRealPointMapYZ
TH2 * fhRealPointMapYZ
Definition: CbmTofHitFinderQa.h:165
CbmMCTrack::GetMass
Double_t GetMass() const
Mass of the associated particle.
Definition: CbmMCTrack.cxx:114
CbmTofHitFinderQa::fhMultiPntHitFurthestDeltaT
TH2 * fhMultiPntHitFurthestDeltaT
Definition: CbmTofHitFinderQa.h:241
CbmMatch
Definition: CbmMatch.h:22
CbmTofHitFinderQa::fsHistoOutFilename
TString fsHistoOutFilename
Definition: CbmTofHitFinderQa.h:129
CbmMCTrack::GetStartX
Double_t GetStartX() const
Definition: CbmMCTrack.h:75
CbmTofHitFinderQa::fChannelInfo
CbmTofCell * fChannelInfo
Definition: CbmTofHitFinderQa.h:88
CbmTofHitFinderQa::fhMultiPntHitMeanDeltaX
TH2 * fhMultiPntHitMeanDeltaX
Definition: CbmTofHitFinderQa.h:248
CbmTofHitFinderQa::fuNbEventsForHitsNbPlots
UInt_t fuNbEventsForHitsNbPlots
Definition: CbmTofHitFinderQa.h:133
CbmTofHitFinderQa::fhIntegratedHiddenHitPntLoss
TH1 * fhIntegratedHiddenHitPntLoss
Definition: CbmTofHitFinderQa.h:399
CbmTofHitFinderQa::fhHitMapSingPntXY
TH2 * fhHitMapSingPntXY
Definition: CbmTofHitFinderQa.h:184
CbmTofHitFinderQa::fhMultiPntHitFurthestDeltaY
TH2 * fhMultiPntHitFurthestDeltaY
Definition: CbmTofHitFinderQa.h:238
CbmTofHitFinderQa::fhMultiTrkHitFurthestPullT
TH2 * fhMultiTrkHitFurthestPullT
Definition: CbmTofHitFinderQa.h:313
CbmTofHitFinderQa::fhMcTrkStartSecSingTrk
TH2 * fhMcTrkStartSecSingTrk
Definition: CbmTofHitFinderQa.h:420
CbmTofHitFinderQa::fvhTrackSecStartZCent
std::vector< TH2 * > fvhTrackSecStartZCent
Definition: CbmTofHitFinderQa.h:146
CbmTofHitFinderQa::fvulIdxPrimTracksWithHitGaps
std::vector< std::vector< ULong64_t > > fvulIdxPrimTracksWithHitGaps
Definition: CbmTofHitFinderQa.h:411
CbmTofHitFinderQa::fhMultiPntHitBestDeltaX
TH2 * fhMultiPntHitBestDeltaX
Definition: CbmTofHitFinderQa.h:259
CbmTofHitFinderQa::fvhPtmRapGenTrkTofHit
std::vector< TH2 * > fvhPtmRapGenTrkTofHit
Definition: CbmTofHitFinderQa.h:373
CbmTofHitFinderQa::fhNbPointsInHit
TH1 * fhNbPointsInHit
Definition: CbmTofHitFinderQa.h:181
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
CbmTofHitFinderQa::fvhPlabSecStsTrkTofHit
std::vector< TH1 * > fvhPlabSecStsTrkTofHit
Definition: CbmTofHitFinderQa.h:384
CbmMatch::GetLink
const CbmLink & GetLink(Int_t i) const
Definition: CbmMatch.h:35
CbmTofHitFinderQa::fvhTrackAllStartZCent
std::vector< TH2 * > fvhTrackAllStartZCent
Definition: CbmTofHitFinderQa.h:144
CbmTofHitFinderQa::fvSmRpcOffs
std::vector< std::vector< Int_t > > fvSmRpcOffs
Definition: CbmTofHitFinderQa.h:94
CbmTofHitFinderQa::fhSingTrkMultiPntHitDeltaR
TH1 * fhSingTrkMultiPntHitDeltaR
Definition: CbmTofHitFinderQa.h:284
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmTofHitFinderQa::fhMultiTrkHitMeanPullX
TH2 * fhMultiTrkHitMeanPullX
Definition: CbmTofHitFinderQa.h:320
CbmTofHitFinderQa::fDigiBdfPar
CbmTofDigiBdfPar * fDigiBdfPar
Definition: CbmTofHitFinderQa.h:101
CbmTofHit::GetClusterSize
Int_t GetClusterSize()
Definition: core/data/tof/CbmTofHit.h:114
CbmTofHitFinderQa::fhMultiTrkHitBestDeltaR
TH2 * fhMultiTrkHitBestDeltaR
Definition: CbmTofHitFinderQa.h:329
CbmTofHitFinderQa::fhMultiTrkHitClosestDeltaX
TH2 * fhMultiTrkHitClosestDeltaX
Definition: CbmTofHitFinderQa.h:293
CbmTofHitFinderQa::fhMultiTrkHitBestDeltaT
TH2 * fhMultiTrkHitBestDeltaT
Definition: CbmTofHitFinderQa.h:330
CbmTofHitFinderQa::Finish
virtual void Finish()
Definition: CbmTofHitFinderQa.cxx:746
CbmTofHitFinderQa::SetWallPosZ
Bool_t SetWallPosZ(Double_t dWallPosCm=1000)
Definition: CbmTofHitFinderQa.cxx:899
CbmTofHitFinderQa::fhHitMapMultTrkAng
TH2 * fhHitMapMultTrkAng
Definition: CbmTofHitFinderQa.h:205
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmTofHitFinderQa::fsHistoInNormAngFilename
TString fsHistoInNormAngFilename
Definition: CbmTofHitFinderQa.h:126
CbmTofHitFinderQa::fhCltSzSinglePointHitPullT
TH1 * fhCltSzSinglePointHitPullT
Definition: CbmTofHitFinderQa.h:223
CbmTofHitFinderQa::fhHitMapMultPntSph
TH2 * fhHitMapMultPntSph
Definition: CbmTofHitFinderQa.h:194
CbmTofHitFinderQa::fhSingTrkMultiPntHitDeltaX
TH1 * fhSingTrkMultiPntHitDeltaX
Definition: CbmTofHitFinderQa.h:281
CbmTofHitFinderQa::fsHistoInNormCartFilename
TString fsHistoInNormCartFilename
Definition: CbmTofHitFinderQa.h:125
CbmTofHitFinderQa::fhMultiTrkHitClosestDeltaT
TH2 * fhMultiTrkHitClosestDeltaT
Definition: CbmTofHitFinderQa.h:297
CbmTofHitFinderQa::fTofDigisColl
TClonesArray * fTofDigisColl
Definition: CbmTofHitFinderQa.h:107
CbmPixelHit::GetDx
Double_t GetDx() const
Definition: CbmPixelHit.h:85
CbmTofHitFinderQa::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmTofHitFinderQa.cxx:720
CbmTofDigiBdfPar::GetNbChan
Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:570
CbmTofHitFinderQa::fvhPlabSecTofPnt
std::vector< TH1 * > fvhPlabSecTofPnt
Definition: CbmTofHitFinderQa.h:365
CbmTofHitFinderQa::fhHitMapXY
TH2 * fhHitMapXY
Definition: CbmTofHitFinderQa.h:173
CbmTofHitFinderQa::fhIntegratedHitPntEffPrimGaps
TH2 * fhIntegratedHitPntEffPrimGaps
Definition: CbmTofHitFinderQa.h:412
CbmTofHitFinderQa::fhMultiPntHitFurthestPullT
TH2 * fhMultiPntHitFurthestPullT
Definition: CbmTofHitFinderQa.h:246
CbmTofHitFinderQa::fhMultiPntHitClosestPullY
TH2 * fhMultiPntHitClosestPullY
Definition: CbmTofHitFinderQa.h:232
CbmTofHitFinderQa::fhMultiTrkHitBestPullR
TH2 * fhMultiTrkHitBestPullR
Definition: CbmTofHitFinderQa.h:334
CbmTofHitFinderQa::fhPointMatchWeight
TH1 * fhPointMatchWeight
Definition: CbmTofHitFinderQa.h:426
CbmTofHitFinderQa::fvulIdxHiddenPrimTracksWithHit
std::vector< ULong64_t > fvulIdxHiddenPrimTracksWithHit
Definition: CbmTofHitFinderQa.h:400
CbmTofHitFinderQa::fvhPtmRapGenTrk
std::vector< TH2 * > fvhPtmRapGenTrk
Definition: CbmTofHitFinderQa.h:340
CbmTofHitFinderQa::fhIntegratedHitPntEff
TH1 * fhIntegratedHitPntEff
Definition: CbmTofHitFinderQa.h:389
CbmTofHitFinderQa::fvhPlabSecTofHitSinglePnt
std::vector< TH1 * > fvhPlabSecTofHitSinglePnt
Definition: CbmTofHitFinderQa.h:367
CbmTofHitFinderQa::fhCltSzSinglePointHitPullY
TH1 * fhCltSzSinglePointHitPullY
Definition: CbmTofHitFinderQa.h:220
CbmTofHitFinderQa::fhMultiTrkHitClosestDeltaR
TH2 * fhMultiTrkHitClosestDeltaR
Definition: CbmTofHitFinderQa.h:296
CbmTofHitFinderQa::fhMultiPntHitClosestPullZ
TH2 * fhMultiPntHitClosestPullZ
Definition: CbmTofHitFinderQa.h:233
CbmTofHitFinderQa::fhCltSzSinglePointHitPullR
TH1 * fhCltSzSinglePointHitPullR
Definition: CbmTofHitFinderQa.h:222
CbmTofHitFinderQa::fhMultiTrkHitClosestPullT
TH2 * fhMultiTrkHitClosestPullT
Definition: CbmTofHitFinderQa.h:302
CbmTofHitFinderQa::fvhPlabSecStsTrkTofPnt
std::vector< TH1 * > fvhPlabSecStsTrkTofPnt
Definition: CbmTofHitFinderQa.h:383
CbmTofHitFinderQa::fhSinglePointHitDeltaY
TH1 * fhSinglePointHitDeltaY
Definition: CbmTofHitFinderQa.h:209
CbmTofHitFinderQa::fhMultiPntHitBestPullX
TH2 * fhMultiPntHitBestPullX
Definition: CbmTofHitFinderQa.h:264
CbmTofHitFinderQa::fdWallPosZ
Double_t fdWallPosZ
Definition: CbmTofHitFinderQa.h:131
CbmTofHitFinderQa::fvulIdxTracksWithHit
std::vector< ULong64_t > fvulIdxTracksWithHit
Definition: CbmTofHitFinderQa.h:388
CbmTofHitFinderQa::fhSingleTrackHitDeltaR
TH1 * fhSingleTrackHitDeltaR
Definition: CbmTofHitFinderQa.h:273
CbmTofHitFinderQa::fvulIdxSecTracksWithHit
std::vector< ULong64_t > fvulIdxSecTracksWithHit
Definition: CbmTofHitFinderQa.h:394
CbmTofHitFinderQa::fhSingleTrackHitPullY
TH1 * fhSingleTrackHitPullY
Definition: CbmTofHitFinderQa.h:276
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
CbmTofHitFinderQa::fvTypeSmOffs
std::vector< Int_t > fvTypeSmOffs
Definition: CbmTofHitFinderQa.h:91
CbmTofHitFinderQa::fhSingleTrackHitPullR
TH1 * fhSingleTrackHitPullR
Definition: CbmTofHitFinderQa.h:278
CbmTofHitFinderQa::fhIntegratedHitPntEffGaps
TH2 * fhIntegratedHitPntEffGaps
Definition: CbmTofHitFinderQa.h:409
CbmTofHitFinderQa::fhPointMapSph
TH2 * fhPointMapSph
Definition: CbmTofHitFinderQa.h:162
CbmTofHitFinderQa::fhNbDigisInHit
TH1 * fhNbDigisInHit
Definition: CbmTofHitFinderQa.h:140
CbmTofDigiBdfPar::GetNbRpc
Int_t GetNbRpc(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:519
CbmTofHitFinderQa::fTofId
CbmTofDetectorId * fTofId
Definition: CbmTofHitFinderQa.h:87
CbmTofHitFinderQa::fhMultiTrkHitMeanDeltaT
TH2 * fhMultiTrkHitMeanDeltaT
Definition: CbmTofHitFinderQa.h:319
CbmTofHitFinderQa::SetHistoFileName
Bool_t SetHistoFileName(TString sFilenameIn)
Definition: CbmTofHitFinderQa.cxx:4865
CbmTofHitFinderQa::fhTrackMapXZ
TH2 * fhTrackMapXZ
Definition: CbmTofHitFinderQa.h:154
CbmTofHitFinderQa::fhMultiTrkHitMeanDeltaR
TH2 * fhMultiTrkHitMeanDeltaR
Definition: CbmTofHitFinderQa.h:318
CbmTofHitFinderQa::fhMultiTrkHitMeanDeltaX
TH2 * fhMultiTrkHitMeanDeltaX
Definition: CbmTofHitFinderQa.h:315
CbmTofHitFinderQa::fhSingTrkMultiPntHitDeltaT
TH1 * fhSingTrkMultiPntHitDeltaT
Definition: CbmTofHitFinderQa.h:285
CbmTofHitFinderQa::~CbmTofHitFinderQa
virtual ~CbmTofHitFinderQa()
Definition: CbmTofHitFinderQa.cxx:679
CbmTofHitFinderQa::fhSingleTrackHitDeltaX
TH1 * fhSingleTrackHitDeltaX
Definition: CbmTofHitFinderQa.h:270
CbmTofHitFinderQa::fvhTofPntAllAngCent
std::vector< TH3 * > fvhTofPntAllAngCent
Definition: CbmTofHitFinderQa.h:152
CbmTofHitFinderQa::fhNbHitsMultTrkPerEvent
TH1 * fhNbHitsMultTrkPerEvent
Definition: CbmTofHitFinderQa.h:138
CbmTofHitFinderQa::fhHitMapSingTrkXY
TH2 * fhHitMapSingTrkXY
Definition: CbmTofHitFinderQa.h:196
CbmTofDetectorId_v12b
Definition: CbmTofDetectorId_v12b.h:33
CbmTofHitFinderQa::fhDigiMapAng
TH2 * fhDigiMapAng
Definition: CbmTofHitFinderQa.h:171
CbmTofHitFinderQa::fhMultiPntHitMeanDeltaT
TH2 * fhMultiPntHitMeanDeltaT
Definition: CbmTofHitFinderQa.h:252
CbmTofHitFinderQa::fhRealPointMapAng
TH2 * fhRealPointMapAng
Definition: CbmTofHitFinderQa.h:166
CbmTofHitFinderQa::fhSingleTrackHitDeltaY
TH1 * fhSingleTrackHitDeltaY
Definition: CbmTofHitFinderQa.h:271
CbmTofHitFinderQa::fhMultiTrkHitClosestPullX
TH2 * fhMultiTrkHitClosestPullX
Definition: CbmTofHitFinderQa.h:298
kiPartPdgCode
const Int_t kiPartPdgCode[kiNbPart]
Definition: CbmTofHitFinderQa.cxx:63
CbmTofHitFinderQa::fhMultiTrkHitFurthestPullX
TH2 * fhMultiTrkHitFurthestPullX
Definition: CbmTofHitFinderQa.h:309
CbmTofDigiBdfPar::GetNbSmTypes
Int_t GetNbSmTypes() const
Definition: CbmTofDigiBdfPar.h:56
CbmTofHitFinderQa::SetHistoFileNameSphCoordNorm
Bool_t SetHistoFileNameSphCoordNorm(TString sFilenameIn)
Definition: CbmTofHitFinderQa.cxx:4614
CbmMCTrack::GetPx
Double_t GetPx() const
Definition: CbmMCTrack.h:72
CbmTofHitFinderQa::fhSinglePointHitDeltaR
TH1 * fhSinglePointHitDeltaR
Definition: CbmTofHitFinderQa.h:211
CbmTofHitFinderQa::fhHitMapMultPntXZ
TH2 * fhHitMapMultPntXZ
Definition: CbmTofHitFinderQa.h:191
CbmTofHitFinderQa::fhTrackMapYZ
TH2 * fhTrackMapYZ
Definition: CbmTofHitFinderQa.h:155
CbmMCTrack::GetPy
Double_t GetPy() const
Definition: CbmMCTrack.h:73
CbmTofHitFinderQa::fhMultiTrkHitClosestPullZ
TH2 * fhMultiTrkHitClosestPullZ
Definition: CbmTofHitFinderQa.h:300
CbmTofHitFinderQa::fhMultiTrkHitBestPullZ
TH2 * fhMultiTrkHitBestPullZ
Definition: CbmTofHitFinderQa.h:333
CbmTofHitFinderQa::fhMultiPntHitMeanPullX
TH2 * fhMultiPntHitMeanPullX
Definition: CbmTofHitFinderQa.h:253
CbmTofDigi.h
CbmTofHitFinderQa::fhMultiPntHitBestPullT
TH2 * fhMultiPntHitBestPullT
Definition: CbmTofHitFinderQa.h:268
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmTofHitFinderQa::CreateHistos
Bool_t CreateHistos()
Definition: CbmTofHitFinderQa.cxx:906
CbmTofHitFinderQa::fhHitMapSingTrkAng
TH2 * fhHitMapSingTrkAng
Definition: CbmTofHitFinderQa.h:199
CbmTofDigiPar.h
CbmTofHitFinderQa::fhTrackMapAng
TH2 * fhTrackMapAng
Definition: CbmTofHitFinderQa.h:156
CbmMatch.h
CbmTofHitFinderQa::fvhPtmRapStsPnt
std::vector< TH2 * > fvhPtmRapStsPnt
Definition: CbmTofHitFinderQa.h:341
CbmTofDigi::GetSm
Double_t GetSm() const
Sm.
Definition: CbmTofDigi.h:124
CbmTofHitFinderQa::fhHitMapMultTrkSph
TH2 * fhHitMapMultTrkSph
Definition: CbmTofHitFinderQa.h:206
CbmPixelHit::GetDy
Double_t GetDy() const
Definition: CbmPixelHit.h:86
CbmTofDigiPar::GetCell
CbmTofCell * GetCell(Int_t i)
Definition: CbmTofDigiPar.h:48
CbmTofHitFinderQa::fuMaxCrossedGaps
UInt_t fuMaxCrossedGaps
Definition: CbmTofHitFinderQa.h:406
CbmTofHitFinderQa::fvhPtmRapSecTofHitSinglePnt
std::vector< TH2 * > fvhPtmRapSecTofHitSinglePnt
Definition: CbmTofHitFinderQa.h:351
CbmHit::GetTimeError
Double_t GetTimeError() const
Definition: CbmHit.h:76
CbmTofHitFinderQa::fTofHitsColl
TClonesArray * fTofHitsColl
Definition: CbmTofHitFinderQa.h:110
CbmTofHitFinderQa::fvhPlabGenTrkTofPnt
std::vector< TH1 * > fvhPlabGenTrkTofPnt
Definition: CbmTofHitFinderQa.h:374
CbmTofHitFinderQa::fbRealPointAvail
Bool_t fbRealPointAvail
Definition: CbmTofHitFinderQa.h:119
CbmTofHitFinderQa::fRealTofPointsColl
TClonesArray * fRealTofPointsColl
Definition: CbmTofHitFinderQa.h:116
CbmTofHitFinderQa::fvhPtmRapSecGenTrkTofPnt
std::vector< TH2 * > fvhPtmRapSecGenTrkTofPnt
Definition: CbmTofHitFinderQa.h:379
CbmTofHitFinderQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmTofHitFinderQa.cxx:732
CbmTofHitFinderQa::fhMultiPntHitBestDeltaR
TH2 * fhMultiPntHitBestDeltaR
Definition: CbmTofHitFinderQa.h:262
CbmTofHitFinderQa::fhMultiPntHitMeanPullY
TH2 * fhMultiPntHitMeanPullY
Definition: CbmTofHitFinderQa.h:254
CbmTofHitFinderQa::DeleteHistos
Bool_t DeleteHistos()
Definition: CbmTofHitFinderQa.cxx:5178
ksPartTag
const TString ksPartTag[kiNbPart]
Definition: CbmTofHitFinderQa.cxx:50
CbmTofHitFinderQa::fbNormHistGenMode
Bool_t fbNormHistGenMode
Definition: CbmTofHitFinderQa.h:123
CbmTofHitFinderQa::fhHitMapSph
TH2 * fhHitMapSph
Definition: CbmTofHitFinderQa.h:177
CbmTofHitFinderQa::fhTrackMapXY
TH2 * fhTrackMapXY
Definition: CbmTofHitFinderQa.h:153
CbmTofHitFinderQa::fhRealPointMapSph
TH2 * fhRealPointMapSph
Definition: CbmTofHitFinderQa.h:167
CbmTofHitFinderQa::fhMultiPntHitBestPullR
TH2 * fhMultiPntHitBestPullR
Definition: CbmTofHitFinderQa.h:267
CbmTofHitFinderQa::fhRealPointMapXY
TH2 * fhRealPointMapXY
Definition: CbmTofHitFinderQa.h:163
CbmTofHitFinderQa.h
CbmTofHitFinderQa::fhHitMapSingPntAng
TH2 * fhHitMapSingPntAng
Definition: CbmTofHitFinderQa.h:187
CbmTofGeoHandler.h
CbmTofHitFinderQa::fhCltSzSinglePointHitPullZ
TH1 * fhCltSzSinglePointHitPullZ
Definition: CbmTofHitFinderQa.h:221
CbmTofHitFinderQa::fhNbHitsSingTrkPerEvent
TH1 * fhNbHitsSingTrkPerEvent
Definition: CbmTofHitFinderQa.h:137
CbmTofHitFinderQa::fhPointMapYZ
TH2 * fhPointMapYZ
Definition: CbmTofHitFinderQa.h:160
CbmTofHitFinderQa::fhMultiTrkHitMeanPullY
TH2 * fhMultiTrkHitMeanPullY
Definition: CbmTofHitFinderQa.h:321
CbmTofHitFinderQa::fhMultiPntHitFurthestDeltaR
TH2 * fhMultiPntHitFurthestDeltaR
Definition: CbmTofHitFinderQa.h:240
CbmTofDetectorId_v14a.h
CbmTofHitFinderQa::fGeoHandler
CbmTofGeoHandler * fGeoHandler
Definition: CbmTofHitFinderQa.h:86
CbmMCTrack::GetStartZ
Double_t GetStartZ() const
Definition: CbmMCTrack.h:77
CbmTofHitFinderQa::fhIntegratedHiddenHitPntLossSec
TH1 * fhIntegratedHiddenHitPntLossSec
Definition: CbmTofHitFinderQa.h:403
CbmTofHitFinderQa::fhMultiPntHitFurthestPullY
TH2 * fhMultiPntHitFurthestPullY
Definition: CbmTofHitFinderQa.h:243
CbmTofHitFinderQa::fvulIdxSecTracksWithPnt
std::vector< ULong64_t > fvulIdxSecTracksWithPnt
Definition: CbmTofHitFinderQa.h:393
CbmTofHitFinderQa::fhMultiPntHitFurthestPullX
TH2 * fhMultiPntHitFurthestPullX
Definition: CbmTofHitFinderQa.h:242
CbmTofHitFinderQa::fvulIdxPrimTracksWithPnt
std::vector< ULong64_t > fvulIdxPrimTracksWithPnt
Definition: CbmTofHitFinderQa.h:390
CbmTofHitFinderQa::fhHitMapMultTrkYZ
TH2 * fhHitMapMultTrkYZ
Definition: CbmTofHitFinderQa.h:204
CbmTofHitFinderQa::fEvents
Int_t fEvents
Definition: CbmTofHitFinderQa.h:83
CbmTofHitFinderQa::fhHitMapYZ
TH2 * fhHitMapYZ
Definition: CbmTofHitFinderQa.h:175
CbmTofHitFinderQa::fhMultiTrkHitClosestDeltaZ
TH2 * fhMultiTrkHitClosestDeltaZ
Definition: CbmTofHitFinderQa.h:295
CbmTofHitFinderQa::fvhPlabSecGenTrkTofPnt
std::vector< TH1 * > fvhPlabSecGenTrkTofPnt
Definition: CbmTofHitFinderQa.h:381
CbmTofHitFinderQa::fvhPtmRapTofHitSingleTrk
std::vector< TH2 * > fvhPtmRapTofHitSingleTrk
Definition: CbmTofHitFinderQa.h:345
CbmTofHitFinderQa::fhMultiTrkHitClosestPullY
TH2 * fhMultiTrkHitClosestPullY
Definition: CbmTofHitFinderQa.h:299
CbmTofHitFinderQa::fhMultiPntHitClosestPullX
TH2 * fhMultiPntHitClosestPullX
Definition: CbmTofHitFinderQa.h:231
CbmTofHitFinderQa::fvulIdxPrimTracksWithPntGaps
std::vector< std::vector< ULong64_t > > fvulIdxPrimTracksWithPntGaps
Definition: CbmTofHitFinderQa.h:410
kiNbPart
const Int_t kiNbPart
Definition: CbmTofHitFinderQa.cxx:49
CbmTofHitFinderQa::fvhPlabSecTofHitSingleTrk
std::vector< TH1 * > fvhPlabSecTofHitSingleTrk
Definition: CbmTofHitFinderQa.h:368
CbmTofDigi::GetType
Double_t GetType() const
Sm Type .
Definition: CbmTofDigi.h:128
CbmTofHitFinderQa::fvulIdxSecTracksWithHitGaps
std::vector< std::vector< ULong64_t > > fvulIdxSecTracksWithHitGaps
Definition: CbmTofHitFinderQa.h:414
CbmTofHitFinderQa::fhIntegratedHitPntEffSecGaps
TH2 * fhIntegratedHitPntEffSecGaps
Definition: CbmTofHitFinderQa.h:415
CbmTofHitFinderQa::fhMultiPntHitClosestDeltaZ
TH2 * fhMultiPntHitClosestDeltaZ
Definition: CbmTofHitFinderQa.h:228
CbmTofHitFinderQa::fhMultiPntHitMeanPullR
TH2 * fhMultiPntHitMeanPullR
Definition: CbmTofHitFinderQa.h:256
CbmTofHitFinderQa::fvhPtmRapGenTrkTofPnt
std::vector< TH2 * > fvhPtmRapGenTrkTofPnt
Definition: CbmTofHitFinderQa.h:372
CbmTofHitFinderQa::fhMultiPntHitBestPullY
TH2 * fhMultiPntHitBestPullY
Definition: CbmTofHitFinderQa.h:265
CbmTofHitFinderQa::fvulIdxPrimTracksWithHit
std::vector< ULong64_t > fvulIdxPrimTracksWithHit
Definition: CbmTofHitFinderQa.h:391
CbmTofHitFinderQa::fhMultiTrkHitBestPullT
TH2 * fhMultiTrkHitBestPullT
Definition: CbmTofHitFinderQa.h:335
CbmTofHitFinderQa::fvhTrackAllStartXZCent
std::vector< TH3 * > fvhTrackAllStartXZCent
Definition: CbmTofHitFinderQa.h:148
CbmTofHitFinderQa::fhMultiTrkHitClosestDeltaY
TH2 * fhMultiTrkHitClosestDeltaY
Definition: CbmTofHitFinderQa.h:294
CbmTofHitFinderQa::fhMultiPntHitClosestDeltaR
TH2 * fhMultiPntHitClosestDeltaR
Definition: CbmTofHitFinderQa.h:229
CbmTofHitFinderQa::fvhPlabTofHitSingleTrk
std::vector< TH1 * > fvhPlabTofHitSingleTrk
Definition: CbmTofHitFinderQa.h:361
CbmTofHitFinderQa::fhMultiPntHitClosestDeltaT
TH2 * fhMultiPntHitClosestDeltaT
Definition: CbmTofHitFinderQa.h:230
CbmTofHitFinderQa::fhMcTrkStartPrimMultiTrk
TH2 * fhMcTrkStartPrimMultiTrk
Definition: CbmTofHitFinderQa.h:422
CbmMCTrack::GetNPoints
Int_t GetNPoints(ECbmModuleId detId) const
Definition: CbmMCTrack.cxx:186
CbmTofHitFinderQa::fvhPtmRapSecTofPnt
std::vector< TH2 * > fvhPtmRapSecTofPnt
Definition: CbmTofHitFinderQa.h:349
CbmTofHitFinderQa::fhMultiTrkHitBestDeltaX
TH2 * fhMultiTrkHitBestDeltaX
Definition: CbmTofHitFinderQa.h:326
CbmTofGeoHandler
Definition: CbmTofGeoHandler.h:30
CbmTofHitFinderQa::Init
virtual InitStatus Init()
Definition: CbmTofHitFinderQa.cxx:685
CbmTofHitFinderQa::fhSingTrkMultiPntHitDeltaY
TH1 * fhSingTrkMultiPntHitDeltaY
Definition: CbmTofHitFinderQa.h:282
k12b
@ k12b
Definition: CbmTofGeoHandler.h:17
CbmTofCell::GetX
Double_t GetX() const
Definition: CbmTofCell.h:36
CbmTofHitFinderQa::fhSinglePointHitPullT
TH1 * fhSinglePointHitPullT
Definition: CbmTofHitFinderQa.h:217
CbmTofDetectorId_v12b.h
CbmTofHitFinderQa::fvhPlabStsTrkTofHit
std::vector< TH1 * > fvhPlabStsTrkTofHit
Definition: CbmTofHitFinderQa.h:377
CbmTofDigi::GetChannel
Double_t GetChannel() const
Channel .
Definition: CbmTofDigi.h:136
CbmTofHitFinderQa::fhNbHitsSingPntPerEvent
TH1 * fhNbHitsSingPntPerEvent
Definition: CbmTofHitFinderQa.h:135
CbmHit::GetTime
Double_t GetTime() const
Definition: CbmHit.h:75
CbmTofHitFinderQa::fhMultiPntHitMeanDeltaY
TH2 * fhMultiPntHitMeanDeltaY
Definition: CbmTofHitFinderQa.h:249
CbmTofHitFinderQa::fhMultiTrkHitMeanDeltaZ
TH2 * fhMultiTrkHitMeanDeltaZ
Definition: CbmTofHitFinderQa.h:317
CbmTofHitFinderQa::fhNbHitsPerEvent
TH1 * fhNbHitsPerEvent
Definition: CbmTofHitFinderQa.h:134
CbmTofHitFinderQa::RegisterInputs
Bool_t RegisterInputs()
Definition: CbmTofHitFinderQa.cxx:763
CbmTofHitFinderQa::fhMultiPntHitFurthestDeltaX
TH2 * fhMultiPntHitFurthestDeltaX
Definition: CbmTofHitFinderQa.h:237
k14a
@ k14a
Definition: CbmTofGeoHandler.h:17
CbmTofHitFinderQa::fhSinglePointHitDeltaZ
TH1 * fhSinglePointHitDeltaZ
Definition: CbmTofHitFinderQa.h:210
CbmTofHitFinderQa::fhLeftRightDigiMatch
TH2 * fhLeftRightDigiMatch
Definition: CbmTofHitFinderQa.h:179
CbmTofHitFinderQa::fhHitMapAng
TH2 * fhHitMapAng
Definition: CbmTofHitFinderQa.h:176
CbmTofHitFinderQa::fhSingTrkMultiPntHitPullZ
TH1 * fhSingTrkMultiPntHitPullZ
Definition: CbmTofHitFinderQa.h:288
CbmTofAddress.h
CbmTofHitFinderQa::fvulIdxTracksWithPntGaps
std::vector< std::vector< ULong64_t > > fvulIdxTracksWithPntGaps
Definition: CbmTofHitFinderQa.h:407
CbmTofHitFinderQa::fhSingleTrackHitDeltaT
TH1 * fhSingleTrackHitDeltaT
Definition: CbmTofHitFinderQa.h:274
CbmTofHitFinderQa::fvhPlabTofHit
std::vector< TH1 * > fvhPlabTofHit
Definition: CbmTofHitFinderQa.h:359
CbmTofDetectorId_v14a
Definition: CbmTofDetectorId_v14a.h:36
CbmTofHitFinderQa::fiNbChTot
Int_t fiNbChTot
Definition: CbmTofHitFinderQa.h:95
CbmTofHitFinderQa::fhMultiTrkHitClosestPullR
TH2 * fhMultiTrkHitClosestPullR
Definition: CbmTofHitFinderQa.h:301
CbmTofGeoHandler::Init
Int_t Init(Bool_t isSimulation=kFALSE)
Definition: CbmTofGeoHandler.cxx:39
CbmTofHitFinderQa::fhMultiTrkHitFurthestDeltaY
TH2 * fhMultiTrkHitFurthestDeltaY
Definition: CbmTofHitFinderQa.h:305
CbmTofHitFinderQa::fvhPtmRapTofHit
std::vector< TH2 * > fvhPtmRapTofHit
Definition: CbmTofHitFinderQa.h:343
CbmTofDigiBdfPar
Parameters class for the CBM ToF digitizer using beam data distributions.
Definition: CbmTofDigiBdfPar.h:30
CbmTofHitFinderQa::fhNbDigisInHitMapXY
TProfile2D * fhNbDigisInHitMapXY
Definition: CbmTofHitFinderQa.h:141
CbmTofHitFinderQa::fhDigiMapSph
TH2 * fhDigiMapSph
Definition: CbmTofHitFinderQa.h:172
CbmTofHitFinderQa::fhHitMapSingTrkYZ
TH2 * fhHitMapSingTrkYZ
Definition: CbmTofHitFinderQa.h:198
CbmTofHitFinderQa::fbHitProducerSource
Bool_t fbHitProducerSource
Definition: CbmTofHitFinderQa.h:115
CbmTofHitFinderQa::fhSinglePointHitPullR
TH1 * fhSinglePointHitPullR
Definition: CbmTofHitFinderQa.h:216
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmTofHitFinderQa::fvhPlabStsTrkTofPnt
std::vector< TH1 * > fvhPlabStsTrkTofPnt
Definition: CbmTofHitFinderQa.h:376
CbmTofHitFinderQa::fhHitMapMultPntAng
TH2 * fhHitMapMultPntAng
Definition: CbmTofHitFinderQa.h:193
CbmTofHitFinderQa::WriteHistos
Bool_t WriteHistos()
Definition: CbmTofHitFinderQa.cxx:4869
CbmTofDetectorId::SetDetectorInfo
virtual Int_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo)=0
CbmTofCell.h
CbmTofHitFinderQa::fhSingleTrackHitPullX
TH1 * fhSingleTrackHitPullX
Definition: CbmTofHitFinderQa.h:275
CbmTofHitFinderQa::fhHitMapMultTrkXY
TH2 * fhHitMapMultTrkXY
Definition: CbmTofHitFinderQa.h:202
CbmTofHitFinderQa::fvRpcChOffs
std::vector< std::vector< std::vector< Int_t > > > fvRpcChOffs
Definition: CbmTofHitFinderQa.h:97
CbmTofHitFinderQa::fhMultiTrkHitMeanPullZ
TH2 * fhMultiTrkHitMeanPullZ
Definition: CbmTofHitFinderQa.h:322
CbmTofHitFinderQa::fhMultiTrkHitFurthestDeltaR
TH2 * fhMultiTrkHitFurthestDeltaR
Definition: CbmTofHitFinderQa.h:307
CbmTofHitFinderQa::fhPointMapXY
TH2 * fhPointMapXY
Definition: CbmTofHitFinderQa.h:158
CbmTofHitFinderQa::fvulIdxTracksWithPnt
std::vector< ULong64_t > fvulIdxTracksWithPnt
Definition: CbmTofHitFinderQa.h:387
CbmTofDetectorInfo
Definition: CbmTofDetectorId.h:20
CbmTofHitFinderQa::fhMultiPntHitClosestDeltaX
TH2 * fhMultiPntHitClosestDeltaX
Definition: CbmTofHitFinderQa.h:226
fTofHitsColl
TClonesArray * fTofHitsColl
Definition: CbmHadronAnalysis.cxx:52
CbmTofHitFinderQa::fvhPlabGenTrkTofHit
std::vector< TH1 * > fvhPlabGenTrkTofHit
Definition: CbmTofHitFinderQa.h:375
CbmTofHitFinderQa::fTofDigiMatchColl
TClonesArray * fTofDigiMatchColl
Definition: CbmTofHitFinderQa.h:112
CbmTofDigi
Data class for expanded digital TOF information.
Definition: CbmTofDigi.h:38
CbmMCTrack::GetPt
Double_t GetPt() const
Definition: CbmMCTrack.h:99
CbmTofHitFinderQa::fhSinglePointHitDeltaT
TH1 * fhSinglePointHitDeltaT
Definition: CbmTofHitFinderQa.h:212
CbmTofHitFinderQa::fhTrackMapSph
TH2 * fhTrackMapSph
Definition: CbmTofHitFinderQa.h:157
CbmTofHitFinderQa::fhHitMapSingPntYZ
TH2 * fhHitMapSingPntYZ
Definition: CbmTofHitFinderQa.h:186
CbmTofHitFinderQa::fTofPointsColl
TClonesArray * fTofPointsColl
Definition: CbmTofHitFinderQa.h:105
CbmTofHitFinderQa::fhMultiTrkHitFurthestPullR
TH2 * fhMultiTrkHitFurthestPullR
Definition: CbmTofHitFinderQa.h:312
CbmTofHitFinderQa::fhMultiTrkHitFurthestDeltaT
TH2 * fhMultiTrkHitFurthestDeltaT
Definition: CbmTofHitFinderQa.h:308
CbmTofHitFinderQa::fhMultiPntHitBestDeltaT
TH2 * fhMultiPntHitBestDeltaT
Definition: CbmTofHitFinderQa.h:263
CbmTofHitFinderQa::fhMultiTrkHitMeanPullT
TH2 * fhMultiTrkHitMeanPullT
Definition: CbmTofHitFinderQa.h:324
CbmTofHitFinderQa::fhSingTrkMultiPntHitDeltaZ
TH1 * fhSingTrkMultiPntHitDeltaZ
Definition: CbmTofHitFinderQa.h:283
CbmTofHitFinderQa::fhMultiTrkHitFurthestPullY
TH2 * fhMultiTrkHitFurthestPullY
Definition: CbmTofHitFinderQa.h:310
CbmTofHitFinderQa::fhMultiPntHitMeanPullT
TH2 * fhMultiPntHitMeanPullT
Definition: CbmTofHitFinderQa.h:257
CbmTofDigiBdfPar::UseExpandedDigi
Bool_t UseExpandedDigi() const
Definition: CbmTofDigiBdfPar.h:85
CbmTofDigi::GetRpc
Double_t GetRpc() const
Detector aka Module aka RPC .
Definition: CbmTofDigi.h:132
CbmMCTrack::GetRapidity
Double_t GetRapidity() const
Definition: CbmMCTrack.cxx:177
CbmTofHitFinderQa::fhMultiTrkHitMeanPullR
TH2 * fhMultiTrkHitMeanPullR
Definition: CbmTofHitFinderQa.h:323
CbmTofHitFinderQa::fhMultiPntHitFurthestDeltaZ
TH2 * fhMultiPntHitFurthestDeltaZ
Definition: CbmTofHitFinderQa.h:239
CbmMCTrack::GetStartY
Double_t GetStartY() const
Definition: CbmMCTrack.h:76
CbmTofHitFinderQa::fhMcTrkStartPrimSingTrk
TH2 * fhMcTrkStartPrimSingTrk
Definition: CbmTofHitFinderQa.h:419
CbmTofHitFinderQa::fhPointMapXZ
TH2 * fhPointMapXZ
Definition: CbmTofHitFinderQa.h:159
CbmTofHitFinderQa::fvulIdxHiddenTracksWithHit
std::vector< ULong64_t > fvulIdxHiddenTracksWithHit
Definition: CbmTofHitFinderQa.h:398
CbmTofHitFinderQa::fhMultiPntHitClosestPullR
TH2 * fhMultiPntHitClosestPullR
Definition: CbmTofHitFinderQa.h:234
CbmTofHitFinderQa::fhIntegratedHitPntEffSec
TH1 * fhIntegratedHitPntEffSec
Definition: CbmTofHitFinderQa.h:395
CbmTofHitFinderQa::fvhPlabGenTrk
std::vector< TH1 * > fvhPlabGenTrk
Definition: CbmTofHitFinderQa.h:356
CbmTofHitFinderQa::fvhTrackAllStartXZ
std::vector< TH2 * > fvhTrackAllStartXZ
Definition: CbmTofHitFinderQa.h:149
CbmTofHitFinderQa::fhHitMapSingTrkXZ
TH2 * fhHitMapSingTrkXZ
Definition: CbmTofHitFinderQa.h:197
CbmTofHitFinderQa::fsHistoInNormSphFilename
TString fsHistoInNormSphFilename
Definition: CbmTofHitFinderQa.h:127
CbmTofHitFinderQa::fvulIdxHiddenSecTracksWithHit
std::vector< ULong64_t > fvulIdxHiddenSecTracksWithHit
Definition: CbmTofHitFinderQa.h:402
CbmMCTrack.h
CbmTofHitFinderQa::fvhPlabSecTofHit
std::vector< TH1 * > fvhPlabSecTofHit
Definition: CbmTofHitFinderQa.h:366
CbmTofHitFinderQa::fvhPtmRapSecStsPnt
std::vector< TH2 * > fvhPtmRapSecStsPnt
Definition: CbmTofHitFinderQa.h:348
CbmTofHitFinderQa::fvhPtmRapSecTofHitSingleTrk
std::vector< TH2 * > fvhPtmRapSecTofHitSingleTrk
Definition: CbmTofHitFinderQa.h:352
CbmTofHitFinderQa::fMCEventHeader
FairMCEventHeader * fMCEventHeader
Definition: CbmTofHitFinderQa.h:103
CbmTofHitFinderQa::fhSingTrkMultiPntHitPullY
TH1 * fhSingTrkMultiPntHitPullY
Definition: CbmTofHitFinderQa.h:287
CbmTofHitFinderQa::fDigiPar
CbmTofDigiPar * fDigiPar
Definition: CbmTofHitFinderQa.h:100
CbmTofHitFinderQa::fhIntegratedHitPntEffPrim
TH1 * fhIntegratedHitPntEffPrim
Definition: CbmTofHitFinderQa.h:392
CbmTofHitFinderQa::fRealTofMatchColl
TClonesArray * fRealTofMatchColl
Definition: CbmTofHitFinderQa.h:118
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmTofHitFinderQa::fhMultiTrkHitFurthestPullZ
TH2 * fhMultiTrkHitFurthestPullZ
Definition: CbmTofHitFinderQa.h:311
CbmTofHitFinderQa::fhMultiTrkHitBestDeltaZ
TH2 * fhMultiTrkHitBestDeltaZ
Definition: CbmTofHitFinderQa.h:328
CbmTofHitFinderQa::fhHitMapMultPntYZ
TH2 * fhHitMapMultPntYZ
Definition: CbmTofHitFinderQa.h:192
CbmTofHitFinderQa::fvhPlabTofPnt
std::vector< TH1 * > fvhPlabTofPnt
Definition: CbmTofHitFinderQa.h:358
CbmTofHitFinderQa::iNbRpcTot
Int_t iNbRpcTot
Definition: CbmTofHitFinderQa.h:92
CbmTofHitFinderQa::fhHitMapMultTrkXZ
TH2 * fhHitMapMultTrkXZ
Definition: CbmTofHitFinderQa.h:203
CbmTofDigiPar
Definition: CbmTofDigiPar.h:18
CbmTofPoint.h
CbmTofHitFinderQa::fhMultiPntHitMeanDeltaZ
TH2 * fhMultiPntHitMeanDeltaZ
Definition: CbmTofHitFinderQa.h:250
CbmTofHitFinderQa::fhMultiPntHitFurthestPullR
TH2 * fhMultiPntHitFurthestPullR
Definition: CbmTofHitFinderQa.h:245
CbmTofHitFinderQa::fhHitMapSingTrkSph
TH2 * fhHitMapSingTrkSph
Definition: CbmTofHitFinderQa.h:200
CbmTofHitFinderQa::fvhPlabSecGenTrk
std::vector< TH1 * > fvhPlabSecGenTrk
Definition: CbmTofHitFinderQa.h:363
CbmTofHitFinderQa::fhSingleTrackHitDeltaZ
TH1 * fhSingleTrackHitDeltaZ
Definition: CbmTofHitFinderQa.h:272
CbmTofHitFinderQa::fhSinglePointHitPullZ
TH1 * fhSinglePointHitPullZ
Definition: CbmTofHitFinderQa.h:215
CbmTofHitFinderQa::fhMultiPntHitClosestDeltaY
TH2 * fhMultiPntHitClosestDeltaY
Definition: CbmTofHitFinderQa.h:227
CbmTofHitFinderQa::fhSingleTrackHitPullT
TH1 * fhSingleTrackHitPullT
Definition: CbmTofHitFinderQa.h:279
CbmTofHitFinderQa::fhSingTrkMultiPntHitPullR
TH1 * fhSingTrkMultiPntHitPullR
Definition: CbmTofHitFinderQa.h:289
CbmTofHitFinderQa::fvhPlabSecGenTrkTofHit
std::vector< TH1 * > fvhPlabSecGenTrkTofHit
Definition: CbmTofHitFinderQa.h:382
CbmTofHitFinderQa::fhNbTracksInHit
TH1 * fhNbTracksInHit
Definition: CbmTofHitFinderQa.h:182
CbmTofHitFinderQa::NormalizeMapHistos
Bool_t NormalizeMapHistos()
Definition: CbmTofHitFinderQa.cxx:4618
CbmTofHitFinderQa::NormalizeNormHistos
Bool_t NormalizeNormHistos()
Definition: CbmTofHitFinderQa.cxx:4834
CbmTofHitFinderQa::fvhTrackAllStartYZ
std::vector< TH2 * > fvhTrackAllStartYZ
Definition: CbmTofHitFinderQa.h:150
CbmTofHitFinderQa::fMcTracksColl
TClonesArray * fMcTracksColl
Definition: CbmTofHitFinderQa.h:106
CbmTofHitFinderQa::fhMultiPntHitFurthestPullZ
TH2 * fhMultiPntHitFurthestPullZ
Definition: CbmTofHitFinderQa.h:244
ClassImp
ClassImp(CbmTofHitFinderQa)
CbmTofHitFinderQa::fvhPtmRapSecGenTrk
std::vector< TH2 * > fvhPtmRapSecGenTrk
Definition: CbmTofHitFinderQa.h:347
CbmTofHitFinderQa::fhSingleTrackHitPullZ
TH1 * fhSingleTrackHitPullZ
Definition: CbmTofHitFinderQa.h:277
CbmTofHitFinderQa::fhMultiPntHitClosestPullT
TH2 * fhMultiPntHitClosestPullT
Definition: CbmTofHitFinderQa.h:235
CbmTofHitFinderQa::fhMultiPntHitBestPullZ
TH2 * fhMultiPntHitBestPullZ
Definition: CbmTofHitFinderQa.h:266
CbmTofHitFinderQa::fhDigiMapXZ
TH2 * fhDigiMapXZ
Definition: CbmTofHitFinderQa.h:169
CbmTofPoint
Geometric intersection of a MC track with a TOFb detector.
Definition: CbmTofPoint.h:40
CbmTofHit
Definition: core/data/tof/CbmTofHit.h:26
CbmTofHitFinderQa::fvhPlabSecStsPnt
std::vector< TH1 * > fvhPlabSecStsPnt
Definition: CbmTofHitFinderQa.h:364
CbmTofCell::GetY
Double_t GetY() const
Definition: CbmTofCell.h:37
CbmTofHitFinderQa::fhMultiTrkHitBestPullX
TH2 * fhMultiTrkHitBestPullX
Definition: CbmTofHitFinderQa.h:331
CbmTofHitFinderQa::fhMultiTrkHitFurthestDeltaX
TH2 * fhMultiTrkHitFurthestDeltaX
Definition: CbmTofHitFinderQa.h:304
CbmTofHitFinderQa::fhCltSzSinglePointHitPullX
TH1 * fhCltSzSinglePointHitPullX
Definition: CbmTofHitFinderQa.h:219
CbmTofHitFinderQa::fhMultiTrkHitFurthestDeltaZ
TH2 * fhMultiTrkHitFurthestDeltaZ
Definition: CbmTofHitFinderQa.h:306
CbmTofHitFinderQa::fhIntegratedHiddenHitPntLossPrim
TH1 * fhIntegratedHiddenHitPntLossPrim
Definition: CbmTofHitFinderQa.h:401
CbmTofHitFinderQa::fhSinglePointHitDeltaX
TH1 * fhSinglePointHitDeltaX
Definition: CbmTofHitFinderQa.h:208
CbmTofHitFinderQa::iNbSmTot
Int_t iNbSmTot
Definition: CbmTofHitFinderQa.h:89
CbmTofHitFinderQa::fhHitMapSingPntSph
TH2 * fhHitMapSingPntSph
Definition: CbmTofHitFinderQa.h:188
CbmTofHitFinderQa::fhMultiTrkHitBestPullY
TH2 * fhMultiTrkHitBestPullY
Definition: CbmTofHitFinderQa.h:332
CbmTofHitFinderQa::fhMultiTrkHitMeanDeltaY
TH2 * fhMultiTrkHitMeanDeltaY
Definition: CbmTofHitFinderQa.h:316
CbmTofHitFinderQa::fhDigiMapXY
TH2 * fhDigiMapXY
Definition: CbmTofHitFinderQa.h:168
CbmTofHitFinderQa::fhHitMapMultPntXY
TH2 * fhHitMapMultPntXY
Definition: CbmTofHitFinderQa.h:190
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
PairAnalysisStyler::Fill
static Int_t Fill[]
Definition: PairAnalysisStyleDefs.h:82
CbmTofHitFinderQa::fTofHitMatchColl
TClonesArray * fTofHitMatchColl
Definition: CbmTofHitFinderQa.h:114
CbmTofHitFinderQa::SetHistoFileNameAngCoordNorm
Bool_t SetHistoFileNameAngCoordNorm(TString sFilenameIn)
Definition: CbmTofHitFinderQa.cxx:4610
CbmTofHitFinderQa::fvhPtmRapTofHitSinglePnt
std::vector< TH2 * > fvhPtmRapTofHitSinglePnt
Definition: CbmTofHitFinderQa.h:344
CbmTofHitFinderQa::LoadGeometry
Bool_t LoadGeometry()
Load the geometry: for now just resizing the Digis temporary vectors.
Definition: CbmTofHitFinderQa.cxx:854
CbmTofHitFinderQa::FillHistos
Bool_t FillHistos()
Definition: CbmTofHitFinderQa.cxx:3257
CbmTofHitFinderQa::fvhPtmRapSecTofHit
std::vector< TH2 * > fvhPtmRapSecTofHit
Definition: CbmTofHitFinderQa.h:350
CbmTofHitFinderQa::fvhPtmRapTofPnt
std::vector< TH2 * > fvhPtmRapTofPnt
Definition: CbmTofHitFinderQa.h:342
CbmTofHitFinderQa::fhDigiMapYZ
TH2 * fhDigiMapYZ
Definition: CbmTofHitFinderQa.h:170
CbmTofHitFinderQa::fhSinglePointHitPullY
TH1 * fhSinglePointHitPullY
Definition: CbmTofHitFinderQa.h:214
CbmMCTrack::GetP
Double_t GetP() const
Definition: CbmMCTrack.h:100
CbmTofHitFinderQa::SetHistoFileNameCartCoordNorm
Bool_t SetHistoFileNameCartCoordNorm(TString sFilenameIn)
Definition: CbmTofHitFinderQa.cxx:4606
CbmTofHitFinderQa::fhMultiPntHitMeanDeltaR
TH2 * fhMultiPntHitMeanDeltaR
Definition: CbmTofHitFinderQa.h:251
CbmTofHitFinderQa::fvhPtmRapSecGenTrkTofHit
std::vector< TH2 * > fvhPtmRapSecGenTrkTofHit
Definition: CbmTofHitFinderQa.h:380
CbmTofHitFinderQa::fhSingTrkMultiPntHitPullT
TH1 * fhSingTrkMultiPntHitPullT
Definition: CbmTofHitFinderQa.h:290
CbmTofHitFinderQa::fvhPlabTofHitSinglePnt
std::vector< TH1 * > fvhPlabTofHitSinglePnt
Definition: CbmTofHitFinderQa.h:360
CbmMCTrack::GetPz
Double_t GetPz() const
Definition: CbmMCTrack.h:74
CbmTofHitFinderQa::fhRealPointMapXZ
TH2 * fhRealPointMapXZ
Definition: CbmTofHitFinderQa.h:164
CbmTofHitFinderQa
QA class for the TOF event based Hit finder tasks (clusterizers, ...)
Definition: CbmTofHitFinderQa.h:34
CbmHit::GetDz
Double_t GetDz() const
Definition: CbmHit.h:71
CbmTofHitFinderQa::fhHitMapSingPntXZ
TH2 * fhHitMapSingPntXZ
Definition: CbmTofHitFinderQa.h:185
CbmTofHitFinderQa::fhMultiPntHitBestDeltaZ
TH2 * fhMultiPntHitBestDeltaZ
Definition: CbmTofHitFinderQa.h:261
CbmTofHitFinderQa::fhSingTrkMultiPntHitPullX
TH1 * fhSingTrkMultiPntHitPullX
Definition: CbmTofHitFinderQa.h:286
CbmTofHitFinderQa::CbmTofHitFinderQa
CbmTofHitFinderQa()
Definition: CbmTofHitFinderQa.cxx:101
CbmTofHitFinderQa::fTofDigiMatchPointsColl
TClonesArray * fTofDigiMatchPointsColl
Definition: CbmTofHitFinderQa.h:109
CbmTofHitFinderQa::fhMultiPntHitMeanPullZ
TH2 * fhMultiPntHitMeanPullZ
Definition: CbmTofHitFinderQa.h:255
CbmTofHitFinderQa::fvulIdxSecTracksWithPntGaps
std::vector< std::vector< ULong64_t > > fvulIdxSecTracksWithPntGaps
Definition: CbmTofHitFinderQa.h:413
CbmTofHitFinderQa::fhMcTrkStartSecMultiTrk
TH2 * fhMcTrkStartSecMultiTrk
Definition: CbmTofHitFinderQa.h:423
kiMinNbStsPntAcc
const Int_t kiMinNbStsPntAcc
Definition: CbmTofHitFinderQa.cxx:89
CbmTofHitFinderQa::fhPointMapAng
TH2 * fhPointMapAng
Definition: CbmTofHitFinderQa.h:161
CbmTofHitFinderQa::fhNbHitsMultPntPerEvent
TH1 * fhNbHitsMultPntPerEvent
Definition: CbmTofHitFinderQa.h:136
CbmTofHitFinderQa::fhHitMapXZ
TH2 * fhHitMapXZ
Definition: CbmTofHitFinderQa.h:174
CbmTofDigiBdfPar::GetNbSm
Int_t GetNbSm(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:513