]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIITSONLINESDDTP_H | |
2 | #define ALIITSONLINESDDTP_H | |
3 | ||
4 | ||
5 | /////////////////////////////////////////////////////////////////// | |
6 | // // | |
7 | // Class used for SDD Test Pulse analysis // | |
8 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
9 | // // | |
10 | /////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include "AliITSOnlineSDD.h" | |
13 | ||
14 | class TH1F; | |
15 | class TH2F; | |
16 | class AliITSOnlineSDDTP : public AliITSOnlineSDD { | |
17 | ||
18 | public: | |
19 | AliITSOnlineSDDTP(); | |
20 | AliITSOnlineSDDTP(Int_t nddl, Int_t ncarlos, Int_t sid, Float_t xDAC); | |
21 | virtual ~AliITSOnlineSDDTP(); | |
22 | void Reset(); | |
23 | void AddEvent(TH2F* hrawd); | |
24 | void ValidateAnodes(); | |
25 | void ReadBaselines(); | |
26 | ||
27 | void SetNSigmaGain(Float_t sig=3.){fNSigmaGain=sig;} | |
28 | void SetNSigmaNoise(Float_t sig=10.){fNSigmaNoise=sig;} | |
29 | Bool_t IsModuleGood()const; | |
30 | Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];} | |
31 | Float_t GetAnodeBaseline(Int_t iAnode) const{ return fBaseline[iAnode];} | |
32 | Int_t GetAnodeEqualizedBaseline(Int_t iAnode) const{ return fEqBaseline[iAnode];} | |
33 | Int_t GetAnodeBaselineOffset(Int_t iAnode) const{ return fOffsetBaseline[iAnode];} | |
34 | Float_t GetAnodeRawNoise(Int_t iAnode) const{ return fRawNoise[iAnode];} | |
35 | Float_t GetAnodeCommonMode(Int_t iAnode) const{ return fCMN[iAnode];} | |
36 | Float_t GetAnodeCorrNoise(Int_t iAnode) const{return fCorrNoise[iAnode];} | |
37 | Float_t GetTimeBinTPPeak(Int_t iAnode) const{ | |
38 | if(fNEvents[iAnode]>0) return fTPPos[iAnode]/fNEvents[iAnode]; | |
39 | else return 0; | |
40 | } | |
41 | Int_t GetNEvents(Int_t iAnode) const {return fNEvents[iAnode];} | |
42 | Float_t GetChannelGain(Int_t iAnode)const{ | |
43 | if(fNEvents[iAnode]>0) return fSumTPPeak[iAnode]/fNEvents[iAnode]/fDAC; | |
44 | else return 0; | |
45 | } | |
46 | void StatGain(Float_t &mean, Float_t &rms); | |
47 | void WriteToASCII(); | |
48 | Bool_t WriteToROOT(TFile *fil); | |
49 | ||
50 | TH1F* GetBaselineAnodeHisto() const; | |
51 | TH1F* GetRawNoiseAnodeHisto() const; | |
52 | TH1F* GetCorrNoiseAnodeHisto() const; | |
53 | TH1F* GetCMNCoefAnodeHisto() const; | |
54 | TH1F* GetGainAnodeHisto() const; | |
55 | TH1F* GetStatusAnodeHisto() const; | |
56 | ||
57 | protected: | |
58 | ||
59 | private: | |
60 | Int_t fNEvents[fgkNAnodes]; // number of TP events for given anode | |
61 | Float_t fDAC; // Pascal Test Pulse amplitude (DAC units) | |
62 | Int_t fLowThreshold; // low threshold for zero supp. | |
63 | Int_t fHighThreshold; // high threshold for zero supp. | |
64 | Bool_t fGoodAnode[fgkNAnodes]; // array of anode quality (1 good, 0 bad) | |
65 | Float_t fBaseline[fgkNAnodes]; // array of anode baselines | |
66 | Int_t fEqBaseline[fgkNAnodes]; // array of anode baselines after equalization | |
67 | Int_t fOffsetBaseline[fgkNAnodes]; // array of offsets for baseline equal. | |
68 | Float_t fRawNoise[fgkNAnodes]; // array of anode raw noise | |
69 | Float_t fCMN[fgkNAnodes]; // common mode noise coeff. | |
70 | Float_t fCorrNoise[fgkNAnodes]; // array of anode corrected noise | |
71 | Float_t fSumTPPeak[fgkNAnodes]; // test pulse amplitude summed over events | |
72 | Float_t fTPPos[fgkNAnodes]; // test pulse position | |
73 | Float_t fNSigmaGain; // Cut value for gain (n*sigma) | |
74 | Float_t fNSigmaNoise; // Threshold for TP signal identification | |
75 | ClassDef(AliITSOnlineSDDTP,4); | |
76 | }; | |
77 | #endif |