#ifndef ALIEMCALDIGITIZER_H
#define ALIEMCALDIGITIZER_H
class TClonesArray ;
class TBrowser;
#include "AliDigitizer.h"
#include "AliConfig.h"
class AliEMCALCalibData ;
class AliEMCALSDigitizer ;
class AliDigitizationInput ;
class AliEMCALDigitizer: public AliDigitizer {
public:
AliEMCALDigitizer() ;
AliEMCALDigitizer(TString alirunFileNameFile,
TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
AliEMCALDigitizer(AliDigitizationInput * manager) ;
virtual ~AliEMCALDigitizer() ;
void Digitize(Int_t event);
void Digitize(Option_t *option);
Int_t GetDigitThreshold() const { return fDigitThreshold ; }
Float_t GetPinNoise() const { return fPinNoise ; }
Float_t GetTimeNoise() const { return fTimeNoise ; }
Float_t GetTimeResolution(const Float_t energy) const;
Double_t GetTimeResolutionPar0() const { return fTimeResolutionPar0 ; }
Double_t GetTimeResolutionPar1() const { return fTimeResolutionPar1 ; }
Double_t GetTimeDelay() const { return fTimeDelay ; }
Float_t GetECAchannel() const { return fADCchannelEC ; }
Float_t GetECApedestal() const { return fADCpedestalEC ; }
void SetEventRange(Int_t first=0, Int_t last=-1) { fFirstEvent = first ;
fLastEvent = last ; }
void SetDigitThreshold(Int_t EMCThreshold) { fDigitThreshold = EMCThreshold ; }
void SetPinNoise(Float_t pinNoise ) { fPinNoise = pinNoise ; }
void SetTimeNoise(Float_t timeNoise ) { fTimeNoise = timeNoise ; }
Int_t GetDigitsInRun() const { return fDigitsInRun; }
void Print (Option_t * option = "") const ;
void Print1(Option_t * option) ;
AliEMCALDigitizer & operator = (const AliEMCALDigitizer & ) {
Fatal("operator =", "not implemented") ;
return *this ;
}
private:
Bool_t Init();
void InitParameters() ;
void PrintDigits(Option_t * option) ;
void Unload() ;
void WriteDigits() ;
void WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG");
Float_t TimeOfNoise(void) ;
void CalibrateADCTime (Float_t & adc , Float_t & time, const Int_t AbsId) ;
void DigitizeEnergyTime(Float_t & energy, Float_t & time, const Int_t AbsId) ;
void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG);
void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples);
void DecalibrateTrigger(AliEMCALDigit *digit);
Bool_t IsDead(AliEMCALDigit *digit);
Bool_t IsDead(Int_t absId);
private:
Bool_t fDefaultInit;
Int_t fDigitsInRun ;
Bool_t fInit ;
Int_t fInput ;
TString *fInputFileNames ;
TString *fEventNames ;
Int_t fDigitThreshold ;
Int_t fMeanPhotonElectron ;
Float_t fGainFluctuations ;
Float_t fPinNoise ;
Double_t fTimeNoise;
Double_t fTimeDelay;
Double_t fTimeResolutionPar0 ;
Double_t fTimeResolutionPar1 ;
Float_t fADCchannelEC ;
Float_t fADCpedestalEC ;
Float_t fADCchannelECDecal ;
Float_t fTimeChannel ;
Float_t fTimeChannelDecal ;
Int_t fNADCEC ;
TString fEventFolderName;
Int_t fFirstEvent;
Int_t fLastEvent;
AliEMCALCalibData * fCalibData;
AliEMCALSDigitizer* fSDigitizer;
ClassDef(AliEMCALDigitizer,13)
};
#endif // AliEMCALDIGITIZER_H