CbmRoot
CbmCheckTiming.cxx
Go to the documentation of this file.
1 #/********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #include "CbmCheckTiming.h"
9 
10 #include "CbmDigiManager.h"
11 #include "CbmFlesHistosTools.h"
12 #include "CbmMuchBeamTimeDigi.h"
13 #include "CbmPsdDigi.h"
14 #include "CbmRichDigi.h"
15 #include "CbmStsDigi.h"
16 #include "CbmTofDigi.h"
17 #include "CbmTrdDigi.h"
18 
19 #include "FairLogger.h"
20 #include "FairRootManager.h"
21 #include "FairRunOnline.h"
22 
23 #include "TClonesArray.h"
24 #include "TH1.h"
25 #include "TH2.h"
26 #include "THttpServer.h"
27 #include <TFile.h>
28 
29 #include <iomanip>
30 #include <iostream>
31 using std::fixed;
32 using std::setprecision;
33 
34 // ---- Default constructor -------------------------------------------
35 CbmCheckTiming::CbmCheckTiming() : FairTask("CbmCheckTiming") {}
36 
37 // ---- Destructor ----------------------------------------------------
39 
40 // ---- Initialisation ----------------------------------------------
42  // Load all necessary parameter containers from the runtime data base
43  /*
44  FairRunAna* ana = FairRunAna::Instance();
45  FairRuntimeDb* rtdb=ana->GetRuntimeDb();
46 
47  <CbmCheckTimingDataMember> = (<ClassPointer>*)
48  (rtdb->getContainer("<ContainerName>"));
49  */
50 }
51 
52 // ---- Init ----------------------------------------------------------
53 InitStatus CbmCheckTiming::Init() {
54 
55  // Get a handle from the IO manager
56  FairRootManager* ioman = FairRootManager::Instance();
59  fDigiMan->Init();
60 
61  // Get a pointer to the previous already existing data level
62  fT0DigiVec = ioman->InitObjectAs<std::vector<CbmTofDigi> const*>("T0Digi");
63  if (!fT0DigiVec) {
64  fT0DigiArr = dynamic_cast<TClonesArray*>(ioman->GetObject("T0Digi"));
65  if (!fT0DigiArr) { LOG(fatal) << "No TClonesArray with T0 digis found."; }
66  }
67 
69  LOG(info) << "No STS digis found.";
70  }
71 
73  LOG(info) << "No MUCH digis found.";
74  }
75 
77  LOG(info) << "No TRD digis found.";
78  }
79 
81  LOG(info) << "No TOF digis found.";
82  }
83 
85  LOG(info) << "No RICH digis found.";
86  }
87 
89  LOG(info) << "No PSD digis found.";
90  }
91 
93 
94  return kSUCCESS;
95 }
96 
97 Int_t CbmCheckTiming::CalcNrBins(Int_t offsetRange) {
98 
99  if (offsetRange < 1001) {
100  fBinWidth = 5;
101  } else if (offsetRange < 10001) {
102  fBinWidth = 10;
103  } else if (offsetRange < 100001) {
104  fBinWidth = 100;
105  } else {
106  fBinWidth = 100;
107  }
108 
109  if ((static_cast<Double_t>(offsetRange) / 6.25) == (offsetRange / 6.25))
110  return (offsetRange / 6.25 * 2);
111 
112  return (offsetRange / fBinWidth * 2);
113 }
114 
117  uint32_t iNbBinsLog = 0;
119  std::vector<double> dBinsLogVector = GenerateLogBinArray(9, 9, 1, iNbBinsLog);
120  double* dBinsLog = dBinsLogVector.data();
121  // double * dBinsLog = GenerateLogBinArray( 9, 9, 1, iNbBinsLog );
122 
123  Int_t nrOfBinsSts = CalcNrBins(fStsOffsetRange);
124  // T0 vs. Sts
125  fT0StsDiff = new TH1D("fT0StsDiff",
126  "Sts-T0;time diff [ns];Counts",
127  nrOfBinsSts,
130 
131  fT0StsDiffCharge = new TH2F("fT0StsDiffCharge",
132  "Sts-T0;time diff [ns]; Charge [a.u]; Counts",
133  nrOfBinsSts,
136  256,
137  0,
138  256);
139 
140  fT0StsDiffEvo = new TH2F("fT0StsDiffEvo",
141  "Sts-T0;TS; time diff [ns];Counts",
142  1000,
143  0,
144  10000,
145  nrOfBinsSts,
148 
149 
150  Int_t nrOfBinsMuch = CalcNrBins(fMuchOffsetRange);
151  // T0 vs. Much
152  fT0MuchDiff = new TH1D("fT0MuchDiff",
153  "Much-T0;time diff [ns];Counts",
154  nrOfBinsMuch,
157 
158  fT0MuchDiffCharge = new TH2F("fT0MuchDiffCharge",
159  "Much-T0;time diff [ns]; Charge [a.u]; ;Counts",
160  nrOfBinsMuch,
163  256,
164  0,
165  256);
166 
167  fT0MuchDiffEvo = new TH2F("fT0MuchDiffEvo",
168  "Much-T0;TS; time diff [ns];Counts",
169  1000,
170  0,
171  10000,
172  nrOfBinsMuch,
175 
176  Int_t nrOfBinsTrd = CalcNrBins(fTrdOffsetRange);
177  // To vs. Trd
178  fT0TrdDiff = new TH1D("fT0TrdDiff",
179  "Trd-T0;time diff [ns];Counts",
180  nrOfBinsTrd,
183 
184  fT0TrdDiffCharge = new TH2F("fT0TrdDiffCharge",
185  "Trd-T0;time diff [ns]; Charge [a.u]; ;Counts",
186  nrOfBinsTrd,
189  256,
190  0,
191  256);
192 
193  fT0TrdDiffEvo = new TH2F("fT0TrdDiffEvo",
194  "Trd-T0;TS; time diff [ns];Counts",
195  1000,
196  0,
197  10000,
198  nrOfBinsTrd,
201 
202  Int_t nrOfBinsTof = CalcNrBins(fTofOffsetRange);
203  // To vs. Tof
204  fT0TofDiff = new TH1D("fT0TofDiff",
205  "Tof-T0;time diff [ns];Counts",
206  nrOfBinsTof,
209 
210  fT0TofDiffCharge = new TH2F("fT0TofDiffCharge",
211  "Tof-T0;time diff [ns]; Charge [a.u]; ;Counts",
212  nrOfBinsTof,
215  256,
216  0,
217  256);
218 
219  fT0TofDiffEvo = new TH2F("fT0TofDiffEvo",
220  "Tof-T0;TS; time diff [ns];Counts",
221  1000,
222  0,
223  10000,
224  nrOfBinsTof,
227 
228 
229  Int_t nrOfBinsRich = CalcNrBins(fRichOffsetRange);
230  // To vs. Rich
231  fT0RichDiff = new TH1D("fT0RichDiff",
232  "Rich-T0;time diff [ns];Counts",
233  nrOfBinsRich,
236 
237  fT0RichDiffCharge = new TH2F("fT0RichDiffCharge",
238  "Rich-T0;time diff [ns]; Charge [a.u]; ;Counts",
239  nrOfBinsRich,
242  256,
243  0,
244  256);
245 
246  fT0RichDiffEvo = new TH2F("fT0RichDiffEvo",
247  "Rich-T0;TS; time diff [ns];Counts",
248  1000,
249  0,
250  10000,
251  nrOfBinsRich,
254 
255  Int_t nrOfBinsPsd = CalcNrBins(fPsdOffsetRange);
256  // To vs. Psd
257  fT0PsdDiff = new TH1D("fT0PsdDiff",
258  "Psd-T0;time diff [ns];Counts",
259  nrOfBinsPsd,
262 
263  fT0PsdDiffCharge = new TH2F("fT0PsdDiffCharge",
264  "Psd-T0;time diff [ns]; Charge [a.u]; ;Counts",
265  nrOfBinsPsd,
268  7000,
269  0,
270  70000);
271 
272  fT0PsdDiffEvo = new TH2F("fT0PsdDiffEvo",
273  "Psd-T0;TS; time diff [ns];Counts",
274  1000,
275  0,
276  10000,
277  nrOfBinsPsd,
280 
281  // T0 vs. Sts
282  fT0StsDiffEvoLong = new TH2F("fT0StsDiffEvoLong",
283  "Sts-T0;TS; time diff [ns];Counts",
284  1800,
285  0,
286  180000,
287  nrOfBinsSts,
290  // T0 vs. Much
291  fT0MuchDiffEvoLong = new TH2F("fT0MuchDiffEvoLong",
292  "Much-T0;TS; time diff [ns];Counts",
293  1800,
294  0,
295  180000,
296  nrOfBinsMuch,
299  // To vs. Trd
300  fT0TrdDiffEvoLong = new TH2F("fT0TrdDiffEvoLong",
301  "Trd-T0;TS; time diff [ns];Counts",
302  1800,
303  0,
304  180000,
305  nrOfBinsTrd,
308  // To vs. Tof
309  fT0TofDiffEvoLong = new TH2F("fT0TofDiffEvoLong",
310  "Tof-T0;TS; time diff [ns];Counts",
311  1800,
312  0,
313  180000,
314  nrOfBinsTof,
317  // To vs. Rich
318  fT0RichDiffEvoLong = new TH2F("fT0RichDiffEvoLong",
319  "Rich-T0;TS; time diff [ns];Counts",
320  1800,
321  0,
322  180000,
323  nrOfBinsRich,
326 
327  // To vs. Psd
328  fT0PsdDiffEvoLong = new TH2F("fT0PsdDiffEvoLong",
329  "Psd-T0;TS; time diff [ns];Counts",
330  1800,
331  0,
332  180000,
333  nrOfBinsPsd,
336 
337  // T0 vs. STS for the different DPBs
338  fT0StsDpbDiff = new TH2F("fT0StsDpbDiff",
339  "Much-T0;DPB; time diff [ns];Counts",
340  2,
341  -0.5,
342  1.5,
343  nrOfBinsSts,
346 
347  for (UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb) {
348  fT0StsDpbDiffEvo[uStsDpb] =
349  new TH2F(Form("fT0StsDpbDiffEvo%02u", uStsDpb),
350  Form("Sts-T0 DPB %02u;TS; time diff [ns];Counts", uStsDpb),
351  1800,
352  0,
353  180000,
354  nrOfBinsSts,
357  fStsDpbCntsEvo[uStsDpb] =
358  new TH1F(Form("fStsDpbCntsEvo%02u", uStsDpb),
359  Form("Time STS DPB %02u;TS; Hit Counts", uStsDpb),
360  1800,
361  0,
362  180000);
363  } // for( UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb )
364 
365  // T0 vs. Much for the different DPBs/AFCK
366  fT0MuchRocDiff = new TH2F("fT0MuchRocDiff",
367  "Much-T0;AFCK; time diff [ns];Counts",
369  -0.5,
370  kuMaxNbMuchDpbs - 0.5,
371  nrOfBinsMuch,
374 
375  // T0 vs. Much for the different ASICs
376  fT0MuchAsicDiff = new TH2F("fT0MuchAsicDiff",
377  "Much-T0;ASIC; time diff [ns];Counts",
379  -0.5,
380  kuMaxNbMuchAsics - 0.5,
381  nrOfBinsMuch,
384 
385  for (UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic)
386  fT0MuchAsicDiffEvo[uMuchAsic] =
387  new TH2F(Form("fT0MuchAsicDiffEvo%02u", uMuchAsic),
388  Form("Much-T0 ASIC %02u;TS; time diff [ns];Counts", uMuchAsic),
389  1800,
390  0,
391  180000,
392  nrOfBinsMuch,
395 
396  // T0 vs. T0
397  fT0T0Diff = new TH1F(
398  "fT0T0Diff", "T0-T0_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
399  // sts vs. Sts
400  fStsStsDiff = new TH1F(
401  "fStsStsDiff", "Sts-Sts_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
402  // Much vs. Much
403  fMuchMuchDiff = new TH1F("fMuchMuchDiff",
404  "Much-Much_prev;time diff [ns];Counts",
405  iNbBinsLog,
406  dBinsLog);
407  // Trd vs. Trd
408  fTrdTrdDiff = new TH1F(
409  "fTrdTrdDiff", "Trd-Trd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
410  // Tof vs. Tof
411  fTofTofDiff = new TH1F(
412  "fTofTofDiff", "Tof-Tof_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
413  // Rich vs. Rich
414  fRichRichDiff = new TH1F("fRichRichDiff",
415  "Rich-Rich_prev;time diff [ns];Counts",
416  iNbBinsLog,
417  dBinsLog);
418  // Psd vs. Psd
419  fPsdPsdDiff = new TH1F(
420  "fPsdPsdDiff", "Psd-Psd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
421 
422  fT0Address =
423  new TH1F("fT0Address", "T0 address;address;Counts", 1000000, 0, 1000000.);
424 
425  fT0Channel =
426  new TH1F("fT0Channel", "T0 channel;channel nr;Counts", 100, -0.5, 99.5);
427 
428  fSelT0StsDiff =
429  new TH1F("fSelT0StsDiff",
430  "Sts-T0 if T0 in coinc with TOF;time diff [ns];Counts",
431  nrOfBinsSts,
435  new TH1F("fSelT0MuchDiff",
436  "Much-T0 if T0 in coinc with TOF;time diff [ns];Counts",
437  nrOfBinsMuch,
440  fSelT0TrdDiff =
441  new TH1F("fSelT0TrdDiff",
442  "Trd-T0 if T0 in coinc with TOF;time diff [ns];Counts",
443  nrOfBinsTrd,
446  fSelT0TofDiff =
447  new TH1F("fSelT0TofDiff",
448  "Tof-T0 if T0 in coinc with TOF;time diff [ns];Counts",
449  nrOfBinsTof,
453  new TH1F("fSelT0RichDiff",
454  "Rich-T0 if T0 in coinc with TOF;time diff [ns];Counts",
455  nrOfBinsRich,
458  fSelT0PsdDiff =
459  new TH1F("fSelT0PsdDiff",
460  "Psd-T0 if T0 in coinc with TOF;time diff [ns];Counts",
461  nrOfBinsPsd,
464 
466  // delete dBinsLog;
467 
469  FairRunOnline* run = FairRunOnline::Instance();
470  if (run) {
471  THttpServer* server = run->GetHttpServer();
472  if (nullptr != server) {
473  server->Register("/CheckTiming", fT0StsDiff);
474  server->Register("/CheckTiming", fT0MuchDiff);
475  server->Register("/CheckTiming", fT0TrdDiff);
476  server->Register("/CheckTiming", fT0TofDiff);
477  server->Register("/CheckTiming", fT0RichDiff);
478  server->Register("/CheckTiming", fT0PsdDiff);
479  server->Register("/CheckTiming", fT0StsDiffCharge);
480  server->Register("/CheckTiming", fT0MuchDiffCharge);
481  server->Register("/CheckTiming", fT0TrdDiffCharge);
482  server->Register("/CheckTiming", fT0TofDiffCharge);
483  server->Register("/CheckTiming", fT0RichDiffCharge);
484  server->Register("/CheckTiming", fT0PsdDiffCharge);
485  server->Register("/CheckTiming", fT0StsDiffEvo);
486  server->Register("/CheckTiming", fT0MuchDiffEvo);
487  server->Register("/CheckTiming", fT0TrdDiffEvo);
488  server->Register("/CheckTiming", fT0TofDiffEvo);
489  server->Register("/CheckTiming", fT0RichDiffEvo);
490  server->Register("/CheckTiming", fT0PsdDiffEvo);
491  server->Register("/CheckTiming", fT0StsDiffEvoLong);
492  server->Register("/CheckTiming", fT0MuchDiffEvoLong);
493  server->Register("/CheckTiming", fT0TrdDiffEvoLong);
494  server->Register("/CheckTiming", fT0TofDiffEvoLong);
495  server->Register("/CheckTiming", fT0RichDiffEvoLong);
496  server->Register("/CheckTiming", fT0PsdDiffEvoLong);
497  server->Register("/CheckTiming", fT0T0Diff);
498  server->Register("/CheckTiming", fStsStsDiff);
499  server->Register("/CheckTiming", fMuchMuchDiff);
500  server->Register("/CheckTiming", fTrdTrdDiff);
501  server->Register("/CheckTiming", fTofTofDiff);
502  server->Register("/CheckTiming", fRichRichDiff);
503  server->Register("/CheckTiming", fPsdPsdDiff);
504 
505  server->Register("/CheckTiming", fT0StsDpbDiff);
506  for (UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb)
507  server->Register("/CheckTiming/sts", fT0StsDpbDiffEvo[uStsDpb]);
508 
509  server->Register("/CheckTiming", fT0MuchRocDiff);
510  server->Register("/CheckTiming", fT0MuchAsicDiff);
511  for (UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic)
512  server->Register("/CheckTiming/much", fT0MuchAsicDiffEvo[uMuchAsic]);
513 
514  server->Register("/CheckTiming", fSelT0StsDiff);
515  server->Register("/CheckTiming", fSelT0MuchDiff);
516  server->Register("/CheckTiming", fSelT0TrdDiff);
517  server->Register("/CheckTiming", fSelT0TofDiff);
518  server->Register("/CheckTiming", fSelT0RichDiff);
519  server->Register("/CheckTiming", fSelT0PsdDiff);
520  }
521  }
522 }
523 // ---- ReInit -------------------------------------------------------
524 InitStatus CbmCheckTiming::ReInit() { return kSUCCESS; }
525 
526 // ---- Exec ----------------------------------------------------------
527 void CbmCheckTiming::Exec(Option_t* /*option*/) {
528  LOG(debug) << "executing TS " << fNrTs;
529 
532 
533  if (0 < fNrTs && 0 == fNrTs % 2000) WriteHistos();
534 
535  fNrTs++;
536 }
537 
539  LOG(debug) << "Begin";
540  Int_t nrT0Digis = 0;
541  if (fT0DigiVec)
542  nrT0Digis = fT0DigiVec->size();
543  else if (fT0DigiArr)
544  nrT0Digis = fT0DigiArr->GetEntriesFast();
545  LOG(debug) << "T0Digis: " << nrT0Digis;
546 
547  Int_t nrStsDigis {0};
549  nrStsDigis = fDigiMan->GetNofDigis(ECbmModuleId::kSts);
550  LOG(debug) << "StsDigis: " << nrStsDigis;
551  }
552 
553  Int_t nrMuchDigis {0};
555  nrMuchDigis = fDigiMan->GetNofDigis(ECbmModuleId::kMuch);
556  LOG(debug) << "MuchDigis: " << nrMuchDigis;
557  }
558 
559  Int_t nrTrdDigis {0};
561  nrTrdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTrd);
562  LOG(debug) << "TrdDigis: " << nrTrdDigis;
563  }
564 
565  Int_t nrTofDigis {0};
567  nrTofDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTof);
568  LOG(debug) << "TofDigis: " << nrTofDigis;
569  }
570 
571  Int_t nrRichDigis {0};
573  nrRichDigis = fDigiMan->GetNofDigis(ECbmModuleId::kRich);
574  LOG(debug) << "RichDigis: " << nrRichDigis;
575  }
576 
577  Int_t nrPsdDigis {0};
579  nrPsdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kPsd);
580  LOG(debug) << "PsdDigis: " << nrPsdDigis;
581  }
582 
583  // if (nrT0Digis < 100000) {
584  if (nrT0Digis < 1000000) {
586  fPrevT0FirstDigiSts = 0.;
588  fPrevT0FirstDigiTrd = 0.;
589  fPrevT0FirstDigiTof = 0.;
591  fPrevT0FirstDigiPsd = 0.;
592 
593  fvdTimeSelectedT0.clear();
594 
595  for (Int_t iT0 = 0; iT0 < nrT0Digis; ++iT0) {
596 
597  if (iT0 % 1000 == 0) LOG(debug) << "Executing entry " << iT0;
598 
599  const CbmTofDigi* T0Digi = nullptr;
600  if (fT0DigiVec)
601  T0Digi = &(fT0DigiVec->at(iT0));
602  else if (fT0DigiArr)
603  T0Digi = dynamic_cast<const CbmTofDigi*>(fT0DigiArr->At(iT0));
604  assert(T0Digi);
605 
607  if (fuMinTotPulserT0 < T0Digi->GetCharge()
608  && T0Digi->GetCharge() < fuMaxTotPulserT0)
609  continue;
610 
611  Double_t T0Time = T0Digi->GetTime();
612  Int_t T0Address = T0Digi->GetAddress();
613  fT0Address->Fill(T0Address);
614 
615  fT0Channel->Fill(T0Digi->GetChannel());
616 
617  if (nrStsDigis > 0 && nrStsDigis < 1000000)
619  FillSystemOffsetHistos<CbmStsDigi>(fT0StsDiff,
624  T0Time,
627  kTRUE,
628  kFALSE,
629  kFALSE,
630  kFALSE);
633  if (nrMuchDigis > 0 && nrMuchDigis < 1000000)
635  FillSystemOffsetHistos<CbmMuchBeamTimeDigi>(fT0MuchDiff,
640  T0Time,
643  kFALSE,
644  kTRUE,
645  kFALSE,
646  kFALSE);
647  if (nrTrdDigis > 0 && nrTrdDigis < 1000000)
649  FillSystemOffsetHistos<CbmTrdDigi>(fT0TrdDiff,
653  nullptr,
654  T0Time,
657  kFALSE,
658  kFALSE,
659  kFALSE,
660  kFALSE);
661  fuNbTofDigiInSync = 0;
662  if (nrTofDigis > 0 && nrTofDigis < 1000000)
664  FillSystemOffsetHistos<CbmTofDigi>(fT0TofDiff,
668  nullptr,
669  T0Time,
672  kFALSE,
673  kFALSE,
674  kTRUE,
675  kFALSE);
676  if (nrRichDigis > 0 && nrRichDigis < 1000000)
678  FillSystemOffsetHistos<CbmRichDigi>(fT0RichDiff,
682  nullptr,
683  T0Time,
686  kFALSE,
687  kFALSE,
688  kFALSE,
689  kFALSE);
690  if (nrPsdDigis > 0 && nrPsdDigis < 1000000)
692  FillSystemOffsetHistos<CbmPsdDigi>(fT0PsdDiff,
696  nullptr,
697  T0Time,
700  kFALSE,
701  kFALSE,
702  kFALSE,
703  kTRUE);
704 
706  fvdTimeSelectedT0.push_back(T0Time);
707  }
708 
710  fPrevT0FirstDigiSts = 0.;
712  fPrevT0FirstDigiTrd = 0.;
713  fPrevT0FirstDigiTof = 0.;
715  fPrevT0FirstDigiPsd = 0.;
716  for (UInt_t uIdxSelT0 = 0; uIdxSelT0 < fvdTimeSelectedT0.size();
717  ++uIdxSelT0) {
718  if (nrStsDigis > 0 && nrStsDigis < 1000000)
720  FillHistosSelT0<CbmStsDigi>(fSelT0StsDiff,
721  fvdTimeSelectedT0[uIdxSelT0],
724  kTRUE,
725  kFALSE,
726  kFALSE,
727  kFALSE);
730  if (nrMuchDigis > 0 && nrMuchDigis < 1000000)
732  FillHistosSelT0<CbmMuchBeamTimeDigi>(fSelT0MuchDiff,
733  fvdTimeSelectedT0[uIdxSelT0],
736  kFALSE,
737  kTRUE,
738  kFALSE,
739  kFALSE);
740  if (nrTrdDigis > 0 && nrTrdDigis < 1000000)
742  FillHistosSelT0<CbmTrdDigi>(fSelT0TrdDiff,
743  fvdTimeSelectedT0[uIdxSelT0],
746  kFALSE,
747  kFALSE,
748  kFALSE,
749  kFALSE);
750  if (nrTofDigis > 0 && nrTofDigis < 1000000)
752  FillHistosSelT0<CbmTofDigi>(fSelT0TofDiff,
753  fvdTimeSelectedT0[uIdxSelT0],
756  kFALSE,
757  kFALSE,
758  kTRUE,
759  kFALSE);
760  if (nrRichDigis > 0 && nrRichDigis < 1000000)
762  FillHistosSelT0<CbmRichDigi>(fSelT0RichDiff,
763  fvdTimeSelectedT0[uIdxSelT0],
766  kFALSE,
767  kFALSE,
768  kFALSE,
769  kFALSE);
770  if (nrPsdDigis > 0 && nrPsdDigis < 1000000)
772  FillHistosSelT0<CbmPsdDigi>(fSelT0PsdDiff,
773  fvdTimeSelectedT0[uIdxSelT0],
776  kFALSE,
777  kFALSE,
778  kFALSE,
779  kTRUE);
780  } // for( UInt_t uIdxSelT0 = 0; uIdxSelT0 < fvdTimeSelectedT0.size(); ++uIdxSelT0 )
781  }
782 }
783 
784 template<class Digi>
786  TH2* histoCharge,
787  TH2* histoEvo,
788  TH2* histoEvoLong,
789  TH2* histoAFCK,
790  const Double_t T0Time,
791  const Int_t offsetRange,
792  Int_t iStartDigi,
793  Bool_t bSts,
794  Bool_t bMuch,
795  Bool_t bTof,
796  Bool_t /*bPsd*/) {
797  Int_t nrDigis = fDigiMan->GetNofDigis(Digi::GetSystem());
798  Int_t iFirstDigiInWin = iStartDigi;
799 
800  for (Int_t i = iStartDigi; i < nrDigis; ++i) {
801 
802  const Digi* digi = fDigiMan->Get<Digi>(i);
803 
805  if (kTRUE == bTof)
806  if (fuMinTotPulserTof < digi->GetCharge()
807  && digi->GetCharge() < fuMaxTotPulserTof)
808  continue;
809  /*
811  if( kTRUE == bMuch )
812  if( digi->GetCharge() < 2 )
813  continue;
814 
816  if( kTRUE == bSts )
817  if( ( digi->GetCharge() < 7 || 31 == digi->GetCharge() ) ||
818  ( 0 == ( digi->GetChannel() % 2 ) ) )
819  continue;
820 
822  if( kTRUE == bPsd )
823  if( digi->GetAddress() != (0<<10)+8 )
824  continue;
825 */
826 
827  // Double_t diffTime = T0Time - digi->GetTime();
828  Double_t diffTime = digi->GetTime() - T0Time; // Use T0 as reference Time
829 
830  if (diffTime < -offsetRange) {
831  ++iFirstDigiInWin; // Update Index of first digi in Win to next digi
832  continue; // not yet in interesting range
833  } // if (diffTime > offsetRange)
834  if (diffTime > offsetRange) break; // already past interesting range
835  histo->Fill(diffTime);
836  histoCharge->Fill(diffTime, digi->GetCharge());
837  histoEvo->Fill(fNrTs, diffTime);
838  histoEvoLong->Fill(fNrTs, diffTime);
839 
841  if (bSts && histoAFCK) {
842  UInt_t uDPB = (0 < (digi->GetAddress() & 0x00000400));
843  histoAFCK->Fill(uDPB, diffTime);
844  if (uDPB < kuMaxNbStsDpbs) fT0StsDpbDiffEvo[uDPB]->Fill(fNrTs, diffTime);
845  } // if (bSts && histoAFCK)
846 
848  if (bMuch && histoAFCK) {
849  const CbmMuchBeamTimeDigi* muchDigi = nullptr;
850  try {
851  muchDigi = boost::any_cast<const CbmMuchBeamTimeDigi*>(digi);
852  } catch (...) {
853  LOG(fatal)
854  << "Failed boost any_cast in CbmCheckTiming::FillSystemOffsetHistos "
855  "for a digi of type "
856  << Digi::GetClassName();
857  } // try/catch
858  assert(muchDigi);
859  UInt_t afck = muchDigi->GetRocId();
860  UInt_t asic = muchDigi->GetNxId();
861  histoAFCK->Fill(afck, diffTime);
862  fT0MuchAsicDiff->Fill(asic, diffTime);
863  if (asic < kuMaxNbMuchAsics)
864  fT0MuchAsicDiffEvo[asic]->Fill(fNrTs, diffTime);
865  } // if (bMuch && histoAFCK)
866 
868  if (kTRUE == bTof && -200 < diffTime && diffTime < 200) fuNbTofDigiInSync++;
869  }
870 
871  return iFirstDigiInWin;
872 }
873 
874 template<class Digi>
876  const Double_t T0Time,
877  const Int_t offsetRange,
878  Int_t iStartDigi,
879  Bool_t /*bSts*/,
880  Bool_t /*bMuch*/,
881  Bool_t bTof,
882  Bool_t /*bPsd*/) {
883  Int_t nrDigis = fDigiMan->GetNofDigis(Digi::GetSystem());
884  Int_t iFirstDigiInWin = iStartDigi;
885 
886  for (Int_t i = iStartDigi; i < nrDigis; ++i) {
887 
888  const Digi* digi = fDigiMan->Get<Digi>(i);
889 
891  if (kTRUE == bTof)
892  if (fuMinTotPulserTof < digi->GetCharge()
893  && digi->GetCharge() < fuMaxTotPulserTof)
894  continue;
895  /*
897  if( kTRUE == bMuch )
898  if( digi->GetCharge() < 2 )
899  continue;
900 
902  if( kTRUE == bSts )
903  if( ( digi->GetCharge() < 7 || 31 == digi->GetCharge() ) ||
904  ( 0 == ( digi->GetChannel() % 2 ) ) )
905  continue;
906 
908  if( kTRUE == bPsd )
909  if( digi->GetAddress() != (0<<10)+8 )
910  continue;
911 */
912 
913  // Double_t diffTime = T0Time - digi->GetTime();
914  Double_t diffTime = digi->GetTime() - T0Time; // Use T0 as reference Time
915 
916  if (diffTime < -offsetRange) {
917  ++iFirstDigiInWin; // Update Index of first digi in Win to next digi
918  continue; // not yet in interesting range
919  } // if (diffTime > offsetRange)
920  if (diffTime > offsetRange) break; // already past interesting range
921  histo->Fill(diffTime);
922  }
923 
924  return iFirstDigiInWin;
925 }
926 
928  if (fT0DigiVec || fT0DigiArr) {
929  Int_t nrT0Digis = 0;
930  if (fT0DigiVec)
931  nrT0Digis = fT0DigiVec->size();
932  else if (fT0DigiArr)
933  nrT0Digis = fT0DigiArr->GetEntriesFast();
934  fNrOfT0Digis += nrT0Digis;
936  }
938  Int_t nrStsDigis = fDigiMan->GetNofDigis(ECbmModuleId::kSts);
939  fNrOfStsDigis += nrStsDigis;
940  fNrOfStsErrors +=
941  CheckIfSorted<CbmStsDigi>(fStsStsDiff, fPrevTimeSts, "Sts");
942 
943  for (Int_t i = 0; i < nrStsDigis; ++i) {
944  const CbmStsDigi* Digi = fDigiMan->Get<CbmStsDigi>(i);
945  UInt_t uDPB = (0 < (Digi->GetAddress() & 0x00000400));
946  if (uDPB < kuMaxNbStsDpbs) fStsDpbCntsEvo[uDPB]->Fill(fNrTs);
947  }
948  }
950  Int_t nrMuchDigis = fDigiMan->GetNofDigis(ECbmModuleId::kMuch);
951  fNrOfMuchDigis += nrMuchDigis;
952  fNrOfMuchErrors +=
953  CheckIfSorted<CbmMuchBeamTimeDigi>(fMuchMuchDiff, fPrevTimeMuch, "Much");
954  }
956  Int_t nrTrdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTrd);
957  fNrOfTrdDigis += nrTrdDigis;
958  fNrOfTrdErrors +=
959  CheckIfSorted<CbmTrdDigi>(fTrdTrdDiff, fPrevTimeTrd, "Trd");
960  }
962  Int_t nrTofDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTof);
963  fNrOfTofDigis += nrTofDigis;
964  fNrOfTofErrors +=
965  CheckIfSorted<CbmTofDigi>(fTofTofDiff, fPrevTimeTof, "Tof");
966  }
968  Int_t nrRichDigis = fDigiMan->GetNofDigis(ECbmModuleId::kRich);
969  fNrOfRichDigis += nrRichDigis;
970  fNrOfRichErrors +=
971  CheckIfSorted<CbmRichDigi>(fRichRichDiff, fPrevTimeRich, "Rich");
972  }
974  Int_t nrPsdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kPsd);
975  fNrOfPsdDigis += nrPsdDigis;
976  fNrOfPsdErrors +=
977  CheckIfSorted<CbmPsdDigi>(fPsdPsdDiff, fPrevTimePsd, "Psd");
978  }
979 }
980 
981 template<class Digi>
983  Double_t& prevTime,
984  TString detector) {
985  Int_t nrOfErrors = 0;
986  Int_t nrDigis = fDigiMan->GetNofDigis(Digi::GetSystem());
987 
988  for (Int_t i = 0; i < nrDigis; ++i) {
989 
990  const Digi* digi = fDigiMan->Get<Digi>(i);
991 
992  Double_t diffTime = digi->GetTime() - prevTime;
993  histo->Fill(diffTime);
994 
995  if (diffTime < 0.) {
996  LOG(info) << fixed << setprecision(15) << diffTime << "ns";
997  LOG(info) << "Previous " << detector << " digi (" << fixed
998  << setprecision(15) << prevTime * 1.e-9
999  << ") has a larger time than the current one ("
1000  << digi->GetTime() * 1.e-9 << ") for digi " << i << " of ts "
1001  << fNrTs;
1002  nrOfErrors++;
1003  }
1004 
1005  prevTime = digi->GetTime();
1006  }
1007 
1008  return nrOfErrors;
1009 }
1010 
1012  Double_t& prevTime,
1013  TString detector) {
1014 
1015  // Extra implementation since T0 is not included in CbmDigiManager
1016  Int_t nrOfErrors = 0;
1017 
1018  Int_t nrDigis = 0;
1019  if (fT0DigiVec)
1020  nrDigis = fT0DigiVec->size();
1021  else if (fT0DigiArr)
1022  nrDigis = fT0DigiArr->GetEntriesFast();
1023 
1024  for (Int_t i = 0; i < nrDigis; ++i) {
1025 
1026  const CbmTofDigi* digi = nullptr;
1027  if (fT0DigiVec)
1028  digi = &(fT0DigiVec->at(i));
1029  else if (fT0DigiArr)
1030  digi = dynamic_cast<const CbmTofDigi*>(fT0DigiArr->At(i));
1031  if (!digi) {
1032  nrOfErrors++;
1033  continue;
1034  }
1035 
1036  Double_t diffTime = digi->GetTime() - prevTime;
1037  histo->Fill(diffTime);
1038 
1039  if (diffTime < 0.) {
1040  LOG(info) << fixed << setprecision(15) << diffTime << "ns";
1041  LOG(info) << "Previous " << detector << " digi (" << fixed
1042  << setprecision(15) << prevTime * 1.e-9
1043  << ") has a larger time than the current one ("
1044  << digi->GetTime() * 1.e-9 << ") for digi " << i << " of ts "
1045  << fNrTs;
1046  nrOfErrors++;
1047  }
1048 
1049  prevTime = digi->GetTime();
1050  }
1051 
1052  return nrOfErrors;
1053 }
1054 
1055 
1056 // ---- Finish --------------------------------------------------------
1058  if (fCheckTimeOrdering) {
1059  LOG(info) << "Total number of T0 out of order digis: " << fNrOfT0Errors;
1060  LOG(info) << "Total number of T0 digis: " << fNrOfT0Digis;
1061  LOG(info) << "Total number of Sts out of order digis: " << fNrOfStsErrors;
1062  LOG(info) << "Total number of Sts digis: " << fNrOfStsDigis;
1063  LOG(info) << "Total number of Much out of order digis: " << fNrOfMuchErrors;
1064  LOG(info) << "Total number of Much digis: " << fNrOfMuchDigis;
1065  LOG(info) << "Total number of Trd out of order digis: " << fNrOfTrdErrors;
1066  LOG(info) << "Total number of Trd digis: " << fNrOfTrdDigis;
1067  LOG(info) << "Total number of Tof out of order digis: " << fNrOfTofErrors;
1068  LOG(info) << "Total number of Tof digis: " << fNrOfTofDigis;
1069  LOG(info) << "Total number of Rich out of order digis: " << fNrOfRichErrors;
1070  LOG(info) << "Total number of Rich digis: " << fNrOfRichDigis;
1071  LOG(info) << "Total number of Psd out of order digis: " << fNrOfPsdErrors;
1072  LOG(info) << "Total number of Psd digis: " << fNrOfPsdDigis;
1073  }
1074  WriteHistos();
1075 
1076  LOG(info) << Form("Checked %6d Timeslices", fNrTs);
1077 }
1078 
1080  TFile* old = gFile;
1081  TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
1082 
1083  fT0StsDiff->Write();
1084  fT0MuchDiff->Write();
1085  fT0TrdDiff->Write();
1086  fT0TofDiff->Write();
1087  fT0RichDiff->Write();
1088  fT0PsdDiff->Write();
1089 
1090  fT0StsDiffCharge->Write();
1091  fT0MuchDiffCharge->Write();
1092  fT0TrdDiffCharge->Write();
1093  fT0TofDiffCharge->Write();
1094  fT0RichDiffCharge->Write();
1095  fT0PsdDiffCharge->Write();
1096 
1097  fT0StsDiffEvo->Write();
1098  fT0MuchDiffEvo->Write();
1099  fT0TrdDiffEvo->Write();
1100  fT0TofDiffEvo->Write();
1101  fT0RichDiffEvo->Write();
1102  fT0PsdDiffEvo->Write();
1103 
1104  fT0StsDiffEvoLong->Write();
1105  fT0MuchDiffEvoLong->Write();
1106  fT0TrdDiffEvoLong->Write();
1107  fT0TofDiffEvoLong->Write();
1108  fT0RichDiffEvoLong->Write();
1109  fT0PsdDiffEvoLong->Write();
1110 
1111  fT0T0Diff->Write();
1112  fStsStsDiff->Write();
1113  fMuchMuchDiff->Write();
1114  fTrdTrdDiff->Write();
1115  fTofTofDiff->Write();
1116  fRichRichDiff->Write();
1117  fPsdPsdDiff->Write();
1118 
1119  fT0Address->Write();
1120  fT0Channel->Write();
1121 
1122  fT0StsDpbDiff->Write();
1123  for (UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb) {
1124  fT0StsDpbDiffEvo[uStsDpb]->Write();
1125  fStsDpbCntsEvo[uStsDpb]->Write();
1126  }
1127 
1128  fT0MuchRocDiff->Write();
1129  fT0MuchAsicDiff->Write();
1130  for (UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic)
1131  fT0MuchAsicDiffEvo[uMuchAsic]->Write();
1132 
1133  fSelT0StsDiff->Write();
1134  fSelT0MuchDiff->Write();
1135  fSelT0TrdDiff->Write();
1136  fSelT0TofDiff->Write();
1137  fSelT0RichDiff->Write();
1138  fSelT0PsdDiff->Write();
1139 
1140  outfile->Close();
1141  delete outfile;
1142 
1143  gFile = old;
1144 }
1145 
CbmCheckTiming::fPrevT0FirstDigiTof
Int_t fPrevT0FirstDigiTof
Definition: CbmCheckTiming.h:152
CbmCheckTiming::fTrdTrdDiff
TH1 * fTrdTrdDiff
Definition: CbmCheckTiming.h:224
CbmCheckTiming::kuMaxNbStsDpbs
static const UInt_t kuMaxNbStsDpbs
Definition: CbmCheckTiming.h:233
CbmCheckTiming::WriteHistos
void WriteHistos()
Definition: CbmCheckTiming.cxx:1079
CbmCheckTiming::fT0TofDiffEvo
TH2 * fT0TofDiffEvo
Definition: CbmCheckTiming.h:210
CbmCheckTiming::fNrOfRichDigis
Int_t fNrOfRichDigis
Definition: CbmCheckTiming.h:176
CbmCheckTiming::fNrOfMuchErrors
Int_t fNrOfMuchErrors
Definition: CbmCheckTiming.h:169
CbmCheckTiming::fT0MuchDiffEvoLong
TH2 * fT0MuchDiffEvoLong
Definition: CbmCheckTiming.h:215
CbmCheckTiming::fT0PsdDiffCharge
TH2 * fT0PsdDiffCharge
Definition: CbmCheckTiming.h:205
CbmCheckTiming::fT0StsDpbDiffEvo
TH2 * fT0StsDpbDiffEvo[kuMaxNbStsDpbs]
Definition: CbmCheckTiming.h:234
CbmCheckTiming::fT0TofDiffCharge
TH2 * fT0TofDiffCharge
Definition: CbmCheckTiming.h:203
CbmCheckTiming
Definition: CbmCheckTiming.h:23
CbmCheckTiming::fT0RichDiffEvo
TH2 * fT0RichDiffEvo
Definition: CbmCheckTiming.h:211
CbmCheckTiming::FillSystemOffsetHistos
Int_t FillSystemOffsetHistos(TH1 *histo, TH2 *histoCharge, TH2 *histoEvo, TH2 *histoEvoLong, TH2 *histoAFCK, const Double_t T0Time, const Int_t offsetRange, Int_t iStartDigi, Bool_t bSts=kFALSE, Bool_t bMuch=kFALSE, Bool_t bTof=kFALSE, Bool_t bPsd=kFALSE)
Definition: CbmCheckTiming.cxx:785
CbmCheckTiming::fPrevTimeMuch
Double_t fPrevTimeMuch
Definition: CbmCheckTiming.h:141
CbmPsdDigi.h
CbmCheckTiming::fNrOfRichErrors
Int_t fNrOfRichErrors
Definition: CbmCheckTiming.h:175
CbmCheckTiming::fCheckTimeOrdering
Bool_t fCheckTimeOrdering
Definition: CbmCheckTiming.h:180
CbmCheckTiming::CheckIfSorted
Int_t CheckIfSorted(TH1 *, Double_t &, TString)
Definition: CbmCheckTiming.cxx:982
CbmCheckTiming::CreateHistos
void CreateHistos()
Definition: CbmCheckTiming.cxx:115
CbmDigiManager::Init
InitStatus Init()
Initialisation.
Definition: CbmDigiManager.cxx:71
CbmCheckTiming::fPrevT0FirstDigiRich
Int_t fPrevT0FirstDigiRich
Definition: CbmCheckTiming.h:153
CbmCheckTiming::fT0PsdDiffEvoLong
TH2 * fT0PsdDiffEvoLong
Definition: CbmCheckTiming.h:219
CbmCheckTiming::fuNbTofDigisSel
UInt_t fuNbTofDigisSel
Definition: CbmCheckTiming.h:243
CbmMuchBeamTimeDigi
Definition: CbmMuchBeamTimeDigi.h:29
CbmCheckTiming::fPrevTimeTrd
Double_t fPrevTimeTrd
Definition: CbmCheckTiming.h:142
CbmCheckTiming::fNrOfPsdErrors
Int_t fNrOfPsdErrors
Definition: CbmCheckTiming.h:177
CbmCheckTiming::~CbmCheckTiming
~CbmCheckTiming()
Definition: CbmCheckTiming.cxx:38
CbmCheckTiming::fT0T0Diff
TH1 * fT0T0Diff
Definition: CbmCheckTiming.h:221
CbmCheckTiming::fT0RichDiffEvoLong
TH2 * fT0RichDiffEvoLong
Definition: CbmCheckTiming.h:218
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmCheckTiming::fvdTimeSelectedT0
std::vector< Double_t > fvdTimeSelectedT0
Definition: CbmCheckTiming.h:245
CbmCheckTiming::CheckIfSortedT0
Int_t CheckIfSortedT0(TH1 *, Double_t &, TString)
Definition: CbmCheckTiming.cxx:1011
CbmCheckTiming::fPsdPsdDiff
TH1 * fPsdPsdDiff
Definition: CbmCheckTiming.h:227
CbmCheckTiming::fNrOfPsdDigis
Int_t fNrOfPsdDigis
Definition: CbmCheckTiming.h:178
CbmCheckTiming::fNrOfTofErrors
Int_t fNrOfTofErrors
Definition: CbmCheckTiming.h:173
CbmCheckTiming::fT0MuchAsicDiff
TH2 * fT0MuchAsicDiff
Definition: CbmCheckTiming.h:240
CbmCheckTiming::fRichRichDiff
TH1 * fRichRichDiff
Definition: CbmCheckTiming.h:226
CbmCheckTiming::fSelT0PsdDiff
TH1 * fSelT0PsdDiff
Definition: CbmCheckTiming.h:251
CbmCheckTiming::fT0TofDiffEvoLong
TH2 * fT0TofDiffEvoLong
Definition: CbmCheckTiming.h:217
CbmCheckTiming::fCheckInterSystemOffset
Bool_t fCheckInterSystemOffset
Definition: CbmCheckTiming.h:181
CbmCheckTiming::fT0DigiVec
const std::vector< CbmTofDigi > * fT0DigiVec
Definition: CbmCheckTiming.h:135
CbmCheckTiming::fRichOffsetRange
Int_t fRichOffsetRange
Definition: CbmCheckTiming.h:188
CbmCheckTiming::fStsStsDiff
TH1 * fStsStsDiff
Definition: CbmCheckTiming.h:222
CbmDigiManager::GetNofDigis
static Int_t GetNofDigis(ECbmModuleId systemId)
Definition: CbmDigiManager.cxx:62
CbmCheckTiming::SetParContainers
virtual void SetParContainers()
Definition: CbmCheckTiming.cxx:41
CbmDigiManager::UseMuchBeamTimeDigi
void UseMuchBeamTimeDigi(Bool_t choice=kTRUE)
Use CbmMuchBeamTimeDigi instead of CbmMuchDigi for MUCH.
Definition: CbmDigiManager.h:130
CbmCheckTiming::fT0PsdDiffEvo
TH2 * fT0PsdDiffEvo
Definition: CbmCheckTiming.h:212
CbmCheckTiming::fT0TrdDiff
TH1 * fT0TrdDiff
Definition: CbmCheckTiming.h:195
CbmCheckTiming::fT0TrdDiffCharge
TH2 * fT0TrdDiffCharge
Definition: CbmCheckTiming.h:202
CbmCheckTiming::fSelT0MuchDiff
TH1 * fSelT0MuchDiff
Definition: CbmCheckTiming.h:247
CbmCheckTiming::fT0StsDiffEvoLong
TH2 * fT0StsDiffEvoLong
Definition: CbmCheckTiming.h:214
CbmTofDigi.h
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmCheckTiming::kuMaxNbMuchDpbs
static const UInt_t kuMaxNbMuchDpbs
Definition: CbmCheckTiming.h:237
CbmDigiManager::IsPresent
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
Definition: CbmDigiManager.cxx:112
CbmCheckTiming::CheckTimeOrder
void CheckTimeOrder()
Definition: CbmCheckTiming.cxx:927
CbmDigiManager::Instance
static CbmDigiManager * Instance()
Static instance.
Definition: CbmDigiManager.h:93
CbmCheckTiming::fNrOfTrdErrors
Int_t fNrOfTrdErrors
Definition: CbmCheckTiming.h:171
CbmCheckTiming::fPrevT0FirstDigiMuch
Int_t fPrevT0FirstDigiMuch
Definition: CbmCheckTiming.h:150
CbmRichDigi.h
CbmCheckTiming::fT0StsDiffEvo
TH2 * fT0StsDiffEvo
Definition: CbmCheckTiming.h:207
CbmCheckTiming::fT0Address
TH1 * fT0Address
Definition: CbmCheckTiming.h:229
CbmCheckTiming::fPsdOffsetRange
Int_t fPsdOffsetRange
Definition: CbmCheckTiming.h:189
CbmCheckTiming::Init
virtual InitStatus Init()
Definition: CbmCheckTiming.cxx:53
CbmTrdDigi.h
CbmCheckTiming::Exec
virtual void Exec(Option_t *)
Definition: CbmCheckTiming.cxx:527
CbmStsDigi.h
CbmCheckTiming::fPrevT0FirstDigiSts
Int_t fPrevT0FirstDigiSts
Definition: CbmCheckTiming.h:149
CbmCheckTiming::fStsOffsetRange
Int_t fStsOffsetRange
Definition: CbmCheckTiming.h:184
CbmCheckTiming::fT0MuchDiff
TH1 * fT0MuchDiff
Definition: CbmCheckTiming.h:194
CbmCheckTiming::fT0StsDiffCharge
TH2 * fT0StsDiffCharge
Definition: CbmCheckTiming.h:200
CbmMuchBeamTimeDigi::GetRocId
Int_t GetRocId() const
Definition: CbmMuchBeamTimeDigi.h:49
CbmCheckTiming::fBinWidth
Int_t fBinWidth
Definition: CbmCheckTiming.h:191
CbmDigiManager::Get
const Digi * Get(Int_t index) const
Get a digi object.
Definition: CbmDigiManager.h:52
CbmCheckTiming::fT0MuchDiffEvo
TH2 * fT0MuchDiffEvo
Definition: CbmCheckTiming.h:208
CbmTofDigi::GetChannel
Double_t GetChannel() const
Channel .
Definition: CbmTofDigi.h:136
CbmCheckTiming::fuMaxTotPulserT0
UInt_t fuMaxTotPulserT0
Definition: CbmCheckTiming.h:158
CbmCheckTiming::fT0DigiArr
TClonesArray * fT0DigiArr
Definition: CbmCheckTiming.h:136
CbmCheckTiming::fPrevTimePsd
Double_t fPrevTimePsd
Definition: CbmCheckTiming.h:145
CbmCheckTiming::CheckInterSystemOffset
void CheckInterSystemOffset()
Definition: CbmCheckTiming.cxx:538
CbmMuchBeamTimeDigi.h
CbmCheckTiming::fT0MuchAsicDiffEvo
TH2 * fT0MuchAsicDiffEvo[kuMaxNbMuchAsics]
Definition: CbmCheckTiming.h:241
CbmCheckTiming::fOutFileName
TString fOutFileName
Definition: CbmCheckTiming.h:253
CbmTofDigi::GetTime
Double_t GetTime() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:111
CbmCheckTiming::fT0MuchDiffCharge
TH2 * fT0MuchDiffCharge
Definition: CbmCheckTiming.h:201
CbmCheckTiming::fT0RichDiffCharge
TH2 * fT0RichDiffCharge
Definition: CbmCheckTiming.h:204
CbmCheckTiming::fNrOfStsErrors
Int_t fNrOfStsErrors
Definition: CbmCheckTiming.h:167
CbmCheckTiming::fT0StsDiff
TH1 * fT0StsDiff
Definition: CbmCheckTiming.h:193
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmCheckTiming::fSelT0TrdDiff
TH1 * fSelT0TrdDiff
Definition: CbmCheckTiming.h:248
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmStsDigi
Data class for a single-channel message in the STS.
Definition: CbmStsDigi.h:29
CbmCheckTiming::fTrdOffsetRange
Int_t fTrdOffsetRange
Definition: CbmCheckTiming.h:186
CbmCheckTiming::fuNbTofDigiInSync
UInt_t fuNbTofDigiInSync
Definition: CbmCheckTiming.h:244
CbmCheckTiming::fT0RichDiff
TH1 * fT0RichDiff
Definition: CbmCheckTiming.h:197
CbmTofDigi
Data class for expanded digital TOF information.
Definition: CbmTofDigi.h:38
CbmCheckTiming::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmCheckTiming.h:132
CbmCheckTiming::fT0StsDpbDiff
TH2 * fT0StsDpbDiff
Definition: CbmCheckTiming.h:232
CbmCheckTiming::fNrOfTrdDigis
Int_t fNrOfTrdDigis
Definition: CbmCheckTiming.h:172
CbmCheckTiming::CbmCheckTiming
CbmCheckTiming()
Definition: CbmCheckTiming.cxx:35
CbmCheckTiming::fPrevTimeSts
Double_t fPrevTimeSts
Definition: CbmCheckTiming.h:140
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmCheckTiming::fTofOffsetRange
Int_t fTofOffsetRange
Definition: CbmCheckTiming.h:187
CbmCheckTiming::FillHistosSelT0
Int_t FillHistosSelT0(TH1 *histo, const Double_t T0Time, const Int_t offsetRange, Int_t iStartDigi, Bool_t bSts=kFALSE, Bool_t bMuch=kFALSE, Bool_t bTof=kFALSE, Bool_t bPsd=kFALSE)
Definition: CbmCheckTiming.cxx:875
CbmStsDigi::GetAddress
Int_t GetAddress() const
Definition: CbmStsDigi.h:53
CbmCheckTiming::fPrevTimeTof
Double_t fPrevTimeTof
Definition: CbmCheckTiming.h:143
CbmCheckTiming.h
CbmCheckTiming::Finish
virtual void Finish()
Definition: CbmCheckTiming.cxx:1057
GenerateLogBinArray
std::vector< double > GenerateLogBinArray(uint32_t uNbDecadesLog, uint32_t uNbStepsDecade, uint32_t uNbSubStepsInStep, uint32_t &uNbBinsLog)
Definition: CbmFlesHistosTools.cxx:6
CbmCheckTiming::fT0MuchRocDiff
TH2 * fT0MuchRocDiff
Definition: CbmCheckTiming.h:238
CbmDigiManager.h
CbmCheckTiming::fNrTs
Int_t fNrTs
Definition: CbmCheckTiming.h:163
CbmCheckTiming::fSelT0TofDiff
TH1 * fSelT0TofDiff
Definition: CbmCheckTiming.h:249
CbmCheckTiming::fStsDpbCntsEvo
TH1 * fStsDpbCntsEvo[kuMaxNbStsDpbs]
Definition: CbmCheckTiming.h:235
CbmCheckTiming::fPrevT0FirstDigiPsd
Int_t fPrevT0FirstDigiPsd
Definition: CbmCheckTiming.h:154
CbmCheckTiming::ReInit
virtual InitStatus ReInit()
Definition: CbmCheckTiming.cxx:524
CbmFlesHistosTools.h
CbmCheckTiming::fMuchOffsetRange
Int_t fMuchOffsetRange
Definition: CbmCheckTiming.h:185
CbmCheckTiming::fNrOfTofDigis
Int_t fNrOfTofDigis
Definition: CbmCheckTiming.h:174
CbmCheckTiming::fuMaxTotPulserTof
UInt_t fuMaxTotPulserTof
Definition: CbmCheckTiming.h:160
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
CbmCheckTiming::kuMaxNbMuchAsics
static const UInt_t kuMaxNbMuchAsics
Definition: CbmCheckTiming.h:239
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmMuchBeamTimeDigi::GetNxId
Int_t GetNxId() const
Definition: CbmMuchBeamTimeDigi.h:50
CbmCheckTiming::fT0TofDiff
TH1 * fT0TofDiff
Definition: CbmCheckTiming.h:196
CbmTofDigi::GetAddress
Int_t GetAddress() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:98
CbmCheckTiming::fSelT0StsDiff
TH1 * fSelT0StsDiff
Definition: CbmCheckTiming.h:246
CbmCheckTiming::fPrevTimeRich
Double_t fPrevTimeRich
Definition: CbmCheckTiming.h:144
CbmCheckTiming::fNrOfStsDigis
Int_t fNrOfStsDigis
Definition: CbmCheckTiming.h:168
CbmCheckTiming::fT0TrdDiffEvoLong
TH2 * fT0TrdDiffEvoLong
Definition: CbmCheckTiming.h:216
CbmTofDigi::GetCharge
Double_t GetCharge() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:116
CbmCheckTiming::fNrOfT0Errors
Int_t fNrOfT0Errors
Definition: CbmCheckTiming.h:165
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmCheckTiming::fT0Channel
TH1 * fT0Channel
Definition: CbmCheckTiming.h:230
CbmCheckTiming::fSelT0RichDiff
TH1 * fSelT0RichDiff
Definition: CbmCheckTiming.h:250
CbmCheckTiming::fNrOfMuchDigis
Int_t fNrOfMuchDigis
Definition: CbmCheckTiming.h:170
CbmCheckTiming::CalcNrBins
Int_t CalcNrBins(Int_t)
Definition: CbmCheckTiming.cxx:97
CbmCheckTiming::fMuchMuchDiff
TH1 * fMuchMuchDiff
Definition: CbmCheckTiming.h:223
CbmCheckTiming::fT0TrdDiffEvo
TH2 * fT0TrdDiffEvo
Definition: CbmCheckTiming.h:209
CbmCheckTiming::fT0PsdDiff
TH1 * fT0PsdDiff
Definition: CbmCheckTiming.h:198
CbmCheckTiming::fPrevT0FirstDigiTrd
Int_t fPrevT0FirstDigiTrd
Definition: CbmCheckTiming.h:151
CbmCheckTiming::fNrOfT0Digis
Int_t fNrOfT0Digis
Definition: CbmCheckTiming.h:166
CbmCheckTiming::fTofTofDiff
TH1 * fTofTofDiff
Definition: CbmCheckTiming.h:225
CbmCheckTiming::fPrevTimeT0
Double_t fPrevTimeT0
Variables to store the previous digi time.
Definition: CbmCheckTiming.h:139