]>
Commit | Line | Data |
---|---|---|
348f80b7 | 1 | #ifndef ALIITSONLINESDDBASE_H |
2 | #define ALIITSONLINESDDBASE_H | |
3 | ||
4 | /////////////////////////////////////////////////////////////////// | |
5 | // // | |
6 | // Class used for SDD baseline and noise analysis // | |
7 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
8 | // // | |
9 | /////////////////////////////////////////////////////////////////// | |
0e5e647a | 10 | #include "AliITSOnlineSDD.h" |
11 | #include <TMath.h> | |
348f80b7 | 12 | |
13 | class TH2F; | |
14 | class TGraph; | |
15 | class AliITSOnlineSDDBase : public AliITSOnlineSDD { | |
16 | ||
17 | public: | |
18 | AliITSOnlineSDDBase(); | |
979b5a5f | 19 | AliITSOnlineSDDBase(Int_t nddl, Int_t ncarlos, Int_t sid); |
348f80b7 | 20 | virtual ~AliITSOnlineSDDBase(); |
21 | void Reset(); | |
22 | void AddEvent(TH2F* hrawd); | |
23 | void ValidateAnodes(); | |
24 | ||
25 | void SetMinBaseline(Float_t bas=10.){fMinBaseline=bas;} | |
26 | void SetMaxBaseline(Float_t bas=150.){fMaxBaseline=bas;} | |
1f8a8566 | 27 | void SetMinRawNoise(Float_t ns=0.5){fMinRawNoise=ns;} |
348f80b7 | 28 | void SetMaxRawNoise(Float_t ns=9.){fMaxRawNoise=ns;} |
29 | void SetNSigmaNoise(Float_t ns=4.){fNSigmaNoise=ns;} | |
e7610d19 | 30 | void SetGoldenBaselineValue(Float_t val=20.){fGoldenBaseline=val;} |
31 | void SetZeroSuppThresholds(Float_t vall=2.2,Float_t valh=4.){ | |
32 | fLowThrFact=vall; | |
33 | fHighThrFact=valh; | |
34 | } | |
348f80b7 | 35 | |
36 | Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];} | |
37 | Float_t GetAnodeBaseline(Int_t iAnode) const{ | |
38 | if(fNEvents>0) return fSumBaseline[iAnode]/fNEvents; | |
39 | else return 0; | |
40 | } | |
e7610d19 | 41 | void GetMinAndMaxBaseline(Float_t &basMin, Float_t &basMax) const; |
d8303ac8 | 42 | Float_t GetMinimumBaseline() const; |
348f80b7 | 43 | Float_t GetAnodeRawNoise(Int_t iAnode) const{ |
44 | if(fNEvents>0) return TMath::Sqrt(fSumRawNoise[iAnode]/fNEvents-TMath::Power(GetAnodeBaseline(iAnode),2)); | |
45 | ||
46 | else return 0; | |
47 | } | |
48 | ||
116c6c50 | 49 | Int_t CountGoodAnodes() const{ |
50 | Int_t nGdAn=0; | |
51 | for(Int_t ian=0;ian<fgkNAnodes;ian++) if(fGoodAnode[ian]) nGdAn++; | |
52 | return nGdAn; | |
53 | } | |
beb262b4 | 54 | Float_t CalcMeanRawNoise() const; |
348f80b7 | 55 | Float_t GetAnodeCommonMode(Int_t iAnode) const{ |
56 | if(fNEvents>0) return fSumCMN[iAnode]/fNEvents; | |
57 | else return 0; | |
58 | } | |
59 | Int_t GetNEvents() const {return fNEvents;} | |
e44f571c | 60 | void WriteToASCII(); |
348f80b7 | 61 | |
62 | protected: | |
63 | ||
64 | private: | |
e7610d19 | 65 | static const Int_t fgkMaxCorr; // maximum baseline correction in AMBRA (=63) |
66 | ||
beb262b4 | 67 | Int_t fNEvents; // number of events |
68 | Bool_t fGoodAnode[fgkNAnodes]; // anode quality: good(1) - bad (0) | |
69 | Float_t fSumBaseline[fgkNAnodes]; // baseline summed over events | |
70 | Float_t fSumRawNoise[fgkNAnodes]; // noise summed over events | |
71 | Float_t fSumCMN[fgkNAnodes]; // common mode noise coeff. | |
72 | Float_t fMinBaseline; // Cut value for minimum baseline | |
73 | Float_t fMaxBaseline; // Cut value for maximum baseline | |
74 | Float_t fMinRawNoise; // Cut value for minimum noise | |
75 | Float_t fMaxRawNoise; // Cut value for maximum noise | |
76 | Float_t fNSigmaNoise; // Cut value for noise (n*sigma) | |
e7610d19 | 77 | Float_t fGoldenBaseline; // golden value for equalizing baselines |
78 | Float_t fLowThrFact; // factor for low threshold | |
79 | Float_t fHighThrFact; // factor for high threshold | |
348f80b7 | 80 | |
e7610d19 | 81 | ClassDef(AliITSOnlineSDDBase,2); |
348f80b7 | 82 | }; |
83 | #endif |