]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRawDigiProducer.h
f838c5543455ab8eea5899141ba6a92f46814d15
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDigiProducer.h
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 AliPHOSRawDecoder. See cxx source for use case.
10
11 class AliPHOSRawDecoder;
12 class AliPHOSCalibData ;
13 class AliPHOSDigit ;
14 class AliPHOSRecoParam ;
15 class AliPHOSGeometry ;
16 #include "TObject.h"
17
18 class AliPHOSRawDigiProducer: public TObject {
19
20 public:
21
22   AliPHOSRawDigiProducer() ;
23   AliPHOSRawDigiProducer(const AliPHOSRecoParam* parEmc, const AliPHOSRecoParam* parCpv) ;
24   AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp);
25   AliPHOSRawDigiProducer& operator= (const AliPHOSRawDigiProducer &dp);
26  
27   virtual ~AliPHOSRawDigiProducer() {}
28
29   void MakeDigits(TClonesArray *digits, AliPHOSRawDecoder* decoder);
30
31 protected:
32
33   void GetCalibrationParameters() ; //Extract calibration parameters from DB
34   void CleanDigits(TClonesArray* digits) ; //remove digits below threshold and bad ones
35   
36   Bool_t IsInEMC(AliPHOSDigit* digit) const ; //tests if digit belongs to EMC
37   Bool_t IsInCPV(AliPHOSDigit* digit) const ;
38
39   Double_t CalibrateE(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate energy 
40   Double_t CalibrateT(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate time
41
42 private:
43   Float_t fEmcMinE ;                 // minimum energy of digit to be included into cluster
44   Float_t fCpvMinE ;                 // minimum energy of digit to be included into cluster
45
46   Int_t fEmcCrystals ;               //  number of EMC crystalls
47   AliPHOSGeometry * fGeom ;          //! PHOS geometry
48   static AliPHOSCalibData * fgCalibData ;   //! Calibration database if aval.
49
50   ClassDef(AliPHOSRawDigiProducer,2)
51 };
52
53 #endif