new classes for resonance and V0 analysis (from R. Vernet)
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSSD.h
CommitLineData
fcf95fc7 1#ifndef ALIITSCALIBRATIONSSD_H
2#define ALIITSCALIBRATIONSSD_H
3
4#include "AliITSCalibration.h"
fb4dfab9 5#include "AliITSNoiseSSD.h"
6#include "AliITSGainSSD.h"
7#include "AliITSBadChannelsSSD.h"
fcf95fc7 8#include "AliITSresponseSSD.h"
569a17d8 9#include "TArrayF.h"
14a74335 10#include "TArrayI.h"
fcf95fc7 11
12//////////////////////////////////////////////
13// Response class for SSD //
14// //
15//////////////////////////////////////////////
16class AliITSCalibrationSSD : public AliITSCalibration {
17
18 public:
19 AliITSCalibrationSSD();
20 AliITSCalibrationSSD(const char *dataType);
21 virtual ~AliITSCalibrationSSD();
14a74335 22
fcf95fc7 23 virtual void SetNoiseParam(Double_t np, Double_t nn) {
14a74335 24 // set noise par
25 fNoiseP=np; fNoiseN=nn;
fcf95fc7 26 }
14a74335 27
fcf95fc7 28 virtual void GetNoiseParam(Double_t &np, Double_t &nn) const {
14a74335 29 // get noise par
30 np=fNoiseP; nn=fNoiseN;
fcf95fc7 31 }
32
fb4dfab9 33 void AddNoiseP(Int_t c, Float_t n) { fNoise->AddNoiseP(c,n);}
34 TArrayF GetNoiseP() {return fNoise->GetNoiseP(); }
35 Float_t GetNoiseP(Int_t n) {return fNoise->GetNoiseP(n); }
36 void AddNoiseN(Int_t c, Float_t n) { fNoise->AddNoiseN(c,n);}
37 TArrayF GetNoiseN() {return fNoise->GetNoiseN(); }
38 Float_t GetNoiseN(Int_t n) {return fNoise->GetNoiseN(n); }
39 void SetNoise( AliITSNoiseSSD* noise) {fNoise=noise;}
40
41 void AddGainP(Int_t c, Float_t n) { fGain->AddGainP(c,n);}
42 TArrayF GetGainP() {return fGain->GetGainP(); }
43 Float_t GetGainP(Int_t n) {return fGain->GetGainP(n); }
44 void AddGainN(Int_t c, Float_t n) { fGain->AddGainN(c,n);}
45 TArrayF GetGainN() {return fGain->GetGainN(); }
46 Float_t GetGainN(Int_t n) {return fGain->GetGainN(n); }
47 void SetGain( AliITSGainSSD* gain) {fGain=gain;}
48
ad2b76cb 49 TArrayI GetBadPChannelsList() { return fBadChannels->GetBadPChannelsList(); } const
50 TArrayI GetBadNChannelsList() { return fBadChannels->GetBadNChannelsList(); } const
fb4dfab9 51 void SetBadChannels( AliITSBadChannelsSSD* badchannels) {fBadChannels=badchannels;}
14a74335 52
53 void SetNoisePThreshold(Int_t threshold) { fNoisePThreshold = threshold;}
54 void AddNoisyPChannel(Int_t c, Int_t n) { fNoisyPChannelsList.AddAt(n,c);}
55 TArrayI GetNoisyPChannelsList() const {return fNoisyPChannelsList; }
56 void SetNoiseNThreshold(Int_t threshold) { fNoiseNThreshold = threshold;}
57 void AddNoisyNChannel(Int_t c, Int_t n) { fNoisyNChannelsList.AddAt(n,c);}
58 TArrayI GetNoisyNChannelsList() const {return fNoisyNChannelsList; }
59
60 void SetNDeadPChannelsList(Int_t n) { fDeadPChannelsList.Set(n); }
61 void AddDeadPChannel(Int_t c, Int_t n) { fDeadPChannelsList.AddAt(n,c);}
62 TArrayI GetDeadPChannelsList() const {return fDeadPChannelsList; }
63 void SetNDeadNChannelsList(Int_t n) { fDeadNChannelsList.Set(n); }
64 void AddDeadNChannel(Int_t c, Int_t n) { fDeadNChannelsList.AddAt(n,c);}
65 TArrayI GetDeadNChannelsList() const {return fDeadNChannelsList; }
66 //
67
68
fcf95fc7 69 virtual void SetNDetParam(Int_t npar) {
70 // set number of param
71 fNPar=npar;
72 }
73 virtual void SetDetParam(Double_t *par);
74
75 // Parameters options
76 virtual Int_t NDetParam() const {
77 // number of param
78 return fNPar;
79 }
80 virtual void GetDetParam(Double_t *dpar) const;
81
82 virtual void SetSigmaSpread(Double_t p1, Double_t p2) {
14a74335 83 // Set sigmas of the charge spread function: Pside-Nside
84 // square of (microns)
85 fSigmaP=p1; fSigmaN=p2;
fcf95fc7 86 }
14a74335 87
fcf95fc7 88 virtual void SigmaSpread(Double_t &sP, Double_t &sN) const {
14a74335 89 // Get sigmas for the charge spread
90 sP=fSigmaP; sN=fSigmaN;
fcf95fc7 91 }
92
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
98 virtual void SetParamOptions(const char *opt1, const char *opt2) {((AliITSresponseSSD*)fResponse)->SetParamOptions(opt1,opt2);}
99 virtual void GetParamOptions(char *opt1,char *opt2) const {((AliITSresponseSSD*)fResponse)->ParamOptions(opt1,opt2);}
9acf2ecc 100 virtual void SetADCpereV(Double_t a=120./24888.9) {((AliITSresponseSSD*)fResponse)->SetADCpereV(a);}
fcf95fc7 101 virtual Double_t GetDEvToADC(Double_t eV) const {return ((AliITSresponseSSD*)fResponse)->DEvToADC(eV);}
102 virtual Int_t IEvToADC(Double_t eV) const {return ((AliITSresponseSSD*)fResponse)->IEvToADC(eV);}
103
9acf2ecc 104 virtual void SetKeVperADC(Double_t a=86.4/120.0) {((AliITSresponseSSD*)fResponse)->SetKeVperADC(a);}
105 virtual Double_t ADCToKeV(Double_t adc) const {return ((AliITSresponseSSD*)fResponse)->ADCToKeV(adc);}
106
14a74335 107 virtual Double_t GetCouplingPR() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingPR();}
108 virtual Double_t GetCouplingPL() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingPL();}
109 virtual Double_t GetCouplingNR() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingNR();}
110 virtual Double_t GetCouplingNL() const {return ((AliITSresponseSSD*)fResponse)->GetCouplingNL();}
111 virtual void SetCouplings(Double_t pr, Double_t pl, Double_t nr, Double_t nl)
112 { ((AliITSresponseSSD*)fResponse)->SetCouplings(pr,pl,nr,nl);}
113
114 virtual Int_t GetZSThreshold() const {return ((AliITSresponseSSD*)fResponse)->GetZSThreshold();}
115 virtual void SetZSThreshold(Int_t zsth)
116 { ((AliITSresponseSSD*)fResponse)->SetZSThreshold(zsth);}
117
118protected:
fcf95fc7 119 static const Double_t fgkNoiseNDefault; // default for fNoiseN
120 static const Double_t fgkNoisePDefault; // default for fNoiseP
121 static const Int_t fgkNParDefault; // default for fNPar
122 static const Double_t fgkSigmaPDefault; //default for fSigmaP
123 static const Double_t fgkSigmaNDefault; //default for fSigmaP
14a74335 124
fcf95fc7 125 Int_t fNPar; // Number of detector param
126 Double_t *fDetPar; //[fNPar] Array of parameters
127
128 Double_t fNoiseP; // Noise on Pside
129 Double_t fNoiseN; // Noise on Nside
fcf95fc7 130 Double_t fSigmaP; // Sigma charge spread on Pside
131 Double_t fSigmaN; // Sigma charge spread on Nside
132
fb4dfab9 133 AliITSNoiseSSD *fNoise;
134 AliITSGainSSD *fGain;
135 AliITSBadChannelsSSD *fBadChannels;
136
569a17d8 137 TArrayF fGainP; // Gain for P side channels
138 TArrayF fGainN; // Gain for N side channels
14a74335 139
569a17d8 140 TArrayF fNoisP; // Noise for P side channels
141 TArrayF fNoisN; // Noise for N side channels
14a74335 142
569a17d8 143 Float_t fNoisePThreshold; // need to decide if channel is noisy
14a74335 144 TArrayI fNoisyPChannelsList; // list of P side noisy channels
569a17d8 145 Float_t fNoiseNThreshold; // need to decide if channel is noisy
14a74335 146 TArrayI fNoisyNChannelsList; // list of N side noisy channels
147
148 TArrayI fDeadNChannelsList; // list of P side dead channels
149 TArrayI fDeadPChannelsList; // list of N side dead channels
150
fcf95fc7 151 private:
152 AliITSCalibrationSSD(const AliITSCalibrationSSD &source); // copy constructor
153 AliITSCalibrationSSD& operator=(const AliITSCalibrationSSD &source); // ass. op.
154
155 ClassDef(AliITSCalibrationSSD,1) //Response class for SSD
156};
157#endif