CbmRoot
CbmMcbm2019CheckPulser.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  ********************************************************************************/
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 "TProfile.h"
28 #include <TFile.h>
29 
30 
31 #include <iomanip>
32 #include <iostream>
33 #include <type_traits>
34 using std::fixed;
35 using std::setprecision;
36 
37 // ---- Default constructor -------------------------------------------
39  : FairTask("CbmMcbm2019CheckPulser") {}
40 
41 // ---- Destructor ----------------------------------------------------
43 
44 // ---- Initialisation ----------------------------------------------
46  // Load all necessary parameter containers from the runtime data base
47  /*
48  FairRunAna* ana = FairRunAna::Instance();
49  FairRuntimeDb* rtdb=ana->GetRuntimeDb();
50 
51  <CbmMcbm2019CheckPulserDataMember> = (<ClassPointer>*)
52  (rtdb->getContainer("<ContainerName>"));
53  */
54 }
55 
56 // ---- Init ----------------------------------------------------------
58 
59  // Get a handle from the IO manager
60  FairRootManager* ioman = FairRootManager::Instance();
61 
62  // Digi manager
65  fDigiMan->Init();
66 
67  // T0 is not included in DigiManager; have to take care here
68  // Try to find a vector branch for the digi
69  fT0DigiVector = ioman->InitObjectAs<std::vector<CbmTofDigi> const*>("T0Digi");
70  if (!fT0DigiVector) {
71  LOG(info) << "No T0 digi vector found; trying TClonesArray";
72  if (std::is_convertible<TObject*, CbmTofDigi*>::value) {
73  fT0DigiArray = dynamic_cast<TClonesArray*>(ioman->GetObject("T0Digi"));
74  if (!fT0DigiArray) LOG(info) << "No T0 digi input found.";
75  } //? CbmTofDigi derives from TObject
76  } //? No vector for T0 digis
77 
79  LOG(info) << "No STS digi input found.";
80  }
81 
83  LOG(info) << "No MUCH digi input found.";
84  }
85 
87  LOG(info) << "No TRD digi input found.";
88  } // if ( ! fDigiMan->IsPresent(ECbmModuleId::kTrd) )
89  else {} // else of if ( ! fDigiMan->IsPresent(ECbmModuleId::kTrd) )
90 
92  LOG(info) << "No TOF digi input found.";
93  }
94 
96  LOG(info) << "No RICH digi input found.";
97  }
98 
100  LOG(info) << "No PSD digi input found.";
101  }
102 
105  dynamic_cast<TClonesArray*>(ioman->GetObject("TimesliceMetaData"));
106  if (!fTimeSliceMetaDataArray) LOG(fatal) << "No TS metadata input found";
107 
108  CreateHistos();
109 
110  return kSUCCESS;
111 }
112 
113 Int_t CbmMcbm2019CheckPulser::CalcNrBins(Int_t offsetRange) {
114 
115  if (offsetRange < 251) {
116  Double_t dClocks = offsetRange;
117  dClocks /= 6.25;
118  return (dClocks * 112 * 2);
119  } else if (offsetRange < 501) {
120  fBinWidth = 1;
121  } else if (offsetRange < 1001) {
122  fBinWidth = 5;
123  } else if (offsetRange < 10001) {
124  fBinWidth = 10;
125  } else if (offsetRange < 100001) {
126  fBinWidth = 100;
127  } else {
128  fBinWidth = 100;
129  }
130 
131  return (offsetRange / fBinWidth * 2);
132 }
133 
136  uint32_t iNbBinsLog = 0;
138  std::vector<double> dBinsLogVector = GenerateLogBinArray(9, 9, 1, iNbBinsLog);
139  double* dBinsLog = dBinsLogVector.data();
140  // double * dBinsLog = GenerateLogBinArray( 9, 9, 1, iNbBinsLog );
141 
142  Int_t nrOfBinsSts = CalcNrBins(fStsOffsetRange);
143  // T0 vs. Sts
144  fT0StsDiff = new TH1F("fT0StsDiff",
145  "T0-Sts;time diff [ns];Counts",
146  nrOfBinsSts,
149 
150  fT0StsDiffEvo = new TH2F("fT0StsDiffEvo",
151  "T0-Sts;TS; time diff [ns];Counts",
152  1000,
153  0,
154  10000,
155  nrOfBinsSts,
158 
159 
160  Int_t nrOfBinsMuch = CalcNrBins(fMuchOffsetRange);
161  // T0 vs. Much
162  fT0MuchDiff = new TH1F("fT0MuchDiff",
163  "T0-Much;time diff [ns];Counts",
164  nrOfBinsMuch,
167 
168  fT0MuchDiffEvo = new TH2F("fT0MuchDiffEvo",
169  "T0-Much;TS; time diff [ns];Counts",
170  1000,
171  0,
172  10000,
173  nrOfBinsMuch,
176 
177 
178  Int_t nrOfBinsTrd = CalcNrBins(fTrdOffsetRange);
179  // To vs. Trd
180  fT0TrdDiff = new TH1F("fT0TrdDiff",
181  "T0-Trd;time diff [ns];Counts",
182  nrOfBinsTrd,
185 
186  fT0TrdDiffEvo = new TH2F("fT0TrdDiffEvo",
187  "T0-Trd;TS; time diff [ns];Counts",
188  1000,
189  0,
190  10000,
191  nrOfBinsTrd,
194 
195 
196  Int_t nrOfBinsTof = CalcNrBins(fTofOffsetRange);
197  // To vs. Tof
198  fT0TofDiff = new TH1F("fT0TofDiff",
199  "T0-Tof;time diff [ns];Counts",
200  nrOfBinsTof,
203 
204  fT0TofDiffEvo = new TH2F("fT0TofDiffEvo",
205  "T0-Tof;TS; time diff [ns];Counts",
206  1000,
207  0,
208  10000,
209  nrOfBinsTof,
212 
213 
214  Int_t nrOfBinsRich = CalcNrBins(fRichOffsetRange);
215  // To vs. Rich
216  fT0RichDiff = new TH1F("fT0RichDiff",
217  "T0-Rich;time diff [ns];Counts",
218  nrOfBinsRich,
221 
222  fT0RichDiffEvo = new TH2F("fT0RichDiffEvo",
223  "T0-Rich;TS; time diff [ns];Counts",
224  1000,
225  0,
226  10000,
227  nrOfBinsRich,
230 
231  Int_t nrOfBinsPsd = CalcNrBins(fPsdOffsetRange);
232  // To vs. Psd
233  fT0PsdDiff = new TH1F("fT0PsdDiff",
234  "T0-Psd;time diff [ns];Counts",
235  nrOfBinsPsd,
238 
239  fT0PsdDiffEvo = new TH2F("fT0PsdDiffEvo",
240  "T0-Psd;TS; time diff [ns];Counts",
241  1000,
242  0,
243  10000,
244  nrOfBinsPsd,
247 
248  fT0PsdDiffCharge = new TH2F("fT0PsdDiffCharge",
249  "T0-Psd;time diff [ns]; Charge [a.u]; ;Counts",
250  nrOfBinsPsd,
253  7000,
254  0,
255  70000);
256 
257 
258  // T0 vs. Sts
259  fT0StsDiffEvoLong = new TH2F("fT0StsDiffEvoLong",
260  "T0-Sts;TS; time diff [ns];Counts",
261  1800,
262  0,
263  180000,
264  nrOfBinsSts,
267  // T0 vs. Much
268  fT0MuchDiffEvoLong = new TH2F("fT0MuchDiffEvoLong",
269  "T0-Much;TS; time diff [ns];Counts",
270  1800,
271  0,
272  180000,
273  nrOfBinsMuch,
276  // To vs. Trd
277  fT0TrdDiffEvoLong = new TH2F("fT0TrdDiffEvoLong",
278  "T0-Trd;TS; time diff [ns];Counts",
279  1800,
280  0,
281  180000,
282  nrOfBinsTrd,
285  // To vs. Tof
286  fT0TofDiffEvoLong = new TH2F("fT0TofDiffEvoLong",
287  "T0-Tof;TS; time diff [ns];Counts",
288  1800,
289  0,
290  180000,
291  nrOfBinsTof,
294  // To vs. Rich
295  fT0RichDiffEvoLong = new TH2F("fT0RichDiffEvoLong",
296  "T0-Rich;TS; time diff [ns];Counts",
297  1800,
298  0,
299  180000,
300  nrOfBinsRich,
303 
304  // To vs. Psd
305  fT0PsdDiffEvoLong = new TH2F("fT0PsdDiffEvoLong",
306  "T0-Psd;TS; time diff [ns];Counts",
307  1800,
308  0,
309  180000,
310  nrOfBinsPsd,
313 
314 
315  // T0 vs. Sts
316  fT0StsMeanEvo = new TProfile("fT0StsMeanEvo",
317  "T0-Sts; time in run [s]; Mean time diff [ns]",
318  4320,
319  0,
320  4320);
321  // T0 vs. Much
322  fT0MuchMeanEvo = new TProfile("fT0MuchMeanEvo",
323  "T0-Much; time in run [s]; Mean time diff [ns]",
324  4320,
325  0,
326  4320);
327  // To vs. Tof
328  fT0TrdMeanEvo = new TProfile("fT0TrdMeanEvo",
329  "T0-Trd; time in run [s]; Mean time diff [ns]",
330  4320,
331  0,
332  4320);
333  // To vs. Tof
334  fT0TofMeanEvo = new TProfile("fT0TofMeanEvo",
335  "T0-Tof; time in run [s]; Mean time diff [ns]",
336  4320,
337  0,
338  4320);
339  // To vs. Rich
340  fT0RichMeanEvo = new TProfile("fT0RichMeanEvo",
341  "T0-Rich; time in run [s]; Mean time diff [ns]",
342  4320,
343  0,
344  4320);
345  // To vs. Psd
346  fT0PsdMeanEvo = new TProfile("fT0PsdMeanEvo",
347  "T0-Psd; time in run [s]; Mean time diff [ns]",
348  4320,
349  0,
350  4320);
351  // 4320, 0, 259200);
352 
353 
354  // T0 vs. STS for the different DPBs
355  fT0StsDpbDiff = new TH2F("fT0StsDpbDiff",
356  "T0-Much;DPB; time diff [ns];Counts",
357  2,
358  -0.5,
359  1.5,
360  nrOfBinsSts,
363 
364  for (UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb) {
365  fT0StsDpbDiffEvo[uStsDpb] =
366  new TH2F(Form("fT0StsDpbDiffEvo%02u", uStsDpb),
367  Form("T0-STS DPB %02u;TS; time diff [ns];Counts", uStsDpb),
368  1800,
369  0,
370  180000,
371  nrOfBinsSts,
374  fStsDpbCntsEvo[uStsDpb] =
375  new TH1F(Form("fStsDpbCntsEvo%02u", uStsDpb),
376  Form("Time STS DPB %02u;TS; Hit Counts", uStsDpb),
377  1800,
378  0,
379  180000);
380  } // for( UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb )
381 
382  // T0 vs. Much for the different DPBs/AFCK
383  fT0MuchRocDiff = new TH2F("fT0MuchRocDiff",
384  "T0-Much;AFCK; time diff [ns];Counts",
386  -0.5,
387  kuMaxNbMuchDpbs - 0.5,
388  nrOfBinsMuch,
391 
392  // T0 vs. Much for the different ASICs
393  fT0MuchAsicDiff = new TH2F("fT0MuchAsicDiff",
394  "T0-Much;ASIC; time diff [ns];Counts",
396  -0.5,
397  kuMaxNbMuchAsics - 0.5,
398  nrOfBinsMuch,
401 
402  for (UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic)
403  fT0MuchAsicDiffEvo[uMuchAsic] =
404  new TH2F(Form("fT0MuchAsicDiffEvo%02u", uMuchAsic),
405  Form("T0-Much ASIC %02u;TS; time diff [ns];Counts", uMuchAsic),
406  1800,
407  0,
408  180000,
409  nrOfBinsMuch,
412 
413  // T0 vs. T0
414  fT0T0Diff = new TH1F(
415  "fT0T0Diff", "T0-T0_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
416  // sts vs. Sts
417  fStsStsDiff = new TH1F(
418  "fStsStsDiff", "Sts-Sts_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
419  // Much vs. Much
420  fMuchMuchDiff = new TH1F("fMuchMuchDiff",
421  "Much-Much_prev;time diff [ns];Counts",
422  iNbBinsLog,
423  dBinsLog);
424  // Trd vs. Trd
425  fTrdTrdDiff = new TH1F(
426  "fTrdTrdDiff", "Trd-Trd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
427  // Tof vs. Tof
428  fTofTofDiff = new TH1F(
429  "fTofTofDiff", "Tof-Tof_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
430  // Rich vs. Rich
431  fRichRichDiff = new TH1F("fRichRichDiff",
432  "Rich-Rich_prev;time diff [ns];Counts",
433  iNbBinsLog,
434  dBinsLog);
435  // Psd vs. Psd
436  fPsdPsdDiff = new TH1F(
437  "fPsdPsdDiff", "Psd-Psd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
438 
439 
440  fT0StsNb = new TH2F(
441  "fT0StsNb", "T0-STS;Nb T0; Nb STS;TS []", 100, 0, 100, 100, 0, 100);
442  fT0MuchNb = new TH2F(
443  "fT0MuchNb", "T0-MUCH;Nb T0; Nb MUCH;TS []", 100, 0, 100, 100, 0, 100);
444  fT0TrdNb = new TH2F(
445  "fT0TrdNb", "T0-TRD;Nb T0; Nb TRD;TS []", 100, 0, 100, 100, 0, 100);
446  fT0TofNb = new TH2F(
447  "fT0TofNb", "T0-TOF;Nb T0; Nb TOF;TS []", 100, 0, 100, 100, 0, 100);
448  fT0RichNb = new TH2F(
449  "fT0RichNb", "T0-RICH;Nb T0; Nb RICH;TS []", 100, 0, 100, 100, 0, 100);
450  fT0PsdNb = new TH2F(
451  "fT0PsdNb", "T0-PSD;Nb T0; Nb PSD;TS []", 100, 0, 100, 100, 0, 100);
452 
453  fT0Address =
454  new TH1F("fT0Address", "T0 address;address;Counts", 1000000, 0, 1000000.);
455 
456  fT0Channel =
457  new TH1F("fT0Channel", "T0 channel;channel nr;Counts", 100, -0.5, 99.5);
458 
460  // delete dBinsLog;
461 
463  FairRunOnline* run = FairRunOnline::Instance();
464  if (run) {
465  THttpServer* server = run->GetHttpServer();
466  if (nullptr != server) {
467  server->Register("/CheckTiming", fT0StsDiff);
468  server->Register("/CheckTiming", fT0MuchDiff);
469  server->Register("/CheckTiming", fT0TrdDiff);
470  server->Register("/CheckTiming", fT0TofDiff);
471  server->Register("/CheckTiming", fT0RichDiff);
472  server->Register("/CheckTiming", fT0PsdDiff);
473  server->Register("/CheckTiming", fT0StsDiffEvo);
474  server->Register("/CheckTiming", fT0MuchDiffEvo);
475  server->Register("/CheckTiming", fT0TrdDiffEvo);
476  server->Register("/CheckTiming", fT0TofDiffEvo);
477  server->Register("/CheckTiming", fT0RichDiffEvo);
478  server->Register("/CheckTiming", fT0PsdDiffEvo);
479  server->Register("/CheckTiming", fT0StsDiffEvoLong);
480  server->Register("/CheckTiming", fT0MuchDiffEvoLong);
481  server->Register("/CheckTiming", fT0TrdDiffEvoLong);
482  server->Register("/CheckTiming", fT0TofDiffEvoLong);
483  server->Register("/CheckTiming", fT0RichDiffEvoLong);
484  server->Register("/CheckTiming", fT0PsdDiffEvoLong);
485 
486  server->Register("/CheckTiming", fT0StsMeanEvo);
487  server->Register("/CheckTiming", fT0MuchMeanEvo);
488  server->Register("/CheckTiming", fT0TrdMeanEvo);
489  server->Register("/CheckTiming", fT0TofMeanEvo);
490  server->Register("/CheckTiming", fT0RichMeanEvo);
491  server->Register("/CheckTiming", fT0PsdMeanEvo);
492 
493  server->Register("/CheckTiming", fT0T0Diff);
494  server->Register("/CheckTiming", fStsStsDiff);
495  server->Register("/CheckTiming", fMuchMuchDiff);
496  server->Register("/CheckTiming", fTrdTrdDiff);
497  server->Register("/CheckTiming", fTofTofDiff);
498  server->Register("/CheckTiming", fRichRichDiff);
499  server->Register("/CheckTiming", fPsdPsdDiff);
500 
501  server->Register("/CheckTiming", fT0StsNb);
502  server->Register("/CheckTiming", fT0MuchNb);
503  server->Register("/CheckTiming", fT0TrdNb);
504  server->Register("/CheckTiming", fT0TofNb);
505  server->Register("/CheckTiming", fT0RichNb);
506  server->Register("/CheckTiming", fT0PsdNb);
507 
508  server->Register("/CheckTiming", fT0StsDpbDiff);
509  for (UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb)
510  server->Register("/CheckTiming/STS", fT0StsDpbDiffEvo[uStsDpb]);
511 
512  server->Register("/CheckTiming", fT0MuchRocDiff);
513  server->Register("/CheckTiming", fT0MuchAsicDiff);
514  for (UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic)
515  server->Register("/CheckTiming/MUCH", fT0MuchAsicDiffEvo[uMuchAsic]);
516  }
517  }
518  /*
519  fDigisPerAsicEvo = new TH2F( "fDigisPerAsicEvo",
520  "Digis per Asic evo; Time [ ns ]; ASIC []",
521  5 * 10240, 0, 5 * 10240000.,
522  kuMaxNbMuchAsics, 0, kuMaxNbMuchAsics);
523  for( UInt_t uAsic = 0; uAsic < kuMaxNbMuchAsics; ++uAsic )
524  for( UInt_t uChan = 0; uChan < kuNbChanSMX; ++uChan )
525  {
526  fdLastMuchDigi[ uAsic ][ uChan ] = 0.0;
527  fdLastMuchDigiPulser[ uAsic ][ uChan ] = 0.0;
528  } // loop on channel and asic
529 
530  fSameChanDigisDistEvo = new TH2F( "fSameChanDigisDistEvo",
531  "Time dist of digis in same chan evo; Time [ ns ]; Same chan dist [ ns ]",
532  5000, 0, 500000.,
533  1000, 0., 10000. );
534 
535  fDigiTimeEvoT0 = new TH2F( "fDigiTimeEvoT0",
536  "Time of digi in T0 vs ts index; TS [ ]; Digi time [ ns ]",
537  10000, 0., 30000.,
538  10000, 0., 300.e9 );
539  fDigiTimeEvoSts = new TH2F( "fDigiTimeEvoSts",
540  "Time of digi in Sts vs ts index; TS [ ]; Digi time [ ns ]",
541  10000, 0., 30000.,
542  10000, 0., 300.e9 );
543  fDigiTimeEvoMuch = new TH2F( "fDigiTimeEvoMuch",
544  "Time of digi in Much vs ts index; TS [ ]; Digi time [ ns ]",
545  10000, 0., 30000.,
546  10000, 0., 300.e9 );
547  fDigiTimeEvoTof = new TH2F( "fDigiTimeEvoTof",
548  "Time of digi in Tof vs ts index; TS [ ]; Digi time [ ns ]",
549  10000, 0., 30000.,
550  10000, 0., 300.e9 );
551 */
552 }
553 // ---- ReInit -------------------------------------------------------
554 InitStatus CbmMcbm2019CheckPulser::ReInit() { return kSUCCESS; }
555 
556 // ---- Exec ----------------------------------------------------------
557 void CbmMcbm2019CheckPulser::Exec(Option_t* /*option*/) {
558  LOG(debug) << "executing TS " << fNrTs;
559 
560  if (0 < fNrTs && 0 == fNrTs % 1000)
561  LOG(info) << Form("Processing TS %6d", fNrTs);
562 
563  /*
565  if( fNrTs < 17600 || 17650 < fNrTs )
566 // if( fNrTs < 17634 || 17637 < fNrTs )
567  return;
568 */
569 
571  /*
572  Int_t nrT0Digis=fT0Digis->GetEntriesFast();
573  for (Int_t iT0 = 0; iT0 < nrT0Digis; ++iT0)
574  {
575  CbmDigi* T0Digi = static_cast<CbmDigi*>(fT0Digis->At(iT0));
576 
577  Double_t T0Time = T0Digi->GetTime();
578  fDigiTimeEvoT0->Fill( fNrTs, T0Time );
579  }
580 
581  Int_t nrStsDigis{0};
582  if (fStsDigis) {
583  nrStsDigis=fStsDigis->GetEntriesFast();
584  LOG(debug) << "StsDigis: " << nrStsDigis;
585  for (Int_t iMuch = 0; iMuch < nrStsDigis; ++iMuch) {
586 
587  CbmDigi* Digi = static_cast<CbmDigi*>(fStsDigis->At(iMuch));
588 
589  Double_t dTime = Digi->GetTime();
590  fDigiTimeEvoSts->Fill( fNrTs, dTime );
591  }
592  }
593 
594  Int_t nrMuchDigis{0};
595  if (fMuchDigis) {
596  nrMuchDigis=fMuchDigis->GetEntriesFast();
597  LOG(debug) << "MuchDigis: " << nrMuchDigis;
598  for (Int_t iMuch = 0; iMuch < nrMuchDigis; ++iMuch) {
599 
600  CbmDigi* Digi = static_cast<CbmDigi*>(fMuchDigis->At(iMuch));
601 
602  Double_t dTime = Digi->GetTime();
603  fDigiTimeEvoMuch->Fill( fNrTs, dTime );
604  }
605  }
606 
607  Int_t nrTofDigis{0};
608  if (fTofDigis) {
609  nrTofDigis=fTofDigis->GetEntriesFast();
610  LOG(debug) << "TofDigis: " << nrTofDigis;
611  for (Int_t iMuch = 0; iMuch < nrTofDigis; ++iMuch) {
612 
613  CbmDigi* Digi = static_cast<CbmDigi*>(fTofDigis->At(iMuch));
614 
615  Double_t dTime = Digi->GetTime();
616  fDigiTimeEvoTof->Fill( fNrTs, dTime );
617  }
618  }
619 */
620  fNrTs++;
621 
622  if (0 < fNrTs && 0 == fNrTs % 90000) WriteHistos();
623 }
624 
626  LOG(debug) << "Begin";
627  Int_t nrT0Digis = 0;
628  if (fT0DigiVector)
629  nrT0Digis = fT0DigiVector->size();
630  else if (fT0DigiArray)
631  nrT0Digis = fT0DigiArray->GetEntriesFast();
632  LOG(debug) << "T0Digis: " << nrT0Digis;
633 
634  Int_t nrStsDigis = fDigiMan->GetNofDigis(ECbmModuleId::kSts);
635  Int_t nrMuchDigis = fDigiMan->GetNofDigis(ECbmModuleId::kMuch);
636  Int_t nrTrdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTrd);
637  Int_t nrTofDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTof);
638  Int_t nrRichDigis = fDigiMan->GetNofDigis(ECbmModuleId::kRich);
639  Int_t nrPsdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kPsd);
640 
641  /*
642  if( 0 < nrT0Digis )
643  {
644  LOG(info) << "TS: " << fNrTs;
645  LOG(info) << "T0: " << nrT0Digis;
646  LOG(info) << "STS: " << nrStsDigis;
647  LOG(info) << "MUCH: " << nrMuchDigis;
648  LOG(info) << "TRD: " << nrTrdDigis;
649  LOG(info) << "TOF: " << nrTofDigis;
650  LOG(info) << "RICH: " << nrRichDigis;
651  LOG(info) << "PSD: " << nrPsdDigis;
652  }
653 */
654  // if (nrT0Digis < 100000) {
655  if (nrT0Digis < 1000000) {
657  fPrevT0FirstDigiSts = 0.;
659  fPrevT0FirstDigiTrd = 0.;
660  fPrevT0FirstDigiTof = 0.;
662  fPrevT0FirstDigiPsd = 0.;
663 
664  pTsMetaData =
665  dynamic_cast<TimesliceMetaData*>(fTimeSliceMetaDataArray->At(0));
666  if (nullptr == pTsMetaData)
667  LOG(fatal) << Form("No TS metadata found for TS %6u.", fNrTs);
668 
669  for (Int_t iT0 = 0; iT0 < nrT0Digis; ++iT0) {
670 
671  if (iT0 % 1000 == 0) LOG(debug) << "Executing entry " << iT0;
672 
673  const CbmTofDigi* T0Digi = nullptr;
674  if (fT0DigiVector)
675  T0Digi = &(fT0DigiVector->at(iT0));
676  else if (fT0DigiArray)
677  T0Digi = dynamic_cast<CbmTofDigi*>(fT0DigiArray->At(iT0));
678  assert(T0Digi);
679 
681  if (fuMaxTotPulserT0 < T0Digi->GetCharge()
682  || T0Digi->GetCharge() < fuMinTotPulserT0)
683  continue;
684 
685  Double_t T0Time = T0Digi->GetTime();
686  Int_t T0Address = T0Digi->GetAddress();
687 
689  if (0x00005006 != T0Address && 0x04005006 != T0Address) continue;
690 
691  fiT0Nb++;
692 
693  fT0Address->Fill(T0Address);
694  /*
695  std::cout << Form( "T0 pulser in TS %5d: address 0x%08X T0 time %12.0f dt %12.0f",
696  fNrTs, T0Address, T0Time, T0Time - fdLastT0DigiPulser )
697  << std::endl;
698 */
699  fT0T0Diff->Fill(T0Time - fdLastT0DigiPulser);
700  fdLastT0DigiPulser = T0Time;
701 
702  fT0Channel->Fill(T0Digi->GetChannel());
703 
704  if (nrStsDigis > 0 && nrStsDigis < 1000000
707  FillSystemOffsetHistos<CbmStsDigi>(fT0StsDiff,
712  T0Time,
716  if (nrMuchDigis > 0 && nrMuchDigis < 1000000
719  FillSystemOffsetHistos<CbmMuchBeamTimeDigi>(fT0MuchDiff,
724  T0Time,
728  if (nrTrdDigis > 0 && nrTrdDigis < 1000000
731  FillSystemOffsetHistos<CbmTrdDigi>(fT0TrdDiff,
735  nullptr,
736  T0Time,
740  if (nrTofDigis > 0 && nrTofDigis < 1000000
743  FillSystemOffsetHistos<CbmTofDigi>(fT0TofDiff,
747  nullptr,
748  T0Time,
752  if (nrRichDigis > 0 && nrRichDigis < 1000000
755  FillSystemOffsetHistos<CbmRichDigi>(fT0RichDiff,
759  nullptr,
760  T0Time,
764  if (nrPsdDigis > 0 && nrPsdDigis < 1000000
767  FillSystemOffsetHistos<CbmPsdDigi>(fT0PsdDiff,
771  nullptr,
772  T0Time,
776  }
777 
780  for (Int_t iDigi = 0; iDigi < nrStsDigis; ++iDigi) {
781  const CbmStsDigi* digi = fDigiMan->Get<CbmStsDigi>(iDigi);
782 
783  UInt_t uAddr = digi->GetAddress();
784  UInt_t uChan = digi->GetChannel();
785 
786  if ((kuDefaultAddress != fuStsAddress && uAddr != fuStsAddress)
787  || (kuMaxChannelSts != fuStsFirstCha && uChan < fuStsFirstCha)
788  || (kuMaxChannelSts != fuStsLastChan && fuStsLastChan < uChan))
789  continue;
790 
791  if (fuMaxAdcPulserSts < digi->GetCharge()
792  || digi->GetCharge() < fuMinAdcPulserSts)
793  continue;
794 
795  fiStsNb++;
796  } // for( Int_t iDigi = 0; iDigi < nrStsDigis; ++iDigi )
798  for (Int_t iDigi = 0; iDigi < nrMuchDigis; ++iDigi) {
799  const CbmMuchBeamTimeDigi* digi =
801 
802  UInt_t uAsic = digi->GetNxId();
803  UInt_t uChan = digi->GetNxCh();
804 
805  if ((kuMaxNbMuchAsics != fuMuchAsic && uAsic != fuMuchAsic)
806  || (kuNbChanSMX != fuMuchFirstCha && uChan < fuMuchFirstCha)
807  || (kuNbChanSMX != fuMuchLastChan && fuMuchLastChan < uChan))
808  continue;
809 
810  if (fuMaxAdcPulserMuch < digi->GetCharge()
811  || digi->GetCharge() < fuMinAdcPulserMuch)
812  continue;
813 
814  fiMuchNb++;
815  } // for( Int_t iDigi = 0; iDigi < nrMuchDigis; ++iDigi )
817  for (Int_t iDigi = 0; iDigi < nrTrdDigis; ++iDigi) {
818  const CbmTrdDigi* digi = fDigiMan->Get<CbmTrdDigi>(iDigi);
819 
820  UInt_t uAddr = digi->GetAddress();
821 
822  if ((kuDefaultAddress != fuTrdAddress && uAddr != fuTrdAddress)) continue;
823 
824  if (fuMaxChargePulserTrd < digi->GetCharge()
825  || digi->GetCharge() < fuMinChargePulserTrd)
826  continue;
827 
828  fiTrdNb++;
829  } // for( Int_t iDigi = 0; iDigi < nrTrdDigis; ++iDigi )
831  for (Int_t iDigi = 0; iDigi < nrTofDigis; ++iDigi) {
832  const CbmTofDigi* digi = fDigiMan->Get<CbmTofDigi>(iDigi);
833 
834  if (fuMaxTotPulserTof < digi->GetCharge()
835  || digi->GetCharge() < fuMinTotPulserTof)
836  continue;
837 
838  fiTofNb++;
839  } // for( Int_t iDigi = 0; iDigi < nrTofDigis; ++iDigi )
841  for (Int_t iDigi = 0; iDigi < nrRichDigis; ++iDigi) {
842  const CbmRichDigi* digi = fDigiMan->Get<CbmRichDigi>(iDigi);
843 
844  if (fuMaxTotPulserRich < digi->GetCharge()
845  || digi->GetCharge() < fuMinTotPulserRich)
846  continue;
847 
848  fiRichNb++;
849  } // for( Int_t iDigi = 0; iDigi < nrRichDigis; ++iDigi )
851  for (Int_t iDigi = 0; iDigi < nrPsdDigis; ++iDigi) {
852  const CbmPsdDigi* digi = fDigiMan->Get<CbmPsdDigi>(iDigi);
853 
854  UInt_t uAddr = digi->GetAddress();
855 
856  if ((kuDefaultAddress != fuPsdAddress && uAddr != fuPsdAddress)) continue;
857 
858  if (fuMaxAdcPulserPsd < digi->GetCharge()
859  || digi->GetCharge() < fuMinAdcPulserPsd)
860  continue;
861 
862  fiPsdNb++;
863  } // for( Int_t iDigi = 0; iDigi < nrPsdDigis; ++iDigi )
864 
865  fT0StsNb->Fill(fiT0Nb, fiStsNb);
866  fT0MuchNb->Fill(fiT0Nb, fiMuchNb);
867  fT0TrdNb->Fill(fiT0Nb, fiTrdNb);
868  fT0TofNb->Fill(fiT0Nb, fiTofNb);
869  fT0RichNb->Fill(fiT0Nb, fiRichNb);
870  fT0PsdNb->Fill(fiT0Nb, fiPsdNb);
871 
872  fiT0Nb = 0;
873  fiStsNb = 0;
874  fiMuchNb = 0;
875  fiTrdNb = 0;
876  fiTofNb = 0;
877  fiRichNb = 0;
878  fiPsdNb = 0;
879  } // if (nrT0Digis < 1000000)
880 
881  /*
882  for (Int_t iMuch = 0; iMuch < nrMuchDigis; ++iMuch) {
883 
884  CbmMuchBeamTimeDigi* Digi = static_cast<CbmMuchBeamTimeDigi*>(fMuchDigis->At(iMuch));
885 
886  Double_t dTime = Digi->GetTime();
887  Double_t dAdc = Digi->GetCharge();
888  UInt_t uAsic = Digi->GetNxId();
889  UInt_t uChan = Digi->GetNxCh();
890 
891  Double_t dStartJump = (17633. + 1969.) * 10240000.;
892  Double_t dTimeSinceStart = dTime - dStartJump;
893  fDigisPerAsicEvo->Fill( dTimeSinceStart, uAsic );
894 
895  if( 19132000. < dTimeSinceStart && dTimeSinceStart < 19600000 )
896  {
897 // std::cout << Form( "Much hit in TS %5d: asic %2u chan %3u T0 time %12.0f ADC %2.0f",
898 // fNrTs, uAsic, uChan, (dTimeSinceStart - 19132000), dAdc )
899 // << std::endl;
900  Double_t dTimeDistLastDigi = dTimeSinceStart - fdLastMuchDigi[ uAsic ][ uChan ];
901  fSameChanDigisDistEvo->Fill( dTimeSinceStart - 19132000,
902  dTimeDistLastDigi < 10000 ? dTimeDistLastDigi : 9999 );
903  }
904  fdLastMuchDigi[ uAsic ][ uChan ] = dTimeSinceStart;
905 
906  if( ( kuMaxNbMuchAsics == fuMuchAsic && uAsic == fuMuchAsic ) &&
907  ( kuNbChanSMX == fuMuchFirstCha || uChan >= fuMuchFirstCha ) &&
908  ( kuNbChanSMX == fuMuchLastChan || fuMuchLastChan <= uChan )
909  )
910  continue;
911  if( fuMaxAdcPulserMuch < Digi->GetCharge() || Digi->GetCharge() < fuMinAdcPulserMuch )
912  continue;
913 
914  if( 32 != uChan )
915  continue;
916  std::cout << Form( "Much pulser in TS %5d: chan %3u T0 time %12.0f ADC %2.0f dt %12.0f",
917  fNrTs, uChan, dTime, dAdc, dTime - fdLastMuchDigiPulser[ uAsic ][ uChan ] )
918  << std::endl;
919  fdLastMuchDigiPulser[ uAsic ][ uChan ] = dTime;
920  }
921 */
922 }
923 
924 template<class Digi>
926  TH2* histoEvo,
927  TH2* histoEvoLong,
928  TProfile* profMeanEvo,
929  TH2* histoAFCK,
930  const Double_t T0Time,
931  const Int_t offsetRange,
932  Int_t iStartDigi,
933  ECbmModuleId iDetId) {
934 
935  Int_t nrDigis = fDigiMan->GetNofDigis(iDetId);
936  Int_t iFirstDigiInWin = iStartDigi;
937 
938  for (Int_t i = iStartDigi; i < nrDigis; ++i) {
939 
940  const Digi* digi = fDigiMan->Get<Digi>(i);
941 
942  switch (iDetId) {
943  case ECbmModuleId::kSts:
944  {
945  const CbmStsDigi* stsDigi = nullptr;
946  try {
947  stsDigi = boost::any_cast<const CbmStsDigi*>(digi);
948  } catch (...) {
949  LOG(fatal) << "Failed boost any_cast in "
950  "CbmMcbm2019CheckPulser::FillSystemOffsetHistos for a "
951  "digi of type "
952  << Digi::GetClassName();
953  } // try/catch
954  assert(stsDigi);
955  UInt_t uAddr = stsDigi->GetAddress();
956  UInt_t uChan = stsDigi->GetChannel();
957 
958  if ((kuDefaultAddress != fuStsAddress && uAddr != fuStsAddress)
959  || (kuMaxChannelSts != fuStsFirstCha && uChan < fuStsFirstCha)
960  || (kuMaxChannelSts != fuStsLastChan && fuStsLastChan < uChan))
961  continue;
962 
963  if (fuMaxAdcPulserSts < digi->GetCharge()
964  || digi->GetCharge() < fuMinAdcPulserSts)
965  continue;
966 
967  fiStsNb++;
968  break;
969  } // case ECbmModuleId::kSts:
970  case ECbmModuleId::kMuch:
971  {
972  const CbmMuchBeamTimeDigi* muchDigi {nullptr};
973  try {
974  muchDigi = boost::any_cast<const CbmMuchBeamTimeDigi*>(digi);
975  } catch (...) {
976  LOG(fatal) << "Failed boost any_cast in "
977  "CbmMcbm2019CheckPulser::FillSystemOffsetHistos for a "
978  "digi of type "
979  << Digi::GetClassName();
980  } // try/catch
981  assert(muchDigi);
982  UInt_t uAsic = muchDigi->GetNxId();
983  UInt_t uChan = muchDigi->GetNxCh();
984 
985  if ((kuMaxNbMuchAsics != fuMuchAsic && uAsic != fuMuchAsic)
986  || (kuNbChanSMX != fuMuchFirstCha && uChan < fuMuchFirstCha)
987  || (kuNbChanSMX != fuMuchLastChan && fuMuchLastChan < uChan))
988  continue;
989 
990  if (fuMaxAdcPulserMuch < digi->GetCharge()
991  || digi->GetCharge() < fuMinAdcPulserMuch)
992  continue;
993 
994  fiMuchNb++;
995  break;
996  } // case ECbmModuleId::kMuch:
997  case ECbmModuleId::kTrd:
998  {
999  /*
1000  const CbmTrdDigi* trdDigi;
1001  try {
1002  trdDigi =
1003  boost::any_cast<const CbmTrdDigi*>( digi );
1004  } catch( ... ) {
1005  LOG( fatal ) << "Failed boost any_cast in CbmMcbm2019CheckPulser::FillSystemOffsetHistos for a digi of type "
1006  << Digi::GetClassName();
1007  } // try/catch
1008  assert(trdDigi);
1009 */
1010  UInt_t uAddr = digi->GetAddress();
1011 
1012  if ((kuDefaultAddress != fuTrdAddress && uAddr != fuTrdAddress))
1013  continue;
1014 
1015  if (fuMaxChargePulserTrd < digi->GetCharge()
1016  || digi->GetCharge() < fuMinChargePulserTrd)
1017  continue;
1018 
1019  fiTrdNb++;
1020  break;
1021  } // case ECbmModuleId::kTrd:
1022  case ECbmModuleId::kTof:
1023  {
1024  if (fuMaxTotPulserTof < digi->GetCharge()
1025  || digi->GetCharge() < fuMinTotPulserTof)
1026  continue;
1027 
1028  fiTofNb++;
1029  break;
1030  } // case ECbmModuleId::kTof:
1031  case ECbmModuleId::kRich:
1032  {
1033  if (fuMaxTotPulserRich < digi->GetCharge()
1034  || digi->GetCharge() < fuMinTotPulserRich)
1035  continue;
1036 
1037  fiRichNb++;
1038  break;
1039  } // case ECbmModuleId::kRich:
1040  case ECbmModuleId::kPsd:
1041  {
1042  UInt_t uAddr = digi->GetAddress();
1043 
1044  if ((kuDefaultAddress != fuPsdAddress && uAddr != fuPsdAddress))
1045  continue;
1046 
1047  if (fuMaxAdcPulserPsd < digi->GetCharge()
1048  || digi->GetCharge() < fuMinAdcPulserPsd)
1049  continue;
1050  if (digi->GetAddress() != (9 << 10) + 8) continue;
1051 
1052  fiPsdNb++;
1053  break;
1054  } // case ECbmModuleId::kPsd:
1055  default: return 0;
1056  } // switch( iDetId )
1057 
1058  Double_t diffTime = T0Time - digi->GetTime();
1059  // profMeanEvo->Fill( T0Time * 1e-9 - fdStartTime, diffTime );
1060 
1061  if (diffTime > offsetRange) {
1062  ++iFirstDigiInWin; // Update Index of first digi in Win to next digi
1063  continue; // not yet in interesting range
1064  } // if (diffTime > offsetRange)
1065  if (diffTime < -offsetRange) break; // already past interesting range
1066 
1067  histo->Fill(diffTime);
1068  histoEvo->Fill(fNrTs, diffTime);
1069  histoEvoLong->Fill(fNrTs, diffTime);
1070 
1071  if (-1 == fdStartTime) fdStartTime = T0Time * 1e-9;
1072  profMeanEvo->Fill(T0Time * 1e-9 - fdStartTime, diffTime);
1073  /*
1074  if (ECbmModuleId::kMuch == iDetId )
1075  std::cout << Form( "MUCH coinc in TS %5d: %7.2f T0 time %12.0f", fNrTs, diffTime, T0Time )
1076  << std::endl;
1077 */
1078  if (ECbmModuleId::kPsd == iDetId)
1079  fT0PsdDiffCharge->Fill(diffTime, digi->GetCharge());
1080 
1082  if (ECbmModuleId::kSts == iDetId && histoAFCK) {
1083  UInt_t uDPB = (0 < (digi->GetAddress() & 0x00000400));
1084  histoAFCK->Fill(uDPB, diffTime);
1085  if (uDPB < kuMaxNbStsDpbs) fT0StsDpbDiffEvo[uDPB]->Fill(fNrTs, diffTime);
1086  } // if (ECbmModuleId::kSts == iDetId && histoAFCK)
1087 
1089  if (ECbmModuleId::kMuch == iDetId && histoAFCK) {
1090  const CbmMuchBeamTimeDigi* muchDigi {nullptr};
1091  try {
1092  muchDigi = boost::any_cast<const CbmMuchBeamTimeDigi*>(digi);
1093  } catch (...) {
1094  LOG(fatal)
1095  << "Failed boost any_cast in CbmCheckTiming::FillSystemOffsetHistos "
1096  "for a digi of type "
1097  << Digi::GetClassName();
1098  } // try/catch
1099  assert(muchDigi);
1100  UInt_t afck = muchDigi->GetRocId();
1101  UInt_t asic = muchDigi->GetNxId();
1102  histoAFCK->Fill(afck, diffTime);
1103  fT0MuchAsicDiff->Fill(asic, diffTime);
1104  if (asic < kuMaxNbMuchAsics)
1105  fT0MuchAsicDiffEvo[asic]->Fill(fNrTs, diffTime);
1106  } // if (ECbmModuleId::kMuch == iDetId && histoAFCK)
1107  }
1108 
1109  return iFirstDigiInWin;
1110 }
1111 
1112 // ---- Finish --------------------------------------------------------
1114 
1116  TFile* old = gFile;
1117  TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
1118 
1119  fT0StsDiff->Write();
1120  fT0MuchDiff->Write();
1121  fT0TrdDiff->Write();
1122  fT0TofDiff->Write();
1123  fT0RichDiff->Write();
1124  fT0PsdDiff->Write();
1125  fT0PsdDiffCharge->Write();
1126 
1127  fT0StsDiffEvo->Write();
1128  fT0MuchDiffEvo->Write();
1129  fT0TrdDiffEvo->Write();
1130  fT0TofDiffEvo->Write();
1131  fT0RichDiffEvo->Write();
1132  fT0PsdDiffEvo->Write();
1133 
1134  fT0StsDiffEvoLong->Write();
1135  fT0MuchDiffEvoLong->Write();
1136  fT0TrdDiffEvoLong->Write();
1137  fT0TofDiffEvoLong->Write();
1138  fT0RichDiffEvoLong->Write();
1139  fT0PsdDiffEvoLong->Write();
1140 
1141  fT0StsMeanEvo->Write();
1142  fT0MuchMeanEvo->Write();
1143  fT0TrdMeanEvo->Write();
1144  fT0TofMeanEvo->Write();
1145  fT0RichMeanEvo->Write();
1146  fT0PsdMeanEvo->Write();
1147 
1148  fT0T0Diff->Write();
1149  fStsStsDiff->Write();
1150  fMuchMuchDiff->Write();
1151  fTrdTrdDiff->Write();
1152  fTofTofDiff->Write();
1153  fRichRichDiff->Write();
1154  fPsdPsdDiff->Write();
1155 
1156  fT0StsNb->Write();
1157  fT0MuchNb->Write();
1158  fT0TrdNb->Write();
1159  fT0TofNb->Write();
1160  fT0RichNb->Write();
1161  fT0PsdNb->Write();
1162 
1163  fT0Address->Write();
1164  fT0Channel->Write();
1165 
1166  fT0StsDpbDiff->Write();
1167  /*
1168  for( UInt_t uStsDpb = 0; uStsDpb < kuMaxNbStsDpbs; ++uStsDpb )
1169  {
1170  fT0StsDpbDiffEvo[uStsDpb]->Write();
1171  fStsDpbCntsEvo[uStsDpb]->Write();
1172  }
1173 */
1174  fT0MuchRocDiff->Write();
1175  fT0MuchAsicDiff->Write();
1176  /*
1177  for( UInt_t uMuchAsic = 0; uMuchAsic < kuMaxNbMuchAsics; ++uMuchAsic )
1178  fT0MuchAsicDiffEvo[uMuchAsic]->Write();
1179 */
1180  /*
1181  fDigisPerAsicEvo->Write();
1182  fSameChanDigisDistEvo->Write();
1183 
1184  fDigiTimeEvoT0 ->Write();
1185  fDigiTimeEvoSts ->Write();
1186  fDigiTimeEvoMuch->Write();
1187  fDigiTimeEvoTof->Write();
1188 */
1189  outfile->Close();
1190  delete outfile;
1191 
1192  gFile = old;
1193 }
1194 
CbmMcbm2019CheckPulser::fTrdTrdDiff
TH1 * fTrdTrdDiff
Definition: CbmMcbm2019CheckPulser.h:244
CbmMcbm2019CheckPulser::CbmMcbm2019CheckPulser
CbmMcbm2019CheckPulser()
Definition: CbmMcbm2019CheckPulser.cxx:38
CbmMcbm2019CheckPulser::fTofTofDiff
TH1 * fTofTofDiff
Definition: CbmMcbm2019CheckPulser.h:245
CbmMcbm2019CheckPulser::fT0TrdDiff
TH1 * fT0TrdDiff
Definition: CbmMcbm2019CheckPulser.h:213
CbmMcbm2019CheckPulser
Definition: CbmMcbm2019CheckPulser.h:31
CbmMcbm2019CheckPulser::fMuchMuchDiff
TH1 * fMuchMuchDiff
Definition: CbmMcbm2019CheckPulser.h:243
CbmMcbm2019CheckPulser::fT0DigiVector
const std::vector< CbmTofDigi > * fT0DigiVector
Definition: CbmMcbm2019CheckPulser.h:141
CbmMcbm2019CheckPulser::fT0PsdDiffEvoLong
TH2 * fT0PsdDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:231
CbmMcbm2019CheckPulser::kuMaxNbMuchDpbs
static const UInt_t kuMaxNbMuchDpbs
Definition: CbmMcbm2019CheckPulser.h:149
CbmMcbm2019CheckPulser::fiTrdNb
Int_t fiTrdNb
Definition: CbmMcbm2019CheckPulser.h:259
CbmTrdDigi::GetAddress
Int_t GetAddress() const
Address getter for module in the format defined by CbmTrdDigi (format of CbmTrdAddress can be accesse...
Definition: CbmTrdDigi.h:92
CbmMcbm2019CheckPulser::fT0MuchDiff
TH1 * fT0MuchDiff
Definition: CbmMcbm2019CheckPulser.h:212
CbmMcbm2019CheckPulser::fT0StsDiffEvo
TH2 * fT0StsDiffEvo
Definition: CbmMcbm2019CheckPulser.h:219
CbmMcbm2019CheckPulser::fuMaxAdcPulserPsd
UInt_t fuMaxAdcPulserPsd
Definition: CbmMcbm2019CheckPulser.h:187
CbmMcbm2019CheckPulser::fPrevT0FirstDigiTof
Int_t fPrevT0FirstDigiTof
Definition: CbmMcbm2019CheckPulser.h:168
CbmMcbm2019CheckPulser::kuDefaultAddress
static const UInt_t kuDefaultAddress
Definition: CbmMcbm2019CheckPulser.h:151
CbmMcbm2019CheckPulser::fT0TofNb
TH2 * fT0TofNb
Definition: CbmMcbm2019CheckPulser.h:252
CbmMcbm2019CheckPulser::fT0PsdDiffCharge
TH2 * fT0PsdDiffCharge
Definition: CbmMcbm2019CheckPulser.h:217
CbmMcbm2019CheckPulser::fStsOffsetRange
Int_t fStsOffsetRange
Definition: CbmMcbm2019CheckPulser.h:202
CbmMcbm2019CheckPulser::fStsDpbCntsEvo
TH1 * fStsDpbCntsEvo[kuMaxNbStsDpbs]
Definition: CbmMcbm2019CheckPulser.h:269
CbmMcbm2019CheckPulser::fMuchOffsetRange
Int_t fMuchOffsetRange
Definition: CbmMcbm2019CheckPulser.h:203
CbmPsdDigi.h
CbmMcbm2019CheckPulser::fuMaxChargePulserTrd
UInt_t fuMaxChargePulserTrd
Definition: CbmMcbm2019CheckPulser.h:181
CbmMcbm2019CheckPulser::ReInit
virtual InitStatus ReInit()
Definition: CbmMcbm2019CheckPulser.cxx:554
CbmRichDigi
Definition: CbmRichDigi.h:25
CbmMcbm2019CheckPulser::kuNbChanSMX
static const UInt_t kuNbChanSMX
Constants.
Definition: CbmMcbm2019CheckPulser.h:147
CbmMcbm2019CheckPulser::fT0MuchDiffEvo
TH2 * fT0MuchDiffEvo
Definition: CbmMcbm2019CheckPulser.h:220
CbmMcbm2019CheckPulser::fT0RichDiffEvo
TH2 * fT0RichDiffEvo
Definition: CbmMcbm2019CheckPulser.h:223
CbmMcbm2019CheckPulser::fdLastT0DigiPulser
Double_t fdLastT0DigiPulser
Definition: CbmMcbm2019CheckPulser.h:280
CbmDigiManager::Init
InitStatus Init()
Initialisation.
Definition: CbmDigiManager.cxx:71
CbmMcbm2019CheckPulser::fT0TofMeanEvo
TProfile * fT0TofMeanEvo
Definition: CbmMcbm2019CheckPulser.h:237
CbmMuchDigi::GetCharge
Double_t GetCharge() const
Charge.
Definition: CbmMuchDigi.h:59
CbmMcbm2019CheckPulser::fT0StsDiff
TH1 * fT0StsDiff
Definition: CbmMcbm2019CheckPulser.h:211
CbmMuchBeamTimeDigi
Definition: CbmMuchBeamTimeDigi.h:29
CbmMcbm2019CheckPulser::Init
virtual InitStatus Init()
Definition: CbmMcbm2019CheckPulser.cxx:57
CbmMcbm2019CheckPulser::fT0RichDiffEvoLong
TH2 * fT0RichDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:230
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMcbm2019CheckPulser::fT0MuchAsicDiff
TH2 * fT0MuchAsicDiff
Definition: CbmMcbm2019CheckPulser.h:272
CbmMcbm2019CheckPulser::fT0MuchMeanEvo
TProfile * fT0MuchMeanEvo
Definition: CbmMcbm2019CheckPulser.h:235
CbmMcbm2019CheckPulser::fiMuchNb
Int_t fiMuchNb
Definition: CbmMcbm2019CheckPulser.h:258
CbmMcbm2019CheckPulser::fuMinAdcPulserMuch
UInt_t fuMinAdcPulserMuch
Definition: CbmMcbm2019CheckPulser.h:178
TimesliceMetaData
Definition: TimesliceMetaData.h:11
CbmMcbm2019CheckPulser::fT0DigiArray
TClonesArray * fT0DigiArray
Definition: CbmMcbm2019CheckPulser.h:142
CbmMcbm2019CheckPulser::fuStsFirstCha
UInt_t fuStsFirstCha
Definition: CbmMcbm2019CheckPulser.h:190
CbmMcbm2019CheckPulser::fuMinChargePulserTrd
UInt_t fuMinChargePulserTrd
Definition: CbmMcbm2019CheckPulser.h:180
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmMcbm2019CheckPulser::fPsdOffsetRange
Int_t fPsdOffsetRange
Definition: CbmMcbm2019CheckPulser.h:207
CbmDigiManager::GetNofDigis
static Int_t GetNofDigis(ECbmModuleId systemId)
Definition: CbmDigiManager.cxx:62
CbmMcbm2019CheckPulser::Exec
virtual void Exec(Option_t *)
Definition: CbmMcbm2019CheckPulser.cxx:557
CbmDigiManager::UseMuchBeamTimeDigi
void UseMuchBeamTimeDigi(Bool_t choice=kTRUE)
Use CbmMuchBeamTimeDigi instead of CbmMuchDigi for MUCH.
Definition: CbmDigiManager.h:130
CbmMcbm2019CheckPulser::WriteHistos
void WriteHistos()
Definition: CbmMcbm2019CheckPulser.cxx:1115
CbmMcbm2019CheckPulser::CheckInterSystemOffset
void CheckInterSystemOffset()
Definition: CbmMcbm2019CheckPulser.cxx:625
CbmMcbm2019CheckPulser::fT0TofDiffEvo
TH2 * fT0TofDiffEvo
Definition: CbmMcbm2019CheckPulser.h:222
CbmTofDigi.h
CbmMcbm2019CheckPulser::fRichRichDiff
TH1 * fRichRichDiff
Definition: CbmMcbm2019CheckPulser.h:246
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmPsdDigi::GetAddress
Int_t GetAddress() const
Address.
Definition: CbmPsdDigi.h:79
CbmDigiManager::IsPresent
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
Definition: CbmDigiManager.cxx:112
CbmMcbm2019CheckPulser::fPsdPsdDiff
TH1 * fPsdPsdDiff
Definition: CbmMcbm2019CheckPulser.h:247
CbmDigiManager::Instance
static CbmDigiManager * Instance()
Static instance.
Definition: CbmDigiManager.h:93
CbmMcbm2019CheckPulser::fuPsdAddress
UInt_t fuPsdAddress
Definition: CbmMcbm2019CheckPulser.h:196
CbmMcbm2019CheckPulser::fT0PsdDiffEvo
TH2 * fT0PsdDiffEvo
Definition: CbmMcbm2019CheckPulser.h:224
CbmMcbm2019CheckPulser::kuMaxChannelSts
static const UInt_t kuMaxChannelSts
Definition: CbmMcbm2019CheckPulser.h:152
CbmMcbm2019CheckPulser::FillSystemOffsetHistos
Int_t FillSystemOffsetHistos(TH1 *histo, TH2 *histoEvo, TH2 *histoEvoLong, TProfile *profMeanEvo, TH2 *histoAFCK, const Double_t T0Time, const Int_t offsetRange, Int_t iStartDigi, ECbmModuleId iDetId=ECbmModuleId::kLastModule)
Definition: CbmMcbm2019CheckPulser.cxx:925
CbmMcbm2019CheckPulser::fuMaxAdcPulserMuch
UInt_t fuMaxAdcPulserMuch
Definition: CbmMcbm2019CheckPulser.h:179
CbmMcbm2019CheckPulser::fiT0Nb
Int_t fiT0Nb
Definition: CbmMcbm2019CheckPulser.h:256
CbmMcbm2019CheckPulser::fPrevT0FirstDigiMuch
Int_t fPrevT0FirstDigiMuch
Definition: CbmMcbm2019CheckPulser.h:166
CbmRichDigi.h
CbmMcbm2019CheckPulser::fuMinAdcPulserPsd
UInt_t fuMinAdcPulserPsd
Definition: CbmMcbm2019CheckPulser.h:186
CbmMcbm2019CheckPulser::fuMaxTotPulserRich
UInt_t fuMaxTotPulserRich
Definition: CbmMcbm2019CheckPulser.h:185
CbmMcbm2019CheckPulser::fPrevT0FirstDigiSts
Int_t fPrevT0FirstDigiSts
Definition: CbmMcbm2019CheckPulser.h:165
CbmMcbm2019CheckPulser::kuMaxNbMuchAsics
static const UInt_t kuMaxNbMuchAsics
Definition: CbmMcbm2019CheckPulser.h:150
CbmMcbm2019CheckPulser::fuMuchFirstCha
UInt_t fuMuchFirstCha
Definition: CbmMcbm2019CheckPulser.h:193
CbmMuchBeamTimeDigi::GetNxCh
Int_t GetNxCh() const
Definition: CbmMuchBeamTimeDigi.h:51
CbmTrdDigi.h
CbmStsDigi.h
CbmMcbm2019CheckPulser::fT0TrdDiffEvo
TH2 * fT0TrdDiffEvo
Definition: CbmMcbm2019CheckPulser.h:221
CbmMcbm2019CheckPulser::CreateHistos
void CreateHistos()
Definition: CbmMcbm2019CheckPulser.cxx:134
CbmMcbm2019CheckPulser::Finish
virtual void Finish()
Definition: CbmMcbm2019CheckPulser.cxx:1113
CbmMcbm2019CheckPulser::fT0TofDiff
TH1 * fT0TofDiff
Definition: CbmMcbm2019CheckPulser.h:214
CbmMcbm2019CheckPulser::fdStartTime
Double_t fdStartTime
Definition: CbmMcbm2019CheckPulser.h:233
CbmMcbm2019CheckPulser::fT0RichNb
TH2 * fT0RichNb
Definition: CbmMcbm2019CheckPulser.h:253
CbmMcbm2019CheckPulser::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmMcbm2019CheckPulser.h:140
CbmDigiManager::Get
const Digi * Get(Int_t index) const
Get a digi object.
Definition: CbmDigiManager.h:52
CbmMcbm2019CheckPulser::kuMaxNbStsDpbs
static const UInt_t kuMaxNbStsDpbs
Definition: CbmMcbm2019CheckPulser.h:148
CbmTofDigi::GetChannel
Double_t GetChannel() const
Channel .
Definition: CbmTofDigi.h:136
CbmMcbm2019CheckPulser::fT0MuchAsicDiffEvo
TH2 * fT0MuchAsicDiffEvo[kuMaxNbMuchAsics]
Definition: CbmMcbm2019CheckPulser.h:273
CbmMcbm2019CheckPulser::fT0StsDiffEvoLong
TH2 * fT0StsDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:226
CbmMcbm2019CheckPulser::fT0Address
TH1 * fT0Address
Definition: CbmMcbm2019CheckPulser.h:264
CbmMuchBeamTimeDigi.h
CbmTofDigi::GetTime
Double_t GetTime() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:111
CbmMcbm2019CheckPulser::fiRichNb
Int_t fiRichNb
Definition: CbmMcbm2019CheckPulser.h:261
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmMcbm2019CheckPulser::fT0PsdNb
TH2 * fT0PsdNb
Definition: CbmMcbm2019CheckPulser.h:254
CbmMcbm2019CheckPulser::fuMinTotPulserRich
UInt_t fuMinTotPulserRich
Definition: CbmMcbm2019CheckPulser.h:184
CbmMcbm2019CheckPulser::fuMinAdcPulserSts
UInt_t fuMinAdcPulserSts
Definition: CbmMcbm2019CheckPulser.h:176
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMcbm2019CheckPulser::fuMuchLastChan
UInt_t fuMuchLastChan
Definition: CbmMcbm2019CheckPulser.h:194
CbmMcbm2019CheckPulser::fT0TofDiffEvoLong
TH2 * fT0TofDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:229
CbmMcbm2019CheckPulser::fTrdOffsetRange
Int_t fTrdOffsetRange
Definition: CbmMcbm2019CheckPulser.h:204
CbmMcbm2019CheckPulser::fRichOffsetRange
Int_t fRichOffsetRange
Definition: CbmMcbm2019CheckPulser.h:206
CbmMcbm2019CheckPulser::fuMaxTotPulserTof
UInt_t fuMaxTotPulserTof
Definition: CbmMcbm2019CheckPulser.h:183
CbmStsDigi
Data class for a single-channel message in the STS.
Definition: CbmStsDigi.h:29
CbmMcbm2019CheckPulser::~CbmMcbm2019CheckPulser
~CbmMcbm2019CheckPulser()
Definition: CbmMcbm2019CheckPulser.cxx:42
CbmMcbm2019CheckPulser::fT0T0Diff
TH1 * fT0T0Diff
Definition: CbmMcbm2019CheckPulser.h:241
CbmMcbm2019CheckPulser::fNrTs
Int_t fNrTs
Definition: CbmMcbm2019CheckPulser.h:199
CbmTofDigi
Data class for expanded digital TOF information.
Definition: CbmTofDigi.h:38
CbmMcbm2019CheckPulser::fPrevT0FirstDigiTrd
Int_t fPrevT0FirstDigiTrd
Definition: CbmMcbm2019CheckPulser.h:167
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmMcbm2019CheckPulser::fT0StsMeanEvo
TProfile * fT0StsMeanEvo
Definition: CbmMcbm2019CheckPulser.h:234
CbmStsDigi::GetCharge
Double_t GetCharge() const
Definition: CbmStsDigi.h:71
CbmMcbm2019CheckPulser::fuStsLastChan
UInt_t fuStsLastChan
Definition: CbmMcbm2019CheckPulser.h:191
CbmStsDigi::GetAddress
Int_t GetAddress() const
Definition: CbmStsDigi.h:53
CbmMcbm2019CheckPulser::fT0RichDiff
TH1 * fT0RichDiff
Definition: CbmMcbm2019CheckPulser.h:215
CbmMcbm2019CheckPulser::fT0MuchRocDiff
TH2 * fT0MuchRocDiff
Definition: CbmMcbm2019CheckPulser.h:271
CbmMcbm2019CheckPulser::fT0RichMeanEvo
TProfile * fT0RichMeanEvo
Definition: CbmMcbm2019CheckPulser.h:238
CbmMcbm2019CheckPulser::fuMuchAsic
UInt_t fuMuchAsic
Definition: CbmMcbm2019CheckPulser.h:192
GenerateLogBinArray
std::vector< double > GenerateLogBinArray(uint32_t uNbDecadesLog, uint32_t uNbStepsDecade, uint32_t uNbSubStepsInStep, uint32_t &uNbBinsLog)
Definition: CbmFlesHistosTools.cxx:6
CbmRichDigi::GetCharge
Double_t GetCharge() const
Charge.
Definition: CbmRichDigi.h:45
CbmMcbm2019CheckPulser::fT0TrdMeanEvo
TProfile * fT0TrdMeanEvo
Definition: CbmMcbm2019CheckPulser.h:236
CbmDigiManager.h
CbmMcbm2019CheckPulser::fT0PsdMeanEvo
TProfile * fT0PsdMeanEvo
Definition: CbmMcbm2019CheckPulser.h:239
CbmMcbm2019CheckPulser::fuStsAddress
UInt_t fuStsAddress
Channel selection.
Definition: CbmMcbm2019CheckPulser.h:189
CbmMcbm2019CheckPulser::fStsStsDiff
TH1 * fStsStsDiff
Definition: CbmMcbm2019CheckPulser.h:242
CbmMcbm2019CheckPulser::fT0TrdNb
TH2 * fT0TrdNb
Definition: CbmMcbm2019CheckPulser.h:251
CbmMcbm2019CheckPulser::fTofOffsetRange
Int_t fTofOffsetRange
Definition: CbmMcbm2019CheckPulser.h:205
CbmMcbm2019CheckPulser::fT0MuchDiffEvoLong
TH2 * fT0MuchDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:227
CbmMcbm2019CheckPulser::fiPsdNb
Int_t fiPsdNb
Definition: CbmMcbm2019CheckPulser.h:262
CbmFlesHistosTools.h
CbmMcbm2019CheckPulser::fuMinTotPulserTof
UInt_t fuMinTotPulserTof
Definition: CbmMcbm2019CheckPulser.h:182
CbmMcbm2019CheckPulser::fTimeSliceMetaDataArray
TClonesArray * fTimeSliceMetaDataArray
Definition: CbmMcbm2019CheckPulser.h:143
CbmMcbm2019CheckPulser::fBinWidth
Int_t fBinWidth
Definition: CbmMcbm2019CheckPulser.h:209
CbmTrdDigi
Definition: CbmTrdDigi.h:14
CbmPsdDigi::GetCharge
Double_t GetCharge() const
Charge.
Definition: CbmPsdDigi.h:87
CbmMcbm2019CheckPulser::fT0Channel
TH1 * fT0Channel
Definition: CbmMcbm2019CheckPulser.h:265
CbmMcbm2019CheckPulser::SetParContainers
virtual void SetParContainers()
Definition: CbmMcbm2019CheckPulser.cxx:45
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
CbmMcbm2019CheckPulser::CalcNrBins
Int_t CalcNrBins(Int_t)
Definition: CbmMcbm2019CheckPulser.cxx:113
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmMcbm2019CheckPulser::fOutFileName
TString fOutFileName
Definition: CbmMcbm2019CheckPulser.h:288
CbmMuchBeamTimeDigi::GetNxId
Int_t GetNxId() const
Definition: CbmMuchBeamTimeDigi.h:50
CbmMcbm2019CheckPulser::fT0StsDpbDiff
TH2 * fT0StsDpbDiff
Definition: CbmMcbm2019CheckPulser.h:267
CbmPsdDigi
Data class for PSD digital information.
Definition: CbmPsdDigi.h:31
CbmMcbm2019CheckPulser::fiStsNb
Int_t fiStsNb
Definition: CbmMcbm2019CheckPulser.h:257
CbmMcbm2019CheckPulser::fT0StsDpbDiffEvo
TH2 * fT0StsDpbDiffEvo[kuMaxNbStsDpbs]
Definition: CbmMcbm2019CheckPulser.h:268
CbmTofDigi::GetAddress
Int_t GetAddress() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:98
CbmMcbm2019CheckPulser::fT0StsNb
TH2 * fT0StsNb
Definition: CbmMcbm2019CheckPulser.h:249
CbmMcbm2019CheckPulser::fuMaxAdcPulserSts
UInt_t fuMaxAdcPulserSts
Definition: CbmMcbm2019CheckPulser.h:177
CbmTofDigi::GetCharge
Double_t GetCharge() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:116
CbmTrdDigi::GetCharge
Double_t GetCharge() const
Charge getter for SPADIC.
Definition: CbmTrdDigi.cxx:133
CbmMcbm2019CheckPulser::fT0MuchNb
TH2 * fT0MuchNb
Definition: CbmMcbm2019CheckPulser.h:250
CbmMcbm2019CheckPulser::fT0PsdDiff
TH1 * fT0PsdDiff
Definition: CbmMcbm2019CheckPulser.h:216
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmMcbm2019CheckPulser::fuTrdAddress
UInt_t fuTrdAddress
Definition: CbmMcbm2019CheckPulser.h:195
CbmMcbm2019CheckPulser::fuMinTotPulserT0
UInt_t fuMinTotPulserT0
Definition: CbmMcbm2019CheckPulser.h:174
CbmMcbm2019CheckPulser::fPrevT0FirstDigiPsd
Int_t fPrevT0FirstDigiPsd
Definition: CbmMcbm2019CheckPulser.h:170
CbmMcbm2019CheckPulser.h
CbmMcbm2019CheckPulser::pTsMetaData
const TimesliceMetaData * pTsMetaData
Definition: CbmMcbm2019CheckPulser.h:144
CbmMcbm2019CheckPulser::fiTofNb
Int_t fiTofNb
Definition: CbmMcbm2019CheckPulser.h:260
CbmMcbm2019CheckPulser::fT0TrdDiffEvoLong
TH2 * fT0TrdDiffEvoLong
Definition: CbmMcbm2019CheckPulser.h:228
CbmMcbm2019CheckPulser::fPrevT0FirstDigiRich
Int_t fPrevT0FirstDigiRich
Definition: CbmMcbm2019CheckPulser.h:169
CbmStsDigi::GetChannel
UShort_t GetChannel() const
Channel number in module @value Channel number.
Definition: CbmStsDigi.h:59