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