]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALDigitizer.h
Update the Print methods (Laurent)
[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
1963b290 13// July 2003 Yves Schutz : NewIO
14// November 2003 Aleksei Pavlinov : Shish-Kebab geometry
ffa6d63b 15//_________________________________________________________________________
61e0abb5 16
17
18// --- ROOT system ---
61e0abb5 19#include "TObjString.h"
20class TArrayI ;
05a92d59 21class TClonesArray ;
1963b290 22class TList;
23class TBrowser;
05a92d59 24
61e0abb5 25// --- Standard library ---
26
27// --- AliRoot header files ---
814ad4bf 28#include "AliDigitizer.h"
88cb7938 29#include "AliConfig.h"
53f1c378 30#include "AliEMCALCalibData.h"
05a92d59 31class AliEMCALSDigitizer ;
32class AliRunDigitizer ;
61e0abb5 33
814ad4bf 34class AliEMCALDigitizer: public AliDigitizer {
61e0abb5 35
36public:
37 AliEMCALDigitizer() ; // ctor
e191bb57 38 AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 39 AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
40 AliEMCALDigitizer(AliRunDigitizer * manager) ;
61e0abb5 41 virtual ~AliEMCALDigitizer() ;
42
09884213 43 void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits
05a92d59 44 void Exec(Option_t *option); // Supervising method
61e0abb5 45
09884213 46 Float_t GetDigitThreshold() const { return fDigitThreshold;}
47 Float_t GetPedestal() const { return fPedestal; }
48 Float_t GetPinNoise() const { return fPinNoise;}
49 Float_t GetSlope() const { return fSlope; }
50 Float_t GetTimeResolution() const { return fTimeResolution ; }
51 Float_t GetECAchannel() const { return fADCchannelEC ; }
52 Float_t GetECApedestal() const { return fADCpedestalEC ; }
45fa49ca 53 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
a9485c37 54 void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;}
61e0abb5 55 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
56
05a92d59 57 //General
09884213 58 Int_t GetDigitsInRun() const { return fDigitsInRun; }
59 void MixWith(TString alirunFileName,
e191bb57 60 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
eb0b1051 61 void Print(Option_t* option="") const ;
1963b290 62 void Print1(Option_t * option); // *MENU*
814ad4bf 63
9c0a4862 64 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) {
814ad4bf 65 // assignement operator requested by coding convention but not needed
9859bfc0 66 Fatal("operator =", "not implemented") ;
67 return *this ;
814ad4bf 68 }
69
1963b290 70 virtual void Browse(TBrowser* b);
71 // hists
eb0b1051 72 void SetControlHists(Int_t var=0) {fControlHists=var;}
1963b290 73 Int_t GetControlHist() const {return fControlHists;}
74 TList *GetListOfHists() {return fHists;}
eb0b1051 75 TList* BookControlHists(int var=0);
1963b290 76 void SaveHists(const char* name="RF/TRD1/Digitizations/DigiVar?",
77 Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU*
78
61e0abb5 79private:
814ad4bf 80
d17817b7 81 Bool_t Init();
839828a6 82 void InitParameters() ;
61e0abb5 83 void PrintDigits(Option_t * option) ;
88cb7938 84 void Unload() ;
9e5d2067 85 void WriteDigits() ; // Writes Digits the current event
86 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
88cb7938 87
05a92d59 88 //Calculate the time of crossing of the threshold by front edge
814ad4bf 89 Float_t FrontEdgeTime(TClonesArray * ticks) ;
1abe522d 90 Int_t DigitizeEnergy(Float_t energy, Int_t AbsId) ;
61e0abb5 91
92private:
814ad4bf 93
88cb7938 94 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
95 Int_t fDigitsInRun ; //! Total number of digits in one run
96 Bool_t fInit ; //! To avoid overwriting existing files
97
98 Int_t fInput ; // Number of files to merge
99 TString * fInputFileNames ; //[fInput] List of file names to merge
100 TString * fEventNames ; //[fInput] List of event names to merge
101
a9485c37 102 Float_t fDigitThreshold ; // Threshold for storing digits in EMC
103 Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy
104 Float_t fPedestal ; // Calibration parameters
105 Float_t fSlope ; // read from SDigitizer
106 Float_t fPinNoise ; // Electronics noise in EMC
107 Float_t fTimeResolution ; // Time resolution of FEE electronics
108 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
109 Float_t fTimeSignalLength ; // Length of the timing signal
110 Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV)
14ce0a6e 111 Float_t fADCpedestalEC ; // pedestal for one ADC channel
a9485c37 112 Int_t fNADCEC ; // number of channels in EC section ADC
a9485c37 113
88cb7938 114 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
45fa49ca 115 Int_t fFirstEvent; // first event to process
116 Int_t fLastEvent; // last event to process
1963b290 117 // Control hists
118 Int_t fControlHists; //!
119 TList *fHists; //!
53f1c378 120 AliEMCALCalibData * fCalibData; //Calibration data pointer
88cb7938 121
53f1c378 122 ClassDef(AliEMCALDigitizer,6) // description
61e0abb5 123};
124
125
126#endif // AliEMCALDigitizer_H