]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALSDigitizer.h
changes to calibration-related objects: use TObjArray for streaming to work, and...
[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 TBrowser;
20
21 // --- Standard library ---
22
23 // --- AliRoot header files ---
24 #include "AliConfig.h"
25
26 class AliEMCALSDigitizer: public TTask {
27
28 public:
29   AliEMCALSDigitizer() ;          // ctor
30   AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; 
31   AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
32   virtual ~AliEMCALSDigitizer(); // dtor
33
34   Int_t         Digitize(Float_t energy)const; //convert energy in GeV to int amplitude
35   Float_t       Calibrate(Int_t amp)const;  //opposite of Digitize()
36
37   virtual void  Exec(Option_t *option); 
38   Int_t         GetSDigitsInRun() const {return fSDigitsInRun ;}  
39   virtual void  Print(Option_t *option="") const;
40   void          Print1(Option_t *option="all");  // *MENU*
41   void          SetEventFolderName(TString name) { fEventFolderName = name ; }
42   void          SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
43
44   Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
45   const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
46
47   virtual void Browse(TBrowser* b);
48
49 private:
50   void     Init() ;
51   void     InitParameters() ; 
52   void     PrintSDigits(Option_t * option) ;
53   void     Unload() const ;
54
55 private:
56   Float_t fA ;                     // Pedestal parameter
57   Float_t fB ;                     // Slope Digitizition parameters
58   Float_t fECPrimThreshold ;       // To store primary if EC Shower Elos > threshold
59   Bool_t  fDefaultInit;            //! Says if the task was created by defaut ctor (only parameters are initialized)
60   TString fEventFolderName;        // event folder name
61   Bool_t  fInit ;                  //! tells if initialisation went OK, will revent exec if not
62   Int_t   fSDigitsInRun ;          //! Total number of sdigits in one run
63   Int_t   fFirstEvent;             // first event to process
64   Int_t   fLastEvent;              // last  event to process
65   Float_t fSampling;               // See AliEMCALGeometry
66
67   ClassDef(AliEMCALSDigitizer,6)  // description 
68 };
69
70 #endif // AliEMCALSDigitizer_H
71