]>
Commit | Line | Data |
---|---|---|
990119d6 | 1 | #ifndef ALIPHOSSDigitizer_H |
2 | #define ALIPHOSSDigitizer_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
88cb7938 | 6 | |
990119d6 | 7 | /* $Id$ */ |
8 | ||
702ab87e | 9 | /* History of cvs commits: |
10 | * | |
11 | * $Log$ | |
0a81ea53 | 12 | * Revision 1.24 2005/05/28 14:19:05 schutz |
13 | * Compilation warnings fixed by T.P. | |
14 | * | |
702ab87e | 15 | */ |
16 | ||
990119d6 | 17 | //_________________________________________________________________________ |
18 | // Task Class for making SDigits in PHOS | |
baef0810 | 19 | // A Summable Digits is the sum of all hits originating |
20 | // from one primary in one active cell | |
21 | //*-- | |
990119d6 | 22 | //*-- Author: Dmitri Peressounko(SUBATECH & KI) |
23 | ||
24 | ||
25 | // --- ROOT system --- | |
26 | #include "TTask.h" | |
0a81ea53 | 27 | #include "AliConfig.h" |
bdc147a9 | 28 | class TFile ; |
3e357865 | 29 | |
0a81ea53 | 30 | |
990119d6 | 31 | // --- Standard library --- |
32 | ||
33 | // --- AliRoot header files --- | |
34 | ||
35 | class AliPHOSSDigitizer: public TTask { | |
36 | ||
37 | public: | |
38 | AliPHOSSDigitizer() ; // ctor | |
e191bb57 | 39 | AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; |
bdc147a9 | 40 | AliPHOSSDigitizer(const AliPHOSSDigitizer & sd) ; // cpy ctor |
797e311f | 41 | virtual ~AliPHOSSDigitizer(); // dtor |
990119d6 | 42 | |
88cb7938 | 43 | Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; } |
44 | Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); } | |
fbf811ec | 45 | virtual void Exec(Option_t *option); |
17323043 | 46 | Int_t GetSDigitsInRun() const {return fSDigitsInRun ;} |
702ab87e | 47 | virtual void Print(const Option_t * = "") const ; |
88cb7938 | 48 | void SetEventFolderName(TString name) { fEventFolderName = name ; } |
212d1c0f | 49 | void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } |
88cb7938 | 50 | |
106fc2fa | 51 | Bool_t operator == (const AliPHOSSDigitizer & sd) const ; |
8c140292 | 52 | AliPHOSSDigitizer & operator = (const AliPHOSSDigitizer & /*sd*/) {return *this ;} |
bdc147a9 | 53 | |
7acf6008 | 54 | private: |
55 | void Init() ; | |
8d0f3f77 | 56 | void InitParameters() ; |
7acf6008 | 57 | void PrintSDigits(Option_t * option) ; |
88cb7938 | 58 | void Unload() const ; |
59 | ||
990119d6 | 60 | |
61 | private: | |
7b7c1533 | 62 | Float_t fA ; // Pedestal parameter |
63 | Float_t fB ; // Slope Digitizition parameters | |
990119d6 | 64 | Float_t fPrimThreshold ; // To store primari if Elos > threshold |
fbf811ec | 65 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
88cb7938 | 66 | TString fEventFolderName; // event folder name |
67 | Bool_t fInit ; //! tells if initialisation wennt OK, will revent exec if not | |
fbf811ec | 68 | Int_t fSDigitsInRun ; //! Total number of sdigits in one run |
212d1c0f | 69 | Int_t fFirstEvent; // first event to process |
70 | Int_t fLastEvent; // last event to process | |
990119d6 | 71 | |
212d1c0f | 72 | ClassDef(AliPHOSSDigitizer,3) // description |
990119d6 | 73 | |
74 | }; | |
75 | ||
76 | #endif // AliPHOSSDigitizer_H |