]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliPHOSDigitizer.h
First commit.
[u/mrichter/AliRoot.git] / EMCAL / AliPHOSDigitizer.h
CommitLineData
34225ff3 1#ifndef ALIPHOSDigitizer_H
2#define ALIPHOSDigitizer_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 SDigits in PHOS
10// Class performs digitization of Summable digits (in the PHOS case this is just
11// sum of contributions of all primary particles into given cell).
12// In addition it performs mixing of summable digits from different events.
13//
14//*-- Author: Dmitri Peressounko(SUBATECH & KI)
15
16
17// --- ROOT system ---
18#include "TObjString.h"
19class TArrayI ;
20// --- Standard library ---
21
22// --- AliRoot header files ---
23#include "AliDigitizer.h"
24class AliPHOSSDigitizer ;
25class AliRunDigitizer ;
26
27class AliPHOSDigitizer: public AliDigitizer {
28
29public:
30 AliPHOSDigitizer() ; // ctor
31 AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ;
32 AliPHOSDigitizer(AliRunDigitizer * ard) ;
33 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer)
34 {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;}
35 virtual ~AliPHOSDigitizer() ;
36
37 void Digitize(const Int_t event) ; // Make Digits from SDigits
38 void Exec(Option_t *option); // Supervising method
39
40 //CPV parameters
41 const Float_t GetCPVNoise() const { return fCPVNoise ;}
42 const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
43 const Float_t GetCPVchannel() const { return fADCchanelCpv; }
44 const Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
45
46 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
47 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
48 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
49 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
50 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
51
52
53 //EMC parameters
54 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
55 const Float_t GetEMCchannel() const { return fADCchanelEmc; }
56 const Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
57 const Float_t GetPinNoise() const { return fPinNoise;}
58 const Float_t GetTimeResolution() const { return fTimeResolution ; }
59
60 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
61 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
62 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
63 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
64 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
65
66 //General
67 const Int_t GetDigitsInRun() const { return fDigitsInRun ;}
68
69 void MixWith(const char* HeaderFile) ; // Add another one file to mix
70 void Print(Option_t* option)const ;
71 void Reset() ; //restarts starts event processing from 0 event(s)
72
73 void SetSDigitsBranch(const char* file) ;
74
75 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
76 // assignement operator requested by coding convention but not needed
77 abort() ;
78 return *this ;
79 }
80
81private:
82
83 Bool_t Init() ;
84 void PrintDigits(Option_t * option) ;
85 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
86 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
87 //Calculate the time of crossing of the threshold by front edge
88 Float_t FrontEdgeTime(TClonesArray * ticks) ;
89 //Calculate digitized signal with gived ADC parameters
90 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
91
92private:
93
94 AliRunDigitizer * fARD ; //! Pointer to the Digitization Manager class
95
96 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
97
98 Float_t fPinNoise ; // Electronics noise in EMC
99 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
100
101 Float_t fCPVNoise ; // Noise in CPV
102 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
103
104 Int_t fDigitsInRun ; //! Total number of digits in one run
105
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
110 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
111 Float_t fADCpedestalEmc ; //
112 Int_t fNADCemc ; // number of channels in EMC ADC
113
114 Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
115 Float_t fADCpedestalCpv ; //
116 Int_t fNADCcpv ; // number of channels in CPV ADC
117
118
119 ClassDef(AliPHOSDigitizer,1) // description
120
121};
122
123
124#endif // AliPHOSDigitizer_H