Line data Source code
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 8 : void SetEmcMinAmp(Float_t emcMin) { fEmcMinE=emcMin; }
37 8 : void SetCpvMinAmp(Float_t cpvMin) { fCpvMinE=cpvMin; }
38 8 : void SetSampleQualityCut(Float_t qcut) { fSampleQualityCut=qcut; }
39 4 : void SetSubtractL1phase(Bool_t a=kTRUE){ fSubtractL1phase=a ; }
40 :
41 : protected:
42 :
43 : void GetCalibrationParameters() ; //Extract calibration parameters from DB
44 : void CleanDigits(TClonesArray* digits) ; //remove digits below threshold and bad ones
45 :
46 : Bool_t IsInEMC(AliPHOSDigit* digit) const ; //tests if digit belongs to EMC
47 : Bool_t IsInCPV(AliPHOSDigit* digit) const ;
48 :
49 : Double_t CalibrateE(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate energy
50 : Double_t CalibrateT(Double_t amp, Int_t* relId, Bool_t isLowGain) ; //calibrate time
51 :
52 : private:
53 : Bool_t fSubtractL1phase ; // To correct time for L1phase
54 : Float_t fEmcMinE ; // minimum energy of digit (ADC)
55 : Float_t fCpvMinE ; // minimum energy of digit (ADC)
56 : Float_t fSampleQualityCut; // Cut on sample shapes: 0: no samples; 1: default parameterization; 999: accept even obviously bad
57 : Float_t fSampleToSec ; // Conversion coeff from sample time step to seconds
58 : Int_t fEmcCrystals ; // number of EMC crystals
59 : AliPHOSGeometry * fGeom ; //! PHOS geometry
60 : static AliPHOSCalibData * fgCalibData ; //! Calibration database if avalable
61 : AliPHOSPulseGenerator * fPulseGenerator ; //! Class with pulse shape parameters
62 : AliRawReader * fRawReader; //! Raw data reader
63 : AliCaloRawStreamV3 * fRawStream; //! Calorimeter decoder of ALTRO format
64 : Int_t *fADCValuesLG; //! Array of low-gain ALTRO samples
65 : Int_t *fADCValuesHG; //! Array of high-gain ALTRO samples
66 : static const Int_t fgkSTUDDL = 20; //! DDL ID of the PHOS STU
67 :
68 22 : ClassDef(AliPHOSRawDigiProducer,9)
69 : };
70 :
71 : #endif
|