13#include "Randomize.hh"
14#include "CLHEP/Random/RanecuEngine.h"
15#include "CLHEP/Random/RandGauss.h"
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));
48 :m_tau(tau),m_sampleTime(sampleTime)
54 while(init!=
emcWave) *--init=0.0;
57 G4cout<<
"BesEmcWaveform:: Invalid size"<<G4endl;
89 if (
this != &assign) {
124 G4double
time = digi->
GetTime()*m_sampleTime+m_timeOffset-m_peakTime;
132 if(m_photonsPerMeV==0)
138 G4double photons =
energy*m_photonsPerMeV;
140 G4double photonStatFactor = RandGauss::shoot(photons, sqrt(photons))/photons;
141 amplitude =
energy*photonStatFactor;
150 G4double peak = m_peakTime*m_peakTime*m_peakTime*m_peakTime*
exp(-m_peakTime/m_tau)/24;
154 tempTime = i*m_sampleTime + m_timeOffset -
time;
156 emcWave[i] += amplitude*tempTime*tempTime*tempTime*tempTime*
exp(-tempTime/m_tau)/(24*peak);
162 G4double oneBitResolution;
163 oneBitResolution = m_midRange*2/((G4double)(1<<m_bitNb));
170 G4cout<<
"---In BesEmcWaveform: Over measurement!--- energy="<<
energy<<G4endl;
171 else if(
energy > m_midRange)
174 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_highPrecision))*m_highPrecision;
176 else if(
energy > m_lowRange)
179 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_midPrecision))*m_midPrecision;
184 emcWave[i] = (G4double)((G4long)(
emcWave[i]/m_lowPrecision))*m_lowPrecision;
191 G4cout<<
"New Wave!"<<G4endl;
201 emcWave[i] += RandGauss::shoot()*width;
EvtComplex exp(const EvtComplex &c)
************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
G4double GetTimeCrystal()
G4double GetEdepCrystal()
static BesEmcParameter & GetInstance()
G4double GetNonuniformity()
G4double GetPhotonsPerMeV()