]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigitizer.h
Adapted to PHOS classes using the Getter
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.h
1 #ifndef ALIEMCALDigitizer_H
2 #define ALIEMCALDigitizer_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  Task Class for making Digits in EMCAL      
10 //                  
11 //*-- Author: Sahal Yacoob (LBL)
12 // based on : AliPHOSDigit
13 //_________________________________________________________________________ 
14
15
16 // --- ROOT system ---
17
18 #include "TObjString.h"
19 class TArrayI ;
20 // --- Standard library ---
21
22 // --- AliRoot header files ---
23 class AliEMCALSDigitizer ;
24 #include "AliRunDigitizer.h"
25 #include "AliDigitizer.h"
26
27
28 class AliEMCALDigitizer: public AliDigitizer {
29
30 public:
31   AliEMCALDigitizer() ;          // ctor
32   AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ; 
33   AliEMCALDigitizer(AliRunDigitizer * ard) ;
34   AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) 
35                   {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;} 
36   virtual ~AliEMCALDigitizer() ;       
37
38   void    Digitize(const Int_t);            // Make Digits from SDigits stored in fSDigits
39   void    Exec(Option_t *option);                // Supervising method
40
41   Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
42   Float_t GetPedestal()     const { return fPedestal; }
43   Float_t GetPinNoise()     const { return fPinNoise;}
44   Float_t GetSlope()        const { return fSlope; }
45   char *  GetDigitsBranch () ;
46   const Float_t GetTimeResolution() const { return fTimeResolution ; }
47
48  
49   void    MixWith(char* HeaderFile) ; // Add another one file to mix
50   virtual void    Print(Option_t* option)const ;
51   void    Reset() ;   //restarts starts event processing from 0 event(s)
52   const Int_t   GetDigitsInRun()  const { return fDigitsInRun; } ;
53   void    SetEMCThreshold(Float_t EMCThreshold)  {fEMCDigitThreshold = EMCThreshold;}
54   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
55
56   void    SetSDigitsBranch(const char* file) ;
57  
58
59  AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue)  {
60     // assignement operator requested by coding convention but not needed
61     abort() ;
62     return *this ; 
63   }
64
65
66 private:
67
68   Bool_t    Init();                   
69   Bool_t  ReadSDigits() ;            // Read sdigits for particular events
70   void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
71   void    PrintDigits(Option_t * option) ;
72   Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
73   Float_t FrontEdgeTime(TClonesArray * ticks) ;
74  Int_t   DigitizeEnergy(Float_t energy, Int_t absId) ;
75
76 private:
77   
78   AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
79   Int_t   fNinputs ;                // Number of input files
80   Bool_t  fInitialized ;            // 
81  
82   Int_t fDigitsInRun ;              //! Total number of digits in one run
83   Float_t fPedestal ;                // Calibration parameters 
84   Float_t fSlope ;                   // read from SDigitizer
85
86   Float_t fPinNoise ;               // Electronics noise in EMC
87   Float_t fEMCDigitThreshold  ;     // Threshold for storing digits in EMC
88   Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits
89
90   Float_t fTimeResolution ;         // Time resolution of FEE electronics
91   Float_t fTimeThreshold ;          // Threshold to start timing for given crystall
92   Float_t fTimeSignalLength ;       // Length of the timing signal 
93
94   Float_t fADCchannelTower ;           // width of one ADC channel in Tower (GeV)
95   Float_t fADCpedestalTower ;         //
96   Int_t fNADCTower ;                // number of channels in Tower ADC
97
98   Float_t fADCchannelPreSho ;           // width of one ADC channel in Pre Shower (GeV)
99   Float_t fADCpedestalPreSho ;                   // 
100   Int_t fNADCPreSho ;                // number of channels in Pre Shower ADC
101
102   ClassDef(AliEMCALDigitizer,1)  // description 
103
104 };
105
106
107 #endif // AliEMCALDigitizer_H