Calibration framework improved (E. Crescio)
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSDD.h
CommitLineData
fcf95fc7 1#ifndef ALIITSCALIBRATIONSDD_H
2#define ALIITSCALIBRATIONSDD_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7
8#include "AliITSCalibration.h"
9#include "AliITSresponseSDD.h"
10
11class AliITSresponseSDD;
12///////////////////////////////////////////////////////
13// Response for SDD //
14///////////////////////////////////////////////////////
15
16class AliITSCalibrationSDD : public AliITSCalibration {
17 public:
18 //
19 // Configuration methods
20 //
21 AliITSCalibrationSDD();
22 AliITSCalibrationSDD(const char *dataType);
23 virtual ~AliITSCalibrationSDD() {;}
24 virtual void SetNoiseParam(Double_t n, Double_t b){
25 fNoise=n; fBaseline=b;}
26
27 virtual void GetNoiseParam(Double_t &n, Double_t &b) const {
28 n=fNoise; b=fBaseline;}
29
30 virtual void SetThresholds(Double_t mv, Double_t /* b */){
31 // Min value used in 2D - could be used as a threshold setting
32 fMinVal = mv;}
33 virtual void Thresholds(Double_t & mv, Double_t & /* b */) const
34 {mv = fMinVal;}
35 virtual void GiveCompressParam(Int_t *x) const;
36
37 void SetNoiseAfterElectronics(Double_t n=2.38){
38 // Noise after electronics (ADC units)
39 // 2.36 for ALICE from beam test measurements 2001
40 fNoiseAfterEl=n;}
41 Double_t GetNoiseAfterElectronics() const {
42 // Noise after electronics (ADC units)
43 return fNoiseAfterEl;}
44 void SetCompressParam(Int_t cp[8]);
45 void SetDeadChannels(Int_t nchips=0, Int_t nchannels=0);
46 Int_t GetDeadChips() const { return fDeadChips; }
47 Int_t GetDeadChannels() const { return fDeadChannels; }
48 Double_t Gain(Int_t wing,Int_t chip,Int_t ch)const
49 {return fGain[wing][chip][ch]; }
50 void PrintGains() const;
51 void Print();
52 virtual void Print(ostream *os) const {AliITSCalibrationSDD::Print(os);}
53 virtual void Print(Option_t *option="") const {AliITSCalibrationSDD::Print(option);}
54 // not implemented virtual methods (devlared in the mother class
55 virtual void SetDetParam(Double_t *)
56 {NotImplemented("SetDetParam");}
57 virtual void GetDetParam(Double_t *) const
58 {NotImplemented("GetDetParam");}
59 virtual void SetNDetParam(Int_t /* n */)
60 {NotImplemented("SetNDetParam");}
61 virtual Int_t NDetParam() const
62 {NotImplemented("NDetParam"); return 0;}
63 virtual void SetSigmaSpread(Double_t, Double_t)
64 {NotImplemented("SetSigmaSpread");}
65 virtual void SigmaSpread(Double_t & /* p1 */,Double_t & /* p2 */) const
66 {NotImplemented("SigmaSpread");}
67
68 void SetDead() { fIsDead = kTRUE; };
69 Bool_t IsDead() const { return fIsDead; };
70 Int_t Wings()const{return fgkWings;}//Total number of SDD wings
71 Int_t Chips() const{return fgkChips;} // Number of chips/module
72 Int_t Channels() const{ return fgkChannels;}//Number of channels/chip
73
74
75 virtual void SetElectronics(Int_t p1=1) {((AliITSresponseSDD*)fResponse)->SetElectronics(p1);}
76 virtual Int_t GetElectronics() const {return ((AliITSresponseSDD*)fResponse)->Electronics();}
77 virtual void SetMaxAdc(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetMaxAdc(p1);}
78 virtual Double_t GetMaxAdc() const {return ((AliITSresponseSDD*)fResponse)->MaxAdc();}
79 virtual void SetChargeLoss(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetChargeLoss(p1);}
80 virtual Double_t GetChargeLoss() const {return ((AliITSresponseSDD*)fResponse)->ChargeLoss();}
81 virtual void SetDynamicRange(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetDynamicRange(p1);}
82 virtual Double_t GetDynamicRange() const {return ((AliITSresponseSDD*)fResponse)->DynamicRange();}
83 virtual void SetDriftSpeed(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetDriftSpeed(p1);}
84 virtual Double_t GetDriftSpeed() const {return ((AliITSresponseSDD*)fResponse)->DriftSpeed();}
85 virtual void SetParamOptions(const char *opt1,const char *opt2) {((AliITSresponseSDD*)fResponse)->SetParamOptions(opt1,opt2);}
86 virtual void GetParamOptions(char *opt1,char *opt2) const {((AliITSresponseSDD*)fResponse)->ParamOptions(opt1,opt2);}
87 virtual Bool_t Do10to8() const {return ((AliITSresponseSDD*)fResponse)->Do10to8();}
88 virtual void SetZeroSupp (const char *opt) {((AliITSresponseSDD*)fResponse)->SetZeroSupp(opt);}
89 virtual const char *GetZeroSuppOption() const {return ((AliITSresponseSDD*)fResponse)->ZeroSuppOption();}
90 virtual void SetNSigmaIntegration(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetNSigmaIntegration(p1);}
91 virtual Double_t GetNSigmaIntegration() const {return ((AliITSresponseSDD*)fResponse)->NSigmaIntegration();}
92 virtual void SetNLookUp(Int_t p1) {((AliITSresponseSDD*)fResponse)->SetNLookUp(p1);}
93 virtual Int_t GetGausNLookUp() const {return ((AliITSresponseSDD*)fResponse)->GausNLookUp();}
94 virtual Double_t GetGausLookUp(Int_t i) const {return ((AliITSresponseSDD*)fResponse)->GausLookUp(i);}
95 virtual Int_t Convert8to10(Int_t signal) const {return ((AliITSresponseSDD*)fResponse)->Convert8to10(signal);}
96 virtual void SetJitterError(Double_t jitter=20) {((AliITSresponseSDD*)fResponse)->SetJitterError(jitter);}
97 virtual Double_t GetJitterError() const {return ((AliITSresponseSDD*)fResponse)->JitterError();}
98 virtual void SetDo10to8(Bool_t bitcomp=kTRUE) {((AliITSresponseSDD*)fResponse)->SetDo10to8(bitcomp);}
99 protected:
100 // these statis const should be move to AliITSsegmentationSDD
101 static const Int_t fgkWings = 2; // Number of wings per module
102 static const Int_t fgkChips = 4; // Number of chips/module
103 static const Int_t fgkChannels = 64; // Number of channels/chip
104 static const Double_t fgkTemperatureDefault; // default for fT (Kelvin)
105 static const Double_t fgkNoiseDefault; // default for fNoise
106 static const Double_t fgkBaselineDefault; // default for fBaseline
107 static const Double_t fgkMinValDefault; // default for fMinVal
108
109 Int_t fDeadChips; // Number of dead chips
110 Int_t fDeadChannels; // Number of dead channels
111 Double_t fGain[fgkWings][fgkChips][fgkChannels];//Array for channel gains
112 Int_t fCPar[8]; // Hardware compression parameters
113 Double_t fNoise; // Noise
114 Double_t fBaseline; // Baseline
115 Double_t fNoiseAfterEl; // Noise after electronics
116 Double_t fMinVal; // Min value used in 2D zero-suppression algo
117
118 Bool_t fIsDead; // module is dead or alive ?
119
120 private:
121 AliITSCalibrationSDD(const AliITSCalibrationSDD &ob); // copy constructor
122 AliITSCalibrationSDD& operator=(const AliITSCalibrationSDD & /* source */); // ass. op.
123
124
125 ClassDef(AliITSCalibrationSDD,1) // SDD response
126
127 };
128#endif