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