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 */
9 /* History of cvs commits:
12 * Revision 1.25 2005/11/30 18:56:26 schutz
13 * Small corrections to fix compilation errors
15 * Revision 1.24 2005/05/28 14:19:05 schutz
16 * Compilation warnings fixed by T.P.
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
25 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
28 // --- ROOT system ---
30 #include "AliConfig.h"
34 // --- Standard library ---
36 // --- AliRoot header files ---
38 class AliPHOSSDigitizer: public TTask {
41 AliPHOSSDigitizer() ; // ctor
42 AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
44 virtual ~AliPHOSSDigitizer(); // dtor
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; }
54 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
58 void InitParameters() ;
59 void PrintSDigits(Option_t * option) ;
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
74 ClassDef(AliPHOSSDigitizer,3) // description
78 #endif // AliPHOSSDigitizer_H