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