CbmRoot
CbmMcbm2019CheckDtInDet.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 CBMMCBM2019CHECKDTINDET_H
9 #define CBMMCBM2019CHECKDTINDET_H
10 
12 #include "CbmDefs.h"
13 #include "CbmTofDigi.h"
14 #include "TimesliceMetaData.h"
15 
17 #include "FairTask.h"
18 
20 #include "TString.h"
21 
23 #include <vector>
24 
25 class TClonesArray;
26 class TH1;
27 class TH2;
28 class TProfile;
29 class CbmDigiManager;
30 
31 class CbmMcbm2019CheckDtInDet : public FairTask {
32 public:
34 
37 
39  // CbmMcbm2019CheckDtInDet(Int_t verbose);
40 
41 
44 
45 
47  virtual InitStatus Init();
48 
50  virtual InitStatus ReInit();
51 
52 
54  virtual void Exec(Option_t*);
55 
57  virtual void SetParContainers();
58 
60  virtual void Finish();
61 
62  void SetNbChanT0(Int_t val = 8) { fuNbChanT0 = val; }
63 
64  void SetNbChanSts(Int_t val = 5120) { fuNbChanSts = val; }
65 
66  void SetNbChanMuch(Int_t val = 1000) { fuNbChanMuch = val; }
67 
68  void SetNbChanTrd(Int_t val = 1000) { fuNbChanTrd = val; }
69 
70  void SetNbChanTof(Int_t val = 1000) { fuNbChanTof = val; }
71 
72  void SetNbChanRich(Int_t val = 1000) { fuNbChanRich = val; }
73 
74  void SetNbChanPsd(Int_t val = 1000) { fuNbChanPsd = val; }
75 
76  inline void SetOutFilename(TString sNameIn) { fOutFileName = sNameIn; }
77 
78 private:
79  template<class Digi>
80  void FillHistosPerDet(TH1* histoSameTime,
81  TH1* histoDt,
82  TH1* histoDtLog,
83  TH2* histoDtPerChan,
85  void CreateHistos();
86  void WriteHistos();
87 
88 
90  CbmDigiManager* fDigiMan = nullptr;
91  const std::vector<CbmTofDigi>* fT0DigiVector = nullptr;
92  TClonesArray* fT0DigiArray = nullptr;
93  TClonesArray* fTimeSliceMetaDataArray = nullptr;
94  const TimesliceMetaData* pTsMetaData = nullptr;
95 
97  static const UInt_t kuNbChanSMX = 128;
98  static const UInt_t kuMaxNbStsDpbs = 2;
99  static const UInt_t kuMaxNbMuchDpbs = 6;
100  static const UInt_t kuMaxNbMuchAsics = 36;
101  static const UInt_t kuDefaultAddress = 0xFFFFFFFF;
102  static const UInt_t kuMaxChannelSts = 3000;
103 
105  Double_t fPrevTimeT0 = 0.;
106  Double_t fPrevTimeSts = 0.;
107  Double_t fPrevTimeMuch = 0.;
108  Double_t fPrevTimeTrd = 0.;
109  Double_t fPrevTimeTof = 0.;
110  Double_t fPrevTimeRich = 0.;
111  Double_t fPrevTimePsd = 0.;
112 
114  UInt_t fuNbChanT0 = 8;
115  UInt_t fuNbChanSts = 5120;
116  UInt_t fuNbChanMuch = 5120;
117  UInt_t fuNbChanTrd = 5120;
118  UInt_t fuNbChanTof = 5120;
119  UInt_t fuNbChanRich = 5120;
120  UInt_t fuNbChanPsd = 5120;
121  //
122  Int_t fNrTs = 0;
123 
124  TH1* fT0T0SameTime = nullptr;
125  TH1* fStsStsSameTime = nullptr;
126  TH1* fMuchMuchSameTime = nullptr;
127  TH1* fTrdTrdSameTime = nullptr;
128  TH1* fTofTofSameTime = nullptr;
129  TH1* fRichRichSameTime = nullptr;
130  TH1* fPsdPsdSameTime = nullptr;
131 
132  TH1* fT0T0Diff = nullptr;
133  TH1* fStsStsDiff = nullptr;
134  TH1* fMuchMuchDiff = nullptr;
135  TH1* fTrdTrdDiff = nullptr;
136  TH1* fTofTofDiff = nullptr;
137  TH1* fRichRichDiff = nullptr;
138  TH1* fPsdPsdDiff = nullptr;
139 
140  TH1* fT0T0DiffLog = nullptr;
141  TH1* fStsStsDiffLog = nullptr;
142  TH1* fMuchMuchDiffLog = nullptr;
143  TH1* fTrdTrdDiffLog = nullptr;
144  TH1* fTofTofDiffLog = nullptr;
145  TH1* fRichRichDiffLog = nullptr;
146  TH1* fPsdPsdDiffLog = nullptr;
147 
148 
149  TH2* fT0T0DiffPerChan = nullptr;
150  TH2* fStsStsDiffPerChan = nullptr;
151  TH2* fMuchMuchDiffPerChan = nullptr;
152  TH2* fTrdTrdDiffPerChan = nullptr;
153  TH2* fTofTofDiffPerChan = nullptr;
154  TH2* fRichRichDiffPerChan = nullptr;
155  TH2* fPsdPsdDiffPerChan = nullptr;
156 
157 
158  TString fOutFileName {"data/HistosDtInDet.root"};
159 
161 };
162 
163 #endif // CBMMCBM2019CHECKDTINDET_H
CbmMcbm2019CheckDtInDet::fTrdTrdDiffPerChan
TH2 * fTrdTrdDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:152
CbmMcbm2019CheckDtInDet
Definition: CbmMcbm2019CheckDtInDet.h:31
CbmMcbm2019CheckDtInDet::CbmMcbm2019CheckDtInDet
CbmMcbm2019CheckDtInDet(const CbmMcbm2019CheckDtInDet &)=delete
CbmMcbm2019CheckDtInDet::Finish
virtual void Finish()
Definition: CbmMcbm2019CheckDtInDet.cxx:510
CbmMcbm2019CheckDtInDet::fStsStsDiffPerChan
TH2 * fStsStsDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:150
CbmMcbm2019CheckDtInDet::fuNbChanTrd
UInt_t fuNbChanTrd
Definition: CbmMcbm2019CheckDtInDet.h:117
CbmMcbm2019CheckDtInDet::kuMaxNbMuchAsics
static const UInt_t kuMaxNbMuchAsics
Definition: CbmMcbm2019CheckDtInDet.h:100
CbmMcbm2019CheckDtInDet::fTofTofDiffLog
TH1 * fTofTofDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:144
CbmMcbm2019CheckDtInDet::fuNbChanTof
UInt_t fuNbChanTof
Definition: CbmMcbm2019CheckDtInDet.h:118
CbmMcbm2019CheckDtInDet::fPrevTimeMuch
Double_t fPrevTimeMuch
Definition: CbmMcbm2019CheckDtInDet.h:107
CbmMcbm2019CheckDtInDet::fRichRichDiffLog
TH1 * fRichRichDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:145
CbmMcbm2019CheckDtInDet::fuNbChanMuch
UInt_t fuNbChanMuch
Definition: CbmMcbm2019CheckDtInDet.h:116
CbmMcbm2019CheckDtInDet::fMuchMuchSameTime
TH1 * fMuchMuchSameTime
Definition: CbmMcbm2019CheckDtInDet.h:126
CbmMcbm2019CheckDtInDet::fT0DigiVector
const std::vector< CbmTofDigi > * fT0DigiVector
Definition: CbmMcbm2019CheckDtInDet.h:91
CbmMcbm2019CheckDtInDet::fRichRichSameTime
TH1 * fRichRichSameTime
Definition: CbmMcbm2019CheckDtInDet.h:129
CbmMcbm2019CheckDtInDet::fPrevTimeSts
Double_t fPrevTimeSts
Definition: CbmMcbm2019CheckDtInDet.h:106
CbmMcbm2019CheckDtInDet::CbmMcbm2019CheckDtInDet
CbmMcbm2019CheckDtInDet()
Definition: CbmMcbm2019CheckDtInDet.cxx:38
CbmMcbm2019CheckDtInDet::operator=
CbmMcbm2019CheckDtInDet operator=(const CbmMcbm2019CheckDtInDet &)=delete
CbmMcbm2019CheckDtInDet::pTsMetaData
const TimesliceMetaData * pTsMetaData
Definition: CbmMcbm2019CheckDtInDet.h:94
CbmMcbm2019CheckDtInDet::SetNbChanMuch
void SetNbChanMuch(Int_t val=1000)
Definition: CbmMcbm2019CheckDtInDet.h:66
TimesliceMetaData
Definition: TimesliceMetaData.h:11
CbmMcbm2019CheckDtInDet::fuNbChanSts
UInt_t fuNbChanSts
Definition: CbmMcbm2019CheckDtInDet.h:115
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmMcbm2019CheckDtInDet::SetNbChanPsd
void SetNbChanPsd(Int_t val=1000)
Definition: CbmMcbm2019CheckDtInDet.h:74
CbmTofDigi.h
CbmMcbm2019CheckDtInDet::ClassDef
ClassDef(CbmMcbm2019CheckDtInDet, 1)
CbmMcbm2019CheckDtInDet::SetOutFilename
void SetOutFilename(TString sNameIn)
Definition: CbmMcbm2019CheckDtInDet.h:76
CbmMcbm2019CheckDtInDet::fT0DigiArray
TClonesArray * fT0DigiArray
Definition: CbmMcbm2019CheckDtInDet.h:92
CbmMcbm2019CheckDtInDet::kuMaxNbStsDpbs
static const UInt_t kuMaxNbStsDpbs
Definition: CbmMcbm2019CheckDtInDet.h:98
CbmMcbm2019CheckDtInDet::SetNbChanTrd
void SetNbChanTrd(Int_t val=1000)
Definition: CbmMcbm2019CheckDtInDet.h:68
CbmMcbm2019CheckDtInDet::fNrTs
Int_t fNrTs
Definition: CbmMcbm2019CheckDtInDet.h:122
CbmMcbm2019CheckDtInDet::fT0T0Diff
TH1 * fT0T0Diff
Definition: CbmMcbm2019CheckDtInDet.h:132
CbmMcbm2019CheckDtInDet::Init
virtual InitStatus Init()
Definition: CbmMcbm2019CheckDtInDet.cxx:57
CbmMcbm2019CheckDtInDet::kuDefaultAddress
static const UInt_t kuDefaultAddress
Definition: CbmMcbm2019CheckDtInDet.h:101
CbmMcbm2019CheckDtInDet::WriteHistos
void WriteHistos()
Definition: CbmMcbm2019CheckDtInDet.cxx:512
CbmMcbm2019CheckDtInDet::fPrevTimeT0
Double_t fPrevTimeT0
Variables to store the previous digi time.
Definition: CbmMcbm2019CheckDtInDet.h:105
CbmMcbm2019CheckDtInDet::fTrdTrdSameTime
TH1 * fTrdTrdSameTime
Definition: CbmMcbm2019CheckDtInDet.h:127
CbmMcbm2019CheckDtInDet::fStsStsDiffLog
TH1 * fStsStsDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:141
CbmMcbm2019CheckDtInDet::fStsStsDiff
TH1 * fStsStsDiff
Definition: CbmMcbm2019CheckDtInDet.h:133
CbmMcbm2019CheckDtInDet::fTimeSliceMetaDataArray
TClonesArray * fTimeSliceMetaDataArray
Definition: CbmMcbm2019CheckDtInDet.h:93
CbmMcbm2019CheckDtInDet::SetNbChanRich
void SetNbChanRich(Int_t val=1000)
Definition: CbmMcbm2019CheckDtInDet.h:72
CbmMcbm2019CheckDtInDet::fuNbChanPsd
UInt_t fuNbChanPsd
Definition: CbmMcbm2019CheckDtInDet.h:120
CbmMcbm2019CheckDtInDet::fT0T0DiffLog
TH1 * fT0T0DiffLog
Definition: CbmMcbm2019CheckDtInDet.h:140
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMcbm2019CheckDtInDet::kuMaxNbMuchDpbs
static const UInt_t kuMaxNbMuchDpbs
Definition: CbmMcbm2019CheckDtInDet.h:99
CbmMcbm2019CheckDtInDet::fTofTofDiffPerChan
TH2 * fTofTofDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:153
CbmMcbm2019CheckDtInDet::SetNbChanTof
void SetNbChanTof(Int_t val=1000)
Definition: CbmMcbm2019CheckDtInDet.h:70
CbmMcbm2019CheckDtInDet::fOutFileName
TString fOutFileName
Definition: CbmMcbm2019CheckDtInDet.h:158
CbmMcbm2019CheckDtInDet::FillHistosPerDet
void FillHistosPerDet(TH1 *histoSameTime, TH1 *histoDt, TH1 *histoDtLog, TH2 *histoDtPerChan, ECbmModuleId iDetId=ECbmModuleId::kLastModule)
Definition: CbmMcbm2019CheckDtInDet.cxx:419
CbmMcbm2019CheckDtInDet::~CbmMcbm2019CheckDtInDet
~CbmMcbm2019CheckDtInDet()
Definition: CbmMcbm2019CheckDtInDet.cxx:42
CbmMcbm2019CheckDtInDet::fMuchMuchDiffLog
TH1 * fMuchMuchDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:142
CbmMcbm2019CheckDtInDet::fTrdTrdDiff
TH1 * fTrdTrdDiff
Definition: CbmMcbm2019CheckDtInDet.h:135
CbmMcbm2019CheckDtInDet::ReInit
virtual InitStatus ReInit()
Definition: CbmMcbm2019CheckDtInDet.cxx:323
CbmMcbm2019CheckDtInDet::SetParContainers
virtual void SetParContainers()
Definition: CbmMcbm2019CheckDtInDet.cxx:45
CbmMcbm2019CheckDtInDet::fT0T0SameTime
TH1 * fT0T0SameTime
Definition: CbmMcbm2019CheckDtInDet.h:124
ECbmModuleId::kLastModule
@ kLastModule
For loops over all modules.
CbmMcbm2019CheckDtInDet::fTofTofSameTime
TH1 * fTofTofSameTime
Definition: CbmMcbm2019CheckDtInDet.h:128
CbmMcbm2019CheckDtInDet::fRichRichDiffPerChan
TH2 * fRichRichDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:154
CbmMcbm2019CheckDtInDet::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmMcbm2019CheckDtInDet.h:90
CbmMcbm2019CheckDtInDet::fMuchMuchDiff
TH1 * fMuchMuchDiff
Definition: CbmMcbm2019CheckDtInDet.h:134
CbmMcbm2019CheckDtInDet::Exec
virtual void Exec(Option_t *)
Definition: CbmMcbm2019CheckDtInDet.cxx:326
CbmMcbm2019CheckDtInDet::fPsdPsdDiffLog
TH1 * fPsdPsdDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:146
CbmMcbm2019CheckDtInDet::fuNbChanT0
UInt_t fuNbChanT0
User settings: Data correction parameters.
Definition: CbmMcbm2019CheckDtInDet.h:114
CbmMcbm2019CheckDtInDet::fTrdTrdDiffLog
TH1 * fTrdTrdDiffLog
Definition: CbmMcbm2019CheckDtInDet.h:143
CbmMcbm2019CheckDtInDet::fuNbChanRich
UInt_t fuNbChanRich
Definition: CbmMcbm2019CheckDtInDet.h:119
CbmMcbm2019CheckDtInDet::fPrevTimeRich
Double_t fPrevTimeRich
Definition: CbmMcbm2019CheckDtInDet.h:110
CbmMcbm2019CheckDtInDet::fRichRichDiff
TH1 * fRichRichDiff
Definition: CbmMcbm2019CheckDtInDet.h:137
CbmMcbm2019CheckDtInDet::fPrevTimePsd
Double_t fPrevTimePsd
Definition: CbmMcbm2019CheckDtInDet.h:111
CbmMcbm2019CheckDtInDet::fT0T0DiffPerChan
TH2 * fT0T0DiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:149
CbmMcbm2019CheckDtInDet::fPsdPsdSameTime
TH1 * fPsdPsdSameTime
Definition: CbmMcbm2019CheckDtInDet.h:130
CbmMcbm2019CheckDtInDet::fTofTofDiff
TH1 * fTofTofDiff
Definition: CbmMcbm2019CheckDtInDet.h:136
CbmMcbm2019CheckDtInDet::fPsdPsdDiff
TH1 * fPsdPsdDiff
Definition: CbmMcbm2019CheckDtInDet.h:138
CbmMcbm2019CheckDtInDet::fMuchMuchDiffPerChan
TH2 * fMuchMuchDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:151
TimesliceMetaData.h
CbmMcbm2019CheckDtInDet::fPsdPsdDiffPerChan
TH2 * fPsdPsdDiffPerChan
Definition: CbmMcbm2019CheckDtInDet.h:155
CbmMcbm2019CheckDtInDet::kuNbChanSMX
static const UInt_t kuNbChanSMX
Constants.
Definition: CbmMcbm2019CheckDtInDet.h:97
CbmMcbm2019CheckDtInDet::SetNbChanSts
void SetNbChanSts(Int_t val=5120)
Definition: CbmMcbm2019CheckDtInDet.h:64
CbmMcbm2019CheckDtInDet::kuMaxChannelSts
static const UInt_t kuMaxChannelSts
Definition: CbmMcbm2019CheckDtInDet.h:102
CbmMcbm2019CheckDtInDet::SetNbChanT0
void SetNbChanT0(Int_t val=8)
Definition: CbmMcbm2019CheckDtInDet.h:62
CbmMcbm2019CheckDtInDet::fPrevTimeTof
Double_t fPrevTimeTof
Definition: CbmMcbm2019CheckDtInDet.h:109
CbmMcbm2019CheckDtInDet::fStsStsSameTime
TH1 * fStsStsSameTime
Definition: CbmMcbm2019CheckDtInDet.h:125
CbmMcbm2019CheckDtInDet::CreateHistos
void CreateHistos()
Definition: CbmMcbm2019CheckDtInDet.cxx:114
CbmMcbm2019CheckDtInDet::fPrevTimeTrd
Double_t fPrevTimeTrd
Definition: CbmMcbm2019CheckDtInDet.h:108
CbmDefs.h