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