Adding some further mother volumes to speed-up the overlap checking and particle...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDTP.h
CommitLineData
348f80b7 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
0e5e647a 12#include "AliITSOnlineSDD.h"
348f80b7 13
14class TH2F;
348f80b7 15class AliITSOnlineSDDTP : public AliITSOnlineSDD {
16
17 public:
18 AliITSOnlineSDDTP();
979b5a5f 19 AliITSOnlineSDDTP(Int_t nddl, Int_t ncarlos, Int_t sid, Float_t xDAC);
348f80b7 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;}
750296dd 27 void SetNSigmaNoise(Float_t sig=10.){fNSigmaNoise=sig;}
3083967f 28 Bool_t IsModuleGood()const;
348f80b7 29 Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];}
3083967f 30 Float_t GetAnodeBaseline(Int_t iAnode) const{ return fBaseline[iAnode];}
d8303ac8 31 Int_t GetAnodeEqualizedBaseline(Int_t iAnode) const{ return fEqBaseline[iAnode];}
32 Int_t GetAnodeBaselineOffset(Int_t iAnode) const{ return fOffsetBaseline[iAnode];}
3083967f 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];}
750296dd 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];}
348f80b7 41 Float_t GetChannelGain(Int_t iAnode)const{
750296dd 42 if(fNEvents[iAnode]>0) return fSumTPPeak[iAnode]/fNEvents[iAnode]/fDAC;
348f80b7 43 else return 0;
44 }
45 void StatGain(Float_t &mean, Float_t &rms);
e44f571c 46 void WriteToASCII();
3083967f 47 Bool_t WriteToROOT(TFile *fil);
348f80b7 48
49 protected:
50
51 private:
750296dd 52 Int_t fNEvents[fgkNAnodes]; // number of TP events for given anode
3083967f 53 Float_t fDAC; // Pascal Test Pulse amplitude (DAC units)
e7610d19 54 Int_t fLowThreshold; // low threshold for zero supp.
55 Int_t fHighThreshold; // high threshold for zero supp.
3083967f 56 Bool_t fGoodAnode[fgkNAnodes]; // array of anode quality (1 good, 0 bad)
beb262b4 57 Float_t fBaseline[fgkNAnodes]; // array of anode baselines
d8303ac8 58 Int_t fEqBaseline[fgkNAnodes]; // array of anode baselines after equalization
59 Int_t fOffsetBaseline[fgkNAnodes]; // array of offsets for baseline equal.
3083967f 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
beb262b4 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)
750296dd 66 Float_t fNSigmaNoise; // Threshold for TP signal identification
d8303ac8 67 ClassDef(AliITSOnlineSDDTP,4);
348f80b7 68};
69#endif