61e0abb5 |
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 | |
6 | /* $Id$ */ |
7 | |
8 | //_________________________________________________________________________ |
9 | // Task Class for making SDigits in EMCAL |
10 | // |
ffa6d63b |
11 | //*-- Author: Sahal Yacoob (LBL) |
12 | // based on : AliPHOSSDigitizer |
13 | //_________________________________________________________________________ |
61e0abb5 |
14 | |
15 | |
16 | // --- ROOT system --- |
17 | #include "TTask.h" |
18 | #include "TString.h" |
19 | // --- Standard library --- |
20 | |
21 | // --- AliRoot header files --- |
22 | |
23 | class AliEMCALSDigitizer: public TTask { |
24 | |
25 | public: |
26 | AliEMCALSDigitizer() ; // ctor |
ffa6d63b |
27 | AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ; |
61e0abb5 |
28 | virtual ~AliEMCALSDigitizer() ; // dtor |
29 | |
30 | Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; } |
31 | Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); } |
32 | |
33 | virtual void Exec(Option_t *option); |
34 | |
35 | Float_t GetPedestalParameter()const {return fA;} |
36 | Float_t GetCalibrationParameter()const{return fB;} |
37 | char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();} |
38 | |
39 | virtual void Print(Option_t* option) const ; |
40 | |
41 | void SetPedestalParameter(Float_t A){fA = A ;} |
42 | void SetSlopeParameter(Float_t B){fB = B ;} |
43 | void SetSDigitsBranch(const char * title ) ; |
44 | |
45 | Bool_t operator == (const AliEMCALSDigitizer & sd) const ; |
46 | |
47 | private: |
48 | void Init() ; |
49 | void PrintSDigits(Option_t * option) ; |
50 | |
51 | private: |
52 | Float_t fA ; //Pedestal parameter |
53 | Float_t fB ; //Slope Digitizition parameters |
54 | Int_t fNevents ; // Number of events to digitize |
55 | Float_t fPrimThreshold ; // To store primari if Elos > threshold |
56 | TString fSDigitsTitle ; // title of SDigits branch |
57 | TString fHeadersFile ; //input file |
58 | Bool_t fIsInitialized ; |
59 | TClonesArray * fSDigits ; //! list of SDigits |
ffa6d63b |
60 | TClonesArray * fHits ; //! |
61e0abb5 |
61 | |
62 | ClassDef(AliEMCALSDigitizer,1) // description |
63 | |
64 | }; |
65 | |
66 | #endif // AliEMCALSDigitizer_H |