1 #ifndef ALIITSONLINESDDCMN_H
2 #define ALIITSONLINESDDCMN_H
4 ///////////////////////////////////////////////////////////////////
6 // Class used for SDD noise corrected for common mode analysis //
7 // Origin: F.Prino, Torino, prino@to.infn.it //
9 ///////////////////////////////////////////////////////////////////
10 #include "AliITSOnlineSDD.h"
15 class AliITSOnlineSDDCMN : public AliITSOnlineSDD {
19 AliITSOnlineSDDCMN(Int_t nddl, Int_t ncarlos, Int_t sid);
20 virtual ~AliITSOnlineSDDCMN();
22 TH2F* GetCleanEvent(TH2F* hrawd) const;
23 void AddEvent(TH2F* hrawd);
24 void ValidateAnodes();
27 void SetMinNoise(Float_t ns=0.001){fMinCorrNoise=ns;}
28 void SetMaxNoise(Float_t ns=9.){fMaxCorrNoise=ns;}
29 void SetNSigmaNoise(Float_t ns=4.){fNSigmaNoise=ns;}
31 Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];}
32 Float_t GetAnodeBaseline(Int_t iAnode) const{ return fBaseline[iAnode];}
33 Int_t GetAnodeEqualizedBaseline(Int_t iAnode) const{ return fEqBaseline[iAnode];}
34 Int_t GetAnodeBaselineOffset(Int_t iAnode) const{ return fOffsetBaseline[iAnode];}
35 Float_t GetAnodeRawNoise(Int_t iAnode) const{ return fRawNoise[iAnode];}
36 Float_t GetAnodeCommonMode(Int_t iAnode) const{ return fCMN[iAnode];}
37 Float_t GetAnodeCorrNoise(Int_t iAnode) const{
38 if(fNEvents>0) return fSumCorrNoise[iAnode]/fNEvents;
42 Float_t CalcMeanNoise() const;
43 Int_t GetNEvents() const {return fNEvents;}
45 TH1F* GetBaselineAnodeHisto() const;
46 TH1F* GetRawNoiseAnodeHisto() const;
47 TH1F* GetCorrNoiseAnodeHisto() const;
48 TH1F* GetCMNCoefAnodeHisto() const;
49 TH1F* GetStatusAnodeHisto() const;
50 TH1F* GetBaselineHisto() const;
51 TH1F* GetRawNoiseHisto() const;
52 TH1F* GetCorrNoiseHisto() const;
55 Bool_t WriteToROOT(TFile *fil);
60 Int_t fNEvents; // number of events
61 Int_t fLowThreshold; // low threshold for zero supp.
62 Int_t fHighThreshold; // high threshold for zero supp.
63 Bool_t fGoodAnode[fgkNAnodes]; // anode quality: good(1) - bad (0)
64 Float_t fBaseline[fgkNAnodes]; // array of anode baselines
65 Int_t fEqBaseline[fgkNAnodes]; // array of anode baselines after equalization
66 Int_t fOffsetBaseline[fgkNAnodes]; // array of offsets for baseline equal.
67 Float_t fRawNoise[fgkNAnodes]; // array of anode raw noise
68 Float_t fSumCorrNoise[fgkNAnodes]; // corrected noise summed over events
69 Float_t fCMN[fgkNAnodes]; // common mode noise coeff.
70 Float_t fMinCorrNoise; // Cut value for minimum corrected noise
71 Float_t fMaxCorrNoise; // Cut value for maximum corrected noise
72 Float_t fNSigmaNoise; // Cut value for corrected noise (n*sigma)
74 ClassDef(AliITSOnlineSDDCMN,3);