]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSOnlineSDDTP.h
1a198e0e29bec4b76718daa3fdbb09ab6c20d674
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDTP.h
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 mod, 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   Bool_t IsAnodeGood(Int_t iAnode)const{ return fGoodAnode[iAnode];}
28   Int_t GetNEvents() const {return fNEvents;}
29   Float_t GetChannelGain(Int_t iAnode)const{
30     if(fNEvents>0) return fSumTPPeak[iAnode]/fNEvents/fDAC;
31     else return 0;
32   }
33   void StatGain(Float_t &mean, Float_t  &rms);
34   void WriteToFXS();
35
36  protected:
37
38  private:
39   Int_t fNEvents;                  // number of events
40   Float_t fDAC;                     // Pascal Test Pulse amplitude (DAC units)
41   Bool_t fGoodAnode[fgkNAnodes]; // array of anode quality (1 good, 0 bad) 
42   Float_t fBaseline[fgkNAnodes];   // array of anode baselines
43   Float_t fSumTPPeak[fgkNAnodes];  // test pulse amplitude summed over events
44   Float_t fTPPos[fgkNAnodes];      // test pulse position
45   Float_t fNSigmaGain;             // Cut value for gain (n*sigma)
46
47   ClassDef(AliITSOnlineSDDTP,1);
48 };
49 #endif