]>
Commit | Line | Data |
---|---|---|
b0f5e3fc | 1 | #ifndef ALIITSRESPONSESDD_H |
2 | #define ALIITSRESPONSESDD_H | |
48058160 | 3 | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* | |
8 | $Id$ | |
9 | */ | |
88cb7938 | 10 | |
7551c5b2 | 11 | #include "TArrayF.h" |
12 | #include <TString.h> | |
4ae5bbc4 | 13 | #include <Riostream.h> |
b0f5e3fc | 14 | #include "AliITSresponse.h" |
15 | ||
16 | // response for SDD | |
17 | ||
48058160 | 18 | class AliITSresponseSDD : public AliITSresponse { |
19 | public: | |
50d05d7b | 20 | // |
21 | // Configuration methods | |
22 | // | |
b0f5e3fc | 23 | |
48058160 | 24 | AliITSresponseSDD(); |
25 | AliITSresponseSDD(const char *dataType); | |
26 | virtual ~AliITSresponseSDD(); | |
7551c5b2 | 27 | |
48058160 | 28 | void SetElectronics(Int_t p1=1) {// Electronics: Pascal (1) or OLA (2) |
29 | fElectronics=p1;} | |
bff7ba71 | 30 | Int_t Electronics() const {// Electronics: 1 = Pascal; 2 = OLA |
48058160 | 31 | return fElectronics;} |
32 | void SetMaxAdc(Float_t p1=1024.) {// Adc-count saturation value | |
33 | fMaxAdc=p1;} | |
bff7ba71 | 34 | Float_t MaxAdc() const {// Get maximum Adc-count value |
48058160 | 35 | return fMaxAdc;} |
36 | void SetChargeLoss(Float_t p1=0.0) { | |
37 | // Set Linear Charge Loss Steepness // 0.01 for 20% | |
38 | fChargeLoss=p1;} | |
bff7ba71 | 39 | Float_t ChargeLoss() const {// Get Charge Loss Coefficient |
48058160 | 40 | return fChargeLoss;} |
41 | void SetDynamicRange(Float_t p1=132.) {// Set Dynamic Range | |
42 | fDynamicRange=p1;} | |
bff7ba71 | 43 | Float_t DynamicRange() const {// Get Dynamic Range |
48058160 | 44 | return fDynamicRange;} |
45 | void SetDiffCoeff(Float_t p1=3.23,Float_t p2=30.) { | |
46 | // Diffusion coefficients | |
47 | fDiffCoeff=p1;fDiffCoeff1=p2;} | |
48 | void DiffCoeff(Float_t&diff,Float_t&diff1) {// Get diffusion coefficients | |
49 | diff = fDiffCoeff;diff1 = fDiffCoeff1;} | |
50 | void SetDriftSpeed(Float_t p1=7.3) {// Drift velocity | |
51 | fDriftSpeed=p1;} | |
bff7ba71 | 52 | Float_t DriftSpeed() const {// drift speed |
48058160 | 53 | return fDriftSpeed;} |
54 | void SetTemperature(Float_t p1=23.) {// Temperature | |
55 | fTemperature=p1;} | |
bff7ba71 | 56 | Float_t Temperature() const {// Get temperature |
48058160 | 57 | return fTemperature;} |
58 | void SetDataType(const char *data="simulated") { | |
59 | // Type of data - real or simulated | |
60 | fDataType=data;} | |
61 | const char *DataType() const {// Get data type | |
62 | return fDataType.Data();} | |
63 | void SetParamOptions(const char *opt1="same",const char *opt2="same"){ | |
64 | // Parameters: "same" or read from "file" | |
65 | fParam1=opt1; fParam2=opt2;} | |
66 | void ParamOptions(char *opt1,char *opt2) {// options | |
67 | strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());} | |
68 | void SetNoiseParam(Float_t n=10., Float_t b=20.){ | |
69 | // Noise and baseline // 10 for ALICE with beam test measurements 2001 | |
70 | fNoise=n; fBaseline=b;} | |
71 | void SetNoiseAfterElectronics(Float_t n=2.38){ | |
72 | // Noise after electronics (ADC units) | |
73 | // 2.36 for ALICE from beam test measurements 2001 | |
74 | fNoiseAfterEl=n;} | |
75 | void GetNoiseParam(Float_t &n, Float_t &b) {// get noise param | |
76 | n=fNoise; b=fBaseline;} | |
77 | Float_t GetNoiseAfterElectronics(){ | |
78 | // Noise after electronics (ADC units) | |
79 | return fNoiseAfterEl;} | |
80 | void SetJitterError(Float_t jitter=20) { | |
81 | // set Jitter error (20 um for ALICE from beam test measurements 2001) | |
82 | fJitterError=jitter;} | |
83 | Float_t JitterError() {// set Jitter error | |
84 | return fJitterError;} | |
85 | void SetDo10to8(Bool_t bitcomp=kTRUE) { | |
86 | // set the option for 10 to 8 bit compression | |
87 | fBitComp = bitcomp;} | |
bff7ba71 | 88 | Bool_t Do10to8() const {// get 10 to 8 compression option |
48058160 | 89 | return fBitComp;} |
90 | void SetZeroSupp (const char *opt="1D") { | |
91 | // Zero-suppression option - could be 1D, 2D or non-ZS | |
92 | fOption=opt;} | |
93 | const char *ZeroSuppOption() const {// Get zero-suppression option | |
94 | return fOption.Data();} | |
95 | void SetMinVal(Int_t mv=4) { | |
96 | // Min value used in 2D - could be used as a threshold setting | |
97 | fMinVal = mv;} | |
bff7ba71 | 98 | Int_t MinVal() const {// min val |
48058160 | 99 | return fMinVal;} |
100 | void SetFilenames(const char *f1="",const char *f2="",const char *f3=""){ | |
101 | // Set filenames - input, output, parameters .... | |
102 | fFileName1=f1; fFileName2=f2; fFileName3=f3;} | |
103 | void Filenames(char *input,char *baseline,char *param) {// Filenames | |
104 | strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data()); | |
105 | strcpy(param,fFileName3.Data());} | |
106 | void SetOutputOption(Bool_t write=kFALSE) {// set output option | |
107 | fWrite = write;} | |
bff7ba71 | 108 | Bool_t OutputOption() const {// output option |
48058160 | 109 | return fWrite;} |
110 | // | |
111 | // Compression parameters | |
112 | void SetCompressParam(Int_t cp[8]); | |
113 | void GiveCompressParam(Int_t *x); | |
114 | // | |
115 | // Detector type response methods | |
116 | void SetNSigmaIntegration(Float_t p1=3.) { | |
117 | // Set number of sigmas over which cluster disintegration is performed | |
118 | fNsigmas=p1;} | |
bff7ba71 | 119 | Float_t NSigmaIntegration() const { |
48058160 | 120 | // Get number of sigmas over which cluster disintegration is performed |
121 | return fNsigmas;} | |
122 | void SetNLookUp(Int_t p1=121) { | |
123 | // Set number of sigmas over which cluster disintegration is performed | |
124 | fNcomps=p1; | |
125 | fGaus = new TArrayF(fNcomps+1); | |
126 | for(Int_t i=0; i<=fNcomps; i++) { | |
127 | Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1); | |
128 | (*fGaus)[i] = exp(-((x*x)/2)); | |
129 | // cout << "fGaus[" << i << "]: " << fGaus->At(i) << endl; | |
130 | } | |
7551c5b2 | 131 | } |
7551c5b2 | 132 | // Get number of intervals in which the gaussian lookup table is divided |
bff7ba71 | 133 | Int_t GausNLookUp() const {return fNcomps;} |
134 | Float_t IntPH(Float_t) const {// Pulse height from scored quantity (eloss) | |
48058160 | 135 | return 0.;} |
bff7ba71 | 136 | Float_t IntXZ(AliITSsegmentation *) const {// Charge disintegration |
48058160 | 137 | return 0.;} |
bff7ba71 | 138 | Float_t GausLookUp(Int_t i) const { |
48058160 | 139 | if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);} |
140 | void SetDeadChannels(Int_t nmodules=0, Int_t nchips=0, Int_t nchannels=0); | |
141 | Int_t GetDeadModules() { return fDeadModules; } | |
142 | Int_t GetDeadChips() { return fDeadChips; } | |
143 | Int_t GetDeadChannels() { return fDeadChannels; } | |
144 | Float_t Gain(Int_t mod,Int_t chip,Int_t ch){return fGain[mod][chip][ch]; } | |
145 | // these functions should be move to AliITSsegmentationSDD | |
146 | const Int_t Modules() const{return fModules;}// Total number of SDD modules | |
147 | const Int_t Chips() const{return fChips;} // Number of chips/module | |
148 | const Int_t Channels() const { return fChannels;}// Number of channels/chip | |
149 | //******** | |
150 | void PrintGains(); | |
151 | void Print(); | |
03898a57 | 152 | |
48058160 | 153 | private: |
154 | AliITSresponseSDD(const AliITSresponseSDD &source); // copy constructor | |
155 | AliITSresponseSDD& operator=(const AliITSresponseSDD &source); // ass. op. | |
2aea926d | 156 | |
48058160 | 157 | protected: |
158 | // these statis const should be move to AliITSsegmentationSDD | |
159 | static const Int_t fModules = 520; // Total number of SDD modules | |
160 | static const Int_t fChips = 4; // Number of chips/module | |
161 | static const Int_t fChannels = 64; // Number of channels/chip | |
162 | //******* | |
163 | Int_t fDeadModules; // Total number of dead SDD modules | |
164 | Int_t fDeadChips; // Number of dead chips | |
165 | Int_t fDeadChannels; // Number of dead channels | |
166 | Float_t fGain[fModules][fChips][fChannels]; // Array for channel gains | |
167 | Int_t fCPar[8]; // Hardware compression parameters | |
168 | Float_t fNoise; // Noise | |
169 | Float_t fBaseline; // Baseline | |
170 | Float_t fNoiseAfterEl; // Noise after electronics | |
171 | Float_t fJitterError; // jitter error | |
172 | Float_t fDynamicRange; // Set Dynamic Range | |
173 | Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss | |
174 | Float_t fTemperature; // Temperature | |
175 | Float_t fDriftSpeed; // Drift velocity | |
176 | Int_t fElectronics; // Electronics | |
177 | Float_t fMaxAdc; // Adc saturation value | |
178 | Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time) | |
179 | Float_t fDiffCoeff1; // Diffusion Coefficient (constant term) | |
180 | Float_t fNsigmas; // Number of sigmas over which charge disintegration | |
181 | // is performed | |
182 | TArrayF *fGaus; // Gaussian lookup table for signal generation | |
183 | Int_t fNcomps; // Number of samplings along the gaussian | |
184 | Int_t fMinVal; // Min value used in 2D zero-suppression algo | |
185 | Bool_t fWrite; // Write option for the compression algorithms | |
186 | Bool_t fBitComp; // 10 to 8 bit compression option | |
187 | TString fOption; // Zero-suppresion option (1D, 2D or none) | |
188 | TString fParam1; // Read baselines from file option | |
189 | TString fParam2; // Read compression algo thresholds from file | |
190 | TString fDataType; // data type - real or simulated | |
191 | TString fFileName1; // input keys : run, module # | |
192 | TString fFileName2; // baseline & noise val or output code | |
193 | // signal or monitored bgr. | |
194 | TString fFileName3; // param values or output coded signal | |
fa1750f9 | 195 | |
800f9ca4 | 196 | ClassDef(AliITSresponseSDD,3) // SDD response |
50d05d7b | 197 | |
198 | }; | |
b0f5e3fc | 199 | #endif |