]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigitizer.h
New class to make V2 clusters starting from digits or hits (fast simulation). Origin...
[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 #include "TObjString.h"
18 class TArrayI ;
19 class TClonesArray ; 
20
21 // --- Standard library ---
22 #include <stdlib.h>
23
24 // --- AliRoot header files ---
25 #include "AliDigitizer.h"
26 class AliEMCALSDigitizer ;
27 class AliRunDigitizer ;
28
29 class AliEMCALDigitizer: public AliDigitizer {
30
31 public:
32   AliEMCALDigitizer() ;          // ctor
33   AliEMCALDigitizer(const char *headerFile, const char * sDigitsBranchTitle = "Default", const Bool_t toSplit = kFALSE) ; 
34   AliEMCALDigitizer(AliRunDigitizer * ard) ;
35   AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) 
36                   {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;} 
37   virtual ~AliEMCALDigitizer() ;       
38
39   void    Digitize(const Int_t event);          // Make Digits from SDigits stored in fSDigits
40   void    Exec(Option_t *option);               // Supervising method
41
42   const Float_t GetDigitThreshold() const { return fDigitThreshold;}
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 GetECchannel()      const { return fADCchannelEC ; }
48   const Float_t GetECpedestal()     const { return fADCpedestalEC ; }
49   const Float_t GetHCchannel()      const { return fADCchannelHC ; }
50   const Float_t GetHCpedestal()     const { return fADCpedestalHC ; }
51   const Float_t GetPREchannel()     const { return fADCchannelPRE ; }
52   const Float_t GetPREpedestal()    const { return fADCpedestalPRE ; }
53
54   void    SetDigitThreshold(Float_t EMCThreshold)  {fDigitThreshold = EMCThreshold;}
55   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
56
57   //General
58   const Int_t   GetDigitsInRun()  const { return fDigitsInRun; } ;
59   void  MixWith(char* HeaderFile) ; // Add another one file to mix
60   void  Print(Option_t* option)const ;
61  
62  AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue)  {
63     // assignement operator requested by coding convention but not needed
64    Fatal("operator =", "not implemented") ;  
65    return *this ; 
66   }
67
68 private:
69
70   Bool_t  Init();                   
71   void    InitParameters() ; 
72   void    PrintDigits(Option_t * option) ;
73   void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
74   Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
75   //Calculate the time of crossing of the threshold by front edge
76   Float_t FrontEdgeTime(TClonesArray * ticks) ;
77   Int_t   DigitizeEnergy(Float_t energy, Int_t absId) ;
78
79 private:
80   
81   Bool_t fDefaultInit;            //! Says if the task was created by defaut ctor (only parameters are initialized)
82   Int_t fDigitsInRun ;            //! Total number of digits in one run
83   Float_t fDigitThreshold  ;      // Threshold for storing digits in EMC
84   Int_t   fMeanPhotonElectron ;   // number of photon electrons per GeV deposited energy 
85   Float_t fPedestal ;             // Calibration parameters 
86   Float_t fSlope ;                // read from SDigitizer
87   Float_t fPinNoise ;             // Electronics noise in EMC
88   Float_t fTimeResolution ;       // Time resolution of FEE electronics
89   Float_t fTimeThreshold ;        // Threshold to start timing for given crystall
90   Float_t fTimeSignalLength ;     // Length of the timing signal 
91   Float_t fADCchannelEC ;         // width of one ADC channel in EC section (GeV)
92   Float_t fADCpedestalEC ;        //
93   Int_t   fNADCEC ;               // number of channels in EC section ADC
94   Float_t fADCchannelHC ;         // width of one ADC channel in HC section (GeV)
95   Float_t fADCpedestalHC ;        //
96   Int_t   fNADCHC ;               // number of channels in HC section ADC
97   Float_t fADCchannelPRE ;        // width of one ADC channel in PRE section (GeV)
98   Float_t fADCpedestalPRE ;       // 
99   Int_t fNADCPRE ;                // number of channels in PRE section ADC
100   Bool_t  fToSplit ;              //! Do we work in the split mode
101   TFile * fSplitFile ;            //! file in which Digits will eventually be stored
102
103   ClassDef(AliEMCALDigitizer,3)  // description 
104
105 };
106
107
108 #endif // AliEMCALDigitizer_H