]>
Commit | Line | Data |
---|---|---|
fcf95fc7 | 1 | #ifndef ALIITSCALIBRATIONSSD_H |
2 | #define ALIITSCALIBRATIONSSD_H | |
b42cfa25 | 3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
fcf95fc7 | 5 | #include "AliITSCalibration.h" |
88128115 | 6 | #include "AliITSNoiseSSDv2.h" |
7 | #include "AliITSPedestalSSDv2.h" | |
8 | #include "AliITSGainSSDv2.h" | |
9 | #include "AliITSBadChannelsSSDv2.h" | |
fcf95fc7 | 10 | #include "AliITSresponseSSD.h" |
569a17d8 | 11 | #include "TArrayF.h" |
14a74335 | 12 | #include "TArrayI.h" |
fcf95fc7 | 13 | |
b42cfa25 | 14 | /* $Id$ */ |
fcf95fc7 | 15 | ////////////////////////////////////////////// |
16 | // Response class for SSD // | |
17 | // // | |
18 | ////////////////////////////////////////////// | |
19 | class AliITSCalibrationSSD : public AliITSCalibration { | |
20 | ||
21 | public: | |
22 | AliITSCalibrationSSD(); | |
23 | AliITSCalibrationSSD(const char *dataType); | |
24 | virtual ~AliITSCalibrationSSD(); | |
14a74335 | 25 | |
ced4d9bc | 26 | virtual void SetNoiseParam(Double_t , Double_t ) { |
27 | NotImplemented("SetNoiseParam");} | |
28 | ||
29 | virtual void GetNoiseParam(Double_t &, Double_t &) const { | |
30 | NotImplemented("SetNoiseParam");} | |
fcf95fc7 | 31 | |
ced4d9bc | 32 | Float_t GetNoiseP(Int_t n) {return fNoise->GetNoiseP(fModule,n); } |
33 | Float_t GetNoiseN(Int_t n) {return fNoise->GetNoiseN(fModule,n); } | |
88128115 | 34 | void SetNoise( AliITSNoiseSSDv2* noise) {fNoise=noise;} |
fb4dfab9 | 35 | |
ced4d9bc | 36 | Float_t GetPedestalP(Int_t n) {return fPedestal->GetPedestalP(fModule,n); } |
37 | Float_t GetPedestalN(Int_t n) {return fPedestal->GetPedestalN(fModule,n); } | |
88128115 | 38 | void SetPedestal( AliITSPedestalSSDv2* pedestal) {fPedestal=pedestal;} |
b42cfa25 | 39 | |
ced4d9bc | 40 | Float_t GetGainP(Int_t n) {return fGain->GetGainP(fModule,n); } |
41 | Float_t GetGainN(Int_t n) {return fGain->GetGainN(fModule,n); } | |
42 | void SetGainP(Int_t n, Float_t value) {fGain->AddGainP(fModule,n,value);} | |
43 | void SetGainN(Int_t n, Float_t value) {fGain->AddGainN(fModule,n,value);} | |
88128115 | 44 | void SetGain( AliITSGainSSDv2* gain) {fGain=gain;} |
fb4dfab9 | 45 | |
df1d5598 | 46 | void SetBad() { |
47 | fIsBad = kTRUE; | |
48 | for(Int_t i=0;i<fgkChipsPerModule;i++) fIsChipBad[i]=kTRUE; | |
49 | } | |
50 | virtual Bool_t IsBad() const { return fIsBad; } | |
51 | void SetChipBad(Int_t nChip) { | |
52 | fIsChipBad[nChip] = kTRUE; | |
53 | } | |
23197852 | 54 | void FillBadChipMap(); |
df1d5598 | 55 | virtual Bool_t IsChipBad(Int_t nChip) const { |
56 | return fIsChipBad[nChip]; | |
57 | } | |
ced4d9bc | 58 | Int_t ChipsPerModule() const{return fgkChipsPerModule;} // # chips/module |
59 | Int_t ChannelsPerChip() const{ return fgkChannelsPerChip;}// #channels/chip | |
60 | ||
88128115 | 61 | void SetBadChannels( AliITSBadChannelsSSDv2* badchannels) { |
ced4d9bc | 62 | fBadChannels=badchannels;} |
63 | Char_t GetBadPChannel(Int_t n) { | |
64 | return fBadChannels->GetBadChannelP(fModule,n); } | |
65 | Char_t GetBadNChannel(Int_t n) { | |
66 | return fBadChannels->GetBadChannelN(fModule,n); } | |
67 | Bool_t IsPChannelBad(Int_t n) { | |
68 | return fBadChannels->GetBadChannelP(fModule,n)&1; } | |
69 | Bool_t IsNChannelBad(Int_t n) { | |
70 | return fBadChannels->GetBadChannelN(fModule,n)&1; } | |
14a74335 | 71 | |
ced4d9bc | 72 | // |
fcf95fc7 | 73 | virtual void SetNDetParam(Int_t npar) { |
74 | // set number of param | |
75 | fNPar=npar; | |
76 | } | |
77 | virtual void SetDetParam(Double_t *par); | |
78 | ||
79 | // Parameters options | |
80 | virtual Int_t NDetParam() const { | |
81 | // number of param | |
82 | return fNPar; | |
83 | } | |
84 | virtual void GetDetParam(Double_t *dpar) const; | |
85 | ||
ced4d9bc | 86 | virtual void SetSigmaSpread(Double_t, Double_t) { |
87 | NotImplemented("SetSigmaSpread");} | |
88 | ||
89 | virtual void SigmaSpread(Double_t &, Double_t &) const { | |
90 | NotImplemented("SetSigmaSpread");} | |
91 | ||
92 | ||
fcf95fc7 | 93 | virtual void SetThresholds(Double_t /* a */, Double_t /* b */) |
94 | {NotImplemented("SetThresholds");} | |
95 | virtual void Thresholds(Double_t & /* a */, Double_t & /* b */) const | |
96 | {NotImplemented("Thresholds");} | |
97 | ||
9acf2ecc | 98 | virtual void SetADCpereV(Double_t a=120./24888.9) {((AliITSresponseSSD*)fResponse)->SetADCpereV(a);} |
fcf95fc7 | 99 | virtual Double_t GetDEvToADC(Double_t eV) const {return ((AliITSresponseSSD*)fResponse)->DEvToADC(eV);} |
100 | virtual Int_t IEvToADC(Double_t eV) const {return ((AliITSresponseSSD*)fResponse)->IEvToADC(eV);} | |
101 | ||
9acf2ecc | 102 | virtual void SetKeVperADC(Double_t a=86.4/120.0) {((AliITSresponseSSD*)fResponse)->SetKeVperADC(a);} |
103 | virtual Double_t ADCToKeV(Double_t adc) const {return ((AliITSresponseSSD*)fResponse)->ADCToKeV(adc);} | |
104 | ||
14a74335 | 105 | virtual Double_t GetCouplingPR() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingPR();} |
106 | virtual Double_t GetCouplingPL() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingPL();} | |
107 | virtual Double_t GetCouplingNR() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingNR();} | |
108 | virtual Double_t GetCouplingNL() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingNL();} | |
109 | virtual void SetCouplings(Double_t pr, Double_t pl, Double_t nr, Double_t nl) | |
110 | { ((AliITSresponseSSD*)fResponse)->SetCouplings(pr,pl,nr,nl);} | |
111 | ||
112 | virtual Int_t GetZSThreshold() const {return ((AliITSresponseSSD*)fResponse)->GetZSThreshold();} | |
113 | virtual void SetZSThreshold(Int_t zsth) | |
114 | { ((AliITSresponseSSD*)fResponse)->SetZSThreshold(zsth);} | |
115 | ||
ced4d9bc | 116 | void SetModule(Int_t mod){fModule = mod;} |
117 | ||
14a74335 | 118 | protected: |
df1d5598 | 119 | |
120 | static const Int_t fgkChipsPerModule = 12; // Number of chips/module | |
121 | static const Int_t fgkChannelsPerChip = 128; // Number of channels/chip | |
122 | ||
fcf95fc7 | 123 | static const Int_t fgkNParDefault; // default for fNPar |
14a74335 | 124 | |
ced4d9bc | 125 | Int_t fModule; //! module number (range 0 -> 1697) |
126 | ||
fcf95fc7 | 127 | Int_t fNPar; // Number of detector param |
128 | Double_t *fDetPar; //[fNPar] Array of parameters | |
129 | ||
88128115 | 130 | AliITSNoiseSSDv2 *fNoise; |
131 | AliITSPedestalSSDv2 *fPedestal; | |
132 | AliITSGainSSDv2 *fGain; | |
133 | AliITSBadChannelsSSDv2 *fBadChannels; | |
fb4dfab9 | 134 | |
df1d5598 | 135 | Bool_t fIsBad; // module is dead or alive ? |
136 | Bool_t fIsChipBad[fgkChipsPerModule]; // chip is dead or alive ? | |
137 | ||
fcf95fc7 | 138 | private: |
139 | AliITSCalibrationSSD(const AliITSCalibrationSSD &source); // copy constructor | |
140 | AliITSCalibrationSSD& operator=(const AliITSCalibrationSSD &source); // ass. op. | |
141 | ||
88128115 | 142 | ClassDef(AliITSCalibrationSSD,4) //Response class for SSD |
ced4d9bc | 143 | }; |
fcf95fc7 | 144 | #endif |