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