]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCalibrationSDD.h
Now have consistant definition of slope and intersept in line fit and
[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"
f45f6658 10#include "TArrayI.h"
fcf95fc7 11
12class AliITSresponseSDD;
13///////////////////////////////////////////////////////
14// Response for SDD //
15///////////////////////////////////////////////////////
16
17class AliITSCalibrationSDD : public AliITSCalibration {
18 public:
19 //
20 // Configuration methods
21 //
22 AliITSCalibrationSDD();
23 AliITSCalibrationSDD(const char *dataType);
24 virtual ~AliITSCalibrationSDD() {;}
f45f6658 25 virtual void SetNoiseParam(Double_t /*n*/, Double_t /*b*/){
26 NotImplemented("SetNoiseParam");}
fcf95fc7 27
f45f6658 28 virtual void GetNoiseParam(Double_t &/*n*/, Double_t &/*b*/) const {
29 NotImplemented("GetNoiseParam");}
30
4bfbde86 31 virtual Float_t GetBaseline(Int_t anode) const {return fBaseline[anode];}
f45f6658 32 virtual void SetBaseline(Int_t anode,Double_t bas) {fBaseline[anode]=bas;}
4bfbde86 33 virtual Float_t GetNoise(Int_t anode) const {return fNoise[anode];}
f45f6658 34 virtual void SetNoise(Int_t anode, Double_t noise) {fNoise[anode]=noise;}
fcf95fc7 35
36 virtual void SetThresholds(Double_t mv, Double_t /* b */){
37 // Min value used in 2D - could be used as a threshold setting
38 fMinVal = mv;}
39 virtual void Thresholds(Double_t & mv, Double_t & /* b */) const
40 {mv = fMinVal;}
f45f6658 41 virtual void GiveCompressParam(Int_t *x,Int_t ian) const;
fcf95fc7 42
f45f6658 43 void SetNoiseAfterElectronics(Int_t anode,Double_t n=2.38){
fcf95fc7 44 // Noise after electronics (ADC units)
45 // 2.36 for ALICE from beam test measurements 2001
f45f6658 46 fNoiseAfterEl[anode]=n;}
4bfbde86 47 Float_t GetNoiseAfterElectronics(Int_t anode) const {
fcf95fc7 48 // Noise after electronics (ADC units)
f45f6658 49 return fNoiseAfterEl[anode];}
50 //void SetDeadChannels(Int_t nchips=0, Int_t nchannels=0);
51 void SetDeadChannels(Int_t ndead=0){fDeadChannels=ndead; fBadChannels.Set(ndead);}
fcf95fc7 52 Int_t GetDeadChips() const { return fDeadChips; }
53 Int_t GetDeadChannels() const { return fDeadChannels; }
4bfbde86 54 Float_t Gain(Int_t wing,Int_t chip,Int_t ch)const
fcf95fc7 55 {return fGain[wing][chip][ch]; }
f45f6658 56 virtual void SetGain(Double_t g,Int_t wing,Int_t chip, Int_t ch)
57 {fGain[wing][chip][ch]=g;}
58
fcf95fc7 59 void PrintGains() const;
60 void Print();
61 virtual void Print(ostream *os) const {AliITSCalibrationSDD::Print(os);}
62 virtual void Print(Option_t *option="") const {AliITSCalibrationSDD::Print(option);}
63 // not implemented virtual methods (devlared in the mother class
64 virtual void SetDetParam(Double_t *)
65 {NotImplemented("SetDetParam");}
66 virtual void GetDetParam(Double_t *) const
67 {NotImplemented("GetDetParam");}
68 virtual void SetNDetParam(Int_t /* n */)
69 {NotImplemented("SetNDetParam");}
70 virtual Int_t NDetParam() const
71 {NotImplemented("NDetParam"); return 0;}
72 virtual void SetSigmaSpread(Double_t, Double_t)
73 {NotImplemented("SetSigmaSpread");}
74 virtual void SigmaSpread(Double_t & /* p1 */,Double_t & /* p2 */) const
75 {NotImplemented("SigmaSpread");}
76
77 void SetDead() { fIsDead = kTRUE; };
78 Bool_t IsDead() const { return fIsDead; };
79 Int_t Wings()const{return fgkWings;}//Total number of SDD wings
80 Int_t Chips() const{return fgkChips;} // Number of chips/module
81 Int_t Channels() const{ return fgkChannels;}//Number of channels/chip
f45f6658 82
83 virtual void SetBadChannel(Int_t i,Int_t anode);
84 Int_t GetBadChannel(Int_t i) const {return fBadChannels[i];}
85 Bool_t IsBadChannel(Int_t anode);
fcf95fc7 86
5bfe44ce 87 Float_t GetMapACell(Int_t i,Int_t j) const {return fMapA[i][j];}
88 virtual void SetMapACell(Int_t i,Int_t j,Float_t dev) {fMapA[i][j]=dev;}
89 Float_t GetMapTCell(Int_t i,Int_t j) const {return fMapT[i][j];}
90 virtual void SetMapTCell(Int_t i,Int_t j,Float_t dev) {fMapT[i][j]=dev;}
03ecfe88 91 static Int_t GetMapTimeNBin() {return fgkMapTimeNBin;}
5bfe44ce 92
fcf95fc7 93 virtual void SetElectronics(Int_t p1=1) {((AliITSresponseSDD*)fResponse)->SetElectronics(p1);}
94 virtual Int_t GetElectronics() const {return ((AliITSresponseSDD*)fResponse)->Electronics();}
95 virtual void SetMaxAdc(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetMaxAdc(p1);}
4bfbde86 96 virtual Float_t GetMaxAdc() const {return ((AliITSresponseSDD*)fResponse)->MaxAdc();}
fcf95fc7 97 virtual void SetChargeLoss(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetChargeLoss(p1);}
4bfbde86 98 virtual Float_t GetChargeLoss() const {return ((AliITSresponseSDD*)fResponse)->ChargeLoss();}
fcf95fc7 99 virtual void SetDynamicRange(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetDynamicRange(p1);}
4bfbde86 100 virtual Float_t GetDynamicRange() const {return ((AliITSresponseSDD*)fResponse)->DynamicRange();}
fcf95fc7 101 virtual void SetDriftSpeed(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetDriftSpeed(p1);}
4bfbde86 102 virtual Float_t GetDriftSpeed() const {return ((AliITSresponseSDD*)fResponse)->DriftSpeed();}
fcf95fc7 103 virtual void SetParamOptions(const char *opt1,const char *opt2) {((AliITSresponseSDD*)fResponse)->SetParamOptions(opt1,opt2);}
104 virtual void GetParamOptions(char *opt1,char *opt2) const {((AliITSresponseSDD*)fResponse)->ParamOptions(opt1,opt2);}
105 virtual Bool_t Do10to8() const {return ((AliITSresponseSDD*)fResponse)->Do10to8();}
106 virtual void SetZeroSupp (const char *opt) {((AliITSresponseSDD*)fResponse)->SetZeroSupp(opt);}
107 virtual const char *GetZeroSuppOption() const {return ((AliITSresponseSDD*)fResponse)->ZeroSuppOption();}
108 virtual void SetNSigmaIntegration(Double_t p1) {((AliITSresponseSDD*)fResponse)->SetNSigmaIntegration(p1);}
4bfbde86 109 virtual Float_t GetNSigmaIntegration() const {return ((AliITSresponseSDD*)fResponse)->NSigmaIntegration();}
fcf95fc7 110 virtual void SetNLookUp(Int_t p1) {((AliITSresponseSDD*)fResponse)->SetNLookUp(p1);}
111 virtual Int_t GetGausNLookUp() const {return ((AliITSresponseSDD*)fResponse)->GausNLookUp();}
4bfbde86 112 virtual Float_t GetGausLookUp(Int_t i) const {return ((AliITSresponseSDD*)fResponse)->GausLookUp(i);}
fcf95fc7 113 virtual Int_t Convert8to10(Int_t signal) const {return ((AliITSresponseSDD*)fResponse)->Convert8to10(signal);}
114 virtual void SetJitterError(Double_t jitter=20) {((AliITSresponseSDD*)fResponse)->SetJitterError(jitter);}
4bfbde86 115 virtual Float_t GetJitterError() const {return ((AliITSresponseSDD*)fResponse)->JitterError();}
fcf95fc7 116 virtual void SetDo10to8(Bool_t bitcomp=kTRUE) {((AliITSresponseSDD*)fResponse)->SetDo10to8(bitcomp);}
117 protected:
5bfe44ce 118
119
fcf95fc7 120 // these statis const should be move to AliITSsegmentationSDD
121 static const Int_t fgkWings = 2; // Number of wings per module
122 static const Int_t fgkChips = 4; // Number of chips/module
123 static const Int_t fgkChannels = 64; // Number of channels/chip
4bfbde86 124 static const Float_t fgkTemperatureDefault; // default for fT (Kelvin)
125 static const Float_t fgkNoiseDefault; // default for fNoise
126 static const Float_t fgkBaselineDefault; // default for fBaseline
127 static const Float_t fgkMinValDefault; // default for fMinVal
128 static const Float_t fgkGainDefault; //default for gain
5bfe44ce 129 static const Int_t fgkMapTimeNBin = 72; //map granularity along drift direction
fcf95fc7 130 Int_t fDeadChips; // Number of dead chips
131 Int_t fDeadChannels; // Number of dead channels
4bfbde86 132 Float_t fGain[fgkWings][fgkChips][fgkChannels];//Array for channel gains
133 Float_t fNoise[fgkWings*fgkChips*fgkChannels]; // Noise array
134 Float_t fBaseline[fgkWings*fgkChips*fgkChannels]; // Baseline array
135 Float_t fNoiseAfterEl[fgkWings*fgkChips*fgkChannels]; // Noise after electronics
136 Float_t fMinVal; // Min value used in 2D zero-suppression algo
fcf95fc7 137
f45f6658 138 Bool_t fIsDead; // module is dead or alive ?
139 TArrayI fBadChannels; //Array with bad anodes number (0-512)
5bfe44ce 140 Float_t fMapA[fgkChips*fgkChannels][fgkMapTimeNBin]; //array with deviations on anode coordinate
141 Float_t fMapT[fgkChips*fgkChannels][fgkMapTimeNBin]; //array with deviations on time coordinate
142
fcf95fc7 143 private:
144 AliITSCalibrationSDD(const AliITSCalibrationSDD &ob); // copy constructor
145 AliITSCalibrationSDD& operator=(const AliITSCalibrationSDD & /* source */); // ass. op.
146
147
4bfbde86 148 ClassDef(AliITSCalibrationSDD,5) // SDD response
fcf95fc7 149
150 };
151#endif