CbmRoot
CbmCheckDigisNbCorr.h
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 #ifndef CBMCHECKDIGISNBCORR_H
9 #define CBMCHECKDIGISNBCORR_H
10 
11 #include "FairTask.h"
12 
13 #include "CbmTofDigi.h"
14 #include "TString.h"
15 #include <vector>
16 
17 class TClonesArray;
18 class TH1;
19 class TH2;
20 class TProfile;
21 class CbmDigiManager;
22 
23 class CbmCheckDigisNbCorr : public FairTask {
24 public:
27 
30 
32  // CbmCheckDigisNbCorr(Int_t verbose);
33 
34 
37 
38 
40  virtual InitStatus Init();
41 
43  virtual InitStatus ReInit();
44 
45 
47  virtual void Exec(Option_t*);
48 
50  virtual void SetParContainers();
51 
53  virtual void Finish();
54 
55  void SetStsOffset(Double_t dval = 1600) { fdStsOffset = dval; }
56 
57  void SetMuchOffset(Double_t dval = 1600) { fdMuchOffset = dval; }
58 
59  void SetTofOffset(Double_t dval = 50) { fdTofOffset = dval; }
60 
61  void SetRichOffset(Double_t dval = 1200) { fdRichOffset = dval; }
62 
63  inline void SetTimeInterval(Double_t dInterNs, Double_t dTsInNs) {
64  fdBinWidthNs = dInterNs;
65  fdTsLengthNs = dTsInNs;
66  }
67 
68  inline void SetT0PulserTotLimits(UInt_t uMin, UInt_t uMax) {
69  fuMinTotPulserT0 = uMin;
70  fuMaxTotPulserT0 = uMax;
71  }
72 
73  inline void SetOutFilename(TString sNameIn) { fOutFileName = sNameIn; }
74 
75 private:
76  void CalcNrBins();
77  void CreateHistos();
78  void WriteHistos();
79 
80 
82  TClonesArray* fTsMetaData = nullptr;
83  CbmDigiManager* fDigiMan = nullptr;
84 
85  const std::vector<CbmTofDigi>* fT0DigiVec = nullptr;
86  TClonesArray* fT0DigiArr {nullptr};
87 
91 
92  //
93  Int_t fNrTs = 0;
94 
95  Int_t fNrOfT0Errors = 0;
96  Int_t fNrOfT0Digis = 0;
97  Int_t fNrOfStsErrors = 0;
98  Int_t fNrOfStsDigis = 0;
99  Int_t fNrOfMuchErrors = 0;
100  Int_t fNrOfMuchDigis = 0;
101  Int_t fNrOfTofErrors = 0;
102  Int_t fNrOfTofDigis = 0;
103  Int_t fNrOfRichErrors = 0;
104  Int_t fNrOfRichDigis = 0;
105 
106  Double_t fdStsOffset = 0.0;
107  Double_t fdMuchOffset = 0.0;
108  Double_t fdTofOffset = 0.0;
109  Double_t fdRichOffset = 0.0;
110 
111  Double_t fdTsLengthNs = 100 * 102e3;
112  Double_t fdBinWidthNs = 10e3;
114  Double_t fdTsStartOffset = 0;
115 
116  std::vector<UInt_t> fvuNbDigisPerBinT0;
117  std::vector<UInt_t> fvuNbDigisPerBinSts;
118  std::vector<UInt_t> fvuNbDigisPerBinMuch;
119  std::vector<UInt_t> fvuNbDigisPerBinTof;
120  std::vector<UInt_t> fvuNbDigisPerBinRich;
121 
122  TH2* fT0StsCorr = nullptr;
123  TH2* fT0MuchCorr = nullptr;
124  TH2* fT0TofCorr = nullptr;
125  TH2* fT0RichCorr = nullptr;
126 
127  TH2* fStsMuchCorr = nullptr;
128  TH2* fStsTofCorr = nullptr;
129  TH2* fStsRichCorr = nullptr;
130 
131  TH2* fMuchTofCorr = nullptr;
132  TH2* fMuchRichCorr = nullptr;
133 
134  TH2* fTofRichCorr = nullptr;
135 
136  TProfile* fT0StsCorrProf = nullptr;
137  TProfile* fT0MuchCorrProf = nullptr;
138  TProfile* fT0TofCorrProf = nullptr;
139  TProfile* fT0RichCorrProf = nullptr;
140 
141  TProfile* fStsMuchCorrProf = nullptr;
142  TProfile* fStsTofCorrProf = nullptr;
143  TProfile* fStsRichCorrProf = nullptr;
144 
145  TProfile* fMuchTofCorrProf = nullptr;
146  TProfile* fMuchRichCorrProf = nullptr;
147 
148  TProfile* fTofRichCorrProf = nullptr;
149 
150  static const UInt_t kuMaxNbStsDpbs = 2;
151  std::vector<std::vector<UInt_t>> fvuNbDigisPerBinStsDpb;
160  /*
161  static const UInt_t kuMaxNbMuchAsics = 24;
162  TH2* fT0MuchAsicCorr[kuMaxNbMuchAsics];
163  TProfile* fT0MuchAsicCorrProf[kuMaxNbMuchAsics];
164 */
165  TString fOutFileName {"HistosCheckDigisNbCorr.root"};
166 
168 };
169 
170 #endif
CbmCheckDigisNbCorr::SetTofOffset
void SetTofOffset(Double_t dval=50)
Definition: CbmCheckDigisNbCorr.h:59
CbmCheckDigisNbCorr::CbmCheckDigisNbCorr
CbmCheckDigisNbCorr()
Definition: CbmCheckDigisNbCorr.cxx:35
CbmCheckDigisNbCorr::Exec
virtual void Exec(Option_t *)
Definition: CbmCheckDigisNbCorr.cxx:477
CbmCheckDigisNbCorr::fT0StsCorrProf
TProfile * fT0StsCorrProf
Definition: CbmCheckDigisNbCorr.h:136
CbmCheckDigisNbCorr::fdStsOffset
Double_t fdStsOffset
Definition: CbmCheckDigisNbCorr.h:106
CbmCheckDigisNbCorr::Init
virtual InitStatus Init()
Definition: CbmCheckDigisNbCorr.cxx:58
CbmCheckDigisNbCorr::SetOutFilename
void SetOutFilename(TString sNameIn)
Definition: CbmCheckDigisNbCorr.h:73
CbmCheckDigisNbCorr::SetTimeInterval
void SetTimeInterval(Double_t dInterNs, Double_t dTsInNs)
Definition: CbmCheckDigisNbCorr.h:63
CbmCheckDigisNbCorr::fT0DigiVec
const std::vector< CbmTofDigi > * fT0DigiVec
Interface to digi data.
Definition: CbmCheckDigisNbCorr.h:85
CbmCheckDigisNbCorr::fT0DigiArr
TClonesArray * fT0DigiArr
Definition: CbmCheckDigisNbCorr.h:86
CbmCheckDigisNbCorr::fTofRichCorrProf
TProfile * fTofRichCorrProf
Definition: CbmCheckDigisNbCorr.h:148
CbmCheckDigisNbCorr::fNrOfStsErrors
Int_t fNrOfStsErrors
Definition: CbmCheckDigisNbCorr.h:97
CbmCheckDigisNbCorr::fStsRichCorrProf
TProfile * fStsRichCorrProf
Definition: CbmCheckDigisNbCorr.h:143
CbmCheckDigisNbCorr::fvuNbDigisPerBinT0
std::vector< UInt_t > fvuNbDigisPerBinT0
Definition: CbmCheckDigisNbCorr.h:116
CbmCheckDigisNbCorr::CbmCheckDigisNbCorr
CbmCheckDigisNbCorr(const CbmCheckDigisNbCorr &)=delete
CbmCheckDigisNbCorr::fT0RichCorr
TH2 * fT0RichCorr
Definition: CbmCheckDigisNbCorr.h:125
CbmCheckDigisNbCorr::operator=
CbmCheckDigisNbCorr operator=(const CbmCheckDigisNbCorr &)=delete
CbmCheckDigisNbCorr::CalcNrBins
void CalcNrBins()
Definition: CbmCheckDigisNbCorr.cxx:99
CbmCheckDigisNbCorr::fNrOfRichErrors
Int_t fNrOfRichErrors
Definition: CbmCheckDigisNbCorr.h:103
CbmCheckDigisNbCorr::fdTsLengthNs
Double_t fdTsLengthNs
Definition: CbmCheckDigisNbCorr.h:111
CbmCheckDigisNbCorr::SetMuchOffset
void SetMuchOffset(Double_t dval=1600)
Definition: CbmCheckDigisNbCorr.h:57
CbmCheckDigisNbCorr::fTsMetaData
TClonesArray * fTsMetaData
Definition: CbmCheckDigisNbCorr.h:82
CbmCheckDigisNbCorr::fvuNbDigisPerBinMuch
std::vector< UInt_t > fvuNbDigisPerBinMuch
Definition: CbmCheckDigisNbCorr.h:118
CbmTofDigi.h
CbmCheckDigisNbCorr::fT0StsDpbCorrProf
TProfile * fT0StsDpbCorrProf[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:156
CbmCheckDigisNbCorr::fMuchTofCorr
TH2 * fMuchTofCorr
Definition: CbmCheckDigisNbCorr.h:131
CbmCheckDigisNbCorr::fMuchTofCorrProf
TProfile * fMuchTofCorrProf
Definition: CbmCheckDigisNbCorr.h:145
CbmCheckDigisNbCorr::SetRichOffset
void SetRichOffset(Double_t dval=1200)
Definition: CbmCheckDigisNbCorr.h:61
CbmCheckDigisNbCorr
Definition: CbmCheckDigisNbCorr.h:23
CbmCheckDigisNbCorr::~CbmCheckDigisNbCorr
~CbmCheckDigisNbCorr()
Definition: CbmCheckDigisNbCorr.cxx:43
CbmCheckDigisNbCorr::fStsTofCorr
TH2 * fStsTofCorr
Definition: CbmCheckDigisNbCorr.h:128
CbmCheckDigisNbCorr::fNrOfMuchDigis
Int_t fNrOfMuchDigis
Definition: CbmCheckDigisNbCorr.h:100
CbmCheckDigisNbCorr::fT0MuchCorrProf
TProfile * fT0MuchCorrProf
Definition: CbmCheckDigisNbCorr.h:137
CbmCheckDigisNbCorr::fStsTofDpbCorrProf
TProfile * fStsTofDpbCorrProf[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:158
CbmCheckDigisNbCorr::fuMinTotPulserT0
UInt_t fuMinTotPulserT0
User settings: Data correction parameters.
Definition: CbmCheckDigisNbCorr.h:89
CbmCheckDigisNbCorr::fuMaxTotPulserT0
UInt_t fuMaxTotPulserT0
Definition: CbmCheckDigisNbCorr.h:90
CbmCheckDigisNbCorr::fdMuchOffset
Double_t fdMuchOffset
Definition: CbmCheckDigisNbCorr.h:107
CbmCheckDigisNbCorr::fNrOfStsDigis
Int_t fNrOfStsDigis
Definition: CbmCheckDigisNbCorr.h:98
CbmCheckDigisNbCorr::ClassDef
ClassDef(CbmCheckDigisNbCorr, 1)
CbmCheckDigisNbCorr::fdBinWidthNs
Double_t fdBinWidthNs
Definition: CbmCheckDigisNbCorr.h:112
CbmCheckDigisNbCorr::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmCheckDigisNbCorr.h:83
CbmCheckDigisNbCorr::fStsRichDpbCorrProf
TProfile * fStsRichDpbCorrProf[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:159
CbmCheckDigisNbCorr::fStsRichDpbCorr
TH2 * fStsRichDpbCorr[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:155
CbmCheckDigisNbCorr::fMuchRichCorr
TH2 * fMuchRichCorr
Definition: CbmCheckDigisNbCorr.h:132
CbmCheckDigisNbCorr::SetStsOffset
void SetStsOffset(Double_t dval=1600)
Definition: CbmCheckDigisNbCorr.h:55
CbmCheckDigisNbCorr::fStsRichCorr
TH2 * fStsRichCorr
Definition: CbmCheckDigisNbCorr.h:129
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmCheckDigisNbCorr::Finish
virtual void Finish()
Definition: CbmCheckDigisNbCorr.cxx:698
CbmCheckDigisNbCorr::fdTsStartOffset
Double_t fdTsStartOffset
Definition: CbmCheckDigisNbCorr.h:114
CbmCheckDigisNbCorr::fNrOfTofDigis
Int_t fNrOfTofDigis
Definition: CbmCheckDigisNbCorr.h:102
CbmCheckDigisNbCorr::SetT0PulserTotLimits
void SetT0PulserTotLimits(UInt_t uMin, UInt_t uMax)
Definition: CbmCheckDigisNbCorr.h:68
CbmCheckDigisNbCorr::fNrTs
Int_t fNrTs
Definition: CbmCheckDigisNbCorr.h:93
CbmCheckDigisNbCorr::ReInit
virtual InitStatus ReInit()
Definition: CbmCheckDigisNbCorr.cxx:474
CbmCheckDigisNbCorr::fNrOfT0Digis
Int_t fNrOfT0Digis
Definition: CbmCheckDigisNbCorr.h:96
CbmCheckDigisNbCorr::fT0StsDpbCorr
TH2 * fT0StsDpbCorr[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:152
CbmCheckDigisNbCorr::fNrOfMuchErrors
Int_t fNrOfMuchErrors
Definition: CbmCheckDigisNbCorr.h:99
CbmCheckDigisNbCorr::fNrOfTofErrors
Int_t fNrOfTofErrors
Definition: CbmCheckDigisNbCorr.h:101
CbmCheckDigisNbCorr::fvuNbDigisPerBinTof
std::vector< UInt_t > fvuNbDigisPerBinTof
Definition: CbmCheckDigisNbCorr.h:119
CbmCheckDigisNbCorr::fdTofOffset
Double_t fdTofOffset
Definition: CbmCheckDigisNbCorr.h:108
CbmCheckDigisNbCorr::fT0RichCorrProf
TProfile * fT0RichCorrProf
Definition: CbmCheckDigisNbCorr.h:139
CbmCheckDigisNbCorr::fStsMuchCorr
TH2 * fStsMuchCorr
Definition: CbmCheckDigisNbCorr.h:127
CbmCheckDigisNbCorr::SetParContainers
virtual void SetParContainers()
Definition: CbmCheckDigisNbCorr.cxx:46
CbmCheckDigisNbCorr::fvuNbDigisPerBinSts
std::vector< UInt_t > fvuNbDigisPerBinSts
Definition: CbmCheckDigisNbCorr.h:117
CbmCheckDigisNbCorr::fT0TofCorr
TH2 * fT0TofCorr
Definition: CbmCheckDigisNbCorr.h:124
CbmCheckDigisNbCorr::fdRichOffset
Double_t fdRichOffset
Definition: CbmCheckDigisNbCorr.h:109
CbmCheckDigisNbCorr::fvuNbDigisPerBinRich
std::vector< UInt_t > fvuNbDigisPerBinRich
Definition: CbmCheckDigisNbCorr.h:120
CbmCheckDigisNbCorr::fStsMuchCorrProf
TProfile * fStsMuchCorrProf
Definition: CbmCheckDigisNbCorr.h:141
CbmCheckDigisNbCorr::fStsMuchDpbCorr
TH2 * fStsMuchDpbCorr[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:153
CbmCheckDigisNbCorr::CreateHistos
void CreateHistos()
Definition: CbmCheckDigisNbCorr.cxx:103
CbmCheckDigisNbCorr::fiBinNb
Int_t fiBinNb
Definition: CbmCheckDigisNbCorr.h:113
CbmCheckDigisNbCorr::kuMaxNbStsDpbs
static const UInt_t kuMaxNbStsDpbs
Definition: CbmCheckDigisNbCorr.h:150
CbmCheckDigisNbCorr::fT0StsCorr
TH2 * fT0StsCorr
Definition: CbmCheckDigisNbCorr.h:122
CbmCheckDigisNbCorr::fOutFileName
TString fOutFileName
Definition: CbmCheckDigisNbCorr.h:165
CbmCheckDigisNbCorr::fvuNbDigisPerBinStsDpb
std::vector< std::vector< UInt_t > > fvuNbDigisPerBinStsDpb
Definition: CbmCheckDigisNbCorr.h:151
CbmCheckDigisNbCorr::fStsTofDpbCorr
TH2 * fStsTofDpbCorr[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:154
CbmCheckDigisNbCorr::fMuchRichCorrProf
TProfile * fMuchRichCorrProf
Definition: CbmCheckDigisNbCorr.h:146
CbmCheckDigisNbCorr::fT0MuchCorr
TH2 * fT0MuchCorr
Definition: CbmCheckDigisNbCorr.h:123
CbmCheckDigisNbCorr::fStsMuchDpbCorrProf
TProfile * fStsMuchDpbCorrProf[kuMaxNbStsDpbs]
Definition: CbmCheckDigisNbCorr.h:157
CbmCheckDigisNbCorr::WriteHistos
void WriteHistos()
Definition: CbmCheckDigisNbCorr.cxx:700
CbmCheckDigisNbCorr::fT0TofCorrProf
TProfile * fT0TofCorrProf
Definition: CbmCheckDigisNbCorr.h:138
CbmCheckDigisNbCorr::fNrOfRichDigis
Int_t fNrOfRichDigis
Definition: CbmCheckDigisNbCorr.h:104
CbmCheckDigisNbCorr::fStsTofCorrProf
TProfile * fStsTofCorrProf
Definition: CbmCheckDigisNbCorr.h:142
CbmCheckDigisNbCorr::fTofRichCorr
TH2 * fTofRichCorr
Definition: CbmCheckDigisNbCorr.h:134
CbmCheckDigisNbCorr::fNrOfT0Errors
Int_t fNrOfT0Errors
Definition: CbmCheckDigisNbCorr.h:95