]>
Commit | Line | Data |
---|---|---|
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 | //_________________________________________________________________________ | |
9 | // Class that performs digitization of Summable digits from simulated data | |
10 | // | |
11 | // In addition it performs mixing of summable digits from different events. | |
12 | // | |
13 | // For each event two branches are created in TreeD: | |
14 | // "EMCAL" - list of digits | |
15 | // "EMCALTRG" - list of trigger digits | |
16 | // "AliEMCALDigitizer" - AliEMCALDigitizer with all parameters used in digitization | |
17 | // | |
18 | //*-- Author: Sahal Yacoob (LBL) | |
19 | // based on : AliPHOSDigit | |
20 | // July 2003 Yves Schutz : NewIO | |
21 | // November 2003 Aleksei Pavlinov : Shish-Kebab geometry | |
22 | // | |
23 | // July 2011 GCB: Digitizer modified to accomodate embedding. | |
24 | // Time calibration added. Decalibration possibility of energy and time added | |
25 | //_________________________________________________________________________ | |
26 | ||
27 | ||
28 | // --- ROOT system --- | |
29 | class TClonesArray ; | |
30 | class TBrowser; | |
31 | ||
32 | // --- Standard library --- | |
33 | ||
34 | // --- AliRoot header files --- | |
35 | #include "AliDigitizer.h" | |
36 | #include "AliConfig.h" | |
37 | class AliEMCALCalibData ; | |
38 | class AliEMCALSDigitizer ; | |
39 | class AliRunDigitizer ; | |
40 | ||
41 | class AliEMCALDigitizer: public AliDigitizer { | |
42 | ||
43 | public: | |
44 | AliEMCALDigitizer() ; // ctor | |
45 | AliEMCALDigitizer(TString alirunFileNameFile, | |
46 | TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; | |
47 | AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ; | |
48 | AliEMCALDigitizer(AliRunDigitizer * manager) ; | |
49 | virtual ~AliEMCALDigitizer() ; | |
50 | ||
51 | void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits | |
52 | void Exec(Option_t *option); // Supervising method | |
53 | ||
54 | Int_t GetDigitThreshold() const { return fDigitThreshold ; } | |
55 | Float_t GetPinNoise() const { return fPinNoise ; } | |
56 | Float_t GetTimeNoise() const { return fTimeNoise ; } | |
57 | Float_t GetTimeResolution(const Float_t energy) const; | |
58 | Double_t GetTimeResolutionPar0() const { return fTimeResolutionPar0 ; } | |
59 | Double_t GetTimeResolutionPar1() const { return fTimeResolutionPar1 ; } | |
60 | Double_t GetTimeDelay() const { return fTimeDelay ; } | |
61 | Float_t GetECAchannel() const { return fADCchannelEC ; } | |
62 | Float_t GetECApedestal() const { return fADCpedestalEC ; } | |
63 | ||
64 | void SetEventRange(Int_t first=0, Int_t last=-1) { fFirstEvent = first ; | |
65 | fLastEvent = last ; } | |
66 | void SetDigitThreshold(Int_t EMCThreshold) { fDigitThreshold = EMCThreshold ; } | |
67 | void SetPinNoise(Float_t pinNoise ) { fPinNoise = pinNoise ; } | |
68 | void SetTimeNoise(Float_t timeNoise ) { fTimeNoise = timeNoise ; } | |
69 | ||
70 | //General | |
71 | Int_t GetDigitsInRun() const { return fDigitsInRun; } | |
72 | void Print (Option_t * option = "") const ; | |
73 | void Print1(Option_t * option) ; // *MENU* | |
74 | ||
75 | ||
76 | AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) { | |
77 | // assignement operator requested by coding convention but not needed | |
78 | Fatal("operator =", "not implemented") ; | |
79 | return *this ; | |
80 | } | |
81 | ||
82 | private: | |
83 | ||
84 | Bool_t Init(); | |
85 | void InitParameters() ; | |
86 | void PrintDigits(Option_t * option) ; | |
87 | void Unload() ; | |
88 | void WriteDigits() ; // Writes Digits the current event | |
89 | void WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG"); // | |
90 | Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise | |
91 | ||
92 | void CalibrateADCTime (Float_t & adc , Float_t & time, const Int_t AbsId) ; | |
93 | void DigitizeEnergyTime(Float_t & energy, Float_t & time, const Int_t AbsId) ; | |
94 | ||
95 | void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG); | |
96 | void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples); | |
97 | ||
98 | private: | |
99 | ||
100 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) | |
101 | Int_t fDigitsInRun ; //! Total number of digits in one run | |
102 | Bool_t fInit ; //! To avoid overwriting existing files | |
103 | ||
104 | Int_t fInput ; // Number of files to merge | |
105 | TString *fInputFileNames ; //[fInput] List of file names to merge | |
106 | TString *fEventNames ; //[fInput] List of event names to merge | |
107 | ||
108 | Int_t fDigitThreshold ; // Threshold for storing digits in EMC, ACD units | |
109 | Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy | |
110 | Float_t fPinNoise ; // Electronics noise in EMC, APD | |
111 | Double_t fTimeNoise; // Electronics noise in EMC, time | |
112 | Double_t fTimeDelay; // Time delay to reproduce data delay | |
113 | Double_t fTimeResolutionPar0 ; // Time resolution of FEE electronics | |
114 | Double_t fTimeResolutionPar1 ; // Time resolution of FEE electronics | |
115 | Float_t fADCchannelEC ; // calibration width of one ADC channel in EC section (GeV) | |
116 | Float_t fADCpedestalEC ; // calibration pedestal for one ADC channel | |
117 | Float_t fADCchannelECDecal ; // decalibration width of one ADC channel in EC section (GeV) | |
118 | Float_t fTimeChannel ; // calibration time width for one channel | |
119 | Float_t fTimeChannelDecal ; // calibration time width for one channel | |
120 | Int_t fNADCEC ; // number of channels in EC section ADC | |
121 | ||
122 | TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode | |
123 | Int_t fFirstEvent; // first event to process | |
124 | Int_t fLastEvent; // last event to process | |
125 | ||
126 | AliEMCALCalibData * fCalibData; //Calibration data pointer | |
127 | ||
128 | ClassDef(AliEMCALDigitizer,11) // description | |
129 | }; | |
130 | ||
131 | ||
132 | #endif // AliEMCALDIGITIZER_H |