]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIPHOSRAWDIGIPRODUCER_H | |
2 | #define ALIPHOSRAWDIGIPRODUCER_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 produces PHOS digits of one event | |
9 | //using AliPHOSRawFitter. See cxx source for use case. | |
10 | ||
11 | class AliPHOSCalibData ; | |
12 | class AliPHOSDigit ; | |
13 | class AliPHOSGeometry ; | |
14 | class AliPHOSPulseGenerator; | |
15 | class AliRawReader; | |
16 | class AliCaloRawStreamV3; | |
17 | class AliPHOSRawFitterv0; | |
18 | ||
19 | #include "AliAltroMapping.h" | |
20 | #include "TObject.h" | |
21 | ||
22 | class AliPHOSRawDigiProducer: public TObject { | |
23 | ||
24 | public: | |
25 | ||
26 | AliPHOSRawDigiProducer() ; | |
27 | AliPHOSRawDigiProducer(AliRawReader *rawReader, AliAltroMapping **mapping = NULL); | |
28 | AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp); | |
29 | AliPHOSRawDigiProducer& operator= (const AliPHOSRawDigiProducer &dp); | |
30 | ||
31 | virtual ~AliPHOSRawDigiProducer(); | |
32 | ||
33 | void MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0* fitter); | |
34 | void MakeDigits(TClonesArray *digits, TClonesArray *tmpDigLG, AliPHOSRawFitterv0* fitter); | |
35 | ||
36 | void SetEmcMinAmp(Float_t emcMin) { fEmcMinE=emcMin; } | |
37 | void SetCpvMinAmp(Float_t cpvMin) { fCpvMinE=cpvMin; } | |
38 | void SetSampleQualityCut(Float_t qcut) { fSampleQualityCut=qcut; } | |
39 | ||
40 | protected: | |
41 | ||
42 | void GetCalibrationParameters() ; //Extract calibration parameters from DB | |
43 | void CleanDigits(TClonesArray* digits) ; //remove digits below threshold and bad ones | |
44 | ||
45 | Bool_t IsInEMC(AliPHOSDigit* digit) const ; //tests if digit belongs to EMC | |
46 | Bool_t IsInCPV(AliPHOSDigit* digit) const ; | |
47 | ||
48 | Double_t CalibrateE(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate energy | |
49 | Double_t CalibrateT(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate time | |
50 | ||
51 | private: | |
52 | Float_t fEmcMinE ; // minimum energy of digit (ADC) | |
53 | Float_t fCpvMinE ; // minimum energy of digit (ADC) | |
54 | Float_t fSampleQualityCut; // Cut on sample shapes: 0: no samples; 1: default parameterization; 999: accept even obviously bad | |
55 | Float_t fSampleToSec ; // Conversion coeff from sample time step to seconds | |
56 | Int_t fEmcCrystals ; // number of EMC crystals | |
57 | AliPHOSGeometry * fGeom ; //! PHOS geometry | |
58 | static AliPHOSCalibData * fgCalibData ; //! Calibration database if avalable | |
59 | AliPHOSPulseGenerator * fPulseGenerator ; //! Class with pulse shape parameters | |
60 | AliRawReader * fRawReader; //! Raw data reader | |
61 | AliCaloRawStreamV3 * fRawStream; //! Calorimeter decoder of ALTRO format | |
62 | Int_t *fADCValuesLG; //! Array og low-gain ALTRO samples | |
63 | Int_t *fADCValuesHG; //! Array og high-gain ALTRO samples | |
64 | ||
65 | ClassDef(AliPHOSRawDigiProducer,7) | |
66 | }; | |
67 | ||
68 | #endif |