CbmRoot
Loading...
Searching...
No Matches
CbmCheckDigisNbCorr.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5#ifndef CBMCHECKDIGISNBCORR_H
6#define CBMCHECKDIGISNBCORR_H
7
8#include "CbmTofDigi.h"
9
10#include "FairTask.h"
11
12#include "TString.h"
13
14#include <vector>
15
16class TClonesArray;
17class TH1;
18class TH2;
19class TProfile;
20class CbmDigiManager;
21
22class CbmCheckDigisNbCorr : public FairTask {
23public:
26
29
31 // CbmCheckDigisNbCorr(Int_t verbose);
32
33
36
37
39 virtual InitStatus Init();
40
42 virtual InitStatus ReInit();
43
44
46 virtual void Exec(Option_t*);
47
49 virtual void SetParContainers();
50
52 virtual void Finish();
53
54 void SetStsOffset(Double_t dval = 1600) { fdStsOffset = dval; }
55
56 void SetMuchOffset(Double_t dval = 1600) { fdMuchOffset = dval; }
57
58 void SetTofOffset(Double_t dval = 50) { fdTofOffset = dval; }
59
60 void SetRichOffset(Double_t dval = 1200) { fdRichOffset = dval; }
61
62 inline void SetTimeInterval(Double_t dInterNs, Double_t dTsInNs)
63 {
64 fdBinWidthNs = dInterNs;
65 fdTsLengthNs = dTsInNs;
66 }
67
68 inline void SetBmonPulserTotLimits(UInt_t uMin, UInt_t uMax)
69 {
70 fuMinTotPulserBmon = uMin;
71 fuMaxTotPulserBmon = uMax;
72 }
73
74 inline void SetOutFilename(TString sNameIn) { fOutFileName = sNameIn; }
75
76private:
77 void CalcNrBins();
78 void CreateHistos();
79 void WriteHistos();
80
81
83 TClonesArray* fTsMetaData = nullptr;
86 const std::vector<CbmTofDigi>* fBmonDigiVec = nullptr;
87 TClonesArray* fBmonDigiArr {nullptr};
88
92
93 //
94 Int_t fNrTs = 0;
95
96 Int_t fNrOfBmonErrors = 0;
97 Int_t fNrOfBmonDigis = 0;
98 Int_t fNrOfStsErrors = 0;
99 Int_t fNrOfStsDigis = 0;
101 Int_t fNrOfMuchDigis = 0;
102 Int_t fNrOfTofErrors = 0;
103 Int_t fNrOfTofDigis = 0;
105 Int_t fNrOfRichDigis = 0;
106
107 Double_t fdStsOffset = 0.0;
108 Double_t fdMuchOffset = 0.0;
109 Double_t fdTofOffset = 0.0;
110 Double_t fdRichOffset = 0.0;
111
112 Double_t fdTsLengthNs = 100 * 102e3;
113 Double_t fdBinWidthNs = 10e3;
115 Double_t fdTsStartOffset = 0;
116
117 std::vector<UInt_t> fvuNbDigisPerBinBmon;
118 std::vector<UInt_t> fvuNbDigisPerBinSts;
119 std::vector<UInt_t> fvuNbDigisPerBinMuch;
120 std::vector<UInt_t> fvuNbDigisPerBinTof;
121 std::vector<UInt_t> fvuNbDigisPerBinRich;
122
123 TH2* fBmonStsCorr = nullptr;
124 TH2* fBmonMuchCorr = nullptr;
125 TH2* fBmonTofCorr = nullptr;
126 TH2* fBmonRichCorr = nullptr;
127
128 TH2* fStsMuchCorr = nullptr;
129 TH2* fStsTofCorr = nullptr;
130 TH2* fStsRichCorr = nullptr;
131
132 TH2* fMuchTofCorr = nullptr;
133 TH2* fMuchRichCorr = nullptr;
134
135 TH2* fTofRichCorr = nullptr;
136
137 TProfile* fBmonStsCorrProf = nullptr;
138 TProfile* fBmonMuchCorrProf = nullptr;
139 TProfile* fBmonTofCorrProf = nullptr;
140 TProfile* fBmonRichCorrProf = nullptr;
141
142 TProfile* fStsMuchCorrProf = nullptr;
143 TProfile* fStsTofCorrProf = nullptr;
144 TProfile* fStsRichCorrProf = nullptr;
145
146 TProfile* fMuchTofCorrProf = nullptr;
147 TProfile* fMuchRichCorrProf = nullptr;
148
149 TProfile* fTofRichCorrProf = nullptr;
150
151 static const UInt_t kuMaxNbStsDpbs = 2;
152 std::vector<std::vector<UInt_t>> fvuNbDigisPerBinStsDpb;
161 /*
162 static const UInt_t kuMaxNbMuchAsics = 24;
163 TH2* fBmonMuchAsicCorr[kuMaxNbMuchAsics];
164 TProfile* fBmonMuchAsicCorrProf[kuMaxNbMuchAsics];
165*/
166 TString fOutFileName {"HistosCheckDigisNbCorr.root"};
167
169};
170
171#endif
TH2 * fStsMuchDpbCorr[kuMaxNbStsDpbs]
void SetTimeInterval(Double_t dInterNs, Double_t dTsInNs)
std::vector< UInt_t > fvuNbDigisPerBinTof
TProfile * fStsTofDpbCorrProf[kuMaxNbStsDpbs]
static const UInt_t kuMaxNbStsDpbs
TH2 * fStsRichDpbCorr[kuMaxNbStsDpbs]
CbmCheckDigisNbCorr operator=(const CbmCheckDigisNbCorr &)=delete
void SetOutFilename(TString sNameIn)
TH2 * fBmonStsDpbCorr[kuMaxNbStsDpbs]
virtual void Exec(Option_t *)
virtual void SetParContainers()
void SetStsOffset(Double_t dval=1600)
UInt_t fuMinTotPulserBmon
User settings: Data correction parameters.
const std::vector< CbmTofDigi > * fBmonDigiVec
Interface to digi data.
TProfile * fStsMuchDpbCorrProf[kuMaxNbStsDpbs]
void SetMuchOffset(Double_t dval=1600)
virtual InitStatus ReInit()
void SetTofOffset(Double_t dval=50)
TH2 * fStsTofDpbCorr[kuMaxNbStsDpbs]
void SetBmonPulserTotLimits(UInt_t uMin, UInt_t uMax)
void SetRichOffset(Double_t dval=1200)
std::vector< UInt_t > fvuNbDigisPerBinSts
ClassDef(CbmCheckDigisNbCorr, 1)
TProfile * fStsRichDpbCorrProf[kuMaxNbStsDpbs]
virtual InitStatus Init()
std::vector< UInt_t > fvuNbDigisPerBinMuch
CbmDigiManager * fDigiMan
std::vector< std::vector< UInt_t > > fvuNbDigisPerBinStsDpb
CbmCheckDigisNbCorr(const CbmCheckDigisNbCorr &)=delete
std::vector< UInt_t > fvuNbDigisPerBinRich
TProfile * fBmonStsDpbCorrProf[kuMaxNbStsDpbs]
TClonesArray * fBmonDigiArr
std::vector< UInt_t > fvuNbDigisPerBinBmon
CbmDigiManager.