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.24 2005/05/28 14:19:05 schutz
13 * Compilation warnings fixed by T.P.
17 //_________________________________________________________________________
18 // Task Class for making SDigits in PHOS
19 // A Summable Digits is the sum of all hits originating
20 // from one primary in one active cell
22 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
25 // --- ROOT system ---
27 #include "AliConfig.h"
31 // --- Standard library ---
33 // --- AliRoot header files ---
35 class AliPHOSSDigitizer: public TTask {
38 AliPHOSSDigitizer() ; // ctor
39 AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
40 AliPHOSSDigitizer(const AliPHOSSDigitizer & sd) ; // cpy ctor
41 virtual ~AliPHOSSDigitizer(); // dtor
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); }
45 virtual void Exec(Option_t *option);
46 Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
47 virtual void Print(const Option_t * = "") const ;
48 void SetEventFolderName(TString name) { fEventFolderName = name ; }
49 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
51 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
52 AliPHOSSDigitizer & operator = (const AliPHOSSDigitizer & /*sd*/) {return *this ;}
56 void InitParameters() ;
57 void PrintSDigits(Option_t * option) ;
62 Float_t fA ; // Pedestal parameter
63 Float_t fB ; // Slope Digitizition parameters
64 Float_t fPrimThreshold ; // To store primari if Elos > threshold
65 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
66 TString fEventFolderName; // event folder name
67 Bool_t fInit ; //! tells if initialisation wennt OK, will revent exec if not
68 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
69 Int_t fFirstEvent; // first event to process
70 Int_t fLastEvent; // last event to process
72 ClassDef(AliPHOSSDigitizer,3) // description
76 #endif // AliPHOSSDigitizer_H