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