#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){
54 while(init!=
emcWave) *--init=0.0;
55 }
56 else{
57 G4Exception("Invalid size");
58 }
59}
◆ ~BesEmcWaveform()
BesEmcWaveform::~BesEmcWaveform |
( |
| ) |
|
|
virtual |
◆ addElecNoise()
void BesEmcWaveform::addElecNoise |
( |
G4double | width, |
|
|
G4double | coherentNoise ) |
◆ digitize()
void BesEmcWaveform::digitize |
( |
| ) |
|
Definition at line 159 of file BesEmcWaveform.cc.
160{
161 G4double oneBitResolution;
162 oneBitResolution = m_midRange*2/((G4double)(1<<m_bitNb));
164
166 {
169 G4cout<<
"---In BesEmcWaveform: Over measurement!--- energy="<<
energy<<G4endl;
170 else if(
energy > m_midRange)
171 {
172 m_flag = 2;
173 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_highPrecision))*m_highPrecision;
174 }
175 else if(
energy > m_lowRange)
176 {
177 m_flag = 1;
178 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_midPrecision))*m_midPrecision;
179 }
180 else
181 {
182 m_flag = 0;
183 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_lowPrecision))*m_lowPrecision;
184 }
185 }
186}
************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
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 128 of file BesEmcWaveform.cc.
129{
130 G4double amplitude;
131 if(m_photonsPerMeV==0)
132 {
134 }
135 else
136 {
137 G4double photons =
energy*m_photonsPerMeV;
138 if(photons>0) {
139 G4double photonStatFactor = RandGauss::shoot(photons, sqrt(photons))/photons;
140 amplitude =
energy*photonStatFactor;
141 } else {
142 amplitude = 0;
143 }
144 }
145
146 G4double tempTime;
147 tempTime = 0;
148
149 G4double peak = m_peakTime*m_peakTime*m_peakTime*m_peakTime*
exp(-m_peakTime/m_tau)/24;
150
152 {
153 tempTime = i*m_sampleTime + m_timeOffset -
time;
154 if(tempTime>0)
155 emcWave[i] += amplitude*tempTime*tempTime*tempTime*tempTime*
exp(-tempTime/m_tau)/(24*peak);
156 }
157}
EvtComplex exp(const EvtComplex &c)
Referenced by updateWaveform(), and updateWaveform().
◆ max()
G4double BesEmcWaveform::max |
( |
G4long & | binOfMax | ) |
const |
◆ operator*=()
◆ operator+=()
◆ operator/=()
◆ operator=()
Definition at line 86 of file BesEmcWaveform.cc.
87{
88 if (this != &assign) {
93 }
94 return *this;
95}
◆ 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 188 of file BesEmcWaveform.cc.
189{
190 G4cout<<"New Wave!"<<G4endl;
193 G4cout<<G4endl;
194}
◆ 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(), 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(), BesEmcWaveform(), digitize(), GetWave(), makeWaveform(), max(), operator*=(), operator+=(), operator/=(), operator=(), operator[](), print(), and ~BesEmcWaveform().
The documentation for this class was generated from the following files: