]>
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 | |
13 | //_________________________________________________________________________ | |
61e0abb5 | 14 | |
15 | ||
d968cee0 | 16 | #include <stdlib.h> |
61e0abb5 | 17 | // --- ROOT system --- |
814ad4bf | 18 | |
61e0abb5 | 19 | #include "TObjString.h" |
20 | class TArrayI ; | |
21 | // --- Standard library --- | |
22 | ||
23 | // --- AliRoot header files --- | |
24 | class AliEMCALSDigitizer ; | |
814ad4bf | 25 | #include "AliRunDigitizer.h" |
26 | #include "AliDigitizer.h" | |
61e0abb5 | 27 | |
28 | ||
814ad4bf | 29 | class AliEMCALDigitizer: public AliDigitizer { |
61e0abb5 | 30 | |
31 | public: | |
32 | AliEMCALDigitizer() ; // ctor | |
ffa6d63b | 33 | AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ; |
814ad4bf | 34 | AliEMCALDigitizer(AliRunDigitizer * ard) ; |
35 | AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) | |
36 | {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;} | |
61e0abb5 | 37 | virtual ~AliEMCALDigitizer() ; |
38 | ||
814ad4bf | 39 | void Digitize(const Int_t); // Make Digits from SDigits stored in fSDigits |
61e0abb5 | 40 | void Exec(Option_t *option); // Supervising method |
41 | ||
9bd3caba | 42 | const TString GetHitsFileName() const { return fHitsFileName ; } |
43 | const TString GetSDigitsFileName() const { return fSDigitsFileName ; } | |
d968cee0 | 44 | const Float_t GetTowerThreshold() const { return fTowerDigitThreshold;} |
d17817b7 | 45 | const Float_t GetPedestal() const { return fPedestal; } |
46 | const Float_t GetPinNoise() const { return fPinNoise;} | |
47 | const Float_t GetSlope() const { return fSlope; } | |
814ad4bf | 48 | const Float_t GetTimeResolution() const { return fTimeResolution ; } |
d17817b7 | 49 | const Float_t GetTowerchannel() const { return fADCchannelTower ; } |
50 | const Float_t GetTowerpedestal() const { return fADCpedestalTower ; } | |
51 | const Float_t GetPreShochannel() const { return fADCchannelPreSho ; } | |
52 | const Float_t GetPreShopedestal() const { return fADCpedestalPreSho ; } | |
814ad4bf | 53 | |
814ad4bf | 54 | void MixWith(char* HeaderFile) ; // Add another one file to mix |
61e0abb5 | 55 | virtual void Print(Option_t* option)const ; |
56 | void Reset() ; //restarts starts event processing from 0 event(s) | |
814ad4bf | 57 | const Int_t GetDigitsInRun() const { return fDigitsInRun; } ; |
d968cee0 | 58 | void SetTowerThreshold(Float_t EMCThreshold) {fTowerDigitThreshold = EMCThreshold;} |
61e0abb5 | 59 | void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} |
60 | ||
61e0abb5 | 61 | void SetSDigitsBranch(const char* file) ; |
64c73770 | 62 | void SetSplitFile(const TString splitFileName = "EMCAL.Digits.root") ; |
814ad4bf | 63 | |
64 | ||
65 | AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue) { | |
66 | // assignement operator requested by coding convention but not needed | |
67 | abort() ; | |
68 | return *this ; | |
69 | } | |
70 | ||
61e0abb5 | 71 | |
72 | private: | |
814ad4bf | 73 | |
d17817b7 | 74 | Bool_t Init(); |
839828a6 | 75 | void InitParameters() ; |
61e0abb5 | 76 | Bool_t ReadSDigits() ; // Read sdigits for particular events |
814ad4bf | 77 | void WriteDigits(Int_t evt) ; // Writes Digits for particular event |
61e0abb5 | 78 | void PrintDigits(Option_t * option) ; |
814ad4bf | 79 | Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise |
80 | Float_t FrontEdgeTime(TClonesArray * ticks) ; | |
d17817b7 | 81 | Int_t DigitizeEnergy(Float_t energy, Int_t absId) ; |
61e0abb5 | 82 | |
83 | private: | |
814ad4bf | 84 | |
9bd3caba | 85 | TString fHitsFileName ; // file name that contains the original hits |
86 | TString fSDigitsFileName ; // file name that contains the original SDigits | |
92f521a9 | 87 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
88 | // !!! the following is not necessary, it is in the folder !!!!!!! | |
ffa6d63b | 89 | AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters |
61e0abb5 | 90 | Int_t fNinputs ; // Number of input files |
91 | Bool_t fInitialized ; // | |
814ad4bf | 92 | |
93 | Int_t fDigitsInRun ; //! Total number of digits in one run | |
61e0abb5 | 94 | Float_t fPedestal ; // Calibration parameters |
95 | Float_t fSlope ; // read from SDigitizer | |
96 | ||
97 | Float_t fPinNoise ; // Electronics noise in EMC | |
d968cee0 | 98 | Float_t fTowerDigitThreshold ; // Threshold for storing digits in EMC |
814ad4bf | 99 | Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits |
100 | ||
101 | Float_t fTimeResolution ; // Time resolution of FEE electronics | |
102 | Float_t fTimeThreshold ; // Threshold to start timing for given crystall | |
103 | Float_t fTimeSignalLength ; // Length of the timing signal | |
104 | ||
105 | Float_t fADCchannelTower ; // width of one ADC channel in Tower (GeV) | |
106 | Float_t fADCpedestalTower ; // | |
107 | Int_t fNADCTower ; // number of channels in Tower ADC | |
61e0abb5 | 108 | |
814ad4bf | 109 | Float_t fADCchannelPreSho ; // width of one ADC channel in Pre Shower (GeV) |
110 | Float_t fADCpedestalPreSho ; // | |
111 | Int_t fNADCPreSho ; // number of channels in Pre Shower ADC | |
64c73770 | 112 | TFile * fSplitFile ; //! file in which Digits will eventually be stored |
61e0abb5 | 113 | |
114 | ClassDef(AliEMCALDigitizer,1) // description | |
115 | ||
116 | }; | |
117 | ||
118 | ||
119 | #endif // AliEMCALDigitizer_H |