]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALSDigitizer.h
Reinitialization after soft scattering, bug fixes in the calculation of angle 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 TFile ;
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::fgkDefaultEventFolderName) ; 
31   AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
32   virtual ~AliEMCALSDigitizer() {;} // dtor
33
34   Float_t       Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
35   Int_t         Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
36   virtual void  Exec(Option_t *option); 
37   Int_t         GetSDigitsInRun() const {return fSDigitsInRun ;}  
38   virtual void  Print() const ;
39   void          SetEventFolderName(TString name) { fEventFolderName = name ; }
40
41   Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
42   const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
43
44
45 private:
46   void     Init() ;
47   void     InitParameters() ; 
48   void     PrintSDigits(Option_t * option) ;
49   void     Unload() const ;
50
51 private:
52   Float_t fA ;                     // Pedestal parameter
53   Float_t fB ;                     // Slope Digitizition parameters
54   Float_t fPREPrimThreshold ;      // To store primary if Pre Shower Elos > threshold
55   Float_t fECPrimThreshold ;       // To store primary if EC Shower Elos > threshold
56   Float_t fHCPrimThreshold ;       // To store primary if HC Shower Elos > threshold
57   Bool_t  fDefaultInit;            //! Says if the task was created by defaut ctor (only parameters are initialized)
58   TString fEventFolderName;        // event folder name
59   Bool_t  fInit ;                  //! tells if initialisation wennt OK, will revent exec if not
60   Int_t   fSDigitsInRun ;          //! Total number of sdigits in one run
61
62   ClassDef(AliEMCALSDigitizer,5)  // description 
63
64 };
65
66 #endif // AliEMCALSDigitizer_H
67