]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigitizer.h
updated version
[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 // July 2003 Yves Schutz : NewIO 
14 //_________________________________________________________________________ 
15
16
17 // --- ROOT system ---
18 #include "TObjString.h"
19 class TArrayI ;
20 class TClonesArray ; 
21
22 // --- Standard library ---
23
24 // --- AliRoot header files ---
25 #include "AliDigitizer.h"
26 #include "AliConfig.h"
27 class AliEMCALSDigitizer ;
28 class AliRunDigitizer ;
29
30 class AliEMCALDigitizer: public AliDigitizer {
31
32 public:
33   AliEMCALDigitizer() ;          // ctor
34   AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ;  
35   AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
36   AliEMCALDigitizer(AliRunDigitizer * manager) ;
37   virtual ~AliEMCALDigitizer() ;       
38
39   void    Digitize(Int_t event);          // Make Digits from SDigits stored in fSDigits
40   void    Exec(Option_t *option);               // Supervising method
41
42   Float_t GetDigitThreshold() const { return fDigitThreshold;}
43   Float_t GetPedestal()       const { return fPedestal; }
44   Float_t GetPinNoise()       const { return fPinNoise;}
45   Float_t GetSlope()          const { return fSlope; }
46   Float_t GetTimeResolution() const { return fTimeResolution ; }
47   Float_t GetECAchannel()     const { return fADCchannelEC ; }
48   Float_t GetECApedestal()    const { return fADCpedestalEC ; }
49  void   SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
50   void    SetDigitThreshold(Float_t EMCThreshold)  {fDigitThreshold = EMCThreshold;}
51   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
52
53   //General
54   Int_t   GetDigitsInRun()  const { return fDigitsInRun; } 
55   void  MixWith(TString alirunFileName, 
56                 TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; // Add another one file to mix
57   void  Print()const ;
58  
59   AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/)  {
60     // assignement operator requested by coding convention but not needed
61    Fatal("operator =", "not implemented") ;  
62    return *this ; 
63   }
64
65 private:
66
67   Bool_t  Init();                   
68   void    InitParameters() ; 
69   void    PrintDigits(Option_t * option) ;
70   void    Unload() ; 
71   void    WriteDigits() ;         // Writes Digits the current event
72   Float_t TimeOfNoise(void) ;     // Calculate time signal generated by noise
73
74   //Calculate the time of crossing of the threshold by front edge
75   Float_t FrontEdgeTime(TClonesArray * ticks) ;
76   Int_t   DigitizeEnergy(Float_t energy) ;
77
78 private:
79   
80   Bool_t  fDefaultInit;           //! Says if the task was created by defaut ctor (only parameters are initialized)
81   Int_t   fDigitsInRun ;          //! Total number of digits in one run
82   Bool_t  fInit ;                 //! To avoid overwriting existing files
83
84   Int_t   fInput ;                // Number of files to merge
85   TString * fInputFileNames ;     //[fInput] List of file names to merge 
86   TString * fEventNames ;         //[fInput] List of event names to merge
87
88   Float_t fDigitThreshold  ;      // Threshold for storing digits in EMC
89   Int_t   fMeanPhotonElectron ;   // number of photon electrons per GeV deposited energy 
90   Float_t fPedestal ;             // Calibration parameters 
91   Float_t fSlope ;                // read from SDigitizer
92   Float_t fPinNoise ;             // Electronics noise in EMC
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   Float_t fADCchannelEC ;         // width of one ADC channel in EC section (GeV)
97   Float_t fADCpedestalEC ;        //
98   Int_t   fNADCEC ;               // number of channels in EC section ADC
99
100   TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
101   Int_t   fFirstEvent;        // first event to process
102   Int_t   fLastEvent;         // last  event to process
103
104   ClassDef(AliEMCALDigitizer,4)  // description 
105
106 };
107
108
109 #endif // AliEMCALDigitizer_H