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