Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawFitterv0.h
CommitLineData
379c5c09 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
12class TArrayI;
13class AliPHOSCalibData;
14
15class AliPHOSRawFitterv0 : public TObject
16{
17
18public:
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 ;}
379c5c09 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
92236b27 32 virtual Bool_t Eval(const UShort_t *signal, Int_t sigStart, Int_t sigLength);
379c5c09 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; }
28aa5f2d 42 Int_t GetAmpOffset() const { return fAmpOffset; }
43 Int_t GetAmpThreshold() const { return fAmpThreshold;}
379c5c09 44
45 void SetCalibData(AliPHOSCalibData * cdata){ fCalibData=cdata ;}
46
47protected:
48
379c5c09 49 Int_t fModule; // PHOS module number
50 Int_t fCellX; // cell number along X-axis
51 Int_t fCellZ; // cell number along Z-axis
52 Int_t fCaloFlag; // 0=LG, 1=HG, 2=TRU
379c5c09 53 Int_t fNBunches; // number of bunches in a signal
54 Bool_t fPedSubtract; // pedestals subtraction (kTRUE="yes")
55 Double_t fEnergy; // "digit" energy
56 Double_t fTime; // "digit" time
57 Double_t fQuality ; // sample quality
58 Double_t fPedestalRMS; // calciulated RMS of pedestal (non-ZS runs)
59 Int_t fAmpOffset ; // pedestal offset from ALTRO chips
60 Int_t fAmpThreshold ; // zero suppression threshold from ALTRO chips
61 Bool_t fOverflow ; // kTRUE is the signal overflows
62 AliPHOSCalibData * fCalibData ; //! Calibration database if avalable
63
92236b27 64 ClassDef(AliPHOSRawFitterv0,2)
379c5c09 65};
66
67#endif