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 */
8 //_________________________________________________________________________
9 // Task Class for making SDigits in PHOS
10 // A Summable Digits is the sum of all hits originating
11 // from one primary in one active cell
13 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
16 // --- ROOT system ---
19 // --- Standard library ---
21 // --- AliRoot header files ---
23 class AliPHOSSDigitizer: public TTask {
26 AliPHOSSDigitizer() ; // ctor
27 AliPHOSSDigitizer(const char* headerFile, const char *sdigitsTitle = "Default", const Bool_t toSplit = kFALSE) ;
28 virtual ~AliPHOSSDigitizer() ; // dtor
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 virtual void Exec(Option_t *option);
33 const char * GetSDigitsBranch()const{return GetName();}
34 const Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
35 virtual void Print(Option_t* option) const ;
36 void SetSDigitsBranch(const char * title ) ;
37 void UseHitsFrom(const char * filename) ;
38 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
42 void InitParameters() ;
43 void PrintSDigits(Option_t * option) ;
46 Float_t fA ; // Pedestal parameter
47 Float_t fB ; // Slope Digitizition parameters
48 Float_t fPrimThreshold ; // To store primari if Elos > threshold
49 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
50 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
51 TFile * fSplitFile ; //! file in which SDigits will eventually be stored
52 Bool_t fToSplit ; //! Says that sigits should be written into splip file
54 ClassDef(AliPHOSSDigitizer,1) // description
58 #endif // AliPHOSSDigitizer_H