]>
Commit | Line | Data |
---|---|---|
a435f763 | 1 | #ifndef ALIEMCALDIGITIZER_H |
2 | #define ALIEMCALDIGITIZER_H | |
61e0abb5 | 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 | //_________________________________________________________________________ | |
a435f763 | 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 | // "AliEMCALDigitizer" - AliEMCALDigitizer with all parameters used in digitization | |
16 | // | |
17 | // Note, that one cset title for new digits branch, and repeat digitization with | |
18 | // another set of parameters. | |
19 | // | |
ffa6d63b | 20 | //*-- Author: Sahal Yacoob (LBL) |
21 | // based on : AliPHOSDigit | |
1963b290 | 22 | // July 2003 Yves Schutz : NewIO |
23 | // November 2003 Aleksei Pavlinov : Shish-Kebab geometry | |
ffa6d63b | 24 | //_________________________________________________________________________ |
61e0abb5 | 25 | |
26 | ||
27 | // --- ROOT system --- | |
05a92d59 | 28 | class TClonesArray ; |
1963b290 | 29 | class TBrowser; |
05a92d59 | 30 | |
61e0abb5 | 31 | // --- Standard library --- |
32 | ||
33 | // --- AliRoot header files --- | |
814ad4bf | 34 | #include "AliDigitizer.h" |
88cb7938 | 35 | #include "AliConfig.h" |
a435f763 | 36 | class AliEMCALCalibData ; |
05a92d59 | 37 | class AliEMCALSDigitizer ; |
38 | class AliRunDigitizer ; | |
61e0abb5 | 39 | |
814ad4bf | 40 | class AliEMCALDigitizer: public AliDigitizer { |
61e0abb5 | 41 | |
42 | public: | |
43 | AliEMCALDigitizer() ; // ctor | |
e191bb57 | 44 | AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; |
88cb7938 | 45 | AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ; |
46 | AliEMCALDigitizer(AliRunDigitizer * manager) ; | |
61e0abb5 | 47 | virtual ~AliEMCALDigitizer() ; |
48 | ||
09884213 | 49 | void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits |
05a92d59 | 50 | void Exec(Option_t *option); // Supervising method |
61e0abb5 | 51 | |
4354827d | 52 | Int_t GetDigitThreshold() const { return fDigitThreshold;} |
33a52e55 | 53 | //Float_t GetPedestal() const { return fPedestal; } |
09884213 | 54 | Float_t GetPinNoise() const { return fPinNoise;} |
33a52e55 | 55 | //Float_t GetSlope() const { return fSlope; } |
6569f329 | 56 | Double_t GetTimeResolution() const { return fTimeResolution ; } |
09884213 | 57 | Float_t GetECAchannel() const { return fADCchannelEC ; } |
58 | Float_t GetECApedestal() const { return fADCpedestalEC ; } | |
7ea6391b | 59 | void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } |
4354827d | 60 | void SetDigitThreshold(Int_t EMCThreshold) {fDigitThreshold = EMCThreshold;} |
61e0abb5 | 61 | void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} |
62 | ||
05a92d59 | 63 | //General |
7ea6391b | 64 | Int_t GetDigitsInRun() const { return fDigitsInRun; } |
09884213 | 65 | void MixWith(TString alirunFileName, |
e191bb57 | 66 | TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix |
eb0b1051 | 67 | void Print(Option_t* option="") const ; |
1963b290 | 68 | void Print1(Option_t * option); // *MENU* |
814ad4bf | 69 | |
9c0a4862 | 70 | AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) { |
814ad4bf | 71 | // assignement operator requested by coding convention but not needed |
9859bfc0 | 72 | Fatal("operator =", "not implemented") ; |
73 | return *this ; | |
814ad4bf | 74 | } |
75 | ||
1963b290 | 76 | virtual void Browse(TBrowser* b); |
1963b290 | 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 |
916f1e76 | 85 | void WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG"); // |
9e5d2067 | 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 |
33a52e55 | 89 | //Float_t FrontEdgeTime(TClonesArray * ticks) ; |
90 | ||
1abe522d | 91 | Int_t DigitizeEnergy(Float_t energy, Int_t AbsId) ; |
916f1e76 | 92 | void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG); |
93 | void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples); | |
94 | ||
95 | ||
61e0abb5 | 96 | private: |
814ad4bf | 97 | |
88cb7938 | 98 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
99 | Int_t fDigitsInRun ; //! Total number of digits in one run | |
100 | Bool_t fInit ; //! To avoid overwriting existing files | |
101 | ||
102 | Int_t fInput ; // Number of files to merge | |
103 | TString * fInputFileNames ; //[fInput] List of file names to merge | |
104 | TString * fEventNames ; //[fInput] List of event names to merge | |
105 | ||
4354827d | 106 | Int_t fDigitThreshold ; // Threshold for storing digits in EMC, ACD units |
a9485c37 | 107 | Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy |
33a52e55 | 108 | //Float_t fPedestal ; // Calibration parameters //Not used, remove? |
109 | //Float_t fSlope ; // read from SDigitizer //Not used, remove? | |
a9485c37 | 110 | Float_t fPinNoise ; // Electronics noise in EMC |
6569f329 | 111 | Double_t fTimeResolution ; // Time resolution of FEE electronics |
33a52e55 | 112 | //Float_t fTimeThreshold ; // Threshold to start timing for given crystall //Not used, remove? |
113 | //Float_t fTimeSignalLength ; // Length of the timing signal //Not used, remove? | |
a9485c37 | 114 | Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV) |
14ce0a6e | 115 | Float_t fADCpedestalEC ; // pedestal for one ADC channel |
a9485c37 | 116 | Int_t fNADCEC ; // number of channels in EC section ADC |
a9485c37 | 117 | |
88cb7938 | 118 | TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode |
45fa49ca | 119 | Int_t fFirstEvent; // first event to process |
120 | Int_t fLastEvent; // last event to process | |
ab6a174f | 121 | |
53f1c378 | 122 | AliEMCALCalibData * fCalibData; //Calibration data pointer |
88cb7938 | 123 | |
33a52e55 | 124 | ClassDef(AliEMCALDigitizer,8) // description |
61e0abb5 | 125 | }; |
126 | ||
127 | ||
a435f763 | 128 | #endif // AliEMCALDIGITIZER_H |