CbmRoot
CbmMcbmCheckTimingAlgo.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 CBMMCBMCHECKTIMINGALGO_H
9 #define CBMMCBMCHECKTIMINGALGO_H
10 
11 #include "CbmModuleList.h"
12 #include "CbmTofDigi.h"
13 #include "TString.h"
14 #include <vector>
15 
16 class TH1;
17 class TH2;
18 class CbmDigiManager;
19 
21 public:
23  CheckTimingDetector(ECbmModuleId detIdIn, std::string sNameIn) {
24  detId = detIdIn;
25  sName = sNameIn;
26  }
27 
30  std::string sName = "Invalid";
31  Double_t dTimeRangeBeg = -1000.0;
32  Double_t dTimeRangeEnd = 1000.0;
33  UInt_t uRangeNbBins = 320;
34  UInt_t uChargeCutMin =
35  0;
36  UInt_t uChargeCutMax =
37  0;
38 
40  Double_t dPrevTime = 0.;
41  Int_t iPrevRefFirstDigi = 0;
42 };
43 
45 public:
47 
50 
52  // CbmMcbmCheckTimingAlgo(Int_t verbose);
53 
54 
57 
58 
60  Bool_t Init();
61 
63  Bool_t ReInit();
64 
65 
67  void ProcessTs();
68 
70  void SetParContainers();
71 
73  void Finish();
74 
75  inline void SetOutFilename(TString sNameIn) { fOutFileName = sNameIn; }
76  void WriteHistos();
77 
78  void SetReferenceDetector(ECbmModuleId refDetIn,
79  std::string sNameIn,
80  Double_t dTimeRangeBegIn = -1000.0,
81  Double_t dTimeRangeEndIn = 1000.0,
82  UInt_t uRangeNbBinsIn = 320,
83  UInt_t uChargeCutMinIn = 0,
84  UInt_t uChargeCutMaxIn = 0);
85  void AddCheckDetector(ECbmModuleId detIn,
86  std::string sNameIn,
87  Double_t dTimeRangeBegIn = -1000.0,
88  Double_t dTimeRangeEndIn = 1000.0,
89  UInt_t uRangeNbBinsIn = 320,
90  UInt_t uChargeCutMinIn = 0,
91  UInt_t uChargeCutMaxIn = 0);
93 
94 private:
95  void CheckDataPresence(CheckTimingDetector detToCheck);
96  void CreateHistos();
97 
98  template<class DigiRef>
100  template<class Digi>
101  void FillTimeOffsetHistos(const Double_t dRefTime,
102  const Double_t dRefCharge,
103  UInt_t uDetIdx);
104 
105 
108 
110  const std::vector<CbmTofDigi>* fpT0DigiVec = nullptr;
111 
112  //
113  UInt_t fuNbTs = 0;
114 
116  std::vector<CheckTimingDetector> fvDets {
123 
125  std::vector<TH1*> fvhDetSelfDiff = {};
126  std::vector<TH1*> fvhDetToRefDiff = {};
127  std::vector<TH2*> fvhDetToRefDiffRefCharge = {};
128  std::vector<TH2*> fvhDetToRefDiffDetCharge = {};
129  std::vector<TH2*> fvhDetToRefDiffEvo = {};
130  std::vector<TH2*> fvhDetToRefDiffEvoLong = {};
131 
133  TString fOutFileName = "data/HistosCheckTiming.root";
134 
136 };
137 
138 #endif
CbmMcbmCheckTimingAlgo::ReInit
Bool_t ReInit()
Definition: CbmMcbmCheckTimingAlgo.cxx:175
CbmMcbmCheckTimingAlgo::fvhDetToRefDiffEvoLong
std::vector< TH2 * > fvhDetToRefDiffEvoLong
Definition: CbmMcbmCheckTimingAlgo.h:130
CheckTimingDetector::CheckTimingDetector
CheckTimingDetector()
Definition: CbmMcbmCheckTimingAlgo.h:22
CbmMcbmCheckTimingAlgo::ClassDefNV
ClassDefNV(CbmMcbmCheckTimingAlgo, 1)
CbmMcbmCheckTimingAlgo::fuNbTs
UInt_t fuNbTs
Definition: CbmMcbmCheckTimingAlgo.h:113
CbmMcbmCheckTimingAlgo::WriteHistos
void WriteHistos()
Definition: CbmMcbmCheckTimingAlgo.cxx:417
CbmMcbmCheckTimingAlgo::RemoveCheckDetector
void RemoveCheckDetector(ECbmModuleId detIn)
Definition: CbmMcbmCheckTimingAlgo.cxx:493
CbmMcbmCheckTimingAlgo::CreateHistos
void CreateHistos()
Definition: CbmMcbmCheckTimingAlgo.cxx:90
ECbmModuleId::kT0
@ kT0
ToF start Detector.
CbmMcbmCheckTimingAlgo::fvDets
std::vector< CheckTimingDetector > fvDets
Definition: CbmMcbmCheckTimingAlgo.h:116
CbmMcbmCheckTimingAlgo::FillTimeOffsetHistos
void FillTimeOffsetHistos(const Double_t dRefTime, const Double_t dRefCharge, UInt_t uDetIdx)
Definition: CbmMcbmCheckTimingAlgo.cxx:328
CbmMcbmCheckTimingAlgo::~CbmMcbmCheckTimingAlgo
~CbmMcbmCheckTimingAlgo()
Definition: CbmMcbmCheckTimingAlgo.cxx:37
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CheckTimingDetector::sName
std::string sName
Definition: CbmMcbmCheckTimingAlgo.h:30
CbmTofDigi.h
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmMcbmCheckTimingAlgo::CbmMcbmCheckTimingAlgo
CbmMcbmCheckTimingAlgo()
Definition: CbmMcbmCheckTimingAlgo.cxx:34
CbmMcbmCheckTimingAlgo::fvhDetToRefDiff
std::vector< TH1 * > fvhDetToRefDiff
Definition: CbmMcbmCheckTimingAlgo.h:126
CbmMcbmCheckTimingAlgo::SetReferenceDetector
void SetReferenceDetector(ECbmModuleId refDetIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
Definition: CbmMcbmCheckTimingAlgo.cxx:442
CheckTimingDetector::uRangeNbBins
UInt_t uRangeNbBins
Definition: CbmMcbmCheckTimingAlgo.h:33
CbmMcbmCheckTimingAlgo::fOutFileName
TString fOutFileName
Definition: CbmMcbmCheckTimingAlgo.h:133
CbmMcbmCheckTimingAlgo::AddCheckDetector
void AddCheckDetector(ECbmModuleId detIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
Definition: CbmMcbmCheckTimingAlgo.cxx:457
CbmMcbmCheckTimingAlgo::CbmMcbmCheckTimingAlgo
CbmMcbmCheckTimingAlgo(const CbmMcbmCheckTimingAlgo &)=delete
CheckTimingDetector
Definition: CbmMcbmCheckTimingAlgo.h:20
CbmMcbmCheckTimingAlgo::fvhDetSelfDiff
std::vector< TH1 * > fvhDetSelfDiff
vectors storing histograms for each detector under investigation
Definition: CbmMcbmCheckTimingAlgo.h:125
CheckTimingDetector::CheckTimingDetector
CheckTimingDetector(ECbmModuleId detIdIn, std::string sNameIn)
Definition: CbmMcbmCheckTimingAlgo.h:23
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmModuleList.h
CbmMcbmCheckTimingAlgo::CheckDataPresence
void CheckDataPresence(CheckTimingDetector detToCheck)
Definition: CbmMcbmCheckTimingAlgo.cxx:68
CbmMcbmCheckTimingAlgo::CheckInterSystemOffset
void CheckInterSystemOffset()
Definition: CbmMcbmCheckTimingAlgo.cxx:222
CheckTimingDetector::uChargeCutMin
UInt_t uChargeCutMin
Definition: CbmMcbmCheckTimingAlgo.h:34
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CheckTimingDetector::dTimeRangeEnd
Double_t dTimeRangeEnd
Definition: CbmMcbmCheckTimingAlgo.h:32
CbmMcbmCheckTimingAlgo::fpT0DigiVec
const std::vector< CbmTofDigi > * fpT0DigiVec
Definition: CbmMcbmCheckTimingAlgo.h:110
CbmMcbmCheckTimingAlgo::SetOutFilename
void SetOutFilename(TString sNameIn)
Definition: CbmMcbmCheckTimingAlgo.h:75
CbmMcbmCheckTimingAlgo::fRefDet
CheckTimingDetector fRefDet
Definition: CbmMcbmCheckTimingAlgo.h:115
CheckTimingDetector::uChargeCutMax
UInt_t uChargeCutMax
Charge cut used for example to reject/select pulser, no effect if equal, select if min < max,...
Definition: CbmMcbmCheckTimingAlgo.h:36
CbmMcbmCheckTimingAlgo
Definition: CbmMcbmCheckTimingAlgo.h:44
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CheckTimingDetector::iPrevRefFirstDigi
Int_t iPrevRefFirstDigi
Definition: CbmMcbmCheckTimingAlgo.h:41
CbmMcbmCheckTimingAlgo::SetParContainers
void SetParContainers()
Definition: CbmMcbmCheckTimingAlgo.cxx:40
ECbmModuleId::kNotExist
@ kNotExist
If not found.
CbmMcbmCheckTimingAlgo::Finish
void Finish()
Definition: CbmMcbmCheckTimingAlgo.cxx:413
CbmMcbmCheckTimingAlgo::fvhDetToRefDiffRefCharge
std::vector< TH2 * > fvhDetToRefDiffRefCharge
Definition: CbmMcbmCheckTimingAlgo.h:127
CbmMcbmCheckTimingAlgo::fvhDetToRefDiffDetCharge
std::vector< TH2 * > fvhDetToRefDiffDetCharge
Definition: CbmMcbmCheckTimingAlgo.h:128
CbmMcbmCheckTimingAlgo::fvhDetToRefDiffEvo
std::vector< TH2 * > fvhDetToRefDiffEvo
Definition: CbmMcbmCheckTimingAlgo.h:129
CheckTimingDetector::dPrevTime
Double_t dPrevTime
Charge cut used for example to reject/select pulser, no effect if equal, select if min < max,...
Definition: CbmMcbmCheckTimingAlgo.h:40
CheckTimingDetector::dTimeRangeBeg
Double_t dTimeRangeBeg
Definition: CbmMcbmCheckTimingAlgo.h:31
CbmMcbmCheckTimingAlgo::ProcessTs
void ProcessTs()
Definition: CbmMcbmCheckTimingAlgo.cxx:178
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmMcbmCheckTimingAlgo::Init
Bool_t Init()
Definition: CbmMcbmCheckTimingAlgo.cxx:52
CbmMcbmCheckTimingAlgo::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmMcbmCheckTimingAlgo.h:107
CheckTimingDetector::detId
ECbmModuleId detId
Settings.
Definition: CbmMcbmCheckTimingAlgo.h:29
CbmMcbmCheckTimingAlgo::operator=
CbmMcbmCheckTimingAlgo operator=(const CbmMcbmCheckTimingAlgo &)=delete