L1phase shift corrected
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDigiProducer.h
CommitLineData
88fb5e50 1#ifndef ALIPHOSRAWDIGIPRODUCER_H
2#define ALIPHOSRAWDIGIPRODUCER_H
7bc140a5 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
379c5c09 9//using AliPHOSRawFitter. See cxx source for use case.
88fb5e50 10
30331de9 11class AliPHOSCalibData ;
12class AliPHOSDigit ;
30331de9 13class AliPHOSGeometry ;
39569d36 14class AliPHOSPulseGenerator;
379c5c09 15class AliRawReader;
16class AliCaloRawStreamV3;
17class AliPHOSRawFitterv0;
18
19#include "AliAltroMapping.h"
30331de9 20#include "TObject.h"
88fb5e50 21
30331de9 22class AliPHOSRawDigiProducer: public TObject {
88fb5e50 23
24public:
25
30331de9 26 AliPHOSRawDigiProducer() ;
379c5c09 27 AliPHOSRawDigiProducer(AliRawReader *rawReader, AliAltroMapping **mapping = NULL);
30331de9 28 AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp);
29 AliPHOSRawDigiProducer& operator= (const AliPHOSRawDigiProducer &dp);
30
39569d36 31 virtual ~AliPHOSRawDigiProducer();
88fb5e50 32
379c5c09 33 void MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0* fitter);
771123c7 34 void MakeDigits(TClonesArray *digits, TClonesArray *tmpDigLG, AliPHOSRawFitterv0* fitter);
88fb5e50 35
8be3a30a 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
30331de9 40protected:
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
51private:
8be3a30a 52 Float_t fEmcMinE ; // minimum energy of digit (ADC)
53 Float_t fCpvMinE ; // minimum energy of digit (ADC)
70d93620 54 Float_t fSampleQualityCut; // Cut on sample shapes: 0: no samples; 1: default parameterization; 999: accept even obviously bad
6f47f50d 55 Float_t fSampleToSec ; // Conversion coeff from sample time step to seconds
7e88424f 56 Int_t fEmcCrystals ; // number of EMC crystals
30331de9 57 AliPHOSGeometry * fGeom ; //! PHOS geometry
379c5c09 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
54ac223e 62 Int_t *fADCValuesLG; //! Array og low-gain ALTRO samples
63 Int_t *fADCValuesHG; //! Array og high-gain ALTRO samples
30331de9 64
54ac223e 65 ClassDef(AliPHOSRawDigiProducer,7)
88fb5e50 66};
67
68#endif