]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRawFitterv0.h
Raw data decoder is migrated from AliCaloRawStream to AliCaloRawStreamV3
[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 ;}
28 void SetSamples(const UShort_t *sig, Int_t sigStart, Int_t sigLength);
29 void SetNBunches(const Int_t nBunches) { fNBunches = nBunches; }
30 void SetChannelGeo(const Int_t module, const Int_t cellX,
31 const Int_t cellZ, const Int_t caloFlag);
32
33 virtual Bool_t Eval();
34 Double_t GetEnergy() const { return fEnergy; }
35 Double_t GetTime() const { return fTime; }
36 Double_t GetSignalQuality() const { return fQuality; }
37 Double_t GetPedestalRMS() const { return fPedestalRMS; }
38 Int_t GetModule() const { return fModule; }
39 Int_t GetCellX() const { return fCellX; }
40 Int_t GetCellZ() const { return fCellZ; }
41 Int_t GetCaloFlag() const { return fCaloFlag; }
42 Bool_t IsOverflow() const { return fOverflow; }
43
44 void SetCalibData(AliPHOSCalibData * cdata){ fCalibData=cdata ;}
45
46protected:
47
48 UShort_t *fSignal; // array of samples
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
53 Int_t fStart; // time bin of start signal
54 Int_t fLength; // signal length in time bins
55 Int_t fNBunches; // number of bunches in a signal
56 Bool_t fPedSubtract; // pedestals subtraction (kTRUE="yes")
57 Double_t fEnergy; // "digit" energy
58 Double_t fTime; // "digit" time
59 Double_t fQuality ; // sample quality
60 Double_t fPedestalRMS; // calciulated RMS of pedestal (non-ZS runs)
61 Int_t fAmpOffset ; // pedestal offset from ALTRO chips
62 Int_t fAmpThreshold ; // zero suppression threshold from ALTRO chips
63 Bool_t fOverflow ; // kTRUE is the signal overflows
64 AliPHOSCalibData * fCalibData ; //! Calibration database if avalable
65
66 ClassDef(AliPHOSRawFitterv0,1)
67};
68
69#endif