Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4SPSEneDistribution Class Reference

#include <G4SPSEneDistribution.hh>

Public Member Functions

 G4SPSEneDistribution ()
 
 ~G4SPSEneDistribution ()
 
void SetEnergyDisType (const G4String &)
 
const G4StringGetEnergyDisType ()
 
void SetEmin (G4double)
 
G4double GetEmin () const
 
G4double GetArbEmin ()
 
void SetEmax (G4double)
 
G4double GetEmax () const
 
G4double GetArbEmax ()
 
void SetMonoEnergy (G4double)
 
void SetAlpha (G4double)
 
void SetBiasAlpha (G4double)
 
void SetTemp (G4double)
 
void SetBeamSigmaInE (G4double)
 
void SetEzero (G4double)
 
void SetGradient (G4double)
 
void SetInterCept (G4double)
 
void UserEnergyHisto (const G4ThreeVector &)
 
void ArbEnergyHisto (const G4ThreeVector &)
 
void ArbEnergyHistoFile (const G4String &)
 
void EpnEnergyHisto (const G4ThreeVector &)
 
void InputEnergySpectra (G4bool)
 
void InputDifferentialSpectra (G4bool)
 
void ArbInterpolate (const G4String &)
 
const G4StringGetIntType ()
 
void Calculate ()
 
void SetBiasRndm (G4SPSRandomGenerator *a)
 
void ReSetHist (const G4String &)
 
void SetVerbosity (G4int a)
 
G4double GetWeight () const
 
G4double GetMonoEnergy ()
 
G4double GetSE ()
 
G4double Getalpha () const
 
G4double GetEzero () const
 
G4double GetTemp ()
 
G4double Getgrad () const
 
G4double Getcept () const
 
G4PhysicsFreeVector GetUserDefinedEnergyHisto ()
 
G4PhysicsFreeVector GetArbEnergyHisto ()
 
G4double GenerateOne (G4ParticleDefinition *)
 
G4double GetProbability (G4double)
 
G4double GetArbEneWeight (G4double)
 
void ApplyEnergyWeight (G4bool val)
 
G4bool IfApplyEnergyWeight () const
 

Detailed Description

Definition at line 70 of file G4SPSEneDistribution.hh.

Constructor & Destructor Documentation

◆ G4SPSEneDistribution()

G4SPSEneDistribution::G4SPSEneDistribution ( )

Definition at line 41 of file G4SPSEneDistribution.cc.

42{
44
45 // Initialise all variables
46
47 particle_energy = 1.0 * MeV;
48 EnergyDisType = "Mono";
49 weight=1.;
50 MonoEnergy = 1 * MeV;
51 Emin = 0.;
52 Emax = 1.e30;
53 alpha = 0.;
54 biasalpha = 0.;
55 prob_norm = 1.0;
56 Ezero = 0.;
57 SE = 0.;
58 Temp = 0.;
59 grad = 0.;
60 cept = 0.;
61 IntType = "NULL"; // Interpolation type
62
63 ArbEmin = 0.;
64 ArbEmax = 1.e30;
65
66 verbosityLevel = 0;
67
68 threadLocal_t& data = threadLocalData.Get();
69 data.Emax = Emax;
70 data.Emin = Emin;
71 data.alpha =alpha;
72 data.cept = cept;
73 data.Ezero = Ezero;
74 data.grad = grad;
75 data.particle_energy = 0.;
76 data.particle_definition = nullptr;
77 data.weight = weight;
78}
#define G4MUTEXINIT(mutex)
Definition: G4Threading.hh:87
value_type & Get() const
Definition: G4Cache.hh:315

◆ ~G4SPSEneDistribution()

G4SPSEneDistribution::~G4SPSEneDistribution ( )

Definition at line 80 of file G4SPSEneDistribution.cc.

81{
83 if(Arb_grad_cept_flag)
84 {
85 delete [] Arb_grad;
86 delete [] Arb_cept;
87 }
88
89 if(Arb_alpha_Const_flag)
90 {
91 delete [] Arb_alpha;
92 delete [] Arb_Const;
93 }
94
95 if(Arb_ezero_flag)
96 {
97 delete [] Arb_ezero;
98 }
99 delete Bbody_x;
100 delete BBHist;
101 delete CP_x;
102 delete CPHist;
103 for (auto & it : SplineInt)
104 {
105 delete it;
106 it = nullptr;
107 }
108 SplineInt.clear();
109}
#define G4MUTEXDESTROY(mutex)
Definition: G4Threading.hh:90

Member Function Documentation

◆ ApplyEnergyWeight()

void G4SPSEneDistribution::ApplyEnergyWeight ( G4bool  val)
inline

Definition at line 196 of file G4SPSEneDistribution.hh.

196{ applyEvergyWeight = val; }

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ ArbEnergyHisto()

void G4SPSEneDistribution::ArbEnergyHisto ( const G4ThreeVector input)

Definition at line 315 of file G4SPSEneDistribution.cc.

316{
317 G4AutoLock l(&mutex);
318 G4double ehi = input.x(),
319 val = input.y();
320 if (verbosityLevel > 1)
321 {
322 G4cout << "In ArbEnergyHisto" << G4endl;
323 G4cout << " " << ehi << " " << val << G4endl;
324 }
325 ArbEnergyH.InsertValues(ehi, val);
326}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
double x() const
double y() const
void InsertValues(const G4double energy, const G4double value)

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ ArbEnergyHistoFile()

void G4SPSEneDistribution::ArbEnergyHistoFile ( const G4String filename)

Definition at line 328 of file G4SPSEneDistribution.cc.

329{
330 G4AutoLock l(&mutex);
331 std::ifstream infile(filename, std::ios::in);
332 if (!infile)
333 {
334 G4Exception("G4SPSEneDistribution::ArbEnergyHistoFile", "Event0301",
335 FatalException, "Unable to open the histo ASCII file");
336 }
337 G4double ehi, val;
338 while (infile >> ehi >> val)
339 {
340 ArbEnergyH.InsertValues(ehi, val);
341 }
342}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ ArbInterpolate()

void G4SPSEneDistribution::ArbInterpolate ( const G4String IType)

Definition at line 561 of file G4SPSEneDistribution.cc.

562{
563 G4AutoLock l(&mutex);
564
565 IntType = IType;
566 ArbEmax = ArbEnergyH.GetMaxEnergy();
567 ArbEmin = ArbEnergyH.Energy(0);
568
569 // Now interpolate points
570
571 if (IntType == "Lin") LinearInterpolation();
572 if (IntType == "Log") LogInterpolation();
573 if (IntType == "Exp") ExpInterpolation();
574 if (IntType == "Spline") SplineInterpolation();
575}
G4double GetMaxEnergy() const
G4double Energy(const std::size_t index) const

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ Calculate()

void G4SPSEneDistribution::Calculate ( )

Definition at line 360 of file G4SPSEneDistribution.cc.

361{
362 G4AutoLock l(&mutex);
363 if (EnergyDisType == "Cdg")
364 {
365 CalculateCdgSpectrum();
366 }
367 else if (EnergyDisType == "Bbody")
368 {
369 if(!BBhistInit)
370 {
371 BBInitHists();
372 }
373 CalculateBbodySpectrum();
374 }
375 else if (EnergyDisType == "CPow")
376 {
377 if(!CPhistInit)
378 {
379 CPInitHists();
380 }
381 CalculateCPowSpectrum();
382 }
383}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ EpnEnergyHisto()

void G4SPSEneDistribution::EpnEnergyHisto ( const G4ThreeVector input)

Definition at line 344 of file G4SPSEneDistribution.cc.

345{
346 G4AutoLock l(&mutex);
347 G4double ehi = input.x(),
348 val = input.y();
349 if (verbosityLevel > 1)
350 {
351 G4cout << "In EpnEnergyHisto" << G4endl;
352 G4cout << " " << ehi << " " << val << G4endl;
353 }
354 EpnEnergyH.InsertValues(ehi, val);
355 Emax = ehi;
356 threadLocalData.Get().Emax = Emax;
357 Epnflag = true;
358}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ GenerateOne()

G4double G4SPSEneDistribution::GenerateOne ( G4ParticleDefinition a)

Definition at line 1941 of file G4SPSEneDistribution.cc.

1942{
1943 // Copy global shared status to thread-local one
1944 //
1945 threadLocal_t& params = threadLocalData.Get();
1946 params.particle_definition=a;
1947 params.particle_energy=-1;
1948 if(applyEvergyWeight)
1949 {
1950 params.Emax = ArbEmax;
1951 params.Emin = ArbEmin;
1952 }
1953 else
1954 {
1955 params.Emax = Emax;
1956 params.Emin = Emin;
1957 }
1958 params.alpha = alpha;
1959 params.Ezero = Ezero;
1960 params.grad = grad;
1961 params.cept = cept;
1962 params.weight = weight;
1963 // particle_energy = -1.;
1964
1965 if((EnergyDisType == "Mono") && ((MonoEnergy>Emax)||(MonoEnergy<Emin)))
1966 {
1968 ed << "MonoEnergy " << G4BestUnit(MonoEnergy,"Energy")
1969 << " is outside of [Emin,Emax] = ["
1970 << G4BestUnit(Emin,"Energy") << ", "
1971 << G4BestUnit(Emax,"Energy") << ". MonoEnergy is used anyway.";
1972 G4Exception("G4SPSEneDistribution::GenerateOne()",
1973 "GPS0001", JustWarning, ed);
1974 params.particle_energy=MonoEnergy;
1975 return params.particle_energy;
1976 }
1977 while ( (EnergyDisType == "Arb")
1978 ? (params.particle_energy < ArbEmin
1979 || params.particle_energy > ArbEmax)
1980 : (params.particle_energy < params.Emin
1981 || params.particle_energy > params.Emax) )
1982 {
1983 if (Biased)
1984 {
1985 GenerateBiasPowEnergies();
1986 }
1987 else
1988 {
1989 if (EnergyDisType == "Mono")
1990 {
1991 GenerateMonoEnergetic();
1992 }
1993 else if (EnergyDisType == "Lin")
1994 {
1995 GenerateLinearEnergies(false);
1996 }
1997 else if (EnergyDisType == "Pow")
1998 {
1999 GeneratePowEnergies(false);
2000 }
2001 else if (EnergyDisType == "CPow")
2002 {
2003 GenerateCPowEnergies();
2004 }
2005 else if (EnergyDisType == "Exp")
2006 {
2007 GenerateExpEnergies(false);
2008 }
2009 else if (EnergyDisType == "Gauss")
2010 {
2011 GenerateGaussEnergies();
2012 }
2013 else if (EnergyDisType == "Brem")
2014 {
2015 GenerateBremEnergies();
2016 }
2017 else if (EnergyDisType == "Bbody")
2018 {
2019 GenerateBbodyEnergies();
2020 }
2021 else if (EnergyDisType == "Cdg")
2022 {
2023 GenerateCdgEnergies();
2024 }
2025 else if (EnergyDisType == "User")
2026 {
2027 GenUserHistEnergies();
2028 }
2029 else if (EnergyDisType == "Arb")
2030 {
2031 GenArbPointEnergies();
2032 }
2033 else if (EnergyDisType == "Epn")
2034 {
2035 GenEpnHistEnergies();
2036 }
2037 else
2038 {
2039 G4cout << "Error: EnergyDisType has unusual value" << G4endl;
2040 }
2041 }
2042 }
2043 return params.particle_energy;
2044}
@ JustWarning
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
#define G4BestUnit(a, b)

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().

◆ Getalpha()

G4double G4SPSEneDistribution::Getalpha ( ) const

Definition at line 262 of file G4SPSEneDistribution.cc.

263{
264 return threadLocalData.Get().alpha;
265}

◆ GetArbEmax()

G4double G4SPSEneDistribution::GetArbEmax ( )

Definition at line 157 of file G4SPSEneDistribution.cc.

158{
159 G4AutoLock l(&mutex);
160 return ArbEmax;
161}

◆ GetArbEmin()

G4double G4SPSEneDistribution::GetArbEmin ( )

Definition at line 151 of file G4SPSEneDistribution.cc.

152{
153 G4AutoLock l(&mutex);
154 return ArbEmin;
155}

◆ GetArbEnergyHisto()

G4PhysicsFreeVector G4SPSEneDistribution::GetArbEnergyHisto ( )

Definition at line 294 of file G4SPSEneDistribution.cc.

295{
296 G4AutoLock l(&mutex);
297 return ArbEnergyH;
298}

◆ GetArbEneWeight()

G4double G4SPSEneDistribution::GetArbEneWeight ( G4double  ene)

Definition at line 1679 of file G4SPSEneDistribution.cc.

1680{
1681 auto nbelow = IPDFArbEnergyH.FindBin(ene,(IPDFArbEnergyH.GetVectorLength())/2);
1682 G4double wei = 0.;
1683 if(IntType=="Lin")
1684 {
1685 // note: grad[i] and cept[i] are calculated with x[i-1] and x[i]
1686 auto gr = Arb_grad[nbelow + 1];
1687 auto ce = Arb_cept[nbelow + 1];
1688 wei = ene*gr + ce;
1689 }
1690 else if(IntType=="Log")
1691 {
1692 auto alp = Arb_alpha[nbelow + 1];
1693 auto cns = Arb_Const[nbelow + 1];
1694 wei = cns * std::pow(ene,alp);
1695 }
1696 else if(IntType=="Exp")
1697 {
1698 auto e0 = Arb_ezero[nbelow + 1];
1699 auto cns = Arb_Const[nbelow + 1];
1700 wei = cns * std::exp(-ene/e0);
1701 }
1702 else if(IntType=="Spline")
1703 {
1704 wei = SplineInt[nbelow+1]->CubicSplineInterpolation(ene);
1705 }
1706 return wei;
1707}
std::size_t GetVectorLength() const
std::size_t FindBin(const G4double energy, std::size_t idx) const

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().

◆ Getcept()

G4double G4SPSEneDistribution::Getcept ( ) const

Definition at line 283 of file G4SPSEneDistribution.cc.

284{
285 return threadLocalData.Get().cept;
286}

◆ GetEmax()

G4double G4SPSEneDistribution::GetEmax ( ) const

Definition at line 170 of file G4SPSEneDistribution.cc.

171{
172 return threadLocalData.Get().Emax;
173}

◆ GetEmin()

G4double G4SPSEneDistribution::GetEmin ( ) const

Definition at line 146 of file G4SPSEneDistribution.cc.

147{
148 return threadLocalData.Get().Emin;
149}

◆ GetEnergyDisType()

const G4String & G4SPSEneDistribution::GetEnergyDisType ( )

Definition at line 133 of file G4SPSEneDistribution.cc.

134{
135 G4AutoLock l(&mutex);
136 return EnergyDisType;
137}

Referenced by G4GeneralParticleSource::ListSource(), and G4GeneralParticleSourceMessenger::SetNewValue().

◆ GetEzero()

G4double G4SPSEneDistribution::GetEzero ( ) const

Definition at line 267 of file G4SPSEneDistribution.cc.

268{
269 return threadLocalData.Get().Ezero;
270}

◆ Getgrad()

G4double G4SPSEneDistribution::Getgrad ( ) const

Definition at line 278 of file G4SPSEneDistribution.cc.

279{
280 return threadLocalData.Get().grad;
281}

◆ GetIntType()

const G4String & G4SPSEneDistribution::GetIntType ( )

Definition at line 227 of file G4SPSEneDistribution.cc.

228{
229 G4AutoLock l(&mutex);
230 return IntType;
231}

◆ GetMonoEnergy()

G4double G4SPSEneDistribution::GetMonoEnergy ( )

Definition at line 250 of file G4SPSEneDistribution.cc.

251{
252 G4AutoLock l(&mutex);
253 return MonoEnergy;
254}

◆ GetProbability()

G4double G4SPSEneDistribution::GetProbability ( G4double  ene)

Definition at line 2046 of file G4SPSEneDistribution.cc.

2047{
2048 G4double prob = 1.;
2049
2050 threadLocal_t& params = threadLocalData.Get();
2051 if (EnergyDisType == "Lin")
2052 {
2053 if (prob_norm == 1.)
2054 {
2055 prob_norm = 0.5*params.grad*params.Emax*params.Emax
2056 + params.cept*params.Emax
2057 - 0.5*params.grad*params.Emin*params.Emin
2058 - params.cept*params.Emin;
2059 }
2060 prob = params.cept + params.grad * ene;
2061 prob /= prob_norm;
2062 }
2063 else if (EnergyDisType == "Pow")
2064 {
2065 if (prob_norm == 1.)
2066 {
2067 if (alpha != -1.)
2068 {
2069 G4double emina = std::pow(params.Emin, params.alpha + 1);
2070 G4double emaxa = std::pow(params.Emax, params.alpha + 1);
2071 prob_norm = 1./(1.+alpha) * (emaxa - emina);
2072 }
2073 else
2074 {
2075 prob_norm = std::log(params.Emax) - std::log(params.Emin) ;
2076 }
2077 }
2078 prob = std::pow(ene, params.alpha)/prob_norm;
2079 }
2080 else if (EnergyDisType == "Exp")
2081 {
2082 if (prob_norm == 1.)
2083 {
2084 prob_norm = -params.Ezero*(std::exp(-params.Emax/params.Ezero)
2085 - std::exp(params.Emin/params.Ezero));
2086 }
2087 prob = std::exp(-ene / params.Ezero);
2088 prob /= prob_norm;
2089 }
2090 else if (EnergyDisType == "Arb")
2091 {
2092 prob = ArbEnergyH.Value(ene);
2093
2094 if (prob <= 0.)
2095 {
2096 G4cout << " Warning:G4SPSEneDistribution::GetProbability: prob<= 0. "
2097 << prob << " " << ene << G4endl;
2098 prob = 1e-30;
2099 }
2100 }
2101 else
2102 {
2103 G4cout << "Error: EnergyDisType not supported" << G4endl;
2104 }
2105
2106 return prob;
2107}
G4double Value(const G4double energy, std::size_t &lastidx) const

◆ GetSE()

G4double G4SPSEneDistribution::GetSE ( )

Definition at line 256 of file G4SPSEneDistribution.cc.

257{
258 G4AutoLock l(&mutex);
259 return SE;
260}

◆ GetTemp()

G4double G4SPSEneDistribution::GetTemp ( )

Definition at line 272 of file G4SPSEneDistribution.cc.

273{
274 G4AutoLock l(&mutex);
275 return Temp;
276}

◆ GetUserDefinedEnergyHisto()

G4PhysicsFreeVector G4SPSEneDistribution::GetUserDefinedEnergyHisto ( )

Definition at line 288 of file G4SPSEneDistribution.cc.

289{
290 G4AutoLock l(&mutex);
291 return UDefEnergyH;
292}

◆ GetWeight()

G4double G4SPSEneDistribution::GetWeight ( ) const

Definition at line 245 of file G4SPSEneDistribution.cc.

246{
247 return threadLocalData.Get().weight;
248}

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().

◆ IfApplyEnergyWeight()

G4bool G4SPSEneDistribution::IfApplyEnergyWeight ( ) const
inline

Definition at line 197 of file G4SPSEneDistribution.hh.

197{ return applyEvergyWeight; }

Referenced by G4SingleParticleSource::GeneratePrimaryVertex().

◆ InputDifferentialSpectra()

void G4SPSEneDistribution::InputDifferentialSpectra ( G4bool  value)

Definition at line 548 of file G4SPSEneDistribution.cc.

549{
550 G4AutoLock l(&mutex);
551
552 // Allows user to specify integral or differential spectra
553 //
554 DiffSpec = value; // true = differential, false = integral
555 if (verbosityLevel > 1)
556 {
557 G4cout << "Diffspec has value " << DiffSpec << G4endl;
558 }
559}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ InputEnergySpectra()

void G4SPSEneDistribution::InputEnergySpectra ( G4bool  value)

Definition at line 535 of file G4SPSEneDistribution.cc.

536{
537 G4AutoLock l(&mutex);
538
539 // Allows user to specify spectrum is momentum
540 //
541 EnergySpec = value; // false if momentum
542 if (verbosityLevel > 1)
543 {
544 G4cout << "EnergySpec has value " << EnergySpec << G4endl;
545 }
546}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ ReSetHist()

void G4SPSEneDistribution::ReSetHist ( const G4String atype)

Definition at line 1914 of file G4SPSEneDistribution.cc.

1915{
1916 G4AutoLock l(&mutex);
1917 if (atype == "energy")
1918 {
1919 UDefEnergyH = IPDFEnergyH = ZeroPhysVector;
1920 IPDFEnergyExist = false;
1921 Emin = 0.;
1922 Emax = 1e30;
1923 }
1924 else if (atype == "arb")
1925 {
1926 ArbEnergyH = IPDFArbEnergyH = ZeroPhysVector;
1927 IPDFArbExist = false;
1928 }
1929 else if (atype == "epn")
1930 {
1931 UDefEnergyH = IPDFEnergyH = ZeroPhysVector;
1932 IPDFEnergyExist = false;
1933 EpnEnergyH = ZeroPhysVector;
1934 }
1935 else
1936 {
1937 G4cout << "Error, histtype not accepted " << G4endl;
1938 }
1939}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetAlpha()

void G4SPSEneDistribution::SetAlpha ( G4double  alp)

Definition at line 186 of file G4SPSEneDistribution.cc.

187{
188 G4AutoLock l(&mutex);
189 alpha = alp;
190 threadLocalData.Get().alpha = alpha;
191}

Referenced by G4AdjointPrimaryGenerator::G4AdjointPrimaryGenerator(), and G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetBeamSigmaInE()

void G4SPSEneDistribution::SetBeamSigmaInE ( G4double  e)

Definition at line 181 of file G4SPSEneDistribution.cc.

182{
183 G4AutoLock l(&mutex);
184 SE = e;
185}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetBiasAlpha()

void G4SPSEneDistribution::SetBiasAlpha ( G4double  alp)

Definition at line 193 of file G4SPSEneDistribution.cc.

194{
195 G4AutoLock l(&mutex);
196 biasalpha = alp;
197 Biased = true;
198}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetBiasRndm()

void G4SPSEneDistribution::SetBiasRndm ( G4SPSRandomGenerator a)

Definition at line 233 of file G4SPSEneDistribution.cc.

234{
235 G4AutoLock l(&mutex);
236 eneRndm = a;
237}

Referenced by G4SingleParticleSource::G4SingleParticleSource().

◆ SetEmax()

void G4SPSEneDistribution::SetEmax ( G4double  ema)

◆ SetEmin()

void G4SPSEneDistribution::SetEmin ( G4double  emi)

◆ SetEnergyDisType()

void G4SPSEneDistribution::SetEnergyDisType ( const G4String DisType)

Definition at line 111 of file G4SPSEneDistribution.cc.

112{
113 G4AutoLock l(&mutex);
114 EnergyDisType = DisType;
115 if (EnergyDisType == "User")
116 {
117 UDefEnergyH = IPDFEnergyH = ZeroPhysVector;
118 IPDFEnergyExist = false;
119 }
120 else if (EnergyDisType == "Arb")
121 {
122 ArbEnergyH = IPDFArbEnergyH = ZeroPhysVector;
123 IPDFArbExist = false;
124 }
125 else if (EnergyDisType == "Epn")
126 {
127 UDefEnergyH = IPDFEnergyH = ZeroPhysVector;
128 IPDFEnergyExist = false;
129 EpnEnergyH = ZeroPhysVector;
130 }
131}

Referenced by G4AdjointPrimaryGenerator::G4AdjointPrimaryGenerator(), and G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetEzero()

void G4SPSEneDistribution::SetEzero ( G4double  eze)

Definition at line 206 of file G4SPSEneDistribution.cc.

207{
208 G4AutoLock l(&mutex);
209 Ezero = eze;
210 threadLocalData.Get().Ezero = Ezero;
211}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetGradient()

void G4SPSEneDistribution::SetGradient ( G4double  gr)

Definition at line 213 of file G4SPSEneDistribution.cc.

214{
215 G4AutoLock l(&mutex);
216 grad = gr;
217 threadLocalData.Get().grad = grad;
218}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetInterCept()

void G4SPSEneDistribution::SetInterCept ( G4double  c)

Definition at line 220 of file G4SPSEneDistribution.cc.

221{
222 G4AutoLock l(&mutex);
223 cept = c;
224 threadLocalData.Get().cept = cept;
225}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetMonoEnergy()

void G4SPSEneDistribution::SetMonoEnergy ( G4double  menergy)

Definition at line 175 of file G4SPSEneDistribution.cc.

176{
177 G4AutoLock l(&mutex);
178 MonoEnergy = menergy;
179}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetTemp()

void G4SPSEneDistribution::SetTemp ( G4double  tem)

Definition at line 200 of file G4SPSEneDistribution.cc.

201{
202 G4AutoLock l(&mutex);
203 Temp = tem;
204}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().

◆ SetVerbosity()

void G4SPSEneDistribution::SetVerbosity ( G4int  a)

Definition at line 239 of file G4SPSEneDistribution.cc.

240{
241 G4AutoLock l(&mutex);
242 verbosityLevel = a;
243}

Referenced by G4SingleParticleSource::SetVerbosity().

◆ UserEnergyHisto()

void G4SPSEneDistribution::UserEnergyHisto ( const G4ThreeVector input)

Definition at line 300 of file G4SPSEneDistribution.cc.

301{
302 G4AutoLock l(&mutex);
303 G4double ehi = input.x(),
304 val = input.y();
305 if (verbosityLevel > 1)
306 {
307 G4cout << "In UserEnergyHisto" << G4endl;
308 G4cout << " " << ehi << " " << val << G4endl;
309 }
310 UDefEnergyH.InsertValues(ehi, val);
311 Emax = ehi;
312 threadLocalData.Get().Emax = Emax;
313}

Referenced by G4GeneralParticleSourceMessenger::SetNewValue().


The documentation for this class was generated from the following files: