]>
Commit | Line | Data |
---|---|---|
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" |
20 | class TArrayI ; | |
05a92d59 | 21 | class TClonesArray ; |
1963b290 | 22 | class TList; |
23 | class TBrowser; | |
05a92d59 | 24 | |
61e0abb5 | 25 | // --- Standard library --- |
26 | ||
27 | // --- AliRoot header files --- | |
814ad4bf | 28 | #include "AliDigitizer.h" |
88cb7938 | 29 | #include "AliConfig.h" |
05a92d59 | 30 | class AliEMCALSDigitizer ; |
31 | class AliRunDigitizer ; | |
61e0abb5 | 32 | |
814ad4bf | 33 | class AliEMCALDigitizer: public AliDigitizer { |
61e0abb5 | 34 | |
35 | public: | |
36 | AliEMCALDigitizer() ; // ctor | |
e191bb57 | 37 | AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; |
88cb7938 | 38 | AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ; |
39 | AliEMCALDigitizer(AliRunDigitizer * manager) ; | |
61e0abb5 | 40 | virtual ~AliEMCALDigitizer() ; |
41 | ||
09884213 | 42 | void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits |
05a92d59 | 43 | void Exec(Option_t *option); // Supervising method |
61e0abb5 | 44 | |
09884213 | 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 ; } | |
45fa49ca | 52 | void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } |
a9485c37 | 53 | void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;} |
61e0abb5 | 54 | void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} |
55 | ||
05a92d59 | 56 | //General |
09884213 | 57 | Int_t GetDigitsInRun() const { return fDigitsInRun; } |
58 | void MixWith(TString alirunFileName, | |
e191bb57 | 59 | TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix |
eb0b1051 | 60 | void Print(Option_t* option="") const ; |
1963b290 | 61 | void Print1(Option_t * option); // *MENU* |
814ad4bf | 62 | |
9c0a4862 | 63 | AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) { |
814ad4bf | 64 | // assignement operator requested by coding convention but not needed |
9859bfc0 | 65 | Fatal("operator =", "not implemented") ; |
66 | return *this ; | |
814ad4bf | 67 | } |
68 | ||
1963b290 | 69 | virtual void Browse(TBrowser* b); |
70 | // hists | |
eb0b1051 | 71 | void SetControlHists(Int_t var=0) {fControlHists=var;} |
1963b290 | 72 | Int_t GetControlHist() const {return fControlHists;} |
73 | TList *GetListOfHists() {return fHists;} | |
eb0b1051 | 74 | TList* BookControlHists(int var=0); |
1963b290 | 75 | void SaveHists(const char* name="RF/TRD1/Digitizations/DigiVar?", |
76 | Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU* | |
77 | ||
61e0abb5 | 78 | private: |
814ad4bf | 79 | |
d17817b7 | 80 | Bool_t Init(); |
839828a6 | 81 | void InitParameters() ; |
61e0abb5 | 82 | void PrintDigits(Option_t * option) ; |
88cb7938 | 83 | void Unload() ; |
9e5d2067 | 84 | void WriteDigits() ; // Writes Digits the current event |
85 | Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise | |
88cb7938 | 86 | |
05a92d59 | 87 | //Calculate the time of crossing of the threshold by front edge |
814ad4bf | 88 | Float_t FrontEdgeTime(TClonesArray * ticks) ; |
1abe522d | 89 | Int_t DigitizeEnergy(Float_t energy, Int_t AbsId) ; |
61e0abb5 | 90 | |
91 | private: | |
814ad4bf | 92 | |
88cb7938 | 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 | |
96 | ||
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 | |
100 | ||
a9485c37 | 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) | |
14ce0a6e | 110 | Float_t fADCpedestalEC ; // pedestal for one ADC channel |
a9485c37 | 111 | Int_t fNADCEC ; // number of channels in EC section ADC |
a9485c37 | 112 | |
88cb7938 | 113 | TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode |
45fa49ca | 114 | Int_t fFirstEvent; // first event to process |
115 | Int_t fLastEvent; // last event to process | |
1963b290 | 116 | // Control hists |
117 | Int_t fControlHists; //! | |
118 | TList *fHists; //! | |
88cb7938 | 119 | |
9d6df3aa | 120 | ClassDef(AliEMCALDigitizer,5) // description |
61e0abb5 | 121 | }; |
122 | ||
123 | ||
124 | #endif // AliEMCALDigitizer_H |