]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALDigitizer.h
Acceptance and random rejection added.
[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
13//_________________________________________________________________________
61e0abb5 14
15
16// --- ROOT system ---
814ad4bf 17
61e0abb5 18#include "TObjString.h"
19class TArrayI ;
20// --- Standard library ---
21
22// --- AliRoot header files ---
23class AliEMCALSDigitizer ;
814ad4bf 24#include "AliRunDigitizer.h"
25#include "AliDigitizer.h"
61e0abb5 26
27
814ad4bf 28class AliEMCALDigitizer: public AliDigitizer {
61e0abb5 29
30public:
31 AliEMCALDigitizer() ; // ctor
ffa6d63b 32 AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ;
814ad4bf 33 AliEMCALDigitizer(AliRunDigitizer * ard) ;
34 AliEMCALDigitizer(const AliEMCALDigitizer & dtizer)
35 {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;}
61e0abb5 36 virtual ~AliEMCALDigitizer() ;
37
814ad4bf 38 void Digitize(const Int_t); // Make Digits from SDigits stored in fSDigits
61e0abb5 39 void Exec(Option_t *option); // Supervising method
40
d17817b7 41 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
42 const Float_t GetPedestal() const { return fPedestal; }
43 const Float_t GetPinNoise() const { return fPinNoise;}
44 const Float_t GetSlope() const { return fSlope; }
814ad4bf 45 const Float_t GetTimeResolution() const { return fTimeResolution ; }
d17817b7 46 const Float_t GetTowerchannel() const { return fADCchannelTower ; }
47 const Float_t GetTowerpedestal() const { return fADCpedestalTower ; }
48 const Float_t GetPreShochannel() const { return fADCchannelPreSho ; }
49 const Float_t GetPreShopedestal() const { return fADCpedestalPreSho ; }
814ad4bf 50
814ad4bf 51 void MixWith(char* HeaderFile) ; // Add another one file to mix
61e0abb5 52 virtual void Print(Option_t* option)const ;
53 void Reset() ; //restarts starts event processing from 0 event(s)
814ad4bf 54 const Int_t GetDigitsInRun() const { return fDigitsInRun; } ;
61e0abb5 55 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
56 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
57
61e0abb5 58 void SetSDigitsBranch(const char* file) ;
814ad4bf 59
60
61 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue) {
62 // assignement operator requested by coding convention but not needed
63 abort() ;
64 return *this ;
65 }
66
61e0abb5 67
68private:
814ad4bf 69
d17817b7 70 Bool_t Init();
61e0abb5 71 Bool_t ReadSDigits() ; // Read sdigits for particular events
814ad4bf 72 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
61e0abb5 73 void PrintDigits(Option_t * option) ;
814ad4bf 74 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
75 Float_t FrontEdgeTime(TClonesArray * ticks) ;
d17817b7 76 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
61e0abb5 77
78private:
814ad4bf 79
ffa6d63b 80 AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
61e0abb5 81 Int_t fNinputs ; // Number of input files
82 Bool_t fInitialized ; //
814ad4bf 83
84 Int_t fDigitsInRun ; //! Total number of digits in one run
61e0abb5 85 Float_t fPedestal ; // Calibration parameters
86 Float_t fSlope ; // read from SDigitizer
87
88 Float_t fPinNoise ; // Electronics noise in EMC
89 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
814ad4bf 90 Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits
91
92 Float_t fTimeResolution ; // Time resolution of FEE electronics
93 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
94 Float_t fTimeSignalLength ; // Length of the timing signal
95
96 Float_t fADCchannelTower ; // width of one ADC channel in Tower (GeV)
97 Float_t fADCpedestalTower ; //
98 Int_t fNADCTower ; // number of channels in Tower ADC
61e0abb5 99
814ad4bf 100 Float_t fADCchannelPreSho ; // width of one ADC channel in Pre Shower (GeV)
101 Float_t fADCpedestalPreSho ; //
102 Int_t fNADCPreSho ; // number of channels in Pre Shower ADC
61e0abb5 103
104 ClassDef(AliEMCALDigitizer,1) // description
105
106};
107
108
109#endif // AliEMCALDigitizer_H