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