Transition to NewIO
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.h
CommitLineData
61e0abb5 1#ifndef ALIEMCALDigitizer_H
2#define ALIEMCALDigitizer_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//_________________________________________________________________________
ffa6d63b 9// Task Class for making Digits in EMCAL
61e0abb5 10//
ffa6d63b 11//*-- Author: Sahal Yacoob (LBL)
12// based on : AliPHOSDigit
88cb7938 13// July 2003 Yves Schutz : NewIO
ffa6d63b 14//_________________________________________________________________________
61e0abb5 15
16
17// --- ROOT system ---
61e0abb5 18#include "TObjString.h"
19class TArrayI ;
05a92d59 20class TClonesArray ;
21
61e0abb5 22// --- Standard library ---
23
24// --- AliRoot header files ---
814ad4bf 25#include "AliDigitizer.h"
88cb7938 26#include "AliConfig.h"
05a92d59 27class AliEMCALSDigitizer ;
28class AliRunDigitizer ;
61e0abb5 29
814ad4bf 30class AliEMCALDigitizer: public AliDigitizer {
61e0abb5 31
32public:
33 AliEMCALDigitizer() ; // ctor
88cb7938 34 AliEMCALDigitizer(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ;
35 AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
36 AliEMCALDigitizer(AliRunDigitizer * manager) ;
61e0abb5 37 virtual ~AliEMCALDigitizer() ;
38
05a92d59 39 void Digitize(const Int_t event); // Make Digits from SDigits stored in fSDigits
40 void Exec(Option_t *option); // Supervising method
61e0abb5 41
a9485c37 42 const Float_t GetDigitThreshold() const { return fDigitThreshold;}
43 const Float_t GetPedestal() const { return fPedestal; }
44 const Float_t GetPinNoise() const { return fPinNoise;}
45 const Float_t GetSlope() const { return fSlope; }
814ad4bf 46 const Float_t GetTimeResolution() const { return fTimeResolution ; }
88cb7938 47 const Float_t GetECAchannel() const { return fADCchannelEC ; }
48 const Float_t GetECApedestal() const { return fADCpedestalEC ; }
49 const Float_t GetHCAchannel() const { return fADCchannelHC ; }
50 const Float_t GetHCApedestal() const { return fADCpedestalHC ; }
a9485c37 51 const Float_t GetPREchannel() const { return fADCchannelPRE ; }
52 const Float_t GetPREpedestal() const { return fADCpedestalPRE ; }
53
54 void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;}
61e0abb5 55 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
56
05a92d59 57 //General
88cb7938 58 const Int_t GetDigitsInRun() const { return fDigitsInRun; }
59 void MixWith(const TString alirunFileName,
60 const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; // Add another one file to mix
61 void Print()const ;
814ad4bf 62
814ad4bf 63 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue) {
64 // assignement operator requested by coding convention but not needed
9859bfc0 65 Fatal("operator =", "not implemented") ;
66 return *this ;
814ad4bf 67 }
68
61e0abb5 69private:
814ad4bf 70
d17817b7 71 Bool_t Init();
839828a6 72 void InitParameters() ;
61e0abb5 73 void PrintDigits(Option_t * option) ;
88cb7938 74 void Unload() ;
05a92d59 75 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
814ad4bf 76 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
88cb7938 77
05a92d59 78 //Calculate the time of crossing of the threshold by front edge
814ad4bf 79 Float_t FrontEdgeTime(TClonesArray * ticks) ;
d17817b7 80 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
61e0abb5 81
82private:
814ad4bf 83
88cb7938 84 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
85 Int_t fDigitsInRun ; //! Total number of digits in one run
86 Bool_t fInit ; //! To avoid overwriting existing files
87
88 Int_t fInput ; // Number of files to merge
89 TString * fInputFileNames ; //[fInput] List of file names to merge
90 TString * fEventNames ; //[fInput] List of event names to merge
91
a9485c37 92 Float_t fDigitThreshold ; // Threshold for storing digits in EMC
93 Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy
94 Float_t fPedestal ; // Calibration parameters
95 Float_t fSlope ; // read from SDigitizer
96 Float_t fPinNoise ; // Electronics noise in EMC
97 Float_t fTimeResolution ; // Time resolution of FEE electronics
98 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
99 Float_t fTimeSignalLength ; // Length of the timing signal
100 Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV)
101 Float_t fADCpedestalEC ; //
102 Int_t fNADCEC ; // number of channels in EC section ADC
103 Float_t fADCchannelHC ; // width of one ADC channel in HC section (GeV)
104 Float_t fADCpedestalHC ; //
105 Int_t fNADCHC ; // number of channels in HC section ADC
106 Float_t fADCchannelPRE ; // width of one ADC channel in PRE section (GeV)
107 Float_t fADCpedestalPRE ; //
108 Int_t fNADCPRE ; // number of channels in PRE section ADC
a9485c37 109
88cb7938 110 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
111
112 ClassDef(AliEMCALDigitizer,4) // description
61e0abb5 113
114};
115
116
117#endif // AliEMCALDigitizer_H