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 */
8 //_________________________________________________________________________
9 // Task Class for making Digits in EMCAL
11 //*-- Author: Sahal Yacoob (LBL)
12 // based on : AliPHOSDigit
13 // July 2003 Yves Schutz : NewIO
14 // November 2003 Aleksei Pavlinov : Shish-Kebab geometry
15 //_________________________________________________________________________
18 // --- ROOT system ---
19 #include "TObjString.h"
25 // --- Standard library ---
27 // --- AliRoot header files ---
28 #include "AliDigitizer.h"
29 #include "AliConfig.h"
30 class AliEMCALSDigitizer ;
31 class AliRunDigitizer ;
33 class AliEMCALDigitizer: public AliDigitizer {
36 AliEMCALDigitizer() ; // ctor
37 AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
38 AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
39 AliEMCALDigitizer(AliRunDigitizer * manager) ;
40 virtual ~AliEMCALDigitizer() ;
42 void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits
43 void Exec(Option_t *option); // Supervising method
45 Float_t GetDigitThreshold() const { return fDigitThreshold;}
46 Float_t GetPedestal() const { return fPedestal; }
47 Float_t GetPinNoise() const { return fPinNoise;}
48 Float_t GetSlope() const { return fSlope; }
49 Float_t GetTimeResolution() const { return fTimeResolution ; }
50 Float_t GetECAchannel() const { return fADCchannelEC ; }
51 Float_t GetECApedestal() const { return fADCpedestalEC ; }
52 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
53 void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;}
54 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
57 Int_t GetDigitsInRun() const { return fDigitsInRun; }
58 void MixWith(TString alirunFileName,
59 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
60 void Print(Option_t* option="") const ;
61 void Print1(Option_t * option); // *MENU*
63 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) {
64 // assignement operator requested by coding convention but not needed
65 Fatal("operator =", "not implemented") ;
69 virtual void Browse(TBrowser* b);
71 void SetControlHists(Int_t var=0) {fControlHists=var;}
72 Int_t GetControlHist() const {return fControlHists;}
73 TList *GetListOfHists() {return fHists;}
74 TList* BookControlHists(int var=0);
75 void SaveHists(const char* name="RF/TRD1/Digitizations/DigiVar?",
76 Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU*
81 void InitParameters() ;
82 void PrintDigits(Option_t * option) ;
84 void WriteDigits() ; // Writes Digits the current event
85 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
87 //Calculate the time of crossing of the threshold by front edge
88 Float_t FrontEdgeTime(TClonesArray * ticks) ;
89 Int_t DigitizeEnergy(Float_t energy, Int_t AbsId) ;
93 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
94 Int_t fDigitsInRun ; //! Total number of digits in one run
95 Bool_t fInit ; //! To avoid overwriting existing files
97 Int_t fInput ; // Number of files to merge
98 TString * fInputFileNames ; //[fInput] List of file names to merge
99 TString * fEventNames ; //[fInput] List of event names to merge
101 Float_t fDigitThreshold ; // Threshold for storing digits in EMC
102 Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy
103 Float_t fPedestal ; // Calibration parameters
104 Float_t fSlope ; // read from SDigitizer
105 Float_t fPinNoise ; // Electronics noise in EMC
106 Float_t fTimeResolution ; // Time resolution of FEE electronics
107 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
108 Float_t fTimeSignalLength ; // Length of the timing signal
109 Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV)
110 Float_t fADCpedestalEC ; // pedestal for one ADC channel
111 Int_t fNADCEC ; // number of channels in EC section ADC
113 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
114 Int_t fFirstEvent; // first event to process
115 Int_t fLastEvent; // last event to process
117 Int_t fControlHists; //!
120 ClassDef(AliEMCALDigitizer,5) // description
124 #endif // AliEMCALDigitizer_H