SDD DA updated: baseline equalized to 20 for each hybrid. Added Carlos thresholds...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDCMN.h
CommitLineData
7f347565 1#ifndef ALIITSONLINESDDCMN_H
2#define ALIITSONLINESDDCMN_H
3
4///////////////////////////////////////////////////////////////////
5// //
6// Class used for SDD noise corrected for common mode analysis //
7// Origin: F.Prino, Torino, prino@to.infn.it //
8// //
9///////////////////////////////////////////////////////////////////
10#include "AliITSOnlineSDD.h"
11
4ff6aa93 12class TH1F;
7f347565 13class TH2F;
14class TGraph;
15class AliITSOnlineSDDCMN : public AliITSOnlineSDD {
16
17 public:
18 AliITSOnlineSDDCMN();
979b5a5f 19 AliITSOnlineSDDCMN(Int_t nddl, Int_t ncarlos, Int_t sid);
7f347565 20 virtual ~AliITSOnlineSDDCMN();
21 void Reset();
22 void AddEvent(TH2F* hrawd);
23 void ValidateAnodes();
24 void ReadBaselines();
25
26 void SetMinNoise(Float_t ns=0.001){fMinCorrNoise=ns;}
27 void SetMaxNoise(Float_t ns=9.){fMaxCorrNoise=ns;}
28 void SetNSigmaNoise(Float_t ns=4.){fNSigmaNoise=ns;}
29
30 Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];}
31 Float_t GetAnodeBaseline(Int_t iAnode) const{ return fBaseline[iAnode];}
d8303ac8 32 Int_t GetAnodeEqualizedBaseline(Int_t iAnode) const{ return fEqBaseline[iAnode];}
33 Int_t GetAnodeBaselineOffset(Int_t iAnode) const{ return fOffsetBaseline[iAnode];}
7f347565 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{
37 if(fNEvents>0) return fSumCorrNoise[iAnode]/fNEvents;
38 else return 0;
39 }
40
beb262b4 41 Float_t CalcMeanNoise() const;
7f347565 42 Int_t GetNEvents() const {return fNEvents;}
4ff6aa93 43
44 TH1F* GetBaselineAnodeHisto() const;
45 TH1F* GetRawNoiseAnodeHisto() const;
46 TH1F* GetCorrNoiseAnodeHisto() const;
47 TH1F* GetBaselineHisto() const;
48 TH1F* GetRawNoiseHisto() const;
49 TH1F* GetCorrNoiseHisto() const;
50
e44f571c 51 void WriteToASCII();
52 Bool_t WriteToROOT(TFile *fil);
7f347565 53
54 protected:
55
56 private:
beb262b4 57 Int_t fNEvents; // number of events
e7610d19 58 Int_t fLowThreshold; // low threshold for zero supp.
59 Int_t fHighThreshold; // high threshold for zero supp.
beb262b4 60 Bool_t fGoodAnode[fgkNAnodes]; // anode quality: good(1) - bad (0)
61 Float_t fBaseline[fgkNAnodes]; // array of anode baselines
d8303ac8 62 Int_t fEqBaseline[fgkNAnodes]; // array of anode baselines after equalization
63 Int_t fOffsetBaseline[fgkNAnodes]; // array of offsets for baseline equal.
beb262b4 64 Float_t fRawNoise[fgkNAnodes]; // array of anode raw noise
65 Float_t fSumCorrNoise[fgkNAnodes]; // corrected noise summed over events
66 Float_t fCMN[fgkNAnodes]; // common mode noise coeff.
67 Float_t fMinCorrNoise; // Cut value for minimum corrected noise
68 Float_t fMaxCorrNoise; // Cut value for maximum corrected noise
69 Float_t fNSigmaNoise; // Cut value for corrected noise (n*sigma)
7f347565 70
e7610d19 71 ClassDef(AliITSOnlineSDDCMN,3);
7f347565 72};
73#endif