]>
Commit | Line | Data |
---|---|---|
b0f5e3fc | 1 | #ifndef ALIITSRESPONSESDD_H |
2 | #define ALIITSRESPONSESDD_H | |
3 | ||
7551c5b2 | 4 | #include "TArrayF.h" |
5 | #include <TString.h> | |
6 | #include <iostream.h> | |
b0f5e3fc | 7 | #include "AliITSresponse.h" |
8 | ||
9 | // response for SDD | |
10 | ||
11 | class AliITSresponseSDD : | |
12 | public AliITSresponse { | |
13 | public: | |
14 | // | |
15 | // Configuration methods | |
16 | // | |
17 | ||
18 | AliITSresponseSDD(); | |
03898a57 | 19 | virtual ~AliITSresponseSDD(); |
7551c5b2 | 20 | |
03898a57 | 21 | void SetElectronics(Int_t p1=1) { |
7551c5b2 | 22 | // Electronics: Pascal or OLA |
23 | fElectronics=p1; | |
24 | } | |
25 | ||
03898a57 | 26 | Int_t Electronics() { |
7551c5b2 | 27 | // Electronics: 1 = Pascal; 2 = OLA |
28 | return fElectronics; | |
29 | } | |
b0f5e3fc | 30 | |
03898a57 | 31 | void SetMaxAdc(Float_t p1=1024.) { |
b0f5e3fc | 32 | // Adc-count saturation value |
33 | fMaxAdc=p1; | |
34 | } | |
03898a57 | 35 | Float_t MaxAdc() { |
b0f5e3fc | 36 | // Get maximum Adc-count value |
37 | return fMaxAdc; | |
38 | } | |
39 | ||
03898a57 | 40 | void SetChargeLoss(Float_t p1=0.01) { |
7551c5b2 | 41 | // Set Linear Charge Loss Steepness |
42 | fChargeLoss=p1; | |
b0f5e3fc | 43 | } |
03898a57 | 44 | Float_t ChargeLoss() { |
7551c5b2 | 45 | // Get Charge Loss Coefficient |
46 | return fChargeLoss; | |
b0f5e3fc | 47 | } |
48 | ||
03898a57 | 49 | void SetDynamicRange(Float_t p1=132.) { |
7551c5b2 | 50 | // Set Dynamic Range |
51 | fDynamicRange=p1; | |
52 | } | |
03898a57 | 53 | Float_t DynamicRange() { |
7551c5b2 | 54 | // Get Dynamic Range |
55 | return fDynamicRange; | |
56 | } | |
57 | ||
03898a57 | 58 | void SetDiffCoeff(Float_t p1=3.23,Float_t p2=30.) { |
e8189707 | 59 | // Diffusion coefficients |
b0f5e3fc | 60 | fDiffCoeff=p1; |
e8189707 | 61 | fDiffCoeff1=p2; |
b0f5e3fc | 62 | } |
03898a57 | 63 | void DiffCoeff(Float_t&diff,Float_t&diff1) { |
e8189707 | 64 | // Get diffusion coefficients |
65 | diff = fDiffCoeff; | |
66 | diff1 = fDiffCoeff1; | |
b0f5e3fc | 67 | } |
68 | ||
03898a57 | 69 | void SetDriftSpeed(Float_t p1=7.3) { |
b0f5e3fc | 70 | // Drift velocity |
71 | fDriftSpeed=p1; | |
72 | } | |
03898a57 | 73 | Float_t DriftSpeed() { |
b0f5e3fc | 74 | // drift speed |
75 | return fDriftSpeed; | |
76 | } | |
77 | ||
03898a57 | 78 | void SetTemperature(Float_t p1=23.) { |
b0f5e3fc | 79 | // Temperature |
80 | fTemperature=p1; | |
81 | } | |
03898a57 | 82 | Float_t Temperature() { |
b0f5e3fc | 83 | // Get temperature |
84 | return fTemperature; | |
85 | } | |
86 | ||
03898a57 | 87 | void SetDataType(const char *data="simulated") { |
b0f5e3fc | 88 | // Type of data - real or simulated |
89 | fDataType=data; | |
90 | } | |
03898a57 | 91 | const char *DataType() const { |
b0f5e3fc | 92 | // Get data type |
e8189707 | 93 | return fDataType.Data(); |
b0f5e3fc | 94 | } |
95 | ||
03898a57 | 96 | void SetParamOptions(const char *opt1="same",const char *opt2="same"){ |
b0f5e3fc | 97 | // Parameters: "same" or read from "file" |
98 | fParam1=opt1; fParam2=opt2; | |
99 | } | |
03898a57 | 100 | void ParamOptions(char *opt1,char *opt2) { |
b0f5e3fc | 101 | // options |
e8189707 | 102 | strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data()); |
b0f5e3fc | 103 | } |
104 | ||
03898a57 | 105 | void SetNoiseParam(Float_t n=8.3, Float_t b=20.){ |
b0f5e3fc | 106 | // Noise and baseline |
107 | fNoise=n; fBaseline=b; | |
108 | } | |
03898a57 | 109 | void SetNoiseAfterElectronics(Float_t n=1.6){ |
7551c5b2 | 110 | // Noise after electronics (ADC units) |
111 | fNoiseAfterEl=n; | |
112 | } | |
03898a57 | 113 | void GetNoiseParam(Float_t &n, Float_t &b) { |
b0f5e3fc | 114 | // get noise param |
115 | n=fNoise; b=fBaseline; | |
fa1750f9 | 116 | } |
03898a57 | 117 | Float_t GetNoiseAfterElectronics(){ |
7551c5b2 | 118 | // Noise after electronics (ADC units) |
119 | return fNoiseAfterEl; | |
120 | } | |
fa1750f9 | 121 | |
03898a57 | 122 | void SetDo10to8(Bool_t bitcomp=kTRUE) { |
fa1750f9 | 123 | // set the option for 10 to 8 bit compression |
124 | fBitComp = bitcomp; | |
125 | } | |
126 | ||
127 | Bool_t Do10to8() { | |
128 | // get 10 to 8 compression option | |
129 | return fBitComp; | |
b0f5e3fc | 130 | } |
131 | ||
03898a57 | 132 | void SetZeroSupp (const char *opt="1D") { |
b0f5e3fc | 133 | // Zero-suppression option - could be 1D, 2D or non-ZS |
134 | fOption=opt; | |
135 | } | |
03898a57 | 136 | const char *ZeroSuppOption() const { |
b0f5e3fc | 137 | // Get zero-suppression option |
e8189707 | 138 | return fOption.Data(); |
b0f5e3fc | 139 | } |
03898a57 | 140 | void SetMinVal(Int_t mv=4) { |
b0f5e3fc | 141 | // Min value used in 2D - could be used as a threshold setting |
142 | fMinVal = mv; | |
143 | } | |
03898a57 | 144 | Int_t MinVal() { |
b0f5e3fc | 145 | // min val |
146 | return fMinVal; | |
147 | } | |
148 | ||
03898a57 | 149 | void SetFilenames(const char *f1="",const char *f2="",const char *f3="") { |
b0f5e3fc | 150 | // Set filenames - input, output, parameters .... |
151 | fFileName1=f1; fFileName2=f2; fFileName3=f3; | |
152 | } | |
03898a57 | 153 | void Filenames(char *input,char *baseline,char *param) { |
b0f5e3fc | 154 | // Filenames |
e8189707 | 155 | strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data()); |
156 | strcpy(param,fFileName3.Data()); | |
b0f5e3fc | 157 | } |
158 | ||
159 | ||
03898a57 | 160 | void SetOutputOption(Bool_t write=kFALSE) { |
b0f5e3fc | 161 | // set output option |
162 | fWrite = write; | |
163 | } | |
164 | Bool_t OutputOption() { | |
165 | // output option | |
166 | return fWrite; | |
167 | } | |
168 | // | |
169 | // Compression parameters | |
03898a57 | 170 | void SetCompressParam(Int_t cp[8]); |
b0f5e3fc | 171 | void GiveCompressParam(Int_t *x); |
172 | ||
173 | // | |
174 | // Detector type response methods | |
03898a57 | 175 | void SetNSigmaIntegration(Float_t p1=3.) { |
b0f5e3fc | 176 | // Set number of sigmas over which cluster disintegration is performed |
e8189707 | 177 | fNsigmas=p1; |
b0f5e3fc | 178 | } |
03898a57 | 179 | Float_t NSigmaIntegration() { |
b0f5e3fc | 180 | // Get number of sigmas over which cluster disintegration is performed |
e8189707 | 181 | return fNsigmas; |
b0f5e3fc | 182 | } |
03898a57 | 183 | void SetNLookUp(Int_t p1=121) { |
7551c5b2 | 184 | // Set number of sigmas over which cluster disintegration is performed |
185 | fNcomps=p1; | |
186 | fGaus = new TArrayF(fNcomps+1); | |
187 | for(Int_t i=0; i<=fNcomps; i++) { | |
188 | Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1); | |
189 | (*fGaus)[i] = exp(-((x*x)/2)); | |
190 | // cout << "fGaus[" << i << "]: " << fGaus->At(i) << endl; | |
191 | } | |
192 | } | |
7551c5b2 | 193 | // Get number of intervals in which the gaussian lookup table is divided |
03898a57 | 194 | Int_t GausNLookUp() {return fNcomps;} |
b0f5e3fc | 195 | |
03898a57 | 196 | Float_t IntPH(Float_t eloss) { |
b0f5e3fc | 197 | // Pulse height from scored quantity (eloss) |
198 | return 0.; | |
199 | } | |
03898a57 | 200 | Float_t IntXZ(AliITSsegmentation *) { |
b0f5e3fc | 201 | // Charge disintegration |
202 | return 0.; | |
203 | } | |
03898a57 | 204 | Float_t GausLookUp(Int_t i) { |
7551c5b2 | 205 | if(i<0 || i>=fNcomps) return 0.; |
206 | return fGaus->At(i); | |
207 | } | |
03898a57 | 208 | void Print(); |
209 | ||
210 | ||
211 | private: | |
212 | ||
213 | AliITSresponseSDD(const AliITSresponseSDD &source); // copy constructor | |
214 | AliITSresponseSDD& operator=(const AliITSresponseSDD &source); // ass. op. | |
7551c5b2 | 215 | |
b0f5e3fc | 216 | protected: |
217 | ||
218 | Int_t fCPar[8]; // Hardware compression parameters | |
b0f5e3fc | 219 | Float_t fNoise; // Noise |
220 | Float_t fBaseline; // Baseline | |
7551c5b2 | 221 | Float_t fNoiseAfterEl; // Noise after electronics |
222 | Float_t fDynamicRange; // Set Dynamic Range | |
223 | Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss | |
b0f5e3fc | 224 | Float_t fTemperature; // Temperature |
225 | Float_t fDriftSpeed; // Drift velocity | |
7551c5b2 | 226 | Int_t fElectronics; // Electronics |
b0f5e3fc | 227 | |
228 | Float_t fMaxAdc; // Adc saturation value | |
e8189707 | 229 | Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time) |
230 | Float_t fDiffCoeff1; // Diffusion Coefficient (constant term) | |
231 | Float_t fNsigmas; // Number of sigmas over which charge disintegration | |
232 | // is performed | |
7551c5b2 | 233 | TArrayF *fGaus; // Gaussian lookup table for signal generation |
234 | Int_t fNcomps; // Number of samplings along the gaussian | |
b0f5e3fc | 235 | |
b0f5e3fc | 236 | Int_t fMinVal; // Min value used in 2D zero-suppression algo |
237 | ||
238 | Bool_t fWrite; // Write option for the compression algorithms | |
fa1750f9 | 239 | Bool_t fBitComp; // 10 to 8 bit compression option |
240 | ||
e8189707 | 241 | TString fOption; // Zero-suppresion option (1D, 2D or none) |
242 | TString fParam1; // Read baselines from file option | |
243 | TString fParam2; // Read compression algo thresholds from file | |
244 | ||
245 | TString fDataType; // data type - real or simulated | |
246 | TString fFileName1; // input keys : run, module # | |
247 | TString fFileName2; // baseline & noise val or output coded // signal or monitored bgr. | |
248 | TString fFileName3; // param values or output coded signal | |
b0f5e3fc | 249 | |
03898a57 | 250 | ClassDef(AliITSresponseSDD,2) // SDD response |
b0f5e3fc | 251 | |
252 | }; | |
253 | #endif | |
254 | ||
255 | ||
256 | ||
257 | ||
258 | ||
259 | ||
260 |