CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEmcWaveform.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//
6// The shape of the ideal signal is generated from the response function of
7// the crystal-photodiode-preAmplifier-mainAmplifier combination. The signal
8// from crystal is an exponential decay with the time constant tau_CsI. In
9// the Laplace domain, it equals 1/(s+a), where a=1/tau_CsI. Assume that the
10// preAmplifier has a step function 1/s. The mainAmplifier has a CR-RC-RC
11// shape. CR=s/(s+b), RC=1/(s+b), where b=1/tau_s, the shaping time constant.
12// The response time of the photodiode, and the time of deposition of energy
13// in the CsI crystal are presumed to be infinitely short, the response
14// funtion is then
15//
16// F(s) = [1/(s+a)]*(1/s)*[s/(s+b)^3] = 1/(s+a)(s+b)^3.
17//
18// In BESIII EMC, tau_CsI=tau_s=1.0e-6s. So the response fuction is 1/(s+a)^4.
19// In time domain, it is
20//
21// f(t) = t^3*exp(-t/tau)/6
22//
23//Author: Hemiao
24//Created: Oct 25, 2004
25//Modified:
26// May 23, 2005
27// The mainAmplifier changes to CR-RC-RC-RC, and the response funtion is then
28// F(s) = [1/(s+a)]*(1/s)*[s/(s+b)^4] = 1/(s+a)(s+b)^4.
29// In time domain, it is
30// f(t) = t^4*exp(-t/tau)/24
31//Comment:
32//---------------------------------------------------------------------------//
33// $Id: BesEmcWaveform.hh
34
35#ifndef BesEmcWaveform_h
36#define BesEmcWaveform_h
37
38#include "globals.hh"
39#include "BesEmcHit.hh"
40
41class BesEmcHit;
42class BesEmcDigi;
43
45
46public:
47
48 // Constructors
50 BesEmcWaveform(G4long, G4double, G4double);
51
52 // Destructors
53 virtual ~BesEmcWaveform();
54
55 // Operators
56 inline G4double &operator[](G4long ) const;
57 virtual BesEmcWaveform &operator*=(const G4double &);
58 virtual BesEmcWaveform &operator/=(const G4double &);
60 virtual BesEmcWaveform &operator=(const BesEmcWaveform &);
61
62 // Selectors
63 inline G4long length() const { return array_size;}
64 inline G4double* GetWave() const { return emcWave; }
65 inline G4double GetTau() const { return m_tau; }
66 inline G4double GetSampleTime() const { return m_sampleTime; }
67 inline G4double GetPeakTime() const { return m_peakTime; }
68 inline G4double GetTimeOffset() const { return m_timeOffset; }
69 inline G4int GetBitNb() const { return m_bitNb; }
70 inline G4int GetGainFlag() const { return m_flag; }
71 inline G4double GetPhotonsPerMeV() const { return m_photonsPerMeV; }
72 inline G4double GetNonuniformity() const { return m_nonuniformity; }
73 G4double max(G4long &binOfMax) const;
74 // returns the max of the array
75
76 // Modifiers
79 void makeWaveform(G4double energy, G4double time);
80 void digitize();
81 void addElecNoise(G4double, G4double); //first parameter: incoherent noise width
82 //second parameter: coherent noise
83 void print();
84
85protected:
86
87 G4double *emcWave;
88 G4long array_size;
89
90private:
91
92 G4double m_tau; //tau_CsI=tau_CR=tau_RC=1000.*ns
93 G4double m_sampleTime; //sample time = 50.*ns
94 G4double m_peakTime; //peak time = 4000.*ns
95 G4double m_timeOffset; //the beginning of sample time = 2500.*ns
96 G4int m_bitNb; //10 bit flash ADC
97 G4int m_flag;
98 //flag = 0, 1, 2 correspond to three different range of measurement
99
100 G4double m_photonsPerMeV; //photons produced in crystal per MeV
101 G4double m_nonuniformity; //non-uniformity of Light Output
102
103 G4double m_highRange; //2.5GeV
104 G4double m_highPrecision;
105 G4double m_midRange; //0.625GeV
106 G4double m_midPrecision;
107 G4double m_lowRange; //0.078GeV
108 G4double m_lowPrecision;
109
110};
111
112inline G4double &BesEmcWaveform::operator[](G4long index) const
113{
114 if(index<0 || index>array_size-1){
115 G4cout << "Array bounds exceeded. Index " << index << G4endl;
116 ::abort();
117 }
118 return emcWave[index];
119}
120
121#endif
Double_t time
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition KK2f.h:50
G4int GetGainFlag() const
G4int GetBitNb() const
virtual BesEmcWaveform & operator/=(const G4double &)
virtual ~BesEmcWaveform()
G4double GetPeakTime() const
void updateWaveform(BesEmcHit *)
virtual BesEmcWaveform & operator+=(const BesEmcWaveform &)
void makeWaveform(G4double energy, G4double time)
G4double & operator[](G4long) const
G4double * GetWave() const
G4double GetNonuniformity() const
G4double GetSampleTime() const
void addElecNoise(G4double, G4double)
virtual BesEmcWaveform & operator=(const BesEmcWaveform &)
G4double * emcWave
G4double GetTimeOffset() const
G4double GetTau() const
G4double GetPhotonsPerMeV() const
virtual BesEmcWaveform & operator*=(const G4double &)
G4long length() const
G4double max(G4long &binOfMax) const