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