CbmRoot
Loading...
Searching...
No Matches
CbmTofTests.cxx
Go to the documentation of this file.
1/* Copyright (C) 2013-2021 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer], Florian Uhlig */
4
5// ------------------------------------------------------------------
6// ----- CbmTofTests -----
7// ----- Created 29/08/2013 by pal -----
8// ------------------------------------------------------------------
9
10#include "CbmTofTests.h"
11
12// TOF Classes and includes
13#include "CbmTofAddress.h" // in cbmdata/tof
14#include "CbmTofCell.h" // in tof/TofData
15#include "CbmTofDetectorId_v12b.h" // in cbmdata/tof
16#include "CbmTofDetectorId_v14a.h" // in cbmdata/tof
17#include "CbmTofDigi.h" // in cbmdata/tof
18#include "CbmTofDigiBdfPar.h" // in tof/TofParam
19#include "CbmTofDigiPar.h" // in tof/TofParam
20#include "CbmTofGeoHandler.h" // in tof/TofTools
21#include "CbmTofHit.h" // in cbmdata/tof
22#include "CbmTofPoint.h" // in cbmdata/tof
23
24// CBMroot classes and includes
25#include "CbmMCTrack.h"
26#include "CbmMatch.h"
27
28#include "FairMCEventHeader.h"
29/*
30#include "CbmGlobalTrack.h"
31#include "CbmHadron.h"
32#include "CbmStsHit.h"
33#include "CbmStsPoint.h"
34#include "CbmStsTrack.h"
35*/
36
37// FAIR classes and includes
38#include "FairRootManager.h"
39#include "FairRunAna.h"
40#include "FairRuntimeDb.h"
41#include <Logger.h>
42
43// ROOT Classes and includes
44#include "TClonesArray.h"
45#include "TFile.h"
46#include "TH1.h"
47#include "TH2.h"
48#include "TMath.h"
49#include "TROOT.h"
50#include "TRandom.h"
51#include "TString.h"
52
53#include "Riostream.h"
54
55using std::cout;
56using std::endl;
57
58//___________________________________________________________________
59//
60// CbmTofTests
61//
62// Task for analysis of hadron spectra
63//
64// ------------------------------------------------------------------
66 : FairTask("HadronAnalysis")
67 , fEvents(0)
68 , fMCEventHeader(NULL)
69 , fGeoHandler(new CbmTofGeoHandler())
70 , fTofId(NULL)
71 , fChannelInfo(NULL)
72 , iNbSmTot(0)
73 , fvTypeSmOffs()
74 , iNbRpcTot(0)
75 , fvSmRpcOffs()
76 , iNbChTot(0)
77 , fvRpcChOffs()
78 , fDigiPar(NULL)
79 , fDigiBdfPar(NULL)
80 , fTofPointsColl(NULL)
81 , fMcTracksColl(NULL)
82 , fTofDigisColl(NULL)
83 , fTofHitsColl(NULL)
84 , fTofHitMatchColl(NULL)
85 , fhTestingTime(NULL)
86 , fhPointMapXY(NULL)
87 , fhPointMapXZ(NULL)
88 , fhPointMapYZ(NULL)
89 , fhPointMapAng(NULL)
90 , fhPointMapSph(NULL)
91 , fhDigiMapXY(NULL)
92 , fhDigiMapXZ(NULL)
93 , fhDigiMapYZ(NULL)
94 , fhDigiMapAng(NULL)
95 , fhDigiMapSph(NULL)
96 , fhHitMapXY(NULL)
97 , fhHitMapXZ(NULL)
98 , fhHitMapYZ(NULL)
99 , fhHitMapAng(NULL)
100 , fhHitMapSph(NULL)
101 , fhFluxMap(NULL)
102 , fhDigiFluxMap(NULL)
103 , fhHitFluxMap(NULL)
104 , fhDigiRateCh(NULL)
105 , fhDataRateCh(NULL)
106 , fhDataRateRpc(NULL)
107 , fhDataRateSm(NULL)
108 , fhDataRateType(NULL)
109 , fhTofDataPerEvt(NULL)
110 , fhTofDataRedEvt(NULL)
111 , fhOptLnkRpc(NULL)
112 , fhOptLnkSm(NULL)
113 , fhOptLnkType(NULL)
114 , fhTofRes(NULL)
115 , fhTofResSing(NULL)
116 , fhTofPosDifX(NULL)
117 , fhTofPosDifY(NULL)
118 , fhTofPosDifZ(NULL)
119 , fhTofPosDifSingXX(NULL)
120 , fhTofPosDifSingXY(NULL)
121 , fhTofPosDifSingXZ(NULL)
122 , fhTofPosDifSingY(NULL)
123 , fhTofPosDifSingZ(NULL)
124 , fhTofPosDifXZSing(NULL)
125 , fhTofBadXPosSing(NULL)
126 , fhTofBadYPosSing(NULL)
127 , fhTofBadZPosSing(NULL)
128 , fhTofEff(NULL)
129 , fhTofMixing(NULL)
130 , fStart()
131 , fStop()
132{
133 cout << "CbmTofTests: Task started " << endl;
134}
135// ------------------------------------------------------------------
136
137// ------------------------------------------------------------------
138CbmTofTests::CbmTofTests(const char* name, Int_t verbose)
139 : FairTask(name, verbose)
140 , fEvents(0)
141 , fMCEventHeader(NULL)
142 , fGeoHandler(new CbmTofGeoHandler())
143 , fTofId(NULL)
144 , fChannelInfo(NULL)
145 , iNbSmTot(0)
146 , fvTypeSmOffs()
147 , iNbRpcTot(0)
148 , fvSmRpcOffs()
149 , iNbChTot(0)
150 , fvRpcChOffs()
151 , fDigiPar(NULL)
152 , fDigiBdfPar(NULL)
153 , fTofPointsColl(NULL)
154 , fMcTracksColl(NULL)
155 , fTofDigisColl(NULL)
156 , fTofHitsColl(NULL)
157 , fTofHitMatchColl(NULL)
158 , fhTestingTime(NULL)
159 , fhPointMapXY(NULL)
160 , fhPointMapXZ(NULL)
161 , fhPointMapYZ(NULL)
162 , fhPointMapAng(NULL)
163 , fhPointMapSph(NULL)
164 , fhDigiMapXY(NULL)
165 , fhDigiMapXZ(NULL)
166 , fhDigiMapYZ(NULL)
167 , fhDigiMapAng(NULL)
168 , fhDigiMapSph(NULL)
169 , fhHitMapXY(NULL)
170 , fhHitMapXZ(NULL)
171 , fhHitMapYZ(NULL)
172 , fhHitMapAng(NULL)
173 , fhHitMapSph(NULL)
174 , fhFluxMap(NULL)
175 , fhDigiFluxMap(NULL)
176 , fhHitFluxMap(NULL)
177 , fhDigiRateCh(NULL)
178 , fhDataRateCh(NULL)
179 , fhDataRateRpc(NULL)
180 , fhDataRateSm(NULL)
181 , fhDataRateType(NULL)
182 , fhTofDataPerEvt(NULL)
183 , fhTofDataRedEvt(NULL)
184 , fhOptLnkRpc(NULL)
185 , fhOptLnkSm(NULL)
186 , fhOptLnkType(NULL)
187 , fhTofRes(NULL)
188 , fhTofResSing(NULL)
189 , fhTofPosDifX(NULL)
190 , fhTofPosDifY(NULL)
191 , fhTofPosDifZ(NULL)
192 , fhTofPosDifSingXX(NULL)
193 , fhTofPosDifSingXY(NULL)
194 , fhTofPosDifSingXZ(NULL)
195 , fhTofPosDifSingY(NULL)
196 , fhTofPosDifSingZ(NULL)
197 , fhTofPosDifXZSing(NULL)
198 , fhTofBadXPosSing(NULL)
199 , fhTofBadYPosSing(NULL)
200 , fhTofBadZPosSing(NULL)
201 , fhTofEff(NULL)
202 , fhTofMixing(NULL)
203 , fStart()
204 , fStop()
205{
206}
207// ------------------------------------------------------------------
208
209// ------------------------------------------------------------------
211{
212 // Destructor
213 if (fGeoHandler) delete fGeoHandler;
214}
215// ------------------------------------------------------------------
216/************************************************************************************/
217// FairTasks inherited functions
219{
220 if (kFALSE == RegisterInputs()) return kFATAL;
221
222 if (kFALSE == InitParameters()) return kFATAL;
223
224 if (kFALSE == LoadGeometry()) return kFATAL;
225
226 if (kFALSE == CreateHistos()) return kFATAL;
227
228 return kSUCCESS;
229}
230
232{
233 // Initialize the TOF GeoHandler
234 Bool_t isSimulation = kFALSE;
235 Int_t iGeoVersion = fGeoHandler->Init(isSimulation);
236 if (k12b > iGeoVersion) {
237 LOG(error) << "CbmTofDigitizerBDF::InitParameters => Only compatible with "
238 "geometries after v12b !!!";
239 return kFALSE;
240 }
241
242 LOG(info) << "CbmTofDigitizerBDF::InitParameters: GeoVersion " << iGeoVersion;
243
244 switch (iGeoVersion) {
245 case k12b: fTofId = new CbmTofDetectorId_v12b(); break;
246 case k14a: fTofId = new CbmTofDetectorId_v14a(); break;
247 default: LOG(error) << "CbmTofDigitizerBDF::InitParameters: Invalid Detector ID " << iGeoVersion;
248 }
249 return kTRUE;
250}
251
253{
254 LOG(info) << " CbmTofTests => Get the digi parameters for tof";
255
256 // Get Base Container
257 FairRunAna* ana = FairRunAna::Instance();
258 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
259
260 fDigiPar = (CbmTofDigiPar*) (rtdb->getContainer("CbmTofDigiPar"));
261
262 fDigiBdfPar = (CbmTofDigiBdfPar*) (rtdb->getContainer("CbmTofDigiBdfPar"));
263}
264
265void CbmTofTests::Exec(Option_t* /*option*/)
266{
267 // Task execution
268
269 LOG(debug) << " CbmTofTests => New event";
270
271 fStart.Set();
272 FillHistos();
273 fStop.Set();
274 fhTestingTime->Fill(fStop.GetSec() - fStart.GetSec() + (fStop.GetNanoSec() - fStart.GetNanoSec()) / 1e9);
275
276 if (0 == (fEvents % 100) && 0 < fEvents) {
277 cout << "-I- CbmTofTests::Exec : "
278 << "event " << fEvents << " processed." << endl;
279 }
280 fEvents += 1;
281}
282
284{
285 // Normalisations
286 cout << "CbmTofTests::Finish up with " << fEvents << " analyzed events " << endl;
287
288 Double_t dEvtRate = 1. / fEvents; // [1/events]
289 Double_t dIntRate = 1.E7; // [interactions/s]
290 Double_t dOptLinkCapa = 2.5; // Nominal bandwidth [GByte/s]
291 Double_t dOptLinkAvBw = 0.8; // Bandwidth available for data transport [Nominal bandwidth ratio]
292 Double_t dKiloByte = 1024;
293 Double_t dMegaByte = 1024 * dKiloByte;
294 Double_t dGigaByte = 1024 * dMegaByte;
295
296 cout << "<I> Normalisation factors " << dIntRate * dEvtRate << " [1/s], " << dOptLinkCapa * dOptLinkAvBw
297 << " [GByte/s]" << endl;
298
299 fhFluxMap->Scale(dIntRate * dEvtRate);
300 fhDigiFluxMap->Scale(dIntRate * dEvtRate);
301 fhHitFluxMap->Scale(dIntRate * dEvtRate);
302 fhDigiRateCh->Scale(dIntRate * dEvtRate);
303 fhDataRateCh->Scale(dIntRate * dEvtRate / dMegaByte);
304 fhDataRateRpc->Scale(dIntRate * dEvtRate / dGigaByte);
305 fhDataRateSm->Scale(dIntRate * dEvtRate / dGigaByte);
306 fhDataRateType->Scale(dIntRate * dEvtRate / dGigaByte);
307 fhTofDataPerEvt->Scale(1 / dKiloByte);
308 // fhHitRateCh->Scale(dIntRate*dEvtRate);
309
310 fhOptLnkRpc->Scale(dIntRate * dEvtRate / dGigaByte / (dOptLinkCapa * dOptLinkAvBw));
311 fhOptLnkSm->Scale(dIntRate * dEvtRate / dGigaByte / (dOptLinkCapa * dOptLinkAvBw));
312 fhOptLnkType->Scale(dIntRate * dEvtRate / dGigaByte / (dOptLinkCapa * dOptLinkAvBw));
313
314 WriteHistos();
315 // Prevent them from being sucked in by the CbmHadronAnalysis WriteHistograms method
316 DeleteHistos();
317}
318
319/************************************************************************************/
320// Functions common for all clusters approximations
322{
323 FairRootManager* fManager = FairRootManager::Instance();
324 /*
325 fMCEventHeader = (CbmMCEventHeader*) fManager->GetObject("MCEventHeader");
326 if( NULL == fMCEventHeader)
327 {
328 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the MCEventHeader TClonesArray!!!";
329 return kFALSE;
330 } // if( NULL == fMCEventHeader)
331*/
332 fTofPointsColl = (TClonesArray*) fManager->GetObject("TofPoint");
333 if (NULL == fTofPointsColl) {
334 LOG(error) << "CbmTofTests::RegisterInputs => Could not get the TofPoint "
335 "TClonesArray!!!";
336 return kFALSE;
337 } // if( NULL == fTofPointsColl)
338
339 fMcTracksColl = (TClonesArray*) fManager->GetObject("MCTrack");
340 if (NULL == fMcTracksColl) {
341 LOG(error) << "CbmTofTests::RegisterInputs => Could not get the MCTrack "
342 "TClonesArray!!!";
343 return kFALSE;
344 } // if( NULL == fMcTracksColl)
345
346 fTofDigisColl = (TClonesArray*) fManager->GetObject("TofDigi");
347 if (NULL == fTofDigisColl) {
348 LOG(error) << "CbmTofTests::RegisterInputs => Could not get the TofDigi "
349 "TClonesArray!!!";
350 return kFALSE;
351 } // if( NULL == fTofDigisColl)
352
353 fTofHitsColl = (TClonesArray*) fManager->GetObject("TofHit");
354 if (NULL == fTofHitsColl) {
355 LOG(error) << "CbmTofTests::RegisterInputs => Could not get the TofHit "
356 "TClonesArray!!!";
357 return kFALSE;
358 } // if( NULL == fTofHitsColl)
359
360 fTofHitMatchColl = (TClonesArray*) fManager->GetObject("TofHitMatch");
361 if (NULL == fTofHitMatchColl) {
362 LOG(error) << "CbmTofHitFinderQa::RegisterInputs => Could not get the "
363 "TofHitMatch TClonesArray!!!";
364 return kFALSE;
365 } // if( NULL == fTofDigiMatchPointsColl)
366
367 /*
368 fGlobalTracks = (TClonesArray*) fManager->GetObject("GlobalTrack");
369 if( NULL == fGlobalTracks)
370 {
371 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the GlobalTrack TClonesArray!!!";
372 return kFALSE;
373 } // if( NULL == fGlobalTracks)
374
375 fHadrons = (TClonesArray*) fManager->GetObject("Hadron");
376 if( NULL == fHadrons)
377 {
378 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the Hadron TClonesArray!!!";
379 return kFALSE;
380 } // if( NULL == fHadrons)
381
382 fStsTracks = (TClonesArray*) fManager->GetObject("StsTrack");
383 if( NULL == fStsTracks)
384 {
385 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the StsTrack TClonesArray!!!";
386 return kFALSE;
387 } // if( NULL == fStsTracks)
388 fStsHits = (TClonesArray*) fManager->GetObject("StsHit");
389 if( NULL == fStsHits)
390 {
391 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the StsHit TClonesArray!!!";
392 return kFALSE;
393 } // if( NULL == fStsHits)
394 fStsPoints = (TClonesArray*) fManager->GetObject("StsPoint");
395 if( NULL == fStsPoints)
396 {
397 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the StsPoint TClonesArray!!!";
398 return kFALSE;
399 } // if( NULL == fStsPoints)
400
401 // PAL modif
402 fRichHits = (TClonesArray*) fManager->GetObject("RichHit");
403 if( NULL == fRichHits)
404 {
405 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the RichHit TClonesArray!!!";
406 fbRichThere = kFALSE;
407 } // if( NULL == fRichHits)
408 else fbRichThere = kTRUE;
409
410 fTrdHits = (TClonesArray*) fManager->GetObject("TrdHit");
411 if( NULL == fTrdHits)
412 {
413 LOG(error)<<"CbmTofTests::RegisterInputs => Could not get the TrdHit TClonesArray!!!";
414 fbTrdThere = kFALSE;
415 } // if( NULL == fTrdHits)
416 else fbTrdThere = kTRUE;
417*/
418
419 return kTRUE;
420}
421/************************************************************************************/
423{
424 /*
425 Type 0: 5 RPC/SM, 24 SM, 32 ch/RPC => 3840 ch , 120 RPC ,
426 Type 1: 5 RPC/SM, 142 SM, 32 ch/RPC => 22720 ch => 26560 , 710 RPC => 830 , => 166
427 Type 3: 3 RPC/SM, 50 SM, 56 ch/RPC => 8400 ch => 34960 , 150 RPC => 980 , => 216
428 Type 4: 5 RPC/SM, 8 SM, 96 ch/RPC => 3840 ch => 38800 , 40 RPC => 1020 , => 224
429 Type 5: 5 RPC/SM, 8 SM, 96 ch/RPC => 3840 ch => 42640 , 40 RPC => 1060 , => 232
430 Type 6: 2 RPC/SM, 10 SM, 96 ch/RPC => 1920 ch => 44560 , 20 RPC => 1080 , => 242
431 */
432
433 // Count the total number of channels and
434 // generate an array with the global channel index of the first channe in each RPC
435 Int_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
436 fvTypeSmOffs.resize(iNbSmTypes);
437 fvSmRpcOffs.resize(iNbSmTypes);
438 fvRpcChOffs.resize(iNbSmTypes);
439 iNbSmTot = 0;
440 iNbRpcTot = 0;
441 iNbChTot = 0;
442 for (Int_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
443 Int_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
444 Int_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
445
446 fvTypeSmOffs[iSmType] = iNbSmTot;
447 iNbSmTot += iNbSm;
448
449 fvSmRpcOffs[iSmType].resize(iNbSm);
450 fvRpcChOffs[iSmType].resize(iNbSm);
451
452 for (Int_t iSm = 0; iSm < iNbSm; iSm++) {
453 fvSmRpcOffs[iSmType][iSm] = iNbRpcTot;
454 iNbRpcTot += iNbRpc;
455
456 fvRpcChOffs[iSmType][iSm].resize(iNbRpc);
457 for (Int_t iRpc = 0; iRpc < iNbRpc; iRpc++) {
458 fvRpcChOffs[iSmType][iSm][iRpc] = iNbChTot;
459 iNbChTot += fDigiBdfPar->GetNbChan(iSmType, iRpc);
460 } // for( Int_t iRpc = 0; iRpc < iNbRpc; iRpc++ )
461 } // for( Int_t iSm = 0; iSm < iNbSm; iSm++ )
462 } // for( Int_t iSmType = 0; iSmType < iNbSmTypes; iSmType++ )
463
464 return kTRUE;
465}
466/************************************************************************************/
467// ------------------------------------------------------------------
469{
470 // Create histogramms
471
472 TDirectory* oldir = gDirectory; // <= To prevent histos from being sucked in by the param file of the TRootManager!
473 gROOT->cd(); // <= To prevent histos from being sucked in by the param file of the TRootManager !
474
475 // Test class performance
476 fhTestingTime = new TH1I("TofDigiBdf_TestingTime", "Time needed to for the test processing in each event; Time [s]",
477 4000, 0.0, 4.0);
478 /*
479 Double_t ymin=-1.;
480 Double_t ymax=4.;
481 Double_t ptmmax=2.5;
482 Int_t ptm_nbx=30;
483 Int_t ptm_nby=30;
484
485 Double_t v1_nbx=20.;
486 Double_t v1_nby=20.;
487 Double_t yvmax=1.3;
488*/
489 // xy - hit densities and rates
490 Int_t nbinx = 1500;
491 Int_t nbiny = 1000;
492 Int_t nbinz = 1500;
493 Double_t xrange = 750.;
494 Double_t yrange = 500.;
495 Double_t zmin = 950.;
496 Double_t zmax = 1100.;
497
498 // angular densities for overlap check
499 Int_t iNbBinThetaX = 1200;
500 Double_t dThetaXMin = -60.0;
501 Double_t dThetaXMax = 60.0;
502 Int_t iNbBinThetaY = 800;
503 Double_t dThetaYMin = -40.0;
504 Double_t dThetaYMax = 40.0;
505 /*
506 Int_t iNbBinPhi = 100;
507 Double_t dPhiMin = 0;
508 Double_t dPhiMax = 10;
509 Int_t iNbBinTheta = 360;
510 Double_t dThetaMin = - 180.0;
511 Double_t dThetaMax = 180.0;
512 */
513 Int_t iNbBinPhi = 180;
514 Double_t dPhiMin = 0;
515 Double_t dPhiMax = TMath::Pi() * 90 / 180;
516 Int_t iNbBinTheta = 180;
517 Double_t dThetaMin = -TMath::Pi();
518 Double_t dThetaMax = TMath::Pi();
519
520 // Mapping
521 // points
522 fhPointMapXY = new TH2D("TofTests_PointsMapXY", "Position of the Tof Points; X[cm]; Y[cm]; # [Points]", nbinx,
523 -xrange, xrange, nbiny, -yrange, yrange);
524 fhPointMapXZ = new TH2D("TofTests_PointsMapXZ", "Position of the Tof Points; X[cm]; Z[cm]; # [Points]", nbinx,
525 -xrange, xrange, nbinz, zmin, zmax);
526 fhPointMapYZ = new TH2D("TofTests_PointsMapYZ", "Position of the Tof Points; Y[cm]; Z[cm]; # [Points]", nbiny,
527 -yrange, yrange, nbinz, zmin, zmax);
528 fhPointMapAng = new TH2D("TofTests_PointsMapAng",
529 "Position of the Tof Points; #theta_{x}[Deg.]; "
530 "#theta_{y}[Deg.]; # [Points]",
531 iNbBinThetaX, dThetaXMin, dThetaXMax, iNbBinThetaY, dThetaYMin, dThetaYMax);
532 fhPointMapSph = new TH2D("TofTests_PointsMapSph", "Position of the Tof Points; #theta[rad.]; #phi[rad.]; # [Points]",
533 iNbBinTheta, dThetaMin, dThetaMax, iNbBinPhi, dPhiMin, dPhiMax);
534 // Digis
535 fhDigiMapXY = new TH2D("TofTests_DigisMapXY", "Position of the Tof Digis; X[cm]; Y[cm]; # [Digi]", nbinx, -xrange,
536 xrange, nbiny, -yrange, yrange);
537 fhDigiMapXZ = new TH2D("TofTests_DigisMapXZ", "Position of the Tof Digis; X[cm]; Z[cm]; # [Digi]", nbinx, -xrange,
538 xrange, nbinz, zmin, zmax);
539 fhDigiMapYZ = new TH2D("TofTests_DigisMapYZ", "Position of the Tof Digis; Y[cm]; Z[cm]; # [Digi]", nbiny, -yrange,
540 yrange, nbinz, zmin, zmax);
542 new TH2D("TofTests_DigisMapAng", "Position of the Tof Digis; #theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Digi]",
543 iNbBinThetaX, dThetaXMin, dThetaXMax, iNbBinThetaY, dThetaYMin, dThetaYMax);
544 fhDigiMapSph = new TH2D("TofTests_DigisMapSph", "Position of the Tof Digis; #theta[rad.]; #phi[rad.]; # [Points]",
545 iNbBinTheta, dThetaMin, dThetaMax, iNbBinPhi, dPhiMin, dPhiMax);
546
547 // Hits
548 fhHitMapXY = new TH2D("TofTests_HitsMapXY", "Position of the Tof Hits; X[cm]; Y[cm]; # [Hits]", nbinx, -xrange,
549 xrange, nbiny, -yrange, yrange);
550 fhHitMapXZ = new TH2D("TofTests_HitsMapXZ", "Position of the Tof Hits; X[cm]; Z[cm]; # [Hits]", nbinx, -xrange,
551 xrange, nbinz, zmin, zmax);
552 fhHitMapYZ = new TH2D("TofTests_HitsMapYZ", "Position of the Tof Hits; Y[cm]; Z[cm]; # [Hits]", nbiny, -yrange,
553 yrange, nbinz, zmin, zmax);
555 new TH2D("TofTests_HitsMapAng", "Position of the Tof Hits; #theta_{x}[Deg.]; #theta_{y}[Deg.]; # [Hits]",
556 iNbBinThetaX, dThetaXMin, dThetaXMax, iNbBinThetaY, dThetaYMin, dThetaYMax);
557 fhHitMapSph = new TH2D("TofTests_HitsMapSph", "Position of the Tof Hits; #theta[rad.]; #phi[rad.]; # [Points]",
558 iNbBinTheta, dThetaMin, dThetaMax, iNbBinPhi, dPhiMin, dPhiMax);
559
560 // Rates and data rates
561 Int_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
562 fhFluxMap = new TH2D("TofTests_FluxMap", "Tof Point rate as function of position; X[cm]; Y[cm]; Flux [1/(s*cm^2)]",
563 nbinx, -xrange, xrange, nbiny, -yrange, yrange);
565 new TH2D("TofTests_DigisFluxMap", "Tof Hit rate as function of position; X[cm]; Y[cm]; Flux [Digi/(s*cm^2)]", nbinx,
566 -xrange, xrange, nbiny, -yrange, yrange);
568 new TH2D("TofTests_HitsFluxMap", "Tof Hit rate as function of position; X[cm]; Y[cm]; Flux [Hits/(s*cm^2)]", nbinx,
569 -xrange, xrange, nbiny, -yrange, yrange);
571 new TH1D("TofTests_DigiRateCh", "Digi rate per channel; Channel []; Rate [1/s]", 2 * iNbChTot, 0, 2 * iNbChTot);
572 fhDataRateCh = new TH1D("TofTests_DataRateCh", "Data rate per channel; Channel []; Data Rate [kB/s]", 2 * iNbChTot, 0,
573 2 * iNbChTot);
574 fhDataRateRpc = new TH1D("TofTests_DataRateRpc", "Data rate per RPC; RPC []; Rate [GB/s]", iNbRpcTot, 0, iNbRpcTot);
575 fhDataRateSm = new TH1D("TofTests_DataRateSm", "Data rate per SM; SM []; Rate [GB/s]", iNbSmTot, 0, iNbSmTot);
577 new TH1D("TofTests_DataRateType", "Data rate per SM; SM Type[]; Rate [GB/s]", iNbSmTypes, 0, iNbSmTypes);
579 new TH1D("TofTests_DataPerEvt", "Data per event for the full wall; Event Size [kB]", 1000, 0, 1000.0);
580 fhTofDataRedEvt = new TH1D("TofTests_DataRedEvt",
581 "Possible data reduction per event for the full "
582 "wall; Event Size Reduction [kB]",
583 iNbChTot, 0, iNbChTot);
584 // fhHitRateCh = new TH1D("TofTests_HitRateCh", "Tof Hit rate per channel; Channel []; Rate [1/s]",
585 // iNbChTot, 0, iNbChTot);
587 new TH1D("TofTests_OptLnkRpc", "Number of optical links needed per RPC; RPC []", iNbRpcTot, 0, iNbRpcTot);
588 fhOptLnkSm = new TH1D("TofTests_OptLnkSm", "Number of optical links needed per SM; SM []; Optical Links []", iNbSmTot,
589 0, iNbSmTot);
591 new TH1D("TofTests_OptLnkType", "Number of optical links needed per SM type; SM Type[]; Optical Links []",
592 iNbSmTypes, 0, iNbSmTypes);
593
594 // Performances check
595 fhTofRes = new TH1I("TofTests_TimeRes", "Time difference between TofHits and TofPoint; tMcPoint -tTofHit [ns]", 5000,
596 -5.0, 5.0);
597 fhTofResSing = new TH1I("TofTests_TimeResSing",
598 "Time difference between TofHits and TofPoint, only "
599 "1 MC Track/Point per Hit; tMcPoint -tTofHit [ns]",
600 5000, -5.0, 5.0);
601
602 fhTofPosDifX = new TH2D("TofTests_PosDifX", "Position Accuracy of the Tof Hits in X; X[cm]; PtX - HitX[cm]; # [Hits]",
603 nbinx, -xrange, xrange, 200, -50, 50);
604 fhTofPosDifY = new TH2D("TofTests_PosDifY", "Position Accuracy of the Tof Hits in Y; Y[cm]; PtY - HitY[cm]; # [Hits]",
605 nbiny, -yrange, yrange, 200, -50, 50);
606 fhTofPosDifZ = new TH2D("TofTests_PosDifZ", "Position Accuracy of the Tof Hits in Z; Z[cm]; PtZ - HitZ[cm]; # [Hits]",
607 600, 950, 1100, 200, -10, 10);
608 fhTofPosDifSingXX = new TH2D("TofTests_PosDifSingXX",
609 "Position Accuracy of the Tof Hits in X, hits from single MC "
610 "point; Pt X[cm]; PtX - HitX[cm]; # [Hits]",
611 nbinx, -xrange, xrange, 500, -50, 50);
612 fhTofPosDifSingXY = new TH2D("TofTests_PosDifSingXY",
613 "Position Accuracy of the Tof Hits in X, hits from single MC "
614 "point; Pt Y[cm]; PtX - HitX[cm]; # [Hits]",
615 nbiny, -yrange, yrange, 500, -50, 50);
616 fhTofPosDifSingXZ = new TH2D("TofTests_PosDifSingXZ",
617 "Position Accuracy of the Tof Hits in X, hits from single MC "
618 "point; Pt Z[cm]; PtX - HitX[cm]; # [Hits]",
619 nbinz, zmin, zmax, 500, -50, 50);
620 fhTofPosDifSingY = new TH2D("TofTests_PosDifSingY",
621 "Position Accuracy of the Tof Hits in Y, hits from single MC "
622 "point; Pt Y[cm]; PtY - HitY[cm]; # [Hits]",
623 nbiny, -yrange, yrange, 500, -50, 50);
624 fhTofPosDifSingZ = new TH2D("TofTests_PosDifSingZ",
625 "Position Accuracy of the Tof Hits in Z, hits from single MC "
626 "point; Pt Z[cm]; PtZ - HitZ[cm]; # [Hits]",
627 600, 950, 1100, 200, -10, 10);
628 fhTofPosDifXZSing = new TH2D("TofTests_PosDifXZSing",
629 "Position Accuracy of the Tof Hits in Z, hits from single MC "
630 "point; PtX - HitX[cm]; PtZ - HitZ[cm]; # [Hits]",
631 200, -50, 50, 200, -10, 10);
632
633 fhTofBadXPosSing = new TH2D("TofTests_BadXPosSing", "Position of the Tof Hits; X[cm]; Y[cm]; # [Hits]", nbinx,
634 -xrange, xrange, nbiny, -yrange, yrange);
635 fhTofBadYPosSing = new TH2D("TofTests_BadYPosSing", "Position of the Tof Hits; X[cm]; Y[cm]; # [Hits]", nbinx,
636 -xrange, xrange, nbiny, -yrange, yrange);
637 fhTofBadZPosSing = new TH2D("TofTests_BadZPosSing", "Position of the Tof Hits; X[cm]; Y[cm]; # [Hits]", nbinx,
638 -xrange, xrange, nbiny, -yrange, yrange);
639
640 fhTofEff = new TH1I("TofTests_TofEff",
641 "Fraction of tracks reaching Tof producing a non mixed "
642 "TofHit; # non-mixed Hits/ # Tof Tracks []",
643 1000, 0.0, 1.0);
644 fhTofMixing = new TH1I("TofTests_TofMix",
645 "Fraction of TofHits built from more than 1 McTrack; "
646 "# mixed Hits/ # Hits []",
647 1000, 0.0, 0.1);
648
649 gDirectory->cd(oldir->GetPath()); // <= To prevent histos from being sucked in by the param file of the TRootManager!
650
651 return kTRUE;
652}
653
654// ------------------------------------------------------------------
656{
657 // Constants, TODO => put as parameter !!!
658 Int_t iDataSizeHit = 48; // [bits]
659
660 // Declare variables outside the loop
661 CbmMCTrack* pMcTrk;
662 CbmTofPoint* pTofPoint;
663 CbmTofHit* pTofHit;
664 CbmMatch* pMatchHitPnt;
665
666 Int_t iNbTracks, iNbTofPts, iNbTofDigis, iNbTofHits;
667
668 iNbTracks = fMcTracksColl->GetEntriesFast();
669 iNbTofPts = fTofPointsColl->GetEntriesFast();
670 iNbTofDigis = fTofDigisColl->GetEntriesFast();
671 iNbTofHits = fTofHitsColl->GetEntriesFast();
672
673 // Tracks Info
674 Int_t iNbTofTracks = 0;
675 Int_t iNbTofTracksPrim = 0;
676 for (Int_t iTrkInd = 0; iTrkInd < iNbTracks; iTrkInd++) {
677 pMcTrk = (CbmMCTrack*) fMcTracksColl->At(iTrkInd);
678
679 if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof)) { iNbTofTracks++; }
680 if (0 < pMcTrk->GetNPoints(ECbmModuleId::kTof) && -1 == pMcTrk->GetMotherId()) iNbTofTracksPrim++;
681
682 } // for(Int_t iTrkInd = 0; iTrkInd < nMcTracks; iTrkInd++)
683
684 // Points info
685 for (Int_t iPntInd = 0; iPntInd < iNbTofPts; iPntInd++) {
686 // Get a pointer to the TOF point
687 pTofPoint = (CbmTofPoint*) fTofPointsColl->At(iPntInd);
688
689 // Obtain position
690 TVector3 vPntPos;
691 pTofPoint->Position(vPntPos);
692
693 Double_t dX = vPntPos.X();
694 Double_t dY = vPntPos.Y();
695 Double_t dZ = vPntPos.Z();
696
697 fhPointMapXY->Fill(dX, dY);
698 fhPointMapXZ->Fill(dX, dZ);
699 fhPointMapYZ->Fill(dY, dZ);
700 fhFluxMap->Fill(dX, dY);
701
702 Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
703 Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
704 fhPointMapAng->Fill(dThetaX, dThetaY);
705
706 Double_t dPhi = TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY), dZ); //*180.0/TMath::Pi();
707 Double_t dTheta = TMath::ATan2(dY, dX); //*180.0/TMath::Pi();
708 fhPointMapSph->Fill(dTheta, dPhi);
709 } // for (Int_t iPntInd = 0; iPntInd < nTofPoint; iPntInd++ )
710
711 // Digis info
712 Double_t dTotalDataSize = 0;
713 if (kTRUE == fDigiBdfPar->UseExpandedDigi()) {
714 CbmTofDigi* pDigi;
715 for (Int_t iDigInd = 0; iDigInd < iNbTofDigis; iDigInd++) {
716 pDigi = (CbmTofDigi*) fTofDigisColl->At(iDigInd);
717
718 Int_t iSmType = pDigi->GetType();
719 Int_t iSm = pDigi->GetSm();
720 Int_t iRpc = pDigi->GetRpc();
721 Int_t iCh = pDigi->GetChannel();
722 // First Get X/Y position info
723 if (fGeoHandler->GetGeoVersion() < k14a) iCh = iCh + 1; //FIXME: Reason found in TofMC and TofGeoHandler
724 CbmTofDetectorInfo xDetInfo(ECbmModuleId::kTof, iSmType, iSm, iRpc, 0, iCh);
725 Int_t iChId = fTofId->SetDetectorInfo(xDetInfo);
726 fChannelInfo = fDigiPar->GetCell(iChId);
727
728 Double_t dX = fChannelInfo->GetX();
729 Double_t dY = fChannelInfo->GetY();
730 Double_t dZ = fChannelInfo->GetZ();
731
732 fhDigiMapXY->Fill(dX, dY);
733 fhDigiMapXZ->Fill(dX, dZ);
734 fhDigiMapYZ->Fill(dY, dZ);
735 fhDigiFluxMap->Fill(dX, dY);
736
737 Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
738 Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
739 fhDigiMapAng->Fill(dThetaX, dThetaY);
740
741 Double_t dPhi = TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY), dZ); //*180.0/TMath::Pi();
742 Double_t dTheta = TMath::ATan2(dY, dX); //*180.0/TMath::Pi();
743 fhDigiMapSph->Fill(dTheta, dPhi);
744
745 Int_t iGlobalChan = iCh + fvRpcChOffs[iSmType][iSm][iRpc];
746 Int_t iGlobalRpc = iRpc + fvSmRpcOffs[iSmType][iSm];
747 Int_t iGlobalSm = iSm + fvTypeSmOffs[iSmType];
748 fhDigiRateCh->Fill(iGlobalChan + iNbChTot * pDigi->GetSide());
749 fhDataRateCh->Fill(iGlobalChan + iNbChTot * pDigi->GetSide(), iDataSizeHit);
750 fhDataRateRpc->Fill(iGlobalRpc, iDataSizeHit);
751 fhDataRateSm->Fill(iGlobalSm, iDataSizeHit);
752 fhDataRateType->Fill(iSmType, iDataSizeHit);
753 fhOptLnkRpc->Fill(iGlobalRpc, iDataSizeHit);
754 fhOptLnkSm->Fill(iGlobalSm, iDataSizeHit);
755 fhOptLnkType->Fill(iSmType, iDataSizeHit);
756 dTotalDataSize += iDataSizeHit;
757 } // for( Int_t iDigInd = 0; iDigInd < iNbTofDigis; iDigInd++ )
758 } // if( kTRUE == fDigiBdfPar->UseExpandedDigi() )
759
760 fhTofDataPerEvt->Fill(dTotalDataSize);
761
762 // Hits info
763 Int_t iNbMixedHits = 0;
764 for (Int_t iHitInd = 0; iHitInd < iNbTofHits; iHitInd++) {
765 pTofHit = (CbmTofHit*) fTofHitsColl->At(iHitInd);
766 pMatchHitPnt = (CbmMatch*) fTofHitMatchColl->At(iHitInd);
767
768 // Need a method to reconvert position in a "central channel"
769 // fhHitRateCh->Fill();
770
771 Double_t dX = pTofHit->GetX();
772 Double_t dY = pTofHit->GetY();
773 Double_t dZ = pTofHit->GetZ();
774
775 fhHitMapXY->Fill(dX, dY);
776 fhHitMapXZ->Fill(dX, dZ);
777 fhHitMapYZ->Fill(dY, dZ);
778 fhHitFluxMap->Fill(dX, dY);
779
780 Double_t dThetaX = TMath::ATan2(dX, dZ) * 180.0 / TMath::Pi();
781 Double_t dThetaY = TMath::ATan2(dY, dZ) * 180.0 / TMath::Pi();
782 fhHitMapAng->Fill(dThetaX, dThetaY);
783
784 Double_t dPhi = TMath::ATan2(TMath::Sqrt(dX * dX + dY * dY), dZ); //*180.0/TMath::Pi();
785 Double_t dTheta = TMath::ATan2(dY, dX); //*180.0/TMath::Pi();
786 fhHitMapSph->Fill(dPhi, dTheta);
787
788 // Get Nb of links in Match and index of Point for best link
789 Int_t iNbPntHit = pMatchHitPnt->GetNofLinks();
790 CbmLink lPnt = pMatchHitPnt->GetMatchedLink();
791 Int_t iPtIdx = lPnt.GetIndex();
792 CbmTofPoint* pPt = (CbmTofPoint*) fTofPointsColl->At(iPtIdx);
793
794 fhTofRes->Fill(pTofHit->GetTime() - pPt->GetTime());
795
796 fhTofPosDifX->Fill(pPt->GetX(), pPt->GetX() - pTofHit->GetX());
797 fhTofPosDifY->Fill(pPt->GetY(), pPt->GetY() - pTofHit->GetY());
798 fhTofPosDifZ->Fill(pPt->GetZ(), pPt->GetZ() - pTofHit->GetZ());
799
800 if (1 == iNbPntHit) {
801 fhTofPosDifSingXX->Fill(pPt->GetX(), pPt->GetX() - pTofHit->GetX());
802 fhTofPosDifSingXY->Fill(pPt->GetY(), pPt->GetX() - pTofHit->GetX());
803 fhTofPosDifSingXZ->Fill(pPt->GetZ(), pPt->GetX() - pTofHit->GetX());
804 fhTofPosDifSingY->Fill(pPt->GetY(), pPt->GetY() - pTofHit->GetY());
805 fhTofPosDifSingZ->Fill(pPt->GetZ(), pPt->GetZ() - pTofHit->GetZ());
806 fhTofPosDifXZSing->Fill(pPt->GetX() - pTofHit->GetX(), pPt->GetZ() - pTofHit->GetZ());
807
808 if (pPt->GetX() - pTofHit->GetX() < -0.7 || 0.7 < pPt->GetX() - pTofHit->GetX())
809 fhTofBadXPosSing->Fill(pPt->GetX(), pPt->GetY());
810 // fhTofBadXPosSing->Fill( pTofHit->GetX(), pTofHit->GetY() );
811 if (pPt->GetY() - pTofHit->GetY() < -2.0 || 2.0 < pPt->GetY() - pTofHit->GetY())
812 fhTofBadYPosSing->Fill(pPt->GetX(), pPt->GetY());
813 // fhTofBadYPosSing->Fill( pTofHit->GetX(), pTofHit->GetY() );
814 if (pPt->GetZ() - pTofHit->GetZ() < -0.6 || 0.6 < pPt->GetZ() - pTofHit->GetZ())
815 fhTofBadZPosSing->Fill(pPt->GetX(), pPt->GetY());
816 // fhTofBadZPosSing->Fill( pTofHit->GetX(), pTofHit->GetY() );
817
818 fhTofResSing->Fill(pTofHit->GetTime() - pPt->GetTime());
819 } // if( 1 == pTofHit->GetFlag() )
820 else
821 iNbMixedHits++;
822
823 } // for( Int_t iHitInd = 0; iHitInd < iNbTofHits; iHitInd++)
824 if (0 < iNbTofHits) fhTofMixing->Fill(iNbMixedHits / iNbTofHits);
825
826 return kTRUE;
827}
828// ------------------------------------------------------------------
829
831{
832 // TODO: add sub-folders
833
835 TFile* oldFile = gFile;
836 TDirectory* oldDir = gDirectory;
837
838 // Write histogramms to the file
839 TFile* fHist = new TFile("./tofTests.hst.root", "RECREATE");
840 fHist->cd();
841
842 // Test class performance
843 fhTestingTime->Write();
844
845 // Mapping
846 fhPointMapXY->Write();
847 fhPointMapXZ->Write();
848 fhPointMapYZ->Write();
849 fhPointMapAng->Write();
850 fhPointMapSph->Write();
851 fhDigiMapXY->Write();
852 fhDigiMapXZ->Write();
853 fhDigiMapYZ->Write();
854 fhDigiMapAng->Write();
855 fhDigiMapSph->Write();
856 fhHitMapXY->Write();
857 fhHitMapXZ->Write();
858 fhHitMapYZ->Write();
859 fhHitMapAng->Write();
860 fhHitMapSph->Write();
861
862 // Rates and data rates
863 fhFluxMap->Write();
864 fhDigiFluxMap->Write();
865 fhHitFluxMap->Write();
866 fhDigiRateCh->Write();
867 fhDataRateCh->Write();
868 fhDataRateRpc->Write();
869 fhDataRateSm->Write();
870 fhDataRateType->Write();
871 fhTofDataPerEvt->Write();
872 fhTofDataRedEvt->Write();
873 // fhHitRateCh->Write();
874 fhOptLnkRpc->Write();
875 fhOptLnkSm->Write();
876 fhOptLnkType->Write();
877
878 // Performances check
879 fhTofRes->Write();
880 fhTofResSing->Write();
881 fhTofPosDifX->Write();
882 fhTofPosDifY->Write();
883 fhTofPosDifZ->Write();
884 fhTofPosDifSingXX->Write();
885 fhTofPosDifSingXY->Write();
886 fhTofPosDifSingXZ->Write();
887
888 fhTofPosDifSingY->Write();
889 fhTofPosDifSingZ->Write();
890 fhTofPosDifXZSing->Write();
891
892 fhTofBadXPosSing->Write();
893 fhTofBadYPosSing->Write();
894 fhTofBadZPosSing->Write();
895
896 fhTofEff->Write();
897 fhTofMixing->Write();
898
900 gFile = oldFile;
901 gDirectory = oldDir;
902
903 fHist->Close();
904
905 return kTRUE;
906}
908{
909 // Test class performance
910 delete fhTestingTime;
911
912 // Mapping
913 delete fhPointMapXY;
914 delete fhPointMapXZ;
915 delete fhPointMapYZ;
916 delete fhPointMapAng;
917 delete fhPointMapSph;
918 delete fhDigiMapXY;
919 delete fhDigiMapXZ;
920 delete fhDigiMapYZ;
921 delete fhDigiMapAng;
922 delete fhDigiMapSph;
923 delete fhHitMapXY;
924 delete fhHitMapXZ;
925 delete fhHitMapYZ;
926 delete fhHitMapAng;
927 delete fhHitMapSph;
928
929 // Rates and data rates
930 delete fhFluxMap;
931 delete fhDigiFluxMap;
932 delete fhHitFluxMap;
933 delete fhDigiRateCh;
934 delete fhDataRateCh;
935 delete fhDataRateRpc;
936 delete fhDataRateSm;
937 delete fhDataRateType;
938 delete fhTofDataPerEvt;
939 delete fhTofDataRedEvt;
940 // delete fhHitRateCh;
941 delete fhOptLnkRpc;
942 delete fhOptLnkSm;
943 delete fhOptLnkType;
944
945 // Performances check
946 delete fhTofRes;
947 delete fhTofResSing;
948 delete fhTofPosDifX;
949 delete fhTofPosDifY;
950 delete fhTofPosDifZ;
951
952 delete fhTofPosDifSingXX;
953 delete fhTofPosDifSingXY;
954 delete fhTofPosDifSingXZ;
955
956 delete fhTofPosDifSingY;
957 delete fhTofPosDifSingZ;
958 delete fhTofPosDifXZSing;
959
960 delete fhTofBadXPosSing;
961 delete fhTofBadYPosSing;
962 delete fhTofBadZPosSing;
963
964 delete fhTofEff;
965 delete fhTofMixing;
966
967 return kTRUE;
968}
969
970
@ kTof
Time-of-flight Detector.
static TFile * fHist
TClonesArray * fTofHitsColl
@ k12b
@ k14a
ClassImp(CbmTofTests)
double GetTime() const
Definition CbmHit.h:76
double GetZ() const
Definition CbmHit.h:71
int32_t GetMotherId() const
Definition CbmMCTrack.h:69
int32_t GetNPoints(ECbmModuleId detId) const
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
Double_t GetY() const
Definition CbmTofCell.h:36
Double_t GetX() const
Definition CbmTofCell.h:35
Double_t GetZ() const
Definition CbmTofCell.h:37
virtual int32_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo)=0
Parameters class for the CBM ToF digitizer using beam data distributions.
Int_t GetNbSmTypes() const
Int_t GetNbSm(Int_t iSmType) const
Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const
Int_t GetNbRpc(Int_t iSmType) const
Bool_t UseExpandedDigi() const
CbmTofCell * GetCell(Int_t i)
Data class for expanded digital TOF information.
Definition CbmTofDigi.h:47
double GetSide() const
Channel Side.
Definition CbmTofDigi.h:160
double GetChannel() const
Channel .
Definition CbmTofDigi.h:156
double GetSm() const
Sm.
Definition CbmTofDigi.h:144
double GetType() const
Sm Type .
Definition CbmTofDigi.h:148
double GetRpc() const
Detector aka Module aka RPC .
Definition CbmTofDigi.h:152
Int_t Init(Bool_t isSimulation=kFALSE)
Geometric intersection of a MC track with a TOFb detector.
Definition CbmTofPoint.h:44
TTimeStamp fStart
virtual void Finish()
std::vector< std::vector< Int_t > > fvSmRpcOffs
Definition CbmTofTests.h:74
Bool_t RegisterInputs()
Bool_t WriteHistos()
TH2 * fhTofPosDifX
TH1 * fhTofResSing
TH2 * fhTofBadXPosSing
CbmTofCell * fChannelInfo
Definition CbmTofTests.h:70
TH1 * fhTestingTime
Definition CbmTofTests.h:99
TH2 * fhHitMapYZ
TClonesArray * fMcTracksColl
Definition CbmTofTests.h:83
TH2 * fhDigiMapXZ
TH1 * fhOptLnkSm
Int_t iNbChTot
Definition CbmTofTests.h:75
TH2 * fhTofPosDifSingY
TH2 * fhTofPosDifSingXX
TH2 * fhPointMapAng
CbmTofDigiPar * fDigiPar
Definition CbmTofTests.h:79
virtual InitStatus Init()
Bool_t CreateHistos()
TH2 * fhTofPosDifSingXZ
Int_t fEvents
Definition CbmTofTests.h:64
virtual ~CbmTofTests()
TClonesArray * fTofDigisColl
Definition CbmTofTests.h:84
Bool_t FillHistos()
TClonesArray * fTofPointsColl
Definition CbmTofTests.h:82
TH2 * fhDigiMapAng
TH1 * fhOptLnkType
TTimeStamp fStop
TH2 * fhDigiFluxMap
TH2 * fhPointMapYZ
CbmTofGeoHandler * fGeoHandler
Definition CbmTofTests.h:68
TH1 * fhTofDataPerEvt
TClonesArray * fTofHitsColl
Definition CbmTofTests.h:85
TH2 * fhTofPosDifXZSing
TH1 * fhDigiRateCh
TH1 * fhDataRateSm
TH2 * fhHitFluxMap
Bool_t DeleteHistos()
TH2 * fhDigiMapYZ
TClonesArray * fTofHitMatchColl
Definition CbmTofTests.h:86
TH2 * fhTofPosDifZ
TH2 * fhHitMapSph
TH2 * fhTofBadZPosSing
TH1 * fhOptLnkRpc
TH2 * fhTofPosDifY
TH2 * fhHitMapXY
TH2 * fhTofBadYPosSing
TH1 * fhDataRateType
std::vector< Int_t > fvTypeSmOffs
Definition CbmTofTests.h:72
TH1 * fhDataRateRpc
TH2 * fhHitMapAng
CbmTofDetectorId * fTofId
Definition CbmTofTests.h:69
Bool_t LoadGeometry()
Load the geometry: for now just resizing the Digis temporary vectors.
Int_t iNbRpcTot
Definition CbmTofTests.h:73
TH2 * fhHitMapXZ
TH2 * fhPointMapSph
std::vector< std::vector< std::vector< Int_t > > > fvRpcChOffs
Definition CbmTofTests.h:76
TH1 * fhTofMixing
virtual void Exec(Option_t *option)
CbmTofDigiBdfPar * fDigiBdfPar
Definition CbmTofTests.h:80
virtual void SetParContainers()
Inherited from FairTask.
Int_t iNbSmTot
Definition CbmTofTests.h:71
TH2 * fhPointMapXY
Bool_t InitParameters()
TH1 * fhDataRateCh
TH2 * fhPointMapXZ
TH2 * fhDigiMapSph
TH2 * fhFluxMap
TH2 * fhTofPosDifSingXY
TH1 * fhTofDataRedEvt
TH2 * fhDigiMapXY
TH2 * fhTofPosDifSingZ