]>
Commit | Line | Data |
---|---|---|
b0f5e3fc | 1 | #ifndef ALIITSRESPONSE_H |
2 | #define ALIITSRESPONSE_H | |
ac8cbb66 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
b0f5e3fc | 7 | |
b0f5e3fc | 8 | #include <TObject.h> |
703a4e51 | 9 | #include <TString.h> |
e8189707 | 10 | |
703a4e51 | 11 | class AliITSsegmentation; |
1ca7869b | 12 | class TF1; |
b0f5e3fc | 13 | class AliITSgeom; |
14 | ||
15 | //---------------------------------------------- | |
16 | // | |
17 | // ITS response virtual base class | |
18 | // | |
4efc56c1 | 19 | class AliITSresponse : public TObject { |
b0f5e3fc | 20 | public: |
4efc56c1 | 21 | // Default Constructor |
22 | AliITSresponse(); | |
23 | // Standard Constructor | |
24 | AliITSresponse(Double_t Thickness); | |
25 | // Destructor. | |
e8189707 | 26 | virtual ~AliITSresponse() {} |
b0f5e3fc | 27 | // |
28 | // Configuration methods | |
29 | // | |
40c33378 | 30 | // fGeVcharge is set by default 3.6e-9 GeV See for ex. PDG 2004. |
31 | virtual void SetGeVToCharge(Double_t gc=3.6e-9){fGeVcharge = gc;} | |
ac8cbb66 | 32 | // Returns the value fGeVcharge |
aacedc3e | 33 | virtual Double_t GetGeVToCharge() const {return fGeVcharge;} |
ac8cbb66 | 34 | // Converts deposited energy to number of electrons liberated |
40c33378 | 35 | virtual Double_t GeVToCharge(Double_t gev) const {return gev/fGeVcharge;} |
b0f5e3fc | 36 | // Diffusion coefficient |
aacedc3e | 37 | virtual void SetDiffCoeff(Double_t, Double_t) = 0; |
e8189707 | 38 | // Get diffusion coefficients |
aacedc3e | 39 | virtual void DiffCoeff(Double_t &,Double_t &) const = 0; |
b0f5e3fc | 40 | |
4efc56c1 | 41 | // Temperature in [degree K] |
aacedc3e | 42 | virtual void SetTemperature(Double_t t=300.0) {fT = t;} |
4efc56c1 | 43 | // Get temperature [degree K] |
aacedc3e | 44 | virtual Double_t Temperature() const {return fT;} |
4efc56c1 | 45 | // Set the impurity concentrations in [#/cm^3] |
46 | virtual void SetImpurity(Double_t n=0.0){fN = n;} | |
47 | // Returns the impurity consentration in [#/cm^3] | |
ac8cbb66 | 48 | virtual Double_t Impurity() const {return fN;} |
4efc56c1 | 49 | // Sets the applied ratio distance/voltage [cm/volt] |
50 | virtual void SetDistanceOverVoltage(Double_t d,Double_t v){fdv = d/v;} | |
51 | // Sets the applied ration distance/voltage [cm/volt]. Default value | |
52 | // is 300E-4cm/80 volts = 0.000375 cm/volts | |
53 | virtual void SetDistanceOverVoltage(Double_t dv=0.000375){fdv = dv;} | |
54 | // Returns the ration distance/voltage | |
ac8cbb66 | 55 | virtual Double_t DistanceOverVoltage() const {return fdv;} |
aacedc3e | 56 | |
b0f5e3fc | 57 | // Get data type |
703a4e51 | 58 | virtual const char *DataType() const {return fDataType.Data();} |
aacedc3e | 59 | // Type of data - real or simulated |
60 | virtual void SetDataType(const char *data="simulated") {fDataType=data;} | |
4efc56c1 | 61 | // Set parameters options: "same" or read from "file" or "SetInvalid" or... |
703a4e51 | 62 | virtual void SetParamOptions(const char*,const char*) = 0; |
e8189707 | 63 | // Set noise parameters |
aacedc3e | 64 | virtual void SetNoiseParam(Double_t, Double_t) = 0; |
b0f5e3fc | 65 | // Number of parameters to be set |
703a4e51 | 66 | virtual void SetNDetParam(Int_t) = 0; |
e8189707 | 67 | // Set detector parameters: gain, coupling ... |
aacedc3e | 68 | virtual void SetDetParam(Double_t *) = 0; |
b0f5e3fc | 69 | |
70 | // Parameters options | |
703a4e51 | 71 | virtual void ParamOptions(char *,char*) const = 0; |
72 | virtual Int_t NDetParam() const = 0; | |
aacedc3e | 73 | virtual void GetDetParam(Double_t *) const = 0; |
74 | virtual void GetNoiseParam(Double_t&, Double_t&) const = 0; | |
b0f5e3fc | 75 | |
4efc56c1 | 76 | // Zero-suppression option - could be 1D, 2D or non-ZeroSuppressed |
703a4e51 | 77 | virtual void SetZeroSupp(const char*) = 0; |
b0f5e3fc | 78 | // Get zero-suppression option |
703a4e51 | 79 | virtual const char *ZeroSuppOption() const = 0; |
b0f5e3fc | 80 | // Set thresholds |
aacedc3e | 81 | virtual void SetThresholds(Double_t, Double_t) = 0; |
82 | virtual void Thresholds(Double_t &, Double_t &) const = 0; | |
b0f5e3fc | 83 | |
84 | // Set filenames | |
aacedc3e | 85 | virtual void SetFilenames(const char *f1="",const char *f2="", |
86 | const char *f3=""){ | |
703a4e51 | 87 | // Set filenames - input, output, parameters .... |
88 | fFileName1=f1; fFileName2=f2; fFileName3=f3;} | |
b0f5e3fc | 89 | // Filenames |
703a4e51 | 90 | virtual void Filenames(char* input,char* baseline,char* param) { |
aacedc3e | 91 | strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data()); |
92 | strcpy(param,fFileName3.Data());} | |
703a4e51 | 93 | |
aacedc3e | 94 | virtual Double_t DriftSpeed() const {return SpeedElectron();}; |
95 | // set output option | |
96 | virtual void SetOutputOption(Bool_t write=kFALSE) {fWrite = write;} | |
97 | ||
703a4e51 | 98 | virtual Bool_t OutputOption() const {return fWrite;} |
ac8cbb66 | 99 | virtual Bool_t Do10to8() const {return kTRUE;} |
703a4e51 | 100 | virtual void GiveCompressParam(Int_t *) const =0; |
4efc56c1 | 101 | // |
b0f5e3fc | 102 | // Detector type response methods |
103 | // Set number of sigmas over which cluster disintegration is performed | |
aacedc3e | 104 | virtual void SetNSigmaIntegration(Double_t) = 0; |
b0f5e3fc | 105 | // Get number of sigmas over which cluster disintegration is performed |
aacedc3e | 106 | virtual Double_t NSigmaIntegration() const = 0; |
7551c5b2 | 107 | // Set number of bins for the gaussian lookup table |
703a4e51 | 108 | virtual void SetNLookUp(Int_t) = 0; |
7551c5b2 | 109 | // Get number of bins for the gaussian lookup table |
ac8cbb66 | 110 | virtual Int_t GausNLookUp() const {return 0;} |
7551c5b2 | 111 | // Get scaling factor for bin i-th from the gaussian lookup table |
aacedc3e | 112 | virtual Double_t GausLookUp(Int_t) const {return 0.;} |
b0f5e3fc | 113 | // Set sigmas of the charge spread function |
aacedc3e | 114 | virtual void SetSigmaSpread(Double_t, Double_t) = 0; |
4efc56c1 | 115 | // Get sigmas for the charge spread |
aacedc3e | 116 | virtual void SigmaSpread(Double_t &,Double_t &) const = 0; |
b0f5e3fc | 117 | // Pulse height from scored quantity (eloss) |
aacedc3e | 118 | virtual Double_t IntPH(Double_t) const {return 0.;} |
4efc56c1 | 119 | // Charge disintegration |
aacedc3e | 120 | virtual Double_t IntXZ(AliITSsegmentation *) const {return 0.;} |
4efc56c1 | 121 | // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3 |
ac8cbb66 | 122 | virtual Double_t MobilityElectronSiEmp() const ; |
4efc56c1 | 123 | // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3 |
ac8cbb66 | 124 | virtual Double_t MobilityHoleSiEmp() const ; |
4efc56c1 | 125 | // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec] |
126 | // T in degree K, N in #/cm^3 | |
ac8cbb66 | 127 | virtual Double_t DiffusionCoefficientElectron() const ; |
4efc56c1 | 128 | // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec] |
129 | // T in [degree K], N in [#/cm^3] | |
ac8cbb66 | 130 | virtual Double_t DiffusionCoefficientHole() const ; |
4efc56c1 | 131 | // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec] |
132 | // d distance-thickness in [cm], v in [volts], T in [degree K], | |
133 | // N in [#/cm^3] | |
ac8cbb66 | 134 | virtual Double_t SpeedElectron() const ; |
4efc56c1 | 135 | // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec] |
136 | // d distance-thickness in [cm], v in [volts], T in [degree K], | |
137 | // N in [#/cm^3] | |
ac8cbb66 | 138 | virtual Double_t SpeedHole() const ; |
4efc56c1 | 139 | // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of |
140 | // electrons or holes through a distance l [cm] caused by an applied | |
141 | // voltage v [volt] through a distance d [cm] in any material at a | |
142 | // temperature T [degree K]. | |
0c6e0556 | 143 | virtual Double_t SigmaDiffusion3D(Double_t l) const; |
4efc56c1 | 144 | // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the |
145 | // defusion of electrons or holes through a distance l [cm] caused by an | |
146 | // applied voltage v [volt] through a distance d [cm] in any material at a | |
147 | // temperature T [degree K]. | |
0c6e0556 | 148 | virtual Double_t SigmaDiffusion2D(Double_t l) const; |
4efc56c1 | 149 | // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of |
150 | // electrons or holes through a distance l [cm] caused by an applied | |
151 | // voltage v [volt] through a distance d [cm] in any material at a | |
152 | // temperature T [degree K]. | |
0c6e0556 | 153 | virtual Double_t SigmaDiffusion1D(Double_t l) const; |
154 | // Compute the thickness of the depleted region in a Si detector, version A | |
155 | virtual Double_t DepletedRegionThicknessA(Double_t dopCons, | |
156 | Double_t voltage, | |
157 | Double_t elecCharge, | |
158 | Double_t voltBuiltIn=0.5)const; | |
159 | // Compute the thickness of the depleted region in a Si detector, version B | |
160 | virtual Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage, | |
161 | Double_t mobility, | |
162 | Double_t voltBuiltIn=0.5, | |
163 | Double_t dielConst=1.E-12)const; | |
164 | // Computes the temperature dependance of the reverse bias current | |
165 | virtual Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1, | |
166 | Double_t tempT1,Double_t energy=1.2)const; | |
ac8cbb66 | 167 | // Prints out the content of this class in ASCII format. |
703a4e51 | 168 | virtual void Print(ostream *os) const; |
ac8cbb66 | 169 | // Reads in the content of this class in the format of Print |
170 | virtual void Read(istream *is); | |
d2f55a22 | 171 | virtual void Print(Option_t *option="") const {TObject::Print(option);} |
172 | virtual Int_t Read(const char *name) {return TObject::Read(name);} | |
703a4e51 | 173 | protected: |
174 | void NotImplemented(const char *method) const {if(gDebug>0) | |
175 | Warning(method,"This method is not implemented for this sub-class");} | |
176 | ||
177 | TString fDataType; // data type - real or simulated | |
4efc56c1 | 178 | private: |
179 | Double_t fdv; // The parameter d/v where d is the disance over which the | |
180 | // the potential v is applied d/v [cm/volts] | |
181 | Double_t fN; // the impurity consentration of the material in #/cm^3 | |
182 | Double_t fT; // The temperature of the Si in Degree K. | |
40c33378 | 183 | Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV |
703a4e51 | 184 | TString fFileName1; // input keys : run, module # |
185 | TString fFileName2; // baseline & noise val or output code | |
186 | // signal or monitored bgr. | |
187 | TString fFileName3; // param values or output coded signal | |
188 | Bool_t fWrite; // Write option for the compression algorithms | |
4efc56c1 | 189 | |
190 | ClassDef(AliITSresponse,2) // Detector type response virtual base class | |
b0f5e3fc | 191 | }; |
ac8cbb66 | 192 | // Input and output function for standard C++ input/output. |
193 | ostream& operator<<(ostream &os,AliITSresponse &source); | |
194 | istream& operator>>(istream &os,AliITSresponse &source); | |
b0f5e3fc | 195 | #endif |