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