]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALSDigitizer.h
Tiny (< 0.1 mm) overlaps corrected.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.h
1 #ifndef ALIEMCALSDigitizer_H
2 #define ALIEMCALSDigitizer_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5 /* $Id$ */
6 //_________________________________________________________________________
7 //  Task Class for making SDigits in EMCAL      
8 //                  
9 //*-- Author: Sahal Yacoob (LBL)
10 // based on : AliPHOSSDigitizer
11 //_________________________________________________________________________
12 //
13 // Modif: 
14 //  August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
15 //  July   2003 Yves Schutz: new  IO (à la PHOS)
16  
17 // --- ROOT system ---
18 #include "TTask.h"
19 class TFile ;
20 class TList;
21 class TBrowser;
22 //class TBrowser;
23
24 // --- Standard library ---
25
26 // --- AliRoot header files ---
27 #include "AliConfig.h"
28
29 class AliEMCALSDigitizer: public TTask {
30
31 public:
32   AliEMCALSDigitizer() ;          // ctor
33   AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; 
34   AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
35   virtual ~AliEMCALSDigitizer(); // dtor
36
37   Float_t       Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
38   Int_t         Digitize(Float_t energy)const;
39   virtual void  Exec(Option_t *option); 
40   Int_t         GetSDigitsInRun() const {return fSDigitsInRun ;}  
41   virtual void  Print(Option_t *option="") const;
42   void          Print1(Option_t *option="all");  // *MENU*
43   void          SetEventFolderName(TString name) { fEventFolderName = name ; }
44   void          SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
45
46   Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
47   const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
48
49   virtual void Browse(TBrowser* b);
50   //JLK
51   // hists
52   //void   SetControlHists(Int_t var=0) {fControlHists=var;}
53   //Int_t  GetControlHist() const {return fControlHists;}
54   //TList *GetListOfHists() {return fHists;}
55   //TList* BookControlHists(int var=0);
56   //void   SaveHists(const char* name="RF/TRD1/Digitizations/SDigiVar?", 
57   //Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU*
58
59 private:
60   void     Init() ;
61   void     InitParameters() ; 
62   void     PrintSDigits(Option_t * option) ;
63   void     Unload() const ;
64
65 private:
66   Float_t fA ;                     // Pedestal parameter
67   Float_t fB ;                     // Slope Digitizition parameters
68   Float_t fECPrimThreshold ;       // To store primary if EC Shower Elos > threshold
69   Bool_t  fDefaultInit;            //! Says if the task was created by defaut ctor (only parameters are initialized)
70   TString fEventFolderName;        // event folder name
71   Bool_t  fInit ;                  //! tells if initialisation went OK, will revent exec if not
72   Int_t   fSDigitsInRun ;          //! Total number of sdigits in one run
73   Int_t   fFirstEvent;             // first event to process
74   Int_t   fLastEvent;              // last  event to process
75   Float_t fSampling;               // See AliEMCALGeometry
76   //JLK
77   // Control hists
78   //Int_t   fControlHists;          //!
79   //TList  *fHists;                 //!
80
81   //JLK
82   //ClassDef(AliEMCALSDigitizer,5)  // description 
83   ClassDef(AliEMCALSDigitizer,6)  // description 
84 };
85
86 #endif // AliEMCALSDigitizer_H
87