]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSDigitizer.h
Timing added to reconstruction
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
1 #ifndef ALIPHOSDigitizer_H
2 #define ALIPHOSDigitizer_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 SDigits in PHOS      
10 // Class performs digitization of Summable digits (in the PHOS case this is just
11 // sum of contributions of all primary particles into given cell). 
12 // In addition it performs mixing of summable digits from different events.
13 //                  
14 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
15
16
17 // --- ROOT system ---
18 #include "TTask.h"
19 #include "TObjString.h"
20 class TArrayI ;
21 // --- Standard library ---
22
23 // --- AliRoot header files ---
24 #include "AliDigitizer.h"
25 class AliPHOSSDigitizer ;
26 class AliRunDigitizer ;
27
28 class AliPHOSDigitizer: public TTask {
29
30 public:
31   AliPHOSDigitizer() ;          // ctor
32   AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ; 
33   AliPHOSDigitizer(AliRunDigitizer * ard) ;
34   AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) 
35                   {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;} 
36   virtual ~AliPHOSDigitizer() ;       
37
38   void    Digitize(const Int_t event) ;            // Make Digits from SDigits 
39   void    Exec(Option_t *option);                // Supervising method
40
41   const Float_t GetCPVNoise()     const { return fCPVNoise ;}
42   const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
43   const Int_t   GetDigitsInRun()  const { return fDigitsInRun ;}  
44   const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
45   const Float_t GetPedestal()     const { return fPedestal; }
46   const Float_t GetPinNoise()     const { return fPinNoise;}
47   const Float_t GetSlope()        const { return fSlope; }
48   const Float_t GetTimeResolution() const { return fTimeResolution ; }
49
50   void    MixWith(const char* HeaderFile) ; // Add another one file to mix
51   void    Print(Option_t* option)const ;
52   void    Reset() ;   //restarts starts event processing from 0 event(s)
53
54   void    SetCPVNoise(Float_t CPVNoise)          {fCPVNoise = CPVNoise;}
55   void    SetCPVThreshold(Float_t CPVThreshold)  {fCPVDigitThreshold= CPVThreshold;}
56   void    SetEMCThreshold(Float_t EMCThreshold)  {fEMCDigitThreshold = EMCThreshold;}
57   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
58
59   void    SetSDigitsBranch(const char* file) ;
60
61   AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue)  {
62     // assignement operator requested by coding convention but not needed
63     abort() ;
64     return *this ; 
65   }
66
67 private:
68   Bool_t  Init() ; 
69   void    PrintDigits(Option_t * option) ;
70   void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
71   Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
72   Float_t FrontEdgeTime(TArrayF *energies, TArrayF * times) ; 
73   Int_t   DigitizeEnergy(Int_t amp, Int_t absId) ;
74   //Calculate the time of crossing of the threshold by front edge
75 private:
76
77   Float_t fPedestal ;                // Calibration parameters read from SDigitizer  
78   Float_t fSlope ;                   // (nothing common with real digitization parameters)
79
80   AliRunDigitizer * fARD ;          //! Pointer to the Digitization Manager class
81   Int_t   fEmcCrystals ;            // Number of EMC crystalls in the given geometry
82   Float_t fPinNoise ;               // Electronics noise in EMC
83   Float_t fEMCDigitThreshold  ;     // Threshold for storing digits in EMC
84   Float_t fCPVNoise ;               // Noise in CPV
85   Float_t fCPVDigitThreshold  ;     // Threshold for storing digits in CPV
86   Int_t fDigitsInRun ;              //! Total number of digits in one run
87
88   Float_t fTimeResolution ;         // Time resolution of FEE electronics
89
90   Float_t fTimeThreshold ;          // Threshold to start timing for given crystall
91   Float_t fTimeSignalLength ;       // Length of the timing signal 
92
93   Int_t   fNADCbitsEmc ;
94   Float_t fADCpedestalEmc ;
95   Int_t   fNADCbitsCPV ;
96   Float_t fADCperestalCPV ;
97
98
99   ClassDef(AliPHOSDigitizer,1)  // description 
100
101 };
102
103
104 #endif // AliPHOSDigitizer_H