calibration parameters for SDD changed from double to float. Effective C++ warnings...
[u/mrichter/AliRoot.git] / ITS / AliITSCalibration.h
CommitLineData
fcf95fc7 1#ifndef ALIITSCALIBRATION_H
2#define ALIITSCALIBRATION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//////////////////////////////////////////////
7// Base ITS calibration class //
8//////////////////////////////////////////////
9
10#include <TObject.h>
11#include <TString.h>
fe20e72f 12#include "AliITSresponse.h"
fcf95fc7 13
14class AliITSsegmentation;
15class TF1;
16class AliITSgeom;
17
18
19/////////////////////////////////////////////
20// //
21// ITS calibration virtual base class //
22/////////////////////////////////////////////
23class AliITSCalibration : public TObject {
24 public:
25 // Default Constructor
26 AliITSCalibration();
27 // Standard Constructor
28 AliITSCalibration(Double_t Thickness);
4bfbde86 29
fcf95fc7 30 // Destructor.
31 virtual ~AliITSCalibration() {;}
32 //
33 // Configuration methods
34 //
35 // fGeVcharge is set by default 3.6e-9 GeV See for ex. PDG 2004.
36 virtual void SetGeVToCharge(Double_t gc=3.6e-9){fGeVcharge = gc;}
37 // Returns the value fGeVcharge
38 virtual Double_t GetGeVToCharge() const {return fGeVcharge;}
39 // Converts deposited energy to number of electrons liberated
40 virtual Double_t GeVToCharge(Double_t gev) const {return gev/fGeVcharge;}
41 // Temperature in [degree K]
42 virtual void SetTemperature(Double_t t=300.0) {fT = t;}
43 // Get temperature [degree K]
44 virtual Double_t Temperature() const {return fT;}
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]
48 virtual Double_t Impurity() const {return fN;}
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
55 virtual Double_t DistanceOverVoltage() const {return fdv;}
56
57 // Get data type
58 virtual const char *DataType() const {return fDataType.Data();}
59 // Type of data - real or simulated
60 virtual void SetDataType(const char *data="simulated") {fDataType=data;}
61 // Set parameters options: "same" or read from "file" or "SetInvalid" or...
62 // virtual void SetParamOptions(const char*,const char*) = 0;
63 // Set noise parameters
64 virtual void SetNoiseParam(Double_t, Double_t) = 0;
65 // Number of parameters to be set
66 virtual void SetNDetParam(Int_t) = 0;
67 // Set detector parameters: gain, coupling ...
68 virtual void SetDetParam(Double_t *) = 0;
69
70 // Parameters options
71 // virtual void ParamOptions(char *,char*) const = 0;
72 virtual Int_t NDetParam() const = 0;
73 virtual void GetDetParam(Double_t *) const = 0;
74 virtual void GetNoiseParam(Double_t&, Double_t&) const = 0;
75 virtual void SetThresholds(Double_t, Double_t) = 0;
76 virtual void Thresholds(Double_t &, Double_t &) const = 0;
77 virtual Double_t DriftSpeed() const {return SpeedElectron();};
78 // Set sigmas of the charge spread function
79 virtual void SetSigmaSpread(Double_t, Double_t) = 0;
80 // Get sigmas for the charge spread
81 virtual void SigmaSpread(Double_t &,Double_t &) const = 0;
82 // Pulse height from scored quantity (eloss)
83 virtual Double_t IntPH(Double_t) const {return 0.;}
84 // Charge disintegration
85 virtual Double_t IntXZ(AliITSsegmentation *) const {return 0.;}
86 // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3
87 virtual Double_t MobilityElectronSiEmp() const ;
88 // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3
89 virtual Double_t MobilityHoleSiEmp() const ;
90 // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec]
91 // T in degree K, N in #/cm^3
92 virtual Double_t DiffusionCoefficientElectron() const ;
93 // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec]
94 // T in [degree K], N in [#/cm^3]
95 virtual Double_t DiffusionCoefficientHole() const ;
96 // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec]
97 // d distance-thickness in [cm], v in [volts], T in [degree K],
98 // N in [#/cm^3]
99 virtual Double_t SpeedElectron() const ;
100 // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec]
101 // d distance-thickness in [cm], v in [volts], T in [degree K],
102 // N in [#/cm^3]
103 virtual Double_t SpeedHole() const ;
104 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
105 // electrons or holes through a distance l [cm] caused by an applied
106 // voltage v [volt] through a distance d [cm] in any material at a
107 // temperature T [degree K].
108 virtual Double_t SigmaDiffusion3D(Double_t l) const;
109 // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the
110 // defusion of electrons or holes through a distance l [cm] caused by an
111 // applied voltage v [volt] through a distance d [cm] in any material at a
112 // temperature T [degree K].
113 virtual Double_t SigmaDiffusion2D(Double_t l) const;
114 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
115 // electrons or holes through a distance l [cm] caused by an applied
116 // voltage v [volt] through a distance d [cm] in any material at a
117 // temperature T [degree K].
118 virtual Double_t SigmaDiffusion1D(Double_t l) const;
119 // Compute the thickness of the depleted region in a Si detector, version A
120 virtual Double_t DepletedRegionThicknessA(Double_t dopCons,
121 Double_t voltage,
122 Double_t elecCharge,
123 Double_t voltBuiltIn=0.5)const;
124 // Compute the thickness of the depleted region in a Si detector, version B
125 virtual Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage,
126 Double_t mobility,
127 Double_t voltBuiltIn=0.5,
128 Double_t dielConst=1.E-12)const;
129 // Computes the temperature dependance of the reverse bias current
130 virtual Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1,
131 Double_t tempT1,Double_t energy=1.2)const;
132 // Prints out the content of this class in ASCII format.
133 virtual void Print(ostream *os) const;
134 // Reads in the content of this class in the format of Print
135 virtual void Read(istream *is);
136 virtual void Print(Option_t *option="") const {TObject::Print(option);}
137 virtual Int_t Read(const char *name) {return TObject::Read(name);}
138
139 void SetResponse(AliITSresponse* response) {fResponse=response;}
140 AliITSresponse* GetResponse() const {return fResponse;}
141
142 virtual void SetDiffCoeff(Float_t p1, Float_t p2) {fResponse->SetDiffCoeff(p1,p2);}
143 virtual void DiffCoeff(Float_t &diff,Float_t &diff1) const {fResponse->DiffCoeff(diff,diff1);}
144 virtual void SetFilenames(const char *f1="",const char *f2="",
145 const char *f3="") {fResponse->SetFilenames(f1,f2,f3);}
146 virtual void Filenames(char* input,char* baseline,char* param) {fResponse->Filenames(input,baseline,param);}
147 virtual void SetOutputOption(Bool_t write=kFALSE) {fResponse->SetOutputOption(write);}
148 virtual Bool_t OutputOption() const {return fResponse->OutputOption();}
149
150 protected:
4bfbde86 151 AliITSCalibration(const AliITSCalibration &ob); // copy constructor
152 AliITSCalibration& operator=(const AliITSCalibration & /* source */); // ass.
fcf95fc7 153 void NotImplemented(const char *method) const {if(gDebug>0)
154 Warning(method,"This method is not implemented for this sub-class");}
155
156 TString fDataType; // data type - real or simulated
157
158 Double_t fdv; // The parameter d/v where d is the disance over which the
159 // the potential v is applied d/v [cm/volts]
160 Double_t fN; // the impurity consentration of the material in #/cm^3
161 Float_t fT; // The temperature of the Si in Degree K.
162 Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV
163 AliITSresponse* fResponse; //! ptr to base response obj. It is not
164 // deleted here but in AliITSDetTypeSim and AliITSDetTypeRec
165
166 ClassDef(AliITSCalibration,1) // Detector type response virtual base class
167};
168// Input and output function for standard C++ input/output.
169ostream& operator<<(ostream &os,AliITSCalibration &source);
170istream& operator>>(istream &os,AliITSCalibration &source);
171#endif