- introduce IsBad() virtual method in AliITSCalibration to check the status
[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;}
71 // Set parameters options: "same" or read from "file" or "SetInvalid" or...
72 // virtual void SetParamOptions(const char*,const char*) = 0;
73 // Set noise parameters
74 virtual void SetNoiseParam(Double_t, Double_t) = 0;
75 // Number of parameters to be set
76 virtual void SetNDetParam(Int_t) = 0;
77 // Set detector parameters: gain, coupling ...
78 virtual void SetDetParam(Double_t *) = 0;
79
80 // Parameters options
81 // virtual void ParamOptions(char *,char*) const = 0;
82 virtual Int_t NDetParam() const = 0;
83 virtual void GetDetParam(Double_t *) const = 0;
84 virtual void GetNoiseParam(Double_t&, Double_t&) const = 0;
85 virtual void SetThresholds(Double_t, Double_t) = 0;
86 virtual void Thresholds(Double_t &, Double_t &) const = 0;
028a3709 87 virtual void SetMapA(Int_t, AliITSMapSDD*) {AliError("This method must be implemented in a derived class");}
88 virtual void SetMapT(Int_t, AliITSMapSDD*) {AliError("This method must be implemented in a derived class");}
18da6e54 89 virtual void SetDriftSpeed(Int_t, AliITSDriftSpeedArraySDD*) {AliError("This method must be implemented in a derived class");}
fcf95fc7 90 virtual Double_t DriftSpeed() const {return SpeedElectron();};
91 // Set sigmas of the charge spread function
92 virtual void SetSigmaSpread(Double_t, Double_t) = 0;
93 // Get sigmas for the charge spread
94 virtual void SigmaSpread(Double_t &,Double_t &) const = 0;
95 // Pulse height from scored quantity (eloss)
96 virtual Double_t IntPH(Double_t) const {return 0.;}
97 // Charge disintegration
98 virtual Double_t IntXZ(AliITSsegmentation *) const {return 0.;}
99 // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3
100 virtual Double_t MobilityElectronSiEmp() const ;
101 // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3
102 virtual Double_t MobilityHoleSiEmp() const ;
103 // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec]
104 // T in degree K, N in #/cm^3
105 virtual Double_t DiffusionCoefficientElectron() const ;
106 // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec]
107 // T in [degree K], N in [#/cm^3]
108 virtual Double_t DiffusionCoefficientHole() const ;
109 // Electron <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 SpeedElectron() const ;
113 // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec]
114 // d distance-thickness in [cm], v in [volts], T in [degree K],
115 // N in [#/cm^3]
116 virtual Double_t SpeedHole() const ;
117 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
118 // electrons or holes through a distance l [cm] caused by an applied
119 // voltage v [volt] through a distance d [cm] in any material at a
120 // temperature T [degree K].
121 virtual Double_t SigmaDiffusion3D(Double_t l) const;
122 // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the
123 // defusion of electrons or holes through a distance l [cm] caused by an
124 // applied voltage v [volt] through a distance d [cm] in any material at a
125 // temperature T [degree K].
126 virtual Double_t SigmaDiffusion2D(Double_t l) const;
127 // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
128 // electrons or holes through a distance l [cm] caused by an applied
129 // voltage v [volt] through a distance d [cm] in any material at a
130 // temperature T [degree K].
131 virtual Double_t SigmaDiffusion1D(Double_t l) const;
a4005be7 132 // Computes the Lorentz angle for Electron and Hole, under the Magnetic field bz (in kGauss)
133 virtual Double_t LorentzAngleElectron(Double_t bz) const;
134 virtual Double_t LorentzAngleHole(Double_t bz) const;
fcf95fc7 135 // Compute the thickness of the depleted region in a Si detector, version A
136 virtual Double_t DepletedRegionThicknessA(Double_t dopCons,
137 Double_t voltage,
138 Double_t elecCharge,
139 Double_t voltBuiltIn=0.5)const;
140 // Compute the thickness of the depleted region in a Si detector, version B
141 virtual Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage,
142 Double_t mobility,
143 Double_t voltBuiltIn=0.5,
144 Double_t dielConst=1.E-12)const;
145 // Computes the temperature dependance of the reverse bias current
146 virtual Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1,
147 Double_t tempT1,Double_t energy=1.2)const;
148 // Prints out the content of this class in ASCII format.
149 virtual void Print(ostream *os) const;
150 // Reads in the content of this class in the format of Print
151 virtual void Read(istream *is);
152 virtual void Print(Option_t *option="") const {TObject::Print(option);}
153 virtual Int_t Read(const char *name) {return TObject::Read(name);}
154
155 void SetResponse(AliITSresponse* response) {fResponse=response;}
156 AliITSresponse* GetResponse() const {return fResponse;}
157
158 virtual void SetDiffCoeff(Float_t p1, Float_t p2) {fResponse->SetDiffCoeff(p1,p2);}
159 virtual void DiffCoeff(Float_t &diff,Float_t &diff1) const {fResponse->DiffCoeff(diff,diff1);}
160 virtual void SetFilenames(const char *f1="",const char *f2="",
161 const char *f3="") {fResponse->SetFilenames(f1,f2,f3);}
162 virtual void Filenames(char* input,char* baseline,char* param) {fResponse->Filenames(input,baseline,param);}
163 virtual void SetOutputOption(Bool_t write=kFALSE) {fResponse->SetOutputOption(write);}
164 virtual Bool_t OutputOption() const {return fResponse->OutputOption();}
165
166 protected:
4bfbde86 167 AliITSCalibration(const AliITSCalibration &ob); // copy constructor
154bfd38 168 AliITSCalibration& operator=(const AliITSCalibration& source); // ass.
fcf95fc7 169 void NotImplemented(const char *method) const {if(gDebug>0)
170 Warning(method,"This method is not implemented for this sub-class");}
171
172 TString fDataType; // data type - real or simulated
173
174 Double_t fdv; // The parameter d/v where d is the disance over which the
175 // the potential v is applied d/v [cm/volts]
176 Double_t fN; // the impurity consentration of the material in #/cm^3
177 Float_t fT; // The temperature of the Si in Degree K.
178 Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV
179 AliITSresponse* fResponse; //! ptr to base response obj. It is not
180 // deleted here but in AliITSDetTypeSim and AliITSDetTypeRec
181
182 ClassDef(AliITSCalibration,1) // Detector type response virtual base class
183};
184// Input and output function for standard C++ input/output.
185ostream& operator<<(ostream &os,AliITSCalibration &source);
186istream& operator>>(istream &os,AliITSCalibration &source);
187#endif