]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EMCAL/AliEMCALDigitizer.h
added a method to tell if the digit is in pre shower
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.h
... / ...
CommitLineData
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// Task Class for making Digits in EMCAL
10//
11//*-- Author: Sahal Yacoob (LBL)
12// based on : AliPHOSDigit
13//_________________________________________________________________________
14
15
16// --- ROOT system ---
17#include "TObjString.h"
18class TArrayI ;
19class TClonesArray ;
20
21// --- Standard library ---
22#include <stdlib.h>
23
24// --- AliRoot header files ---
25#include "AliDigitizer.h"
26class AliEMCALSDigitizer ;
27class AliRunDigitizer ;
28
29class AliEMCALDigitizer: public AliDigitizer {
30
31public:
32 AliEMCALDigitizer() ; // ctor
33 AliEMCALDigitizer(const char *headerFile, const char * sDigitsBranchTitle = "Default", const Bool_t toSplit = kFALSE) ;
34 AliEMCALDigitizer(AliRunDigitizer * ard) ;
35 AliEMCALDigitizer(const AliEMCALDigitizer & dtizer)
36 {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;}
37 virtual ~AliEMCALDigitizer() ;
38
39 void Digitize(const Int_t event); // Make Digits from SDigits stored in fSDigits
40 void Exec(Option_t *option); // Supervising method
41
42 const Float_t GetTowerThreshold() const { return fTowerDigitThreshold;}
43 const Float_t GetPedestal() const { return fPedestal; }
44 const Float_t GetPinNoise() const { return fPinNoise;}
45 const Float_t GetSlope() const { return fSlope; }
46 const Float_t GetTimeResolution() const { return fTimeResolution ; }
47 const Float_t GetTowerchannel() const { return fADCchannelTower ; }
48 const Float_t GetTowerpedestal() const { return fADCpedestalTower ; }
49 const Float_t GetPreShochannel() const { return fADCchannelPreSho ; }
50 const Float_t GetPreShopedestal() const { return fADCpedestalPreSho ; }
51
52 void SetTowerThreshold(Float_t EMCThreshold) {fTowerDigitThreshold = EMCThreshold;}
53 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
54
55 //General
56 const Int_t GetDigitsInRun() const { return fDigitsInRun; } ;
57 void MixWith(char* HeaderFile) ; // Add another one file to mix
58 void Print(Option_t* option)const ;
59
60 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue) {
61 // assignement operator requested by coding convention but not needed
62 Fatal("operator =", "not implemented") ;
63 return *this ;
64 }
65
66private:
67
68 Bool_t Init();
69 void InitParameters() ;
70 void PrintDigits(Option_t * option) ;
71 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
72 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
73 //Calculate the time of crossing of the threshold by front edge
74 Float_t FrontEdgeTime(TClonesArray * ticks) ;
75 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
76
77private:
78
79 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
80 Int_t fDigitsInRun ; //! Total number of digits in one run
81
82 Float_t fPedestal ; // Calibration parameters
83 Float_t fSlope ; // read from SDigitizer
84
85 Float_t fPinNoise ; // Electronics noise in EMC
86 Float_t fTowerDigitThreshold ; // Threshold for storing digits in EMC
87 Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits
88
89 Float_t fTimeResolution ; // Time resolution of FEE electronics
90 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
91 Float_t fTimeSignalLength ; // Length of the timing signal
92
93 Float_t fADCchannelTower ; // width of one ADC channel in Tower (GeV)
94 Float_t fADCpedestalTower ; //
95 Int_t fNADCTower ; // number of channels in Tower ADC
96
97 Float_t fADCchannelPreSho ; // width of one ADC channel in Pre Shower (GeV)
98 Float_t fADCpedestalPreSho ; //
99 Int_t fNADCPreSho ; // number of channels in Pre Shower ADC
100
101 Bool_t fToSplit ; //! Do we work in the split mode
102 TFile * fSplitFile ; //! file in which Digits will eventually be stored
103
104 ClassDef(AliEMCALDigitizer,2) // description
105
106};
107
108
109#endif // AliEMCALDigitizer_H