1 #ifndef ALIITSRESPONSE_H
2 #define ALIITSRESPONSE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
11 class AliITSsegmentation;
15 //----------------------------------------------
17 // ITS response virtual base class
19 class AliITSresponse : public TObject {
21 // Default Constructor
23 // Standard Constructor
24 AliITSresponse(Double_t Thickness);
26 virtual ~AliITSresponse() {}
28 // Configuration methods
32 virtual void SetElectronics(Int_t) = 0;
34 virtual Int_t Electronics() const = 0;
36 // Set maximum Adc-count value
37 virtual void SetMaxAdc(Float_t) = 0;
38 // Get maximum Adc-count value
39 virtual Float_t MaxAdc() const = 0;
41 // Set maximum Adc-top value
42 virtual void SetDynamicRange(Float_t) = 0;
43 // Get maximum Adc-top value
44 virtual Float_t DynamicRange() const = 0;
46 // Set Charge Loss Linear Coefficient
47 virtual void SetChargeLoss(Float_t) = 0;
48 // Get Charge Loss Linear Coefficient
49 virtual Float_t ChargeLoss() const = 0;
51 // Set GeVcharge value
52 virtual void SetGeVToCharge(Float_t gc=2.778E+8){fGeVcharge = gc;}
53 // Returns the value fGeVcharge
54 virtual Float_t GetGeVToCharge() const {return fGeVcharge;}
55 // Converts deposited energy to number of electrons liberated
56 virtual Float_t GeVToCharge(Float_t gev) const {return gev*fGeVcharge;}
58 // Diffusion coefficient
59 virtual void SetDiffCoeff(Float_t, Float_t) = 0;
60 // Get diffusion coefficients
61 virtual void DiffCoeff(Float_t &,Float_t &) const = 0;
63 // Temperature in [degree K]
64 virtual void SetTemperature(Float_t t=300.0) {fT = t;}
65 // Get temperature [degree K]
66 virtual Float_t Temperature() const {return fT;}
67 // Type of data - real or simulated
68 virtual void SetDataType(const char *data="simulated") {fDataType=data;}
69 // Set the impurity concentrations in [#/cm^3]
70 virtual void SetImpurity(Double_t n=0.0){fN = n;}
71 // Returns the impurity consentration in [#/cm^3]
72 virtual Double_t Impurity() const {return fN;}
73 // Sets the applied ratio distance/voltage [cm/volt]
74 virtual void SetDistanceOverVoltage(Double_t d,Double_t v){fdv = d/v;}
75 // Sets the applied ration distance/voltage [cm/volt]. Default value
76 // is 300E-4cm/80 volts = 0.000375 cm/volts
77 virtual void SetDistanceOverVoltage(Double_t dv=0.000375){fdv = dv;}
78 // Returns the ration distance/voltage
79 virtual Double_t DistanceOverVoltage() const {return fdv;}
81 virtual const char *DataType() const {return fDataType.Data();}
83 // Set parameters options: "same" or read from "file" or "SetInvalid" or...
84 virtual void SetParamOptions(const char*,const char*) = 0;
85 // Set noise parameters
86 virtual void SetNoiseParam(Float_t, Float_t) = 0;
87 // Number of parameters to be set
88 virtual void SetNDetParam(Int_t) = 0;
89 // Set detector parameters: gain, coupling ...
90 virtual void SetDetParam(Float_t *) = 0;
93 virtual void ParamOptions(char *,char*) const = 0;
94 virtual Int_t NDetParam() const = 0;
95 virtual void GetDetParam(Float_t *) const = 0;
96 virtual void GetNoiseParam(Float_t&, Float_t&) const = 0;
98 // Zero-suppression option - could be 1D, 2D or non-ZeroSuppressed
99 virtual void SetZeroSupp(const char*) = 0;
100 // Get zero-suppression option
101 virtual const char *ZeroSuppOption() const = 0;
103 virtual void SetThresholds(Float_t, Float_t) = 0;
104 virtual void Thresholds(Float_t &, Float_t &) const = 0;
107 virtual void SetFilenames(const char *f1="",const char *f2="",const char *f3=""){
108 // Set filenames - input, output, parameters ....
109 fFileName1=f1; fFileName2=f2; fFileName3=f3;}
111 virtual void Filenames(char* input,char* baseline,char* param) {
112 strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data());
113 strcpy(param,fFileName3.Data());}
115 virtual void SetDriftSpeed(Float_t p1) = 0;
116 virtual Float_t DriftSpeed() const = 0;
117 virtual void SetOutputOption(Bool_t write=kFALSE) {// set output option
119 virtual Bool_t OutputOption() const {return fWrite;}
120 virtual Bool_t Do10to8() const {return kTRUE;}
121 virtual void GiveCompressParam(Int_t *) const =0;
123 // Detector type response methods
124 // Set number of sigmas over which cluster disintegration is performed
125 virtual void SetNSigmaIntegration(Float_t) = 0;
126 // Get number of sigmas over which cluster disintegration is performed
127 virtual Float_t NSigmaIntegration() const = 0;
128 // Set number of bins for the gaussian lookup table
129 virtual void SetNLookUp(Int_t) = 0;
130 // Get number of bins for the gaussian lookup table
131 virtual Int_t GausNLookUp() const {return 0;}
132 // Get scaling factor for bin i-th from the gaussian lookup table
133 virtual Float_t GausLookUp(Int_t) const {return 0.;}
134 // Set sigmas of the charge spread function
135 virtual void SetSigmaSpread(Float_t, Float_t) = 0;
136 // Get sigmas for the charge spread
137 virtual void SigmaSpread(Float_t &,Float_t &) const = 0;
138 // Pulse height from scored quantity (eloss)
139 virtual Float_t IntPH(Float_t) const {return 0.;}
140 // Charge disintegration
141 virtual Float_t IntXZ(AliITSsegmentation *) const {return 0.;}
142 // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3
143 virtual Double_t MobilityElectronSiEmp() const ;
144 // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3
145 virtual Double_t MobilityHoleSiEmp() const ;
146 // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec]
147 // T in degree K, N in #/cm^3
148 virtual Double_t DiffusionCoefficientElectron() const ;
149 // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec]
150 // T in [degree K], N in [#/cm^3]
151 virtual Double_t DiffusionCoefficientHole() const ;
152 // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec]
153 // d distance-thickness in [cm], v in [volts], T in [degree K],
155 virtual Double_t SpeedElectron() const ;
156 // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec]
157 // d distance-thickness in [cm], v in [volts], T in [degree K],
159 virtual Double_t SpeedHole() const ;
160 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
161 // electrons or holes through a distance l [cm] caused by an applied
162 // voltage v [volt] through a distance d [cm] in any material at a
163 // temperature T [degree K].
164 virtual Double_t SigmaDiffusion3D(Double_t l) const ;
165 // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the
166 // defusion of electrons or holes through a distance l [cm] caused by an
167 // applied voltage v [volt] through a distance d [cm] in any material at a
168 // temperature T [degree K].
169 virtual Double_t SigmaDiffusion2D(Double_t l) const ;
170 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
171 // electrons or holes through a distance l [cm] caused by an applied
172 // voltage v [volt] through a distance d [cm] in any material at a
173 // temperature T [degree K].
174 virtual Double_t SigmaDiffusion1D(Double_t l) const ;
175 // Prints out the content of this class in ASCII format.
176 virtual void Print(ostream *os) const;
177 // Reads in the content of this class in the format of Print
178 virtual void Read(istream *is);
180 void NotImplemented(const char *method) const {if(gDebug>0)
181 Warning(method,"This method is not implemented for this sub-class");}
183 TString fDataType; // data type - real or simulated
185 Double_t fdv; // The parameter d/v where d is the disance over which the
186 // the potential v is applied d/v [cm/volts]
187 Double_t fN; // the impurity consentration of the material in #/cm^3
188 Double_t fT; // The temperature of the Si in Degree K.
189 Double_t fGeVcharge; // Energy to ionize (free an electron).
190 TString fFileName1; // input keys : run, module #
191 TString fFileName2; // baseline & noise val or output code
192 // signal or monitored bgr.
193 TString fFileName3; // param values or output coded signal
194 Bool_t fWrite; // Write option for the compression algorithms
196 ClassDef(AliITSresponse,2) // Detector type response virtual base class
198 // Input and output function for standard C++ input/output.
199 ostream& operator<<(ostream &os,AliITSresponse &source);
200 istream& operator>>(istream &os,AliITSresponse &source);