CbmRoot
Loading...
Searching...
No Matches
CbmTofDigiBdfPar.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau, Florian Uhlig [committer] */
4
17#ifndef CBMTOFDIGIBDFPAR_H
18#define CBMTOFDIGIBDFPAR_H 1
19
20#include <CbmTofAddress.h> // for accessors
21#include <CbmTofHit.h> // for accessors
22
23#include <FairParGenericSet.h> // for FairParGenericSet
24
25#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
26#include <RtypesCore.h> // for Int_t, Double_t, Bool_t
27#include <TArrayD.h> // for TArrayD
28#include <TArrayI.h> // for TArrayI
29#include <TString.h> // for TString
30
31#include <map> // for map
32#include <vector> // for vector
33
34class FairParamList;
35class TH1;
36
37class CbmTofDigiBdfPar : public FairParGenericSet {
38 public:
39 CbmTofDigiBdfPar(const char* name = "CbmTofDigiBdfPar",
40 const char* title = "BDF Digitization parameters for the TOF detector",
41 const char* context = "TestDefaultContext");
43 void clear(void);
44 void putParams(FairParamList*);
45 Bool_t getParams(FairParamList*);
46 void printParams();
47 Bool_t LoadBeamtimeHistos();
48
49 void SetInputFile(TString FileName) { fsBeamInputFile = FileName; }
50 void SetCalibFile(TString FileName) { fsBeamCalibFile = FileName; }
51
52 // Fee properties
53 Double_t GetFeeGainSigma() const { return fdFeeGainSigma; };
54 Double_t GetFeeThreshold() const { return fdFeeTotThr; };
55 Double_t GetFeeTimeRes() const { return fdTimeResElec; };
56 Double_t GetStartTimeRes() const { return fdTimeResStart; };
57 Double_t GetDeadtime() const { return fdDeadtime; };
58
59
60 // Geometry variables
61 Double_t GetSignalSpeed() const { return fdSignalPropSpeed; };
62 Int_t GetNbSmTypes() const { return fiNbSmTypes; };
63 Int_t GetNbSm(Int_t iSmType) const;
64 Int_t GetNbRpc(Int_t iSmType) const;
65 Int_t GetNbGaps(Int_t iSmType, Int_t iRpc) const;
66 Double_t GetGapSize(Int_t iSmType, Int_t iRpc) const;
67 Double_t GetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc) const;
68 void SetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc, Double_t dvel);
69 Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const;
70 Int_t GetChanType(Int_t iSmType, Int_t iRpc) const;
71 Int_t GetChanOrient(Int_t iSmType, Int_t iRpc) const;
72 Int_t GetNbDet() const;
73 Int_t GetDetUId(Int_t iDet);
74 Int_t GetDetInd(Int_t iAddr);
75 Int_t GetTrackingStation(Int_t iSmType, Int_t iSm, Int_t iRpc) const;
82
83 // Beamtime variables
84 TString GetInputFileName() const { return fsBeamInputFile; };
85 TString GetCalibFileName() const { return fsBeamCalibFile; };
87 Int_t GetTypeInputMap(Int_t iSmType) const;
88 Double_t GetEfficiency(Int_t iSmType) const;
89 Double_t GetGapEfficiency(Int_t iSmType, Int_t iRpc) const;
90 Double_t GetResolution(Int_t iSmType) const;
91 Double_t GetSystemResolution(Int_t iSmType) const;
92 TH1* GetClustSizeHist(Int_t iSmType) const;
93 TH1* GetClustTotHist(Int_t iSmType) const;
94 Double_t GetLandauMpv(Int_t iSmType) const;
95 Double_t GetLandauSigma(Int_t iSmType) const;
96
97 // Digi type to use
98 Bool_t UseExpandedDigi() const { return fbUseExpDigi; };
99 // Switch to use only primary tracks
100 Bool_t UseOnlyPrimaries() const { return fbUseOnlyPrim; };
101 // Switch to use only primary tracks
102 Bool_t UseOneGapPerTrk() const { return fbOneGapTrack; };
103
104 // Cluster Model to use
105 Int_t GetClusterModel() const { return fiClusterModel; };
106
107 // Simple clusterizer parameters
108 Bool_t ClustUseTrackId() const { return fbMulUseTrackId; };
109 Double_t GetMaxTimeDist() const;
110 Double_t GetMaxDistAlongCh() const { return fdMaxSpaceDistClust; };
111
112 // Cleaning junk
113 void ClearHistos();
114
115 private:
116 // Fit the cluster size distribution and use it to extract
117 // the values of the parameter to use for the Landau Cluster
118 // size distribution. If failing use default values from parameter
119 // file.
121
122 // Digi type to use
124 // Switch to use only primary tracks
126 // Switch method to try avoiding counting all gaps/TofPoint from same track
127 // with different time/charge
129
130 // Cluster Model to use
132
133 // Fee properties
134 Double_t fdFeeGainSigma; // -> 0 makes gain 1 for all channels
135 Double_t fdFeeTotThr; //
136 Double_t fdTimeResElec; //
137 Double_t fdTimeResStart; //
138 Double_t fdDeadtime; //
139
140 // Geometry variables, text to be generated in the CreateGeometry macros
141 Double_t fdSignalPropSpeed; // -> in parameter?
142 Int_t fiNbSmTypes; //
144 TArrayI fiNbSm; // [fiNbSmTypes]
145 TArrayI fiNbRpc; // [fiNbSmTypes]
146 std::vector<TArrayI> fiNbGaps; // [fiNbSmTypes][fiNbRpc]
147 std::vector<TArrayD> fdGapSize; // [fiNbSmTypes][fiNbRpc]
148 std::vector<TArrayD> fdSigVel; // [fiNbSmTypes][fiNbSm*fiNbRpc] // Signal velocity
149 std::vector<TArrayI> fiTrkStation; // [fiNbSmTypes][fiNbSm*fiNbRpc] // Signal velocity
150 std::vector<TArrayI> fiNbCh; // [fiNbSmTypes][fiNbRpc]
151 std::vector<TArrayI> fiChType; // [fiNbSmTypes][fiNbRpc]
152 std::vector<TArrayI>
153 fiChOrientation; // [fiNbSmTypes][fiNbRpc] -> in parameter? Possibility to Readout from geometry angles?
154 TArrayI fiDetUId; // [NbDet]
155 std::map<Int_t, Int_t> fMapDetInd; // [NbDet]
156
157 // Beamtime variables
160 Int_t
161 fiClusterRadiusModel; // 0 = fixed value, 1 = Landau distrib. with fixed param, 2 = Landau distrib. with bdf params
163 TArrayD fdEfficiency; // [fiNbSmTypes] -> in parameter?
164 std::vector<TArrayD> fdGapsEfficiency; // [fiNbSmTypes][fiNbRpc]
165 TArrayD fdTimeResolution; // [fiNbSmTypes] -> in parameter?
166 std::vector<TH1*> fh1ClusterSize; // [fiNbSmTypes] -> in parameter?
167 std::vector<TH1*> fh1ClusterTot; // [fiNbSmTypes] -> in parameter?
168 TArrayD fdLandauMpv; // [fiNbSmTypes] -> in parameter?
169 TArrayD fdLandauSigma; // [fiNbSmTypes] -> in parameter?
170
171 // Simple clusterizer parameters
175
178
179 ClassDef(CbmTofDigiBdfPar, 1)
180};
181
182#endif // CBMTOFDIGIBDFPAR_H
int32_t GetAddress() const
Definition CbmHit.h:74
static int32_t GetSmId(uint32_t address)
static int32_t GetRpcId(uint32_t address)
static int32_t GetSmType(uint32_t address)
Parameters class for the CBM ToF digitizer using beam data distributions.
Int_t GetClusterModel() const
void SetCalibFile(TString FileName)
std::vector< TArrayD > fdGapSize
Double_t GetFeeTimeRes() const
Int_t GetNbSmTypes() const
CbmTofDigiBdfPar(const char *name="CbmTofDigiBdfPar", const char *title="BDF Digitization parameters for the TOF detector", const char *context="TestDefaultContext")
Double_t GetResolution(Int_t iSmType) const
Int_t GetClusterRadiusModel() const
void SetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc, Double_t dvel)
Double_t GetGapSize(Int_t iSmType, Int_t iRpc) const
Int_t GetTypeInputMap(Int_t iSmType) const
Bool_t UseOnlyPrimaries() const
Double_t GetFeeGainSigma() const
std::vector< TArrayI > fiTrkStation
Int_t GetNbSm(Int_t iSmType) const
Double_t GetMaxDistAlongCh() const
Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const
Int_t GetDetInd(Int_t iAddr)
Double_t GetEfficiency(Int_t iSmType) const
void SetInputFile(TString FileName)
std::vector< TH1 * > fh1ClusterTot
Bool_t getParams(FairParamList *)
std::vector< TArrayD > fdSigVel
Bool_t UseOneGapPerTrk() const
std::vector< TArrayI > fiNbGaps
Double_t GetGapEfficiency(Int_t iSmType, Int_t iRpc) const
Int_t GetTrackingStation(CbmTofHit *pHit) const
Double_t GetFeeThreshold() const
Bool_t ClustUseTrackId() const
TH1 * GetClustSizeHist(Int_t iSmType) const
std::vector< TArrayI > fiNbCh
Bool_t GetLandauParFromBeamDataFit()
Int_t GetNbGaps(Int_t iSmType, Int_t iRpc) const
void putParams(FairParamList *)
Int_t GetChanType(Int_t iSmType, Int_t iRpc) const
Int_t GetNbRpc(Int_t iSmType) const
Double_t GetLandauMpv(Int_t iSmType) const
Int_t GetNbTrackingStations() const
Bool_t UseExpandedDigi() const
Double_t GetMaxTimeDist() const
std::vector< TArrayI > fiChOrientation
std::vector< TArrayD > fdGapsEfficiency
Double_t GetDeadtime() const
Double_t GetSystemResolution(Int_t iSmType) const
CbmTofDigiBdfPar & operator=(const CbmTofDigiBdfPar &)
Int_t GetChanOrient(Int_t iSmType, Int_t iRpc) const
std::vector< TH1 * > fh1ClusterSize
Double_t GetLandauSigma(Int_t iSmType) const
Int_t GetDetUId(Int_t iDet)
TString GetCalibFileName() const
Double_t GetSignalSpeed() const
std::vector< TArrayI > fiChType
Int_t GetTrackingStation(Int_t iSmType, Int_t iSm, Int_t iRpc) const
Double_t GetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc) const
TH1 * GetClustTotHist(Int_t iSmType) const
CbmTofDigiBdfPar(const CbmTofDigiBdfPar &)
TString GetInputFileName() const
Double_t GetStartTimeRes() const
std::map< Int_t, Int_t > fMapDetInd