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