]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRawFitterv0.h
SVN keyword substitution is added
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawFitterv0.h
1 #ifndef ALIPHOSRAWFITTERV0_H
2 #define ALIPHOSRAWFITTERV0_H
3 /* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                          */
5
6 /* $Id: $ */
7
8 // This class extracts the signal parameters (energy, time, quality)
9 // from ALTRO samples. Energy is in ADC counts, time is in time bin units.
10 // A coarse algorithm is applied.
11
12 class TArrayI;
13 class AliPHOSCalibData;
14
15 class AliPHOSRawFitterv0 : public TObject 
16 {
17
18 public:
19
20   AliPHOSRawFitterv0();
21   AliPHOSRawFitterv0(const AliPHOSRawFitterv0& rawFitterv0);
22   AliPHOSRawFitterv0& operator = (const AliPHOSRawFitterv0& rawFitterv0);
23   virtual ~AliPHOSRawFitterv0();
24
25   void SubtractPedestals(Bool_t subtract) {fPedSubtract  = subtract;}
26   void SetAmpOffset     (Int_t extPed=5)  {fAmpOffset    = extPed ;}
27   void SetAmpThreshold  (Int_t thr=5)     {fAmpThreshold = thr ;}
28   void SetNBunches(const Int_t nBunches) { fNBunches = nBunches; }
29   void SetChannelGeo(const Int_t module, const Int_t cellX,
30                      const Int_t cellZ,  const Int_t caloFlag);
31
32   virtual Bool_t Eval(const UShort_t *signal, Int_t sigStart, Int_t sigLength);
33   Double_t GetEnergy()        const { return fEnergy;      }
34   Double_t GetTime()          const { return fTime;        }
35   Double_t GetSignalQuality() const { return fQuality;     }
36   Double_t GetPedestalRMS()   const { return fPedestalRMS; }
37   Int_t    GetModule()        const { return fModule;      }
38   Int_t    GetCellX()         const { return fCellX;       }
39   Int_t    GetCellZ()         const { return fCellZ;       }
40   Int_t    GetCaloFlag()      const { return fCaloFlag;    }
41   Bool_t   IsOverflow()       const { return fOverflow;    }
42
43   void SetCalibData(AliPHOSCalibData * cdata){ fCalibData=cdata ;}
44
45 protected:   
46   
47   Int_t    fModule;         // PHOS module number
48   Int_t    fCellX;          // cell number along X-axis
49   Int_t    fCellZ;          // cell number along Z-axis
50   Int_t    fCaloFlag;       // 0=LG, 1=HG, 2=TRU
51   Int_t    fNBunches;       // number of bunches in a signal
52   Bool_t   fPedSubtract;    // pedestals subtraction (kTRUE="yes")
53   Double_t fEnergy;         // "digit" energy
54   Double_t fTime;           // "digit" time
55   Double_t fQuality ;       // sample quality
56   Double_t fPedestalRMS;    // calciulated RMS of pedestal (non-ZS runs)
57   Int_t    fAmpOffset ;     // pedestal offset from ALTRO chips
58   Int_t    fAmpThreshold ;  // zero suppression threshold from ALTRO chips
59   Bool_t   fOverflow ;      // kTRUE is the signal overflows
60   AliPHOSCalibData * fCalibData ;   //! Calibration database if avalable
61
62   ClassDef(AliPHOSRawFitterv0,2)
63 };
64
65 #endif