1 #ifndef ALIITSONLINESDDTP_H
2 #define ALIITSONLINESDDTP_H
5 ///////////////////////////////////////////////////////////////////
7 // Class used for SDD Test Pulse analysis //
8 // Origin: F.Prino, Torino, prino@to.infn.it //
10 ///////////////////////////////////////////////////////////////////
12 #include "AliITSOnlineSDD.h"
16 class AliITSOnlineSDDTP : public AliITSOnlineSDD {
20 AliITSOnlineSDDTP(Int_t nddl, Int_t ncarlos, Int_t sid, Float_t xDAC);
21 virtual ~AliITSOnlineSDDTP();
23 void AddEvent(TH2F* hrawd);
24 void ValidateAnodes();
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];
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;
46 void StatGain(Float_t &mean, Float_t &rms);
48 Bool_t WriteToROOT(TFile *fil);
50 TH1F* GetBaselineAnodeHisto() const;
51 TH1F* GetRawNoiseAnodeHisto() const;
52 TH1F* GetCorrNoiseAnodeHisto() const;
53 TH1F* GetCMNCoefAnodeHisto() const;
54 TH1F* GetGainAnodeHisto() const;
55 TH1F* GetStatusAnodeHisto() const;
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);