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" |
19 | class TArrayI ; |
05a92d59 |
20 | class TClonesArray ; |
21 | |
61e0abb5 |
22 | // --- Standard library --- |
23 | |
24 | // --- AliRoot header files --- |
814ad4bf |
25 | #include "AliDigitizer.h" |
88cb7938 |
26 | #include "AliConfig.h" |
05a92d59 |
27 | class AliEMCALSDigitizer ; |
28 | class AliRunDigitizer ; |
61e0abb5 |
29 | |
814ad4bf |
30 | class AliEMCALDigitizer: public AliDigitizer { |
61e0abb5 |
31 | |
32 | public: |
33 | AliEMCALDigitizer() ; // ctor |
09884213 |
34 | AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; |
88cb7938 |
35 | AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ; |
36 | AliEMCALDigitizer(AliRunDigitizer * manager) ; |
61e0abb5 |
37 | virtual ~AliEMCALDigitizer() ; |
38 | |
09884213 |
39 | void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits |
05a92d59 |
40 | void Exec(Option_t *option); // Supervising method |
61e0abb5 |
41 | |
09884213 |
42 | Float_t GetDigitThreshold() const { return fDigitThreshold;} |
43 | Float_t GetPedestal() const { return fPedestal; } |
44 | Float_t GetPinNoise() const { return fPinNoise;} |
45 | Float_t GetSlope() const { return fSlope; } |
46 | Float_t GetTimeResolution() const { return fTimeResolution ; } |
47 | Float_t GetECAchannel() const { return fADCchannelEC ; } |
48 | Float_t GetECApedestal() const { return fADCpedestalEC ; } |
a9485c37 |
49 | |
50 | void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;} |
61e0abb5 |
51 | void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} |
52 | |
05a92d59 |
53 | //General |
09884213 |
54 | Int_t GetDigitsInRun() const { return fDigitsInRun; } |
55 | void MixWith(TString alirunFileName, |
56 | TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; // Add another one file to mix |
88cb7938 |
57 | void Print()const ; |
814ad4bf |
58 | |
9c0a4862 |
59 | AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) { |
814ad4bf |
60 | // assignement operator requested by coding convention but not needed |
9859bfc0 |
61 | Fatal("operator =", "not implemented") ; |
62 | return *this ; |
814ad4bf |
63 | } |
64 | |
61e0abb5 |
65 | private: |
814ad4bf |
66 | |
d17817b7 |
67 | Bool_t Init(); |
839828a6 |
68 | void InitParameters() ; |
61e0abb5 |
69 | void PrintDigits(Option_t * option) ; |
88cb7938 |
70 | void Unload() ; |
9e5d2067 |
71 | void WriteDigits() ; // Writes Digits the current event |
72 | Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise |
88cb7938 |
73 | |
05a92d59 |
74 | //Calculate the time of crossing of the threshold by front edge |
814ad4bf |
75 | Float_t FrontEdgeTime(TClonesArray * ticks) ; |
fdebddeb |
76 | Int_t DigitizeEnergy(Float_t energy) ; |
61e0abb5 |
77 | |
78 | private: |
814ad4bf |
79 | |
88cb7938 |
80 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
81 | Int_t fDigitsInRun ; //! Total number of digits in one run |
82 | Bool_t fInit ; //! To avoid overwriting existing files |
83 | |
84 | Int_t fInput ; // Number of files to merge |
85 | TString * fInputFileNames ; //[fInput] List of file names to merge |
86 | TString * fEventNames ; //[fInput] List of event names to merge |
87 | |
a9485c37 |
88 | Float_t fDigitThreshold ; // Threshold for storing digits in EMC |
89 | Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy |
90 | Float_t fPedestal ; // Calibration parameters |
91 | Float_t fSlope ; // read from SDigitizer |
92 | Float_t fPinNoise ; // Electronics noise in EMC |
93 | Float_t fTimeResolution ; // Time resolution of FEE electronics |
94 | Float_t fTimeThreshold ; // Threshold to start timing for given crystall |
95 | Float_t fTimeSignalLength ; // Length of the timing signal |
96 | Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV) |
97 | Float_t fADCpedestalEC ; // |
98 | Int_t fNADCEC ; // number of channels in EC section ADC |
a9485c37 |
99 | |
88cb7938 |
100 | TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode |
101 | |
102 | ClassDef(AliEMCALDigitizer,4) // description |
61e0abb5 |
103 | |
104 | }; |
105 | |
106 | |
107 | #endif // AliEMCALDigitizer_H |