CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2019CheckDtInDet.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5#ifndef CBMMCBM2019CHECKDTINDET_H
6#define CBMMCBM2019CHECKDTINDET_H
7
9#include "CbmDefs.h"
10#include "CbmTofDigi.h"
11
12#include "TimesliceMetaData.h"
13
15#include "FairTask.h"
16
18#include "TString.h"
19
21#include <vector>
22
23class TClonesArray;
24class TH1;
25class TH2;
26class TProfile;
27class CbmDigiManager;
28
29class CbmMcbm2019CheckDtInDet : public FairTask {
30public:
32
35
37 // CbmMcbm2019CheckDtInDet(Int_t verbose);
38
39
42
43
45 virtual InitStatus Init();
46
48 virtual InitStatus ReInit();
49
50
52 virtual void Exec(Option_t*);
53
55 virtual void SetParContainers();
56
58 virtual void Finish();
59
60 void SetNbChanBmon(Int_t val = 8) { fuNbChanBmon = val; }
61
62 void SetNbChanSts(Int_t val = 5120) { fuNbChanSts = val; }
63
64 void SetNbChanMuch(Int_t val = 1000) { fuNbChanMuch = val; }
65
66 void SetNbChanTrd(Int_t val = 1000) { fuNbChanTrd = val; }
67
68 void SetNbChanTof(Int_t val = 1000) { fuNbChanTof = val; }
69
70 void SetNbChanRich(Int_t val = 1000) { fuNbChanRich = val; }
71
72 void SetNbChanPsd(Int_t val = 1000) { fuNbChanPsd = val; }
73
74 inline void SetOutFilename(TString sNameIn) { fOutFileName = sNameIn; }
75
76private:
77 template<class Digi>
78 void FillHistosPerDet(TH1* histoSameTime, TH1* histoDt, TH1* histoDtLog, TH2* histoDtPerChan,
80 void CreateHistos();
81 void WriteHistos();
82
83
86 const std::vector<CbmTofDigi>* fBmonDigiVector = nullptr;
87 TClonesArray* fBmonDigiArray = nullptr;
88 TClonesArray* fTimeSliceMetaDataArray = nullptr;
90
92 static const UInt_t kuNbChanSMX = 128;
93 static const UInt_t kuMaxNbStsDpbs = 2;
94 static const UInt_t kuMaxNbMuchDpbs = 6;
95 static const UInt_t kuMaxNbMuchAsics = 36;
96 static const UInt_t kuDefaultAddress = 0xFFFFFFFF;
97 static const UInt_t kuMaxChannelSts = 3000;
98
100 Double_t fPrevTimeBmon = 0.;
101 Double_t fPrevTimeSts = 0.;
102 Double_t fPrevTimeMuch = 0.;
103 Double_t fPrevTimeTrd = 0.;
104 Double_t fPrevTimeTof = 0.;
105 Double_t fPrevTimeRich = 0.;
106 Double_t fPrevTimePsd = 0.;
107
109 UInt_t fuNbChanBmon = 8;
110 UInt_t fuNbChanSts = 5120;
111 UInt_t fuNbChanMuch = 5120;
112 UInt_t fuNbChanTrd = 5120;
113 UInt_t fuNbChanTof = 5120;
114 UInt_t fuNbChanRich = 5120;
115 UInt_t fuNbChanPsd = 5120;
116 //
117 Int_t fNrTs = 0;
118
119 TH1* fBmonBmonSameTime = nullptr;
120 TH1* fStsStsSameTime = nullptr;
121 TH1* fMuchMuchSameTime = nullptr;
122 TH1* fTrdTrdSameTime = nullptr;
123 TH1* fTofTofSameTime = nullptr;
124 TH1* fRichRichSameTime = nullptr;
125 TH1* fPsdPsdSameTime = nullptr;
126
127 TH1* fBmonBmonDiff = nullptr;
128 TH1* fStsStsDiff = nullptr;
129 TH1* fMuchMuchDiff = nullptr;
130 TH1* fTrdTrdDiff = nullptr;
131 TH1* fTofTofDiff = nullptr;
132 TH1* fRichRichDiff = nullptr;
133 TH1* fPsdPsdDiff = nullptr;
134
135 TH1* fBmonBmonDiffLog = nullptr;
136 TH1* fStsStsDiffLog = nullptr;
137 TH1* fMuchMuchDiffLog = nullptr;
138 TH1* fTrdTrdDiffLog = nullptr;
139 TH1* fTofTofDiffLog = nullptr;
140 TH1* fRichRichDiffLog = nullptr;
141 TH1* fPsdPsdDiffLog = nullptr;
142
143
144 TH2* fBmonBmonDiffPerChan = nullptr;
145 TH2* fStsStsDiffPerChan = nullptr;
146 TH2* fMuchMuchDiffPerChan = nullptr;
147 TH2* fTrdTrdDiffPerChan = nullptr;
148 TH2* fTofTofDiffPerChan = nullptr;
149 TH2* fRichRichDiffPerChan = nullptr;
150 TH2* fPsdPsdDiffPerChan = nullptr;
151
152
153 TString fOutFileName {"data/HistosDtInDet.root"};
154
156};
157
158#endif // CBMMCBM2019CHECKDTINDET_H
ECbmModuleId
Definition CbmDefs.h:39
@ kLastModule
For loops over all modules.
CbmDigiManager.
void SetNbChanTof(Int_t val=1000)
void SetNbChanPsd(Int_t val=1000)
static const UInt_t kuMaxNbMuchDpbs
void SetNbChanMuch(Int_t val=1000)
UInt_t fuNbChanBmon
User settings: Data correction parameters.
const std::vector< CbmTofDigi > * fBmonDigiVector
CbmMcbm2019CheckDtInDet operator=(const CbmMcbm2019CheckDtInDet &)=delete
const TimesliceMetaData * pTsMetaData
Double_t fPrevTimeBmon
Variables to store the previous digi time.
static const UInt_t kuNbChanSMX
Constants.
static const UInt_t kuMaxNbMuchAsics
void SetNbChanRich(Int_t val=1000)
virtual void Exec(Option_t *)
void SetNbChanSts(Int_t val=5120)
CbmMcbm2019CheckDtInDet(const CbmMcbm2019CheckDtInDet &)=delete
void SetNbChanTrd(Int_t val=1000)
void FillHistosPerDet(TH1 *histoSameTime, TH1 *histoDt, TH1 *histoDtLog, TH2 *histoDtPerChan, ECbmModuleId iDetId=ECbmModuleId::kLastModule)
static const UInt_t kuMaxChannelSts
static const UInt_t kuDefaultAddress
void SetOutFilename(TString sNameIn)
ClassDef(CbmMcbm2019CheckDtInDet, 1)
static const UInt_t kuMaxNbStsDpbs