]>
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 TH2F; | |
15 | class AliITSOnlineSDDTP : public AliITSOnlineSDD { | |
16 | ||
17 | public: | |
18 | AliITSOnlineSDDTP(); | |
19 | AliITSOnlineSDDTP(Int_t nddl, Int_t ncarlos, Int_t sid, Float_t xDAC); | |
20 | virtual ~AliITSOnlineSDDTP(); | |
21 | void Reset(); | |
22 | void AddEvent(TH2F* hrawd); | |
23 | void ValidateAnodes(); | |
24 | void ReadBaselines(); | |
25 | ||
26 | void SetNSigmaGain(Float_t sig=3.){fNSigmaGain=sig;} | |
27 | void SetNSigmaNoise(Float_t sig=10.){fNSigmaNoise=sig;} | |
28 | Bool_t IsModuleGood()const; | |
29 | Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];} | |
30 | Float_t GetAnodeBaseline(Int_t iAnode) const{ return fBaseline[iAnode];} | |
31 | Int_t GetAnodeEqualizedBaseline(Int_t iAnode) const{ return fEqBaseline[iAnode];} | |
32 | Int_t GetAnodeBaselineOffset(Int_t iAnode) const{ return fOffsetBaseline[iAnode];} | |
33 | Float_t GetAnodeRawNoise(Int_t iAnode) const{ return fRawNoise[iAnode];} | |
34 | Float_t GetAnodeCommonMode(Int_t iAnode) const{ return fCMN[iAnode];} | |
35 | Float_t GetAnodeCorrNoise(Int_t iAnode) const{return fCorrNoise[iAnode];} | |
36 | Float_t GetTimeBinTPPeak(Int_t iAnode) const{ | |
37 | if(fNEvents[iAnode]>0) return fTPPos[iAnode]/fNEvents[iAnode]; | |
38 | else return 0; | |
39 | } | |
40 | Int_t GetNEvents(Int_t iAnode) const {return fNEvents[iAnode];} | |
41 | Float_t GetChannelGain(Int_t iAnode)const{ | |
42 | if(fNEvents[iAnode]>0) return fSumTPPeak[iAnode]/fNEvents[iAnode]/fDAC; | |
43 | else return 0; | |
44 | } | |
45 | void StatGain(Float_t &mean, Float_t &rms); | |
46 | void WriteToASCII(); | |
47 | Bool_t WriteToROOT(TFile *fil); | |
48 | ||
49 | protected: | |
50 | ||
51 | private: | |
52 | Int_t fNEvents[fgkNAnodes]; // number of TP events for given anode | |
53 | Float_t fDAC; // Pascal Test Pulse amplitude (DAC units) | |
54 | Int_t fLowThreshold; // low threshold for zero supp. | |
55 | Int_t fHighThreshold; // high threshold for zero supp. | |
56 | Bool_t fGoodAnode[fgkNAnodes]; // array of anode quality (1 good, 0 bad) | |
57 | Float_t fBaseline[fgkNAnodes]; // array of anode baselines | |
58 | Int_t fEqBaseline[fgkNAnodes]; // array of anode baselines after equalization | |
59 | Int_t fOffsetBaseline[fgkNAnodes]; // array of offsets for baseline equal. | |
60 | Float_t fRawNoise[fgkNAnodes]; // array of anode raw noise | |
61 | Float_t fCMN[fgkNAnodes]; // common mode noise coeff. | |
62 | Float_t fCorrNoise[fgkNAnodes]; // array of anode corrected noise | |
63 | Float_t fSumTPPeak[fgkNAnodes]; // test pulse amplitude summed over events | |
64 | Float_t fTPPos[fgkNAnodes]; // test pulse position | |
65 | Float_t fNSigmaGain; // Cut value for gain (n*sigma) | |
66 | Float_t fNSigmaNoise; // Threshold for TP signal identification | |
67 | ClassDef(AliITSOnlineSDDTP,4); | |
68 | }; | |
69 | #endif |