]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigitizer.h
Added the fFailed data member that gives the status of the file and of galice
[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 #include <stdlib.h>
17 // --- ROOT system ---
18
19 #include "TObjString.h"
20 class TArrayI ;
21 // --- Standard library ---
22
23 // --- AliRoot header files ---
24 class AliEMCALSDigitizer ;
25 #include "AliRunDigitizer.h"
26 #include "AliDigitizer.h"
27
28
29 class AliEMCALDigitizer: public AliDigitizer {
30
31 public:
32   AliEMCALDigitizer() ;          // ctor
33   AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ; 
34   AliEMCALDigitizer(AliRunDigitizer * ard) ;
35   AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) 
36                   {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;} 
37   virtual ~AliEMCALDigitizer() ;       
38
39   void    Digitize(const Int_t);            // Make Digits from SDigits stored in fSDigits
40   void    Exec(Option_t *option);                // Supervising method
41
42   const Float_t GetTowerThreshold() const { return fTowerDigitThreshold;}
43   const Float_t GetPedestal()     const { return fPedestal; }
44   const Float_t GetPinNoise()     const { return fPinNoise;}
45   const Float_t GetSlope()        const { return fSlope; }
46   const Float_t GetTimeResolution() const { return fTimeResolution ; }
47   const Float_t GetTowerchannel() const { return fADCchannelTower ; }
48   const Float_t GetTowerpedestal() const { return fADCpedestalTower ; }
49   const Float_t GetPreShochannel() const { return fADCchannelPreSho ; }
50   const Float_t GetPreShopedestal() const { return fADCpedestalPreSho ; }
51
52   void    MixWith(char* HeaderFile) ; // Add another one file to mix
53   virtual void    Print(Option_t* option)const ;
54   void    Reset() ;   //restarts starts event processing from 0 event(s)
55   const Int_t   GetDigitsInRun()  const { return fDigitsInRun; } ;
56   void    SetTowerThreshold(Float_t EMCThreshold)  {fTowerDigitThreshold = EMCThreshold;}
57   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
58
59   void    SetSDigitsBranch(const char* file) ;
60  
61
62  AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue)  {
63     // assignement operator requested by coding convention but not needed
64     abort() ;
65     return *this ; 
66   }
67
68
69 private:
70
71   Bool_t  Init();                   
72   Bool_t  ReadSDigits() ;            // Read sdigits for particular events
73   void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
74   void    PrintDigits(Option_t * option) ;
75   Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
76   Float_t FrontEdgeTime(TClonesArray * ticks) ;
77   Int_t   DigitizeEnergy(Float_t energy, Int_t absId) ;
78
79 private:
80   
81   AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
82   Int_t   fNinputs ;                // Number of input files
83   Bool_t  fInitialized ;            // 
84  
85   Int_t fDigitsInRun ;              //! Total number of digits in one run
86   Float_t fPedestal ;                // Calibration parameters 
87   Float_t fSlope ;                   // read from SDigitizer
88
89   Float_t fPinNoise ;               // Electronics noise in EMC
90   Float_t fTowerDigitThreshold  ;     // Threshold for storing digits in EMC
91   Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits
92
93   Float_t fTimeResolution ;         // Time resolution of FEE electronics
94   Float_t fTimeThreshold ;          // Threshold to start timing for given crystall
95   Float_t fTimeSignalLength ;       // Length of the timing signal 
96
97   Float_t fADCchannelTower ;           // width of one ADC channel in Tower (GeV)
98   Float_t fADCpedestalTower ;         //
99   Int_t fNADCTower ;                // number of channels in Tower ADC
100
101   Float_t fADCchannelPreSho ;           // width of one ADC channel in Pre Shower (GeV)
102   Float_t fADCpedestalPreSho ;                   // 
103   Int_t fNADCPreSho ;                // number of channels in Pre Shower ADC
104
105   ClassDef(AliEMCALDigitizer,1)  // description 
106
107 };
108
109
110 #endif // AliEMCALDigitizer_H