#include <BesEmcWaveform.hh>
Definition at line 44 of file BesEmcWaveform.hh.
◆ BesEmcWaveform() [1/2]
BesEmcWaveform::BesEmcWaveform |
( |
| ) |
|
Definition at line 21 of file BesEmcWaveform.cc.
22{
24
25
37 m_flag = -1;
38 m_highPrecision = m_highRange/((G4double)(1<<m_bitNb));
39 m_midPrecision = m_midRange/((G4double)(1<<m_bitNb));
40 m_lowPrecision = m_lowRange/((G4double)(1<<m_bitNb));
42
45}
static BesEmcParameter & GetInstance()
G4double GetNonuniformity()
G4double GetPhotonsPerMeV()
◆ BesEmcWaveform() [2/2]
BesEmcWaveform::BesEmcWaveform |
( |
G4long |
size, |
|
|
G4double |
tau, |
|
|
G4double |
sampleTime |
|
) |
| |
Definition at line 47 of file BesEmcWaveform.cc.
48 :m_tau(tau),m_sampleTime(sampleTime)
49{
50 if(size>0){
55 }
56 else{
57 G4cout<<"BesEmcWaveform:: Invalid size"<<G4endl;
58 exit(-1);
59 }
60}
◆ ~BesEmcWaveform()
BesEmcWaveform::~BesEmcWaveform |
( |
| ) |
|
|
virtual |
◆ addElecNoise()
void BesEmcWaveform::addElecNoise |
( |
G4double |
width, |
|
|
G4double |
coherentNoise |
|
) |
| |
◆ digitize()
void BesEmcWaveform::digitize |
( |
| ) |
|
Definition at line 160 of file BesEmcWaveform.cc.
161{
162 G4double oneBitResolution;
163 oneBitResolution = m_midRange*2/((G4double)(1<<m_bitNb));
165
167 {
170 G4cout<<
"---In BesEmcWaveform: Over measurement!--- energy="<<
energy<<G4endl;
171 else if(
energy > m_midRange)
172 {
173 m_flag = 2;
174 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_highPrecision))*m_highPrecision;
175 }
176 else if(
energy > m_lowRange)
177 {
178 m_flag = 1;
179 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_midPrecision))*m_midPrecision;
180 }
181 else
182 {
183 m_flag = 0;
184 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_lowPrecision))*m_lowPrecision;
185 }
186 }
187}
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP 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
Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().
◆ GetBitNb()
G4int BesEmcWaveform::GetBitNb |
( |
| ) |
const |
|
inline |
◆ GetGainFlag()
G4int BesEmcWaveform::GetGainFlag |
( |
| ) |
const |
|
inline |
◆ GetNonuniformity()
G4double BesEmcWaveform::GetNonuniformity |
( |
| ) |
const |
|
inline |
◆ GetPeakTime()
G4double BesEmcWaveform::GetPeakTime |
( |
| ) |
const |
|
inline |
◆ GetPhotonsPerMeV()
G4double BesEmcWaveform::GetPhotonsPerMeV |
( |
| ) |
const |
|
inline |
◆ GetSampleTime()
G4double BesEmcWaveform::GetSampleTime |
( |
| ) |
const |
|
inline |
◆ GetTau()
G4double BesEmcWaveform::GetTau |
( |
| ) |
const |
|
inline |
◆ GetTimeOffset()
G4double BesEmcWaveform::GetTimeOffset |
( |
| ) |
const |
|
inline |
◆ GetWave()
G4double * BesEmcWaveform::GetWave |
( |
| ) |
const |
|
inline |
◆ length()
G4long BesEmcWaveform::length |
( |
| ) |
const |
|
inline |
◆ makeWaveform()
void BesEmcWaveform::makeWaveform |
( |
G4double |
energy, |
|
|
G4double |
time |
|
) |
| |
Definition at line 129 of file BesEmcWaveform.cc.
130{
131 G4double amplitude;
132 if(m_photonsPerMeV==0)
133 {
135 }
136 else
137 {
138 G4double photons =
energy*m_photonsPerMeV;
139 if(photons>0) {
140 G4double photonStatFactor = RandGauss::shoot(photons, sqrt(photons))/photons;
141 amplitude =
energy*photonStatFactor;
142 } else {
143 amplitude = 0;
144 }
145 }
146
147 G4double tempTime;
148 tempTime = 0;
149
150 G4double peak = m_peakTime*m_peakTime*m_peakTime*m_peakTime*
exp(-m_peakTime/m_tau)/24;
151
153 {
154 tempTime = i*m_sampleTime + m_timeOffset -
time;
155 if(tempTime>0)
156 emcWave[i] += amplitude*tempTime*tempTime*tempTime*tempTime*
exp(-tempTime/m_tau)/(24*peak);
157 }
158}
EvtComplex exp(const EvtComplex &c)
Referenced by updateWaveform().
◆ max()
G4double BesEmcWaveform::max |
( |
G4long & |
binOfMax | ) |
const |
◆ operator*=()
◆ operator+=()
◆ operator/=()
◆ operator=()
Definition at line 87 of file BesEmcWaveform.cc.
88{
89 if (this != &assign) {
94 }
95 return *this;
96}
◆ operator[]()
G4double & BesEmcWaveform::operator[] |
( |
G4long |
index | ) |
const |
|
inline |
Definition at line 112 of file BesEmcWaveform.hh.
113{
115 G4cout << "Array bounds exceeded. Index " << index << G4endl;
116 ::abort();
117 }
119}
◆ print()
void BesEmcWaveform::print |
( |
| ) |
|
Definition at line 189 of file BesEmcWaveform.cc.
190{
191 G4cout<<"New Wave!"<<G4endl;
194 G4cout<<G4endl;
195}
◆ updateWaveform() [1/2]
void BesEmcWaveform::updateWaveform |
( |
BesEmcDigi * |
digi | ) |
|
◆ updateWaveform() [2/2]
void BesEmcWaveform::updateWaveform |
( |
BesEmcHit * |
hit | ) |
|
◆ array_size
G4long BesEmcWaveform::array_size |
|
protected |
Definition at line 88 of file BesEmcWaveform.hh.
Referenced by addElecNoise(), BesEmcWaveform(), digitize(), length(), makeWaveform(), max(), operator*=(), operator+=(), operator/=(), operator=(), operator[](), and print().
◆ emcWave
G4double* BesEmcWaveform::emcWave |
|
protected |
Definition at line 87 of file BesEmcWaveform.hh.
Referenced by addElecNoise(), BesEmcWaveform(), digitize(), GetWave(), makeWaveform(), max(), operator*=(), operator+=(), operator/=(), operator=(), operator[](), print(), and ~BesEmcWaveform().
The documentation for this class was generated from the following files: