]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSSDigitizer.h
coding convention
[u/mrichter/AliRoot.git] / PHOS / AliPHOSSDigitizer.h
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 //_________________________________________________________________________
10 //  Task Class for making SDigits in PHOS      
11 // A Summable Digits is the sum of all hits originating 
12 // from one primary in one active cell
13 //*--
14 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
15
16
17 // --- ROOT system ---
18 #include "TTask.h"
19 class TFile ;
20
21 // --- Standard library ---
22
23 // --- AliRoot header files ---
24
25 class AliPHOSSDigitizer: public TTask {
26
27 public:
28   AliPHOSSDigitizer() ;          // ctor
29   AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::fgkDefaultEventFolderName) ; 
30   AliPHOSSDigitizer(const AliPHOSSDigitizer & sd) ; // cpy ctor
31   virtual ~AliPHOSSDigitizer() {;} // dtor
32
33   Float_t        Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
34   Int_t          Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
35   virtual void   Exec(Option_t *option); 
36   const Int_t    GetSDigitsInRun() const {return fSDigitsInRun ;}  
37   virtual void   Print() const ;
38   void           SetEventFolderName(TString name) { fEventFolderName = name ; }
39
40   Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
41   AliPHOSSDigitizer & operator = (const AliPHOSSDigitizer & /*sd*/) {return *this ;}
42   
43 private:
44   void     Init() ;
45   void     InitParameters() ;
46   void     PrintSDigits(Option_t * option) ;
47   void     Unload() const ;
48
49
50 private:
51   Float_t fA ;              // Pedestal parameter
52   Float_t fB ;              // Slope Digitizition parameters
53   Float_t fPrimThreshold ;  // To store primari if Elos > threshold
54   Bool_t  fDefaultInit;     //! Says if the task was created by defaut ctor (only parameters are initialized)
55   TString fEventFolderName; // event folder name
56   Bool_t  fInit ;           //! tells if initialisation wennt OK, will revent exec if not
57   Int_t   fSDigitsInRun ;   //! Total number of sdigits in one run
58
59   ClassDef(AliPHOSSDigitizer,2)  // description 
60
61 };
62
63 #endif // AliPHOSSDigitizer_H