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