]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSCalibration.h
Changes to set the number of layers in trackerUpgrade and trackU from the reconstructor.
[u/mrichter/AliRoot.git] / ITS / AliITSCalibration.h
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 /* $Id$ */
7
8 //////////////////////////////////////////////
9 // Base ITS calibration class               //
10 //////////////////////////////////////////////
11
12 #include <TObject.h>
13 #include <TString.h>
14 #include "AliLog.h"
15 #include "AliITSCorrMapSDD.h"
16 #include "AliITSDriftSpeedArraySDD.h"
17
18 class AliITSsegmentation;
19 class TF1;
20 class AliITSgeom;
21
22
23 /////////////////////////////////////////////
24 //                                         //
25 // ITS calibration virtual base class      //
26 /////////////////////////////////////////////
27 class AliITSCalibration : public TObject {
28  public:
29     // Default Constructor
30     AliITSCalibration();
31
32     // Destructor.
33     virtual ~AliITSCalibration() {;}
34
35     // Check for dead modules anche chips
36     // Return 1 if the module/chip is dead, 0 if it is ok
37     virtual Bool_t IsBad() const {AliError("This method must be implemented in a derived class"); return kFALSE;}
38     virtual Bool_t IsChipBad(Int_t) const {AliError("This method must be implemented in a derived class"); return kFALSE;}
39     //
40     // Configuration methods
41     //
42     // Temperature in [degree K]
43     virtual void    SetTemperature(Double_t t=300.0) {fT = t;}
44     // Get temperature [degree K]
45     virtual Double_t Temperature() const {return fT;}
46  
47     // Get data type
48     virtual const char  *DataType() const {return fDataType.Data();}
49     // Type of data - real or simulated
50     virtual void    SetDataType(const char *data="simulated") {fDataType=data;}
51     // Number of parameters to be set
52     virtual  void   SetNDetParam(Int_t) = 0;
53     // Set detector parameters: gain, coupling ...
54     virtual  void   SetDetParam(Double_t *) = 0;
55
56     virtual Int_t  NDetParam() const = 0;
57     virtual void   GetDetParam(Double_t *) const = 0;
58     virtual void   SetMapA(Int_t, AliITSCorrMapSDD*) {AliError("This method must be implemented in a derived class");}
59     virtual void   SetMapT(Int_t, AliITSCorrMapSDD*) {AliError("This method must be implemented in a derived class");}
60     virtual void   SetDriftSpeed(Int_t, AliITSDriftSpeedArraySDD*) {AliError("This method must be implemented in a derived class");}
61     // Set sigmas of the charge spread function
62     virtual void    SetSigmaSpread(Double_t, Double_t) = 0;
63     // Get sigmas for the charge spread
64     virtual void    SigmaSpread(Double_t &,Double_t &) const = 0;
65
66     // Needed for SSD bad modules retrieval in the tracker
67     virtual void    SetModuleIndex(Int_t /*modId*/) {};
68
69     // Prints out the content of this class in ASCII format.
70     virtual void Print(ostream *os) const;
71     // Reads in the content of this class in the format of Print
72     virtual void Read(istream *is);
73     virtual void Print(Option_t *option="") const {TObject::Print(option);}
74     virtual Int_t Read(const char *name) {return TObject::Read(name);}
75
76
77  protected:
78     AliITSCalibration(const AliITSCalibration &ob); // copy constructor
79     AliITSCalibration& operator=(const AliITSCalibration& source); // ass.
80     void NotImplemented(const char *method) const {if(gDebug>0)
81          Warning(method,"This method is not implemented for this sub-class");}
82
83     TString  fDataType;   // data type - real or simulated
84     
85     Float_t fT;   // The temperature of the Si in Degree K.
86                  // deleted here but in AliITSDetTypeSim and AliITSDetTypeRec
87
88     ClassDef(AliITSCalibration,3) // Detector type response virtual base class 
89 };
90 // Input and output function for standard C++ input/output.
91 ostream& operator<<(ostream &os,AliITSCalibration &source);
92 istream& operator>>(istream &os,AliITSCalibration &source);
93 #endif