1 #ifndef ALIITSRESPONSESDD_H
2 #define ALIITSRESPONSESDD_H
7 #include "AliITSresponse.h"
11 class AliITSresponseSDD :
12 public AliITSresponse {
15 // Configuration methods
19 AliITSresponseSDD(const char *dataType);
21 virtual ~AliITSresponseSDD();
23 void SetElectronics(Int_t p1=1) {
24 // Electronics: Pascal (1) or OLA (2)
29 // Electronics: 1 = Pascal; 2 = OLA
33 void SetMaxAdc(Float_t p1=1024.) {
34 // Adc-count saturation value
38 // Get maximum Adc-count value
42 void SetChargeLoss(Float_t p1=0.0) {
43 // Set Linear Charge Loss Steepness // 0.01 for 20%
46 Float_t ChargeLoss() {
47 // Get Charge Loss Coefficient
51 void SetDynamicRange(Float_t p1=132.) {
55 Float_t DynamicRange() {
60 void SetDiffCoeff(Float_t p1=3.23,Float_t p2=30.) {
61 // Diffusion coefficients
65 void DiffCoeff(Float_t&diff,Float_t&diff1) {
66 // Get diffusion coefficients
71 void SetDriftSpeed(Float_t p1=7.3) {
75 Float_t DriftSpeed() {
80 void SetTemperature(Float_t p1=23.) {
84 Float_t Temperature() {
89 void SetDataType(const char *data="simulated") {
90 // Type of data - real or simulated
93 const char *DataType() const {
95 return fDataType.Data();
98 void SetParamOptions(const char *opt1="same",const char *opt2="same"){
99 // Parameters: "same" or read from "file"
100 fParam1=opt1; fParam2=opt2;
102 void ParamOptions(char *opt1,char *opt2) {
104 strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());
107 void SetNoiseParam(Float_t n=0., Float_t b=20.){
108 // Noise and baseline // 8.3 for ALICE with beam test measurements
109 fNoise=n; fBaseline=b;
111 void SetNoiseAfterElectronics(Float_t n=0.){
112 // Noise after electronics (ADC units) // 1.6 for ALICE from beam test measurements
115 void GetNoiseParam(Float_t &n, Float_t &b) {
117 n=fNoise; b=fBaseline;
119 Float_t GetNoiseAfterElectronics(){
120 // Noise after electronics (ADC units)
121 return fNoiseAfterEl;
124 void SetDo10to8(Bool_t bitcomp=kTRUE) {
125 // set the option for 10 to 8 bit compression
130 // get 10 to 8 compression option
134 void SetZeroSupp (const char *opt="1D") {
135 // Zero-suppression option - could be 1D, 2D or non-ZS
138 const char *ZeroSuppOption() const {
139 // Get zero-suppression option
140 return fOption.Data();
142 void SetMinVal(Int_t mv=4) {
143 // Min value used in 2D - could be used as a threshold setting
151 void SetFilenames(const char *f1="",const char *f2="",const char *f3="") {
152 // Set filenames - input, output, parameters ....
153 fFileName1=f1; fFileName2=f2; fFileName3=f3;
155 void Filenames(char *input,char *baseline,char *param) {
157 strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data());
158 strcpy(param,fFileName3.Data());
162 void SetOutputOption(Bool_t write=kFALSE) {
166 Bool_t OutputOption() {
171 // Compression parameters
172 void SetCompressParam(Int_t cp[8]);
173 void GiveCompressParam(Int_t *x);
176 // Detector type response methods
177 void SetNSigmaIntegration(Float_t p1=3.) {
178 // Set number of sigmas over which cluster disintegration is performed
181 Float_t NSigmaIntegration() {
182 // Get number of sigmas over which cluster disintegration is performed
185 void SetNLookUp(Int_t p1=121) {
186 // Set number of sigmas over which cluster disintegration is performed
188 fGaus = new TArrayF(fNcomps+1);
189 for(Int_t i=0; i<=fNcomps; i++) {
190 Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
191 (*fGaus)[i] = exp(-((x*x)/2));
192 // cout << "fGaus[" << i << "]: " << fGaus->At(i) << endl;
195 // Get number of intervals in which the gaussian lookup table is divided
196 Int_t GausNLookUp() {return fNcomps;}
198 Float_t IntPH(Float_t eloss) {
199 // Pulse height from scored quantity (eloss)
202 Float_t IntXZ(AliITSsegmentation *) {
203 // Charge disintegration
206 Float_t GausLookUp(Int_t i) {
207 if(i<0 || i>=fNcomps) return 0.;
210 void SetDeadChannels(Int_t nmodules=0, Int_t nchips=0, Int_t nchannels=0);
212 Int_t GetDeadModules() { return fDeadModules; }
213 Int_t GetDeadChips() { return fDeadChips; }
214 Int_t GetDeadChannels() { return fDeadChannels; }
215 Float_t Gain( Int_t mod, Int_t chip, Int_t ch)
216 { return fGain[mod][chip][ch]; }
218 // these functions should be move to AliITSsegmentationSDD
219 const Int_t Modules() const { return fModules; } // Total number of SDD modules
220 const Int_t Chips() const { return fChips; } // Number of chips/module
221 const Int_t Channels() const { return fChannels; } // Number of channels/chip
230 AliITSresponseSDD(const AliITSresponseSDD &source); // copy constructor
231 AliITSresponseSDD& operator=(const AliITSresponseSDD &source); // ass. op.
234 // these statis const should be move to AliITSsegmentationSDD
235 static const Int_t fModules = 520; // Total number of SDD modules
236 static const Int_t fChips = 4; // Number of chips/module
237 static const Int_t fChannels = 64; // Number of channels/chip
240 Int_t fDeadModules; // Total number of dead SDD modules
241 Int_t fDeadChips; // Number of dead chips
242 Int_t fDeadChannels; // Number of dead channels
243 Float_t fGain[fModules][fChips][fChannels]; // Array for channel gains
245 Int_t fCPar[8]; // Hardware compression parameters
246 Float_t fNoise; // Noise
247 Float_t fBaseline; // Baseline
248 Float_t fNoiseAfterEl; // Noise after electronics
249 Float_t fDynamicRange; // Set Dynamic Range
250 Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss
251 Float_t fTemperature; // Temperature
252 Float_t fDriftSpeed; // Drift velocity
253 Int_t fElectronics; // Electronics
255 Float_t fMaxAdc; // Adc saturation value
256 Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time)
257 Float_t fDiffCoeff1; // Diffusion Coefficient (constant term)
258 Float_t fNsigmas; // Number of sigmas over which charge disintegration
260 TArrayF *fGaus; // Gaussian lookup table for signal generation
261 Int_t fNcomps; // Number of samplings along the gaussian
263 Int_t fMinVal; // Min value used in 2D zero-suppression algo
265 Bool_t fWrite; // Write option for the compression algorithms
266 Bool_t fBitComp; // 10 to 8 bit compression option
268 TString fOption; // Zero-suppresion option (1D, 2D or none)
269 TString fParam1; // Read baselines from file option
270 TString fParam2; // Read compression algo thresholds from file
272 TString fDataType; // data type - real or simulated
273 TString fFileName1; // input keys : run, module #
274 TString fFileName2; // baseline & noise val or output coded // signal or monitored bgr.
275 TString fFileName3; // param values or output coded signal
277 ClassDef(AliITSresponseSDD,2) // SDD response