CbmRoot
CbmTofDigiBdfPar.h
Go to the documentation of this file.
1 
13 #ifndef CBMTOFDIGIBDFPAR_H
14 #define CBMTOFDIGIBDFPAR_H 1
15 
16 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
17 #include <RtypesCore.h> // for Int_t, Double_t, Bool_t
18 #include <TArrayD.h> // for TArrayD
19 #include <TArrayI.h> // for TArrayI
20 #include <TString.h> // for TString
21 
22 #include <map> // for map
23 #include <vector> // for vector
24 
25 #include <FairParGenericSet.h> // for FairParGenericSet
26 
27 class FairParamList;
28 class TH1;
29 
30 class CbmTofDigiBdfPar : public FairParGenericSet {
31 public:
33  const char* name = "CbmTofDigiBdfPar",
34  const char* title = "BDF Digitization parameters for the TOF detector",
35  const char* context = "TestDefaultContext");
36  ~CbmTofDigiBdfPar(void);
37  void clear(void);
38  void putParams(FairParamList*);
39  Bool_t getParams(FairParamList*);
40  void printParams();
41  Bool_t LoadBeamtimeHistos();
42 
43  void SetInputFile(TString FileName) { fsBeamInputFile = FileName; }
44  void SetCalibFile(TString FileName) { fsBeamCalibFile = FileName; }
45 
46  // Fee properties
47  Double_t GetFeeGainSigma() const { return fdFeeGainSigma; };
48  Double_t GetFeeThreshold() const { return fdFeeTotThr; };
49  Double_t GetFeeTimeRes() const { return fdTimeResElec; };
50  Double_t GetStartTimeRes() const { return fdTimeResStart; };
51  Double_t GetDeadtime() const { return fdDeadtime; };
52 
53 
54  // Geometry variables
55  Double_t GetSignalSpeed() const { return fdSignalPropSpeed; };
56  Int_t GetNbSmTypes() const { return fiNbSmTypes; };
57  Int_t GetNbSm(Int_t iSmType) const;
58  Int_t GetNbRpc(Int_t iSmType) const;
59  Int_t GetNbGaps(Int_t iSmType, Int_t iRpc) const;
60  Double_t GetGapSize(Int_t iSmType, Int_t iRpc) const;
61  Double_t GetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc) const;
62  void SetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc, Double_t dvel);
63  Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const;
64  Int_t GetChanType(Int_t iSmType, Int_t iRpc) const;
65  Int_t GetChanOrient(Int_t iSmType, Int_t iRpc) const;
66  Int_t GetNbDet() const;
67  Int_t GetDetUId(Int_t iDet);
68  Int_t GetDetInd(Int_t iAddr);
69 
70  // Beamtime variables
71  TString GetInputFileName() const { return fsBeamInputFile; };
72  TString GetCalibFileName() const { return fsBeamCalibFile; };
73  Int_t GetClusterRadiusModel() const { return fiClusterRadiusModel; };
74  Int_t GetTypeInputMap(Int_t iSmType) const;
75  Double_t GetEfficiency(Int_t iSmType) const;
76  Double_t GetGapEfficiency(Int_t iSmType, Int_t iRpc) const;
77  Double_t GetResolution(Int_t iSmType) const;
78  Double_t GetSystemResolution(Int_t iSmType) const;
79  TH1* GetClustSizeHist(Int_t iSmType) const;
80  TH1* GetClustTotHist(Int_t iSmType) const;
81  Double_t GetLandauMpv(Int_t iSmType) const;
82  Double_t GetLandauSigma(Int_t iSmType) const;
83 
84  // Digi type to use
85  Bool_t UseExpandedDigi() const { return fbUseExpDigi; };
86  // Switch to use only primary tracks
87  Bool_t UseOnlyPrimaries() const { return fbUseOnlyPrim; };
88  // Switch to use only primary tracks
89  Bool_t UseOneGapPerTrk() const { return fbOneGapTrack; };
90 
91  // Cluster Model to use
92  Int_t GetClusterModel() const { return fiClusterModel; };
93 
94  // Simple clusterizer parameters
95  Bool_t ClustUseTrackId() const { return fbMulUseTrackId; };
96  Double_t GetMaxTimeDist() const;
97  Double_t GetMaxDistAlongCh() const { return fdMaxSpaceDistClust; };
98 
99  // Cleaning junk
100  void ClearHistos();
101 
102 private:
103  // Fit the cluster size distribution and use it to extract
104  // the values of the parameter to use for the Landau Cluster
105  // size distribution. If failing use default values from parameter
106  // file.
108 
109  // Digi type to use
110  Bool_t fbUseExpDigi;
111  // Switch to use only primary tracks
113  // Switch method to try avoiding counting all gaps/TofPoint from same track
114  // with different time/charge
116 
117  // Cluster Model to use
119 
120  // Fee properties
121  Double_t fdFeeGainSigma; // -> 0 makes gain 1 for all channels
122  Double_t fdFeeTotThr; //
123  Double_t fdTimeResElec; //
124  Double_t fdTimeResStart; //
125  Double_t fdDeadtime; //
126 
127  // Geometry variables, text to be generated in the CreateGeometry macros
128  Double_t fdSignalPropSpeed; // -> in parameter?
129  Int_t fiNbSmTypes; //
130  TArrayI fiNbSm; // [fiNbSmTypes]
131  TArrayI fiNbRpc; // [fiNbSmTypes]
132  std::vector<TArrayI> fiNbGaps; // [fiNbSmTypes][fiNbRpc]
133  std::vector<TArrayD> fdGapSize; // [fiNbSmTypes][fiNbRpc]
134  std::vector<TArrayD>
135  fdSigVel; // [fiNbSmTypes][fiNbSm*fiNbRpc] // Signal velocity
136  std::vector<TArrayI> fiNbCh; // [fiNbSmTypes][fiNbRpc]
137  std::vector<TArrayI> fiChType; // [fiNbSmTypes][fiNbRpc]
138  std::vector<TArrayI>
139  fiChOrientation; // [fiNbSmTypes][fiNbRpc] -> in parameter? Possibility to Readout from geometry angles?
140  TArrayI fiDetUId; // [NbDet]
141  std::map<Int_t, Int_t> fMapDetInd; // [NbDet]
142 
143  // Beamtime variables
146  Int_t
147  fiClusterRadiusModel; // 0 = fixed value, 1 = Landau distrib. with fixed param, 2 = Landau distrib. with bdf params
149  TArrayD fdEfficiency; // [fiNbSmTypes] -> in parameter?
150  std::vector<TArrayD> fdGapsEfficiency; // [fiNbSmTypes][fiNbRpc]
151  TArrayD fdTimeResolution; // [fiNbSmTypes] -> in parameter?
152  std::vector<TH1*> fh1ClusterSize; // [fiNbSmTypes] -> in parameter?
153  std::vector<TH1*> fh1ClusterTot; // [fiNbSmTypes] -> in parameter?
154  TArrayD fdLandauMpv; // [fiNbSmTypes] -> in parameter?
155  TArrayD fdLandauSigma; // [fiNbSmTypes] -> in parameter?
156 
157  // Simple clusterizer parameters
161 
164 
165  ClassDef(CbmTofDigiBdfPar, 1)
166 };
167 
168 #endif // CBMTOFDIGIBDFPAR_H
CbmTofDigiBdfPar::fdLandauMpv
TArrayD fdLandauMpv
Definition: CbmTofDigiBdfPar.h:154
CbmTofDigiBdfPar::fiNbGaps
std::vector< TArrayI > fiNbGaps
Definition: CbmTofDigiBdfPar.h:132
CbmTofDigiBdfPar::fdDeadtime
Double_t fdDeadtime
Definition: CbmTofDigiBdfPar.h:125
CbmTofDigiBdfPar::printParams
void printParams()
Definition: CbmTofDigiBdfPar.cxx:667
CbmTofDigiBdfPar::SetCalibFile
void SetCalibFile(TString FileName)
Definition: CbmTofDigiBdfPar.h:44
CbmTofDigiBdfPar::fbMulUseTrackId
Bool_t fbMulUseTrackId
Definition: CbmTofDigiBdfPar.h:158
CbmTofDigiBdfPar::fbUseOnlyPrim
Bool_t fbUseOnlyPrim
Definition: CbmTofDigiBdfPar.h:112
CbmTofDigiBdfPar::fdGapSize
std::vector< TArrayD > fdGapSize
Definition: CbmTofDigiBdfPar.h:133
CbmTofDigiBdfPar::fiDetUId
TArrayI fiDetUId
Definition: CbmTofDigiBdfPar.h:140
CbmTofDigiBdfPar::GetInputFileName
TString GetInputFileName() const
Definition: CbmTofDigiBdfPar.h:71
CbmTofDigiBdfPar::GetClustSizeHist
TH1 * GetClustSizeHist(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:637
CbmTofDigiBdfPar::GetCalibFileName
TString GetCalibFileName() const
Definition: CbmTofDigiBdfPar.h:72
CbmTofDigiBdfPar::fiNbRpc
TArrayI fiNbRpc
Definition: CbmTofDigiBdfPar.h:131
CbmTofDigiBdfPar::fh1ClusterTot
std::vector< TH1 * > fh1ClusterTot
Definition: CbmTofDigiBdfPar.h:153
CbmTofDigiBdfPar::GetResolution
Double_t GetResolution(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:623
CbmTofDigiBdfPar::fMapDetInd
std::map< Int_t, Int_t > fMapDetInd
Definition: CbmTofDigiBdfPar.h:141
CbmTofDigiBdfPar::UseOneGapPerTrk
Bool_t UseOneGapPerTrk() const
Definition: CbmTofDigiBdfPar.h:89
CbmTofDigiBdfPar::GetNbChan
Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:570
CbmTofDigiBdfPar::GetGapEfficiency
Double_t GetGapEfficiency(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:613
CbmTofDigiBdfPar::fiNbCh
std::vector< TArrayI > fiNbCh
Definition: CbmTofDigiBdfPar.h:136
CbmTofDigiBdfPar::GetNbRpc
Int_t GetNbRpc(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:519
CbmTofDigiBdfPar::fiNbSm
TArrayI fiNbSm
Definition: CbmTofDigiBdfPar.h:130
CbmTofDigiBdfPar::GetChanOrient
Int_t GetChanOrient(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:590
CbmTofDigiBdfPar::GetSigVel
Double_t GetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:546
CbmTofDigiBdfPar::GetNbSmTypes
Int_t GetNbSmTypes() const
Definition: CbmTofDigiBdfPar.h:56
CbmTofDigiBdfPar::GetClusterRadiusModel
Int_t GetClusterRadiusModel() const
Definition: CbmTofDigiBdfPar.h:73
CbmTofDigiBdfPar::GetFeeGainSigma
Double_t GetFeeGainSigma() const
Definition: CbmTofDigiBdfPar.h:47
CbmTofDigiBdfPar::GetDetInd
Int_t GetDetInd(Int_t iAddr)
Definition: CbmTofDigiBdfPar.cxx:878
CbmTofDigiBdfPar::fdFeeGainSigma
Double_t fdFeeGainSigma
Definition: CbmTofDigiBdfPar.h:121
CbmTofDigiBdfPar::fdSignalPropSpeed
Double_t fdSignalPropSpeed
Definition: CbmTofDigiBdfPar.h:128
CbmTofDigiBdfPar::putParams
void putParams(FairParamList *)
Definition: CbmTofDigiBdfPar.cxx:88
CbmTofDigiBdfPar::GetDeadtime
Double_t GetDeadtime() const
Definition: CbmTofDigiBdfPar.h:51
CbmTofDigiBdfPar::fbUseExpDigi
Bool_t fbUseExpDigi
Definition: CbmTofDigiBdfPar.h:110
CbmTofDigiBdfPar::operator=
CbmTofDigiBdfPar & operator=(const CbmTofDigiBdfPar &)
CbmTofDigiBdfPar::fiClusterRadiusModel
Int_t fiClusterRadiusModel
Definition: CbmTofDigiBdfPar.h:147
CbmTofDigiBdfPar::CbmTofDigiBdfPar
CbmTofDigiBdfPar(const CbmTofDigiBdfPar &)
CbmTofDigiBdfPar::GetClusterModel
Int_t GetClusterModel() const
Definition: CbmTofDigiBdfPar.h:92
CbmTofDigiBdfPar::UseOnlyPrimaries
Bool_t UseOnlyPrimaries() const
Definition: CbmTofDigiBdfPar.h:87
CbmTofDigiBdfPar::fdTimeResElec
Double_t fdTimeResElec
Definition: CbmTofDigiBdfPar.h:123
CbmTofDigiBdfPar::getParams
Bool_t getParams(FairParamList *)
Definition: CbmTofDigiBdfPar.cxx:131
CbmTofDigiBdfPar::fiChType
std::vector< TArrayI > fiChType
Definition: CbmTofDigiBdfPar.h:137
CbmTofDigiBdfPar::GetTypeInputMap
Int_t GetTypeInputMap(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:601
CbmTofDigiBdfPar::fdFeeTotThr
Double_t fdFeeTotThr
Definition: CbmTofDigiBdfPar.h:122
CbmTofDigiBdfPar::GetChanType
Int_t GetChanType(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:580
CbmTofDigiBdfPar
Parameters class for the CBM ToF digitizer using beam data distributions.
Definition: CbmTofDigiBdfPar.h:30
CbmTofDigiBdfPar::GetLandauSigma
Double_t GetLandauSigma(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:655
CbmTofDigiBdfPar::GetFeeTimeRes
Double_t GetFeeTimeRes() const
Definition: CbmTofDigiBdfPar.h:49
CbmTofDigiBdfPar::fdSigVel
std::vector< TArrayD > fdSigVel
Definition: CbmTofDigiBdfPar.h:135
CbmTofDigiBdfPar::~CbmTofDigiBdfPar
~CbmTofDigiBdfPar(void)
Definition: CbmTofDigiBdfPar.cxx:68
CbmTofDigiBdfPar::fbOneGapTrack
Bool_t fbOneGapTrack
Definition: CbmTofDigiBdfPar.h:115
CbmTofDigiBdfPar::GetLandauMpv
Double_t GetLandauMpv(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:649
CbmTofDigiBdfPar::GetLandauParFromBeamDataFit
Bool_t GetLandauParFromBeamDataFit()
Definition: CbmTofDigiBdfPar.cxx:424
CbmTofDigiBdfPar::GetGapSize
Double_t GetGapSize(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:535
CbmTofDigiBdfPar::fiSmTypeInpMapp
TArrayI fiSmTypeInpMapp
Definition: CbmTofDigiBdfPar.h:148
CbmTofDigiBdfPar::fdGapsEfficiency
std::vector< TArrayD > fdGapsEfficiency
Definition: CbmTofDigiBdfPar.h:150
CbmTofDigiBdfPar::UseExpandedDigi
Bool_t UseExpandedDigi() const
Definition: CbmTofDigiBdfPar.h:85
CbmTofDigiBdfPar::GetSystemResolution
Double_t GetSystemResolution(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:629
CbmTofDigiBdfPar::fdTimeResolution
TArrayD fdTimeResolution
Definition: CbmTofDigiBdfPar.h:151
CbmTofDigiBdfPar::fdEfficiency
TArrayD fdEfficiency
Definition: CbmTofDigiBdfPar.h:149
CbmTofDigiBdfPar::GetNbDet
Int_t GetNbDet() const
Definition: CbmTofDigiBdfPar.cxx:876
CbmTofDigiBdfPar::fiClusterModel
Int_t fiClusterModel
Definition: CbmTofDigiBdfPar.h:118
CbmTofDigiBdfPar::fiNbSmTypes
Int_t fiNbSmTypes
Definition: CbmTofDigiBdfPar.h:129
CbmTofDigiBdfPar::fdMaxTimeDistClust
Double_t fdMaxTimeDistClust
Definition: CbmTofDigiBdfPar.h:159
CbmTofDigiBdfPar::SetInputFile
void SetInputFile(TString FileName)
Definition: CbmTofDigiBdfPar.h:43
CbmTofDigiBdfPar::fsBeamInputFile
TString fsBeamInputFile
Definition: CbmTofDigiBdfPar.h:144
CbmTofDigiBdfPar::fsBeamCalibFile
TString fsBeamCalibFile
Definition: CbmTofDigiBdfPar.h:145
CbmTofDigiBdfPar::GetSignalSpeed
Double_t GetSignalSpeed() const
Definition: CbmTofDigiBdfPar.h:55
CbmTofDigiBdfPar::SetSigVel
void SetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc, Double_t dvel)
Definition: CbmTofDigiBdfPar.cxx:556
CbmTofDigiBdfPar::fdTimeResStart
Double_t fdTimeResStart
Definition: CbmTofDigiBdfPar.h:124
CbmTofDigiBdfPar::GetStartTimeRes
Double_t GetStartTimeRes() const
Definition: CbmTofDigiBdfPar.h:50
CbmTofDigiBdfPar::GetMaxDistAlongCh
Double_t GetMaxDistAlongCh() const
Definition: CbmTofDigiBdfPar.h:97
CbmTofDigiBdfPar::GetDetUId
Int_t GetDetUId(Int_t iDet)
Definition: CbmTofDigiBdfPar.cxx:893
CbmTofDigiBdfPar::fiChOrientation
std::vector< TArrayI > fiChOrientation
Definition: CbmTofDigiBdfPar.h:139
CbmTofDigiBdfPar::clear
void clear(void)
Definition: CbmTofDigiBdfPar.cxx:74
CbmTofDigiBdfPar::fdLandauSigma
TArrayD fdLandauSigma
Definition: CbmTofDigiBdfPar.h:155
CbmTofDigiBdfPar::ClustUseTrackId
Bool_t ClustUseTrackId() const
Definition: CbmTofDigiBdfPar.h:95
CbmTofDigiBdfPar::GetMaxTimeDist
Double_t GetMaxTimeDist() const
Definition: CbmTofDigiBdfPar.cxx:661
CbmTofDigiBdfPar::fdMaxSpaceDistClust
Double_t fdMaxSpaceDistClust
Definition: CbmTofDigiBdfPar.h:160
CbmTofDigiBdfPar::ClearHistos
void ClearHistos()
Definition: CbmTofDigiBdfPar.cxx:79
CbmTofDigiBdfPar::GetEfficiency
Double_t GetEfficiency(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:607
CbmTofDigiBdfPar::GetClustTotHist
TH1 * GetClustTotHist(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:643
CbmTofDigiBdfPar::CbmTofDigiBdfPar
CbmTofDigiBdfPar(const char *name="CbmTofDigiBdfPar", const char *title="BDF Digitization parameters for the TOF detector", const char *context="TestDefaultContext")
CbmTofDigiBdfPar::fh1ClusterSize
std::vector< TH1 * > fh1ClusterSize
Definition: CbmTofDigiBdfPar.h:152
CbmTofDigiBdfPar::GetNbGaps
Int_t GetNbGaps(Int_t iSmType, Int_t iRpc) const
Definition: CbmTofDigiBdfPar.cxx:525
CbmTofDigiBdfPar::GetFeeThreshold
Double_t GetFeeThreshold() const
Definition: CbmTofDigiBdfPar.h:48
CbmTofDigiBdfPar::GetNbSm
Int_t GetNbSm(Int_t iSmType) const
Definition: CbmTofDigiBdfPar.cxx:513
CbmTofDigiBdfPar::LoadBeamtimeHistos
Bool_t LoadBeamtimeHistos()
Definition: CbmTofDigiBdfPar.cxx:314