]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIEMCALSDIGITIZER_H | |
2 | #define ALIEMCALSDIGITIZER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | /* $Id$ */ | |
6 | //_________________________________________________________________________ | |
7 | // This is a TTask that makes SDigits out of Hits | |
8 | // A Summable Digits is the sum of all hits originating | |
9 | // from one in one tower of the EMCAL | |
10 | // A threshold for assignment of the primary to SDigit is applied | |
11 | // | |
12 | // SDigits need to hold the energy sum of the hits, but AliEMCALDigit | |
13 | // can (should) only store amplitude. Therefore, the SDigit energy is | |
14 | // "digitized" before being stored and must be "calibrated" back to an | |
15 | // energy before SDigits are summed to form true Digits | |
16 | // | |
17 | // | |
18 | //*-- Author: Sahal Yacoob (LBL) | |
19 | // based on : AliPHOSSDigitizer | |
20 | //_________________________________________________________________________ | |
21 | ||
22 | // --- ROOT system --- | |
23 | #include "TTask.h" | |
24 | class TBrowser; | |
25 | ||
26 | // --- Standard library --- | |
27 | ||
28 | // --- AliRoot header files --- | |
29 | #include "AliConfig.h" | |
30 | ||
31 | class AliEMCALSDigitizer: public TTask { | |
32 | ||
33 | public: | |
34 | AliEMCALSDigitizer() ; // ctor | |
35 | AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; | |
36 | AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ; | |
37 | virtual ~AliEMCALSDigitizer(); // dtor | |
38 | ||
39 | Int_t Digitize(Float_t energy)const; //convert energy in GeV to int amplitude | |
40 | Float_t Calibrate(Int_t amp)const; //opposite of Digitize() | |
41 | ||
42 | virtual void Exec(Option_t *option); | |
43 | Int_t GetSDigitsInRun() const {return fSDigitsInRun ;} | |
44 | virtual void Print(Option_t *option="") const; | |
45 | void Print1(Option_t *option="all"); // *MENU* | |
46 | void SetEventFolderName(TString name) { fEventFolderName = name ; } | |
47 | void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } | |
48 | ||
49 | Bool_t operator == (const AliEMCALSDigitizer & sd) const ; | |
50 | const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;} | |
51 | ||
52 | virtual void Browse(TBrowser* b); | |
53 | ||
54 | private: | |
55 | void Init() ; | |
56 | void InitParameters() ; | |
57 | void PrintSDigits(Option_t * option) ; | |
58 | void Unload() const ; | |
59 | ||
60 | private: | |
61 | Float_t fA ; // Pedestal parameter | |
62 | Float_t fB ; // Slope Digitizition parameters | |
63 | Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold | |
64 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) | |
65 | TString fEventFolderName; // event folder name | |
66 | Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not | |
67 | Int_t fSDigitsInRun ; //! Total number of sdigits in one run | |
68 | Int_t fFirstEvent; // first event to process | |
69 | Int_t fLastEvent; // last event to process | |
70 | Float_t fSampling; // See AliEMCALGeometry | |
71 | ||
72 | ClassDef(AliEMCALSDigitizer,6) // description | |
73 | }; | |
74 | ||
75 | #endif // AliEMCALSDIGITIZER_H | |
76 |