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