]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALDigitizer.h
Fix for the problem during PbPb run of Nov 2010 (Indra)
[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
f0a6dc6f 52 Int_t GetDigitThreshold() const { return fDigitThreshold;}
33a52e55 53 //Float_t GetPedestal() const { return fPedestal; }
f0a6dc6f 54 Float_t GetPinNoise() const { return fPinNoise;}
33a52e55 55 //Float_t GetSlope() const { return fSlope; }
6569f329 56 Double_t GetTimeResolution() const { return fTimeResolution ; }
f0a6dc6f 57 Double_t GetTimeDelay() const { return fTimeDelay ; }
58 Float_t GetECAchannel() const { return fADCchannelEC ; }
59 Float_t GetECApedestal() const { return fADCpedestalEC ; }
60 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
61 void SetDigitThreshold(Int_t EMCThreshold) {fDigitThreshold = EMCThreshold;}
62 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
61e0abb5 63
05a92d59 64 //General
7ea6391b 65 Int_t GetDigitsInRun() const { return fDigitsInRun; }
09884213 66 void MixWith(TString alirunFileName,
e191bb57 67 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
eb0b1051 68 void Print(Option_t* option="") const ;
1963b290 69 void Print1(Option_t * option); // *MENU*
814ad4bf 70
9c0a4862 71 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) {
814ad4bf 72 // assignement operator requested by coding convention but not needed
9859bfc0 73 Fatal("operator =", "not implemented") ;
74 return *this ;
814ad4bf 75 }
76
1963b290 77 virtual void Browse(TBrowser* b);
1963b290 78
61e0abb5 79private:
814ad4bf 80
d17817b7 81 Bool_t Init();
839828a6 82 void InitParameters() ;
61e0abb5 83 void PrintDigits(Option_t * option) ;
88cb7938 84 void Unload() ;
9e5d2067 85 void WriteDigits() ; // Writes Digits the current event
916f1e76 86 void WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG"); //
9e5d2067 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
33a52e55 90 //Float_t FrontEdgeTime(TClonesArray * ticks) ;
91
829ba234 92 Float_t DigitizeEnergy(Float_t energy, Int_t AbsId) ;
916f1e76 93 void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG);
94 void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples);
95
96
61e0abb5 97private:
814ad4bf 98
88cb7938 99 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
100 Int_t fDigitsInRun ; //! Total number of digits in one run
101 Bool_t fInit ; //! To avoid overwriting existing files
102
103 Int_t fInput ; // Number of files to merge
104 TString * fInputFileNames ; //[fInput] List of file names to merge
105 TString * fEventNames ; //[fInput] List of event names to merge
106
f0a6dc6f 107 Int_t fDigitThreshold ; // Threshold for storing digits in EMC, ACD units
108 Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy
33a52e55 109 //Float_t fPedestal ; // Calibration parameters //Not used, remove?
110 //Float_t fSlope ; // read from SDigitizer //Not used, remove?
f0a6dc6f 111 Float_t fPinNoise ; // Electronics noise in EMC
112 Double_t fTimeDelay; // Time delay to reproduce data delay
113 Double_t fTimeResolution ; // Time resolution of FEE electronics
33a52e55 114 //Float_t fTimeThreshold ; // Threshold to start timing for given crystall //Not used, remove?
115 //Float_t fTimeSignalLength ; // Length of the timing signal //Not used, remove?
a9485c37 116 Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV)
14ce0a6e 117 Float_t fADCpedestalEC ; // pedestal for one ADC channel
a9485c37 118 Int_t fNADCEC ; // number of channels in EC section ADC
a9485c37 119
f0a6dc6f 120 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
121 Int_t fFirstEvent; // first event to process
122 Int_t fLastEvent; // last event to process
123
53f1c378 124 AliEMCALCalibData * fCalibData; //Calibration data pointer
88cb7938 125
f0a6dc6f 126 ClassDef(AliEMCALDigitizer,9) // description
61e0abb5 127};
128
129
a435f763 130#endif // AliEMCALDIGITIZER_H