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

#include <G4Nucleus.hh>

Public Member Functions

 G4Nucleus ()
 
 G4Nucleus (const G4double A, const G4double Z)
 
 G4Nucleus (const G4int A, const G4int Z)
 
 G4Nucleus (const G4Material *aMaterial)
 
 ~G4Nucleus ()
 
 G4Nucleus (const G4Nucleus &right)
 
G4Nucleusoperator= (const G4Nucleus &right)
 
G4bool operator== (const G4Nucleus &right) const
 
G4bool operator!= (const G4Nucleus &right) const
 
void ChooseParameters (const G4Material *aMaterial)
 
void SetParameters (const G4double A, const G4double Z)
 
void SetParameters (const G4int A, const G4int Z)
 
G4int GetA_asInt () const
 
G4int GetN_asInt () const
 
G4int GetZ_asInt () const
 
const G4IsotopeGetIsotope ()
 
void SetIsotope (const G4Isotope *iso)
 
G4DynamicParticleReturnTargetParticle () const
 
G4double AtomicMass (const G4double A, const G4double Z) const
 
G4double AtomicMass (const G4int A, const G4int Z) const
 
G4double GetThermalPz (const G4double mass, const G4double temp) const
 
G4ReactionProduct GetThermalNucleus (G4double aMass, G4double temp=-1) const
 
G4ReactionProduct GetBiasedThermalNucleus (G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
 
G4double Cinema (G4double kineticEnergy)
 
G4double EvaporationEffects (G4double kineticEnergy)
 
G4double AnnihilationEvaporationEffects (G4double kineticEnergy, G4double ekOrg)
 
G4double GetPNBlackTrackEnergy () const
 
G4double GetDTABlackTrackEnergy () const
 
G4double GetAnnihilationPNBlackTrackEnergy () const
 
G4double GetAnnihilationDTABlackTrackEnergy () const
 
G4ThreeVector GetFermiMomentum ()
 
G4ReactionProductVectorFragmentate ()
 
void AddExcitationEnergy (G4double anEnergy)
 
void AddMomentum (const G4ThreeVector aMomentum)
 
G4double GetEnergyDeposit ()
 

Detailed Description

Definition at line 50 of file G4Nucleus.hh.

Constructor & Destructor Documentation

◆ G4Nucleus() [1/5]

G4Nucleus::G4Nucleus ( )

Definition at line 54 of file G4Nucleus.cc.

55 : theA(0), theZ(0), aEff(0.0), zEff(0)
56{
57 pnBlackTrackEnergy = 0.0;
58 dtaBlackTrackEnergy = 0.0;
59 pnBlackTrackEnergyfromAnnihilation = 0.0;
60 dtaBlackTrackEnergyfromAnnihilation = 0.0;
61 excitationEnergy = 0.0;
62 momentum = G4ThreeVector(0.,0.,0.);
63 fermiMomentum = 1.52*hbarc/fermi;
64 theTemp = 293.16*kelvin;
65 fIsotope = 0;
66}
CLHEP::Hep3Vector G4ThreeVector

◆ G4Nucleus() [2/5]

G4Nucleus::G4Nucleus ( const G4double  A,
const G4double  Z 
)

Definition at line 68 of file G4Nucleus.cc.

69{
70 SetParameters( A, Z );
71 pnBlackTrackEnergy = 0.0;
72 dtaBlackTrackEnergy = 0.0;
73 pnBlackTrackEnergyfromAnnihilation = 0.0;
74 dtaBlackTrackEnergyfromAnnihilation = 0.0;
75 excitationEnergy = 0.0;
76 momentum = G4ThreeVector(0.,0.,0.);
77 fermiMomentum = 1.52*hbarc/fermi;
78 theTemp = 293.16*kelvin;
79 fIsotope = 0;
80}
void SetParameters(const G4double A, const G4double Z)
Definition: G4Nucleus.cc:212

◆ G4Nucleus() [3/5]

G4Nucleus::G4Nucleus ( const G4int  A,
const G4int  Z 
)

Definition at line 82 of file G4Nucleus.cc.

83{
84 SetParameters( A, Z );
85 pnBlackTrackEnergy = 0.0;
86 dtaBlackTrackEnergy = 0.0;
87 pnBlackTrackEnergyfromAnnihilation = 0.0;
88 dtaBlackTrackEnergyfromAnnihilation = 0.0;
89 excitationEnergy = 0.0;
90 momentum = G4ThreeVector(0.,0.,0.);
91 fermiMomentum = 1.52*hbarc/fermi;
92 theTemp = 293.16*kelvin;
93 fIsotope = 0;
94}

◆ G4Nucleus() [4/5]

G4Nucleus::G4Nucleus ( const G4Material aMaterial)

Definition at line 96 of file G4Nucleus.cc.

97{
98 ChooseParameters( aMaterial );
99 pnBlackTrackEnergy = 0.0;
100 dtaBlackTrackEnergy = 0.0;
101 pnBlackTrackEnergyfromAnnihilation = 0.0;
102 dtaBlackTrackEnergyfromAnnihilation = 0.0;
103 excitationEnergy = 0.0;
104 momentum = G4ThreeVector(0.,0.,0.);
105 fermiMomentum = 1.52*hbarc/fermi;
106 theTemp = aMaterial->GetTemperature();
107 fIsotope = 0;
108}
G4double GetTemperature() const
Definition: G4Material.hh:180
void ChooseParameters(const G4Material *aMaterial)
Definition: G4Nucleus.cc:172

◆ ~G4Nucleus()

G4Nucleus::~G4Nucleus ( )

Definition at line 110 of file G4Nucleus.cc.

110{}

◆ G4Nucleus() [5/5]

G4Nucleus::G4Nucleus ( const G4Nucleus right)
inline

Definition at line 61 of file G4Nucleus.hh.

62 { *this = right; }

Member Function Documentation

◆ AddExcitationEnergy()

void G4Nucleus::AddExcitationEnergy ( G4double  anEnergy)

Definition at line 449 of file G4Nucleus.cc.

450 {
451 excitationEnergy+=anEnergy;
452 }

◆ AddMomentum()

void G4Nucleus::AddMomentum ( const G4ThreeVector  aMomentum)

Definition at line 444 of file G4Nucleus.cc.

445 {
446 momentum+=(aMomentum);
447 }

◆ AnnihilationEvaporationEffects()

G4double G4Nucleus::AnnihilationEvaporationEffects ( G4double  kineticEnergy,
G4double  ekOrg 
)

Definition at line 337 of file G4Nucleus.cc.

338 {
339 // Nuclear evaporation as a function of atomic number and kinetic
340 // energy (MeV) of primary particle. Modified for annihilation effects.
341 //
342 if( aEff < 1.5 || ekOrg < 0.)
343 {
344 pnBlackTrackEnergyfromAnnihilation = 0.0;
345 dtaBlackTrackEnergyfromAnnihilation = 0.0;
346 return 0.0;
347 }
348 G4double ek = kineticEnergy/GeV;
349 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
350 const G4float atno = std::min( 120., aEff );
351 const G4float gfa = 2.0*((aEff-1.0)/70.)*G4Exp(-(aEff-1.0)/70.);
352
353 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*G4Log(ekin) );
354 G4float exnu = 7.716 * cfa * G4Exp(-cfa)
355 * ((atno-1.0)/120.)*G4Exp(-(atno-1.0)/120.);
356 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
357
358 pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
359 dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
360
361 G4double ran1 = -6.0;
362 G4double ran2 = -6.0;
363 for( G4int i=0; i<12; ++i ) {
364 ran1 += G4UniformRand();
365 ran2 += G4UniformRand();
366 }
367 pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
368 dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
369
370 pnBlackTrackEnergyfromAnnihilation = std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
371 dtaBlackTrackEnergyfromAnnihilation = std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
372 G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
373 if (blackSum >= ekOrg/GeV) {
374 pnBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
375 dtaBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
376 }
377
378 return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*GeV;
379 }
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226
float G4float
Definition: G4Types.hh:84
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52

Referenced by G4RPGInelastic::CalculateMomenta().

◆ AtomicMass() [1/2]

◆ AtomicMass() [2/2]

G4double G4Nucleus::AtomicMass ( const G4int  A,
const G4int  Z 
) const

Definition at line 261 of file G4Nucleus.cc.

262 {
263 // Now returns (atomic mass - electron masses)
265 }

◆ ChooseParameters()

void G4Nucleus::ChooseParameters ( const G4Material aMaterial)

Definition at line 172 of file G4Nucleus.cc.

173{
174 G4double random = G4UniformRand();
175 G4double sum = aMaterial->GetTotNbOfAtomsPerVolume();
176 const G4ElementVector* theElementVector = aMaterial->GetElementVector();
177 G4double running(0);
178 // G4Element* element(0);
179 G4Element* element = (*theElementVector)[aMaterial->GetNumberOfElements()-1];
180
181 for (unsigned int i = 0; i < aMaterial->GetNumberOfElements(); ++i) {
182 running += aMaterial->GetVecNbOfAtomsPerVolume()[i];
183 if (running > random*sum) {
184 element = (*theElementVector)[i];
185 break;
186 }
187 }
188
189 if (element->GetNumberOfIsotopes() > 0) {
190 G4double randomAbundance = G4UniformRand();
191 G4double sumAbundance = element->GetRelativeAbundanceVector()[0];
192 unsigned int iso=0;
193 while (iso < element->GetNumberOfIsotopes() && /* Loop checking, 02.11.2015, A.Ribon */
194 sumAbundance < randomAbundance) {
195 ++iso;
196 sumAbundance += element->GetRelativeAbundanceVector()[iso];
197 }
198 theA=element->GetIsotope(iso)->GetN();
199 theZ=element->GetIsotope(iso)->GetZ();
200 aEff=theA;
201 zEff=theZ;
202 } else {
203 aEff = element->GetN();
204 zEff = element->GetZ();
205 theZ = G4int(zEff + 0.5);
206 theA = G4int(aEff + 0.5);
207 }
208}
std::vector< G4Element * > G4ElementVector
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:166
G4double GetZ() const
Definition: G4Element.hh:130
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:169
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:158
G4double GetN() const
Definition: G4Element.hh:134
G4int GetZ() const
Definition: G4Isotope.hh:90
G4int GetN() const
Definition: G4Isotope.hh:93
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:188
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:207
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:204

Referenced by G4Nucleus().

◆ Cinema()

G4double G4Nucleus::Cinema ( G4double  kineticEnergy)

Definition at line 382 of file G4Nucleus.cc.

383 {
384 // derived from original FORTRAN code CINEMA by H. Fesefeldt (14-Oct-1987)
385 //
386 // input: kineticEnergy (MeV)
387 // returns modified kinetic energy (MeV)
388 //
389 static const G4double expxu = 82.; // upper bound for arg. of exp
390 static const G4double expxl = -expxu; // lower bound for arg. of exp
391
392 G4double ek = kineticEnergy/GeV;
393 G4double ekLog = G4Log( ek );
394 G4double aLog = G4Log( aEff );
395 G4double em = std::min( 1.0, 0.2390 + 0.0408*aLog*aLog );
396 G4double temp1 = -ek * std::min( 0.15, 0.0019*aLog*aLog*aLog );
397 G4double temp2 = G4Exp( std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
398 G4double result = 0.0;
399 if( std::abs( temp1 ) < 1.0 )
400 {
401 if( temp2 > 1.0e-10 )result = temp1*temp2;
402 }
403 else result = temp1*temp2;
404 if( result < -ek )result = -ek;
405 return result*GeV;
406 }

Referenced by G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), and G4RPGInelastic::CalculateMomenta().

◆ EvaporationEffects()

G4double G4Nucleus::EvaporationEffects ( G4double  kineticEnergy)

Definition at line 278 of file G4Nucleus.cc.

279 {
280 // derived from original FORTRAN code EXNU by H. Fesefeldt (10-Dec-1986)
281 //
282 // Nuclear evaporation as function of atomic number
283 // and kinetic energy (MeV) of primary particle
284 //
285 // returns kinetic energy (MeV)
286 //
287 if( aEff < 1.5 )
288 {
289 pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
290 return 0.0;
291 }
292 G4double ek = kineticEnergy/GeV;
293 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
294 const G4float atno = std::min( 120., aEff );
295 const G4float gfa = 2.0*((aEff-1.0)/70.)*G4Exp(-(aEff-1.0)/70.);
296 //
297 // 0.35 value at 1 GeV
298 // 0.05 value at 0.1 GeV
299 //
300 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*G4Log(ekin) );
301 G4float exnu = 7.716 * cfa * G4Exp(-cfa)
302 * ((atno-1.0)/120.)*G4Exp(-(atno-1.0)/120.);
303 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
304 //
305 // pnBlackTrackEnergy is the kinetic energy (in GeV) available for
306 // proton/neutron black track particles
307 // dtaBlackTrackEnergy is the kinetic energy (in GeV) available for
308 // deuteron/triton/alpha black track particles
309 //
310 pnBlackTrackEnergy = exnu*fpdiv;
311 dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
312
313 if( G4int(zEff+0.1) != 82 )
314 {
315 G4double ran1 = -6.0;
316 G4double ran2 = -6.0;
317 for( G4int i=0; i<12; ++i )
318 {
319 ran1 += G4UniformRand();
320 ran2 += G4UniformRand();
321 }
322 pnBlackTrackEnergy *= 1.0 + ran1*gfa;
323 dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
324 }
325 pnBlackTrackEnergy = std::max( 0.0, pnBlackTrackEnergy );
326 dtaBlackTrackEnergy = std::max( 0.0, dtaBlackTrackEnergy );
327 while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek ) /* Loop checking, 02.11.2015, A.Ribon */
328 {
329 pnBlackTrackEnergy *= 1.0 - 0.5*G4UniformRand();
330 dtaBlackTrackEnergy *= 1.0 - 0.5*G4UniformRand();
331 }
332// G4cout << "EvaporationEffects "<<kineticEnergy<<" "
333// <<pnBlackTrackEnergy+dtaBlackTrackEnergy<<endl;
334 return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*GeV;
335 }

Referenced by G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), and G4RPGXiZeroInelastic::ApplyYourself().

◆ Fragmentate()

G4ReactionProductVector * G4Nucleus::Fragmentate ( )

Definition at line 438 of file G4Nucleus.cc.

439 {
440 // needs implementation!
441 return NULL;
442 }

◆ GetA_asInt()

G4int G4Nucleus::GetA_asInt ( ) const
inline

Definition at line 109 of file G4Nucleus.hh.

110 { return theA; }

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4LENDorBERTModel::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDCombinedModel::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDGammaModel::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEHadronProtonElastic::ApplyYourself(), G4LFission::ApplyYourself(), G4ANuElNucleusCcModel::ApplyYourself(), G4ANuElNucleusNcModel::ApplyYourself(), G4ANuMuNucleusCcModel::ApplyYourself(), G4ANuMuNucleusNcModel::ApplyYourself(), G4NuElNucleusCcModel::ApplyYourself(), G4NuElNucleusNcModel::ApplyYourself(), G4NuMuNucleusCcModel::ApplyYourself(), G4NuMuNucleusNcModel::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4LowEGammaNuclearModel::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4CascadeInterface::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LMsdGenerator::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4MuonMinusAtomicCapture::AtRestDoIt(), G4RPGInelastic::CalculateMomenta(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4HadronicProcess::CheckResult(), G4NeutrinoNucleusModel::CoherentPion(), G4CascadeInterface::createTarget(), G4NeutrinoNucleusModel::FermiMomentum(), G4HadronicProcess::FillResult(), G4NeutrinoNucleusModel::FinalBarion(), G4QuasiElasticChannel::GetFraction(), G4NeutrinoNucleusModel::GgSampleNM(), G4FTFModel::Init(), G4LMsdGenerator::IsApplicable(), G4RPGReaction::NuclearReaction(), G4NeutrinoNucleusModel::NucleonMomentum(), G4NeutrinoElectronProcess::PostStepDoIt(), G4HadronicProcess::PostStepDoIt(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4HadronElasticProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4ANuElNucleusCcModel::SampleLVkr(), G4ANuElNucleusNcModel::SampleLVkr(), G4ANuMuNucleusCcModel::SampleLVkr(), G4ANuMuNucleusNcModel::SampleLVkr(), G4NuElNucleusCcModel::SampleLVkr(), G4NuElNucleusNcModel::SampleLVkr(), G4NuMuNucleusCcModel::SampleLVkr(), G4NuMuNucleusNcModel::SampleLVkr(), G4VPartonStringModel::Scatter(), and G4QuasiElasticChannel::Scatter().

◆ GetAnnihilationDTABlackTrackEnergy()

G4double G4Nucleus::GetAnnihilationDTABlackTrackEnergy ( ) const
inline

Definition at line 159 of file G4Nucleus.hh.

160 { return dtaBlackTrackEnergyfromAnnihilation; }

Referenced by G4RPGFragmentation::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ GetAnnihilationPNBlackTrackEnergy()

G4double G4Nucleus::GetAnnihilationPNBlackTrackEnergy ( ) const
inline

Definition at line 156 of file G4Nucleus.hh.

157 { return pnBlackTrackEnergyfromAnnihilation; }

Referenced by G4RPGFragmentation::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ GetBiasedThermalNucleus()

G4ReactionProduct G4Nucleus::GetBiasedThermalNucleus ( G4double  aMass,
G4ThreeVector  aVelocity,
G4double  temp = -1 
) const

Definition at line 112 of file G4Nucleus.cc.

114{
115 G4double velMag = aVelocity.mag();
116 G4ReactionProduct result;
117 G4double value = 0;
118 G4double random = 1;
119 G4double norm = 3.*std::sqrt(k_Boltzmann*temp*aMass*G4Neutron::Neutron()->GetPDGMass());
120 norm /= G4Neutron::Neutron()->GetPDGMass();
121 norm *= 5.;
122 norm += velMag;
123 norm /= velMag;
124 const G4int maxNumberOfLoops = 1000000;
125 G4int loopCounter = -1;
126 while ( (value/norm<random) && ++loopCounter < maxNumberOfLoops ) /* Loop checking, 02.11.2015, A.Ribon */
127 {
128 result = GetThermalNucleus(aMass, temp);
129 G4ThreeVector targetVelocity = 1./result.GetMass()*result.GetMomentum();
130 value = (targetVelocity+aVelocity).mag()/velMag;
131 random = G4UniformRand();
132 }
133 if ( loopCounter >= maxNumberOfLoops ) {
135 ed << " Failed sampling after maxNumberOfLoops attempts : forced exit! " << G4endl;
136 G4Exception( " G4Nucleus::GetBiasedThermalNucleus ", "HAD_NUCLEUS_001", JustWarning, ed );
137 result = GetThermalNucleus(aMass, temp);
138 }
139 return result;
140}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
#define G4endl
Definition: G4ios.hh:57
double mag() const
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const
Definition: G4Nucleus.cc:143
G4ThreeVector GetMomentum() const
G4double GetMass() const

Referenced by G4FissionLibrary::ApplyYourself(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4ParticleHPInelasticCompFS::CompositeApply(), and G4ParticleHPThermalBoost::GetThermalEnergy().

◆ GetDTABlackTrackEnergy()

G4double G4Nucleus::GetDTABlackTrackEnergy ( ) const
inline

Definition at line 153 of file G4Nucleus.hh.

154 { return dtaBlackTrackEnergy; }

Referenced by G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ GetEnergyDeposit()

G4double G4Nucleus::GetEnergyDeposit ( )
inline

Definition at line 184 of file G4Nucleus.hh.

184{return excitationEnergy; }

Referenced by G4WilsonAbrasionModel::ApplyYourself().

◆ GetFermiMomentum()

G4ThreeVector G4Nucleus::GetFermiMomentum ( )

Definition at line 412 of file G4Nucleus.cc.

413 {
414 // chv: .. we assume zero temperature!
415
416 // momentum is equally distributed in each phasespace volume dpx, dpy, dpz.
417 G4double ranflat1=
418 G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
419 G4double ranflat2=
420 G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
421 G4double ranflat3=
422 G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
423 G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
424 ranmax = (ranmax>ranflat3? ranmax : ranflat3);
425
426 // Isotropic momentum distribution
427 G4double costheta = 2.*G4UniformRand() - 1.0;
428 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
429 G4double phi = 2.0*pi*G4UniformRand();
430
431 G4double pz=costheta*ranmax;
432 G4double px=sintheta*std::cos(phi)*ranmax;
433 G4double py=sintheta*std::sin(phi)*ranmax;
434 G4ThreeVector p(px,py,pz);
435 return p;
436 }
const G4double pi

◆ GetIsotope()

◆ GetN_asInt()

G4int G4Nucleus::GetN_asInt ( ) const
inline

Definition at line 112 of file G4Nucleus.hh.

113 { return theA-theZ; }

Referenced by G4QuasiElasticChannel::GetFraction().

◆ GetPNBlackTrackEnergy()

G4double G4Nucleus::GetPNBlackTrackEnergy ( ) const
inline

Definition at line 150 of file G4Nucleus.hh.

151 { return pnBlackTrackEnergy; }

Referenced by G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ GetThermalNucleus()

G4ReactionProduct G4Nucleus::GetThermalNucleus ( G4double  aMass,
G4double  temp = -1 
) const

Definition at line 143 of file G4Nucleus.cc.

144{
145 G4double currentTemp = temp;
146 if (currentTemp < 0) currentTemp = theTemp;
147 G4ReactionProduct theTarget;
148 theTarget.SetMass(targetMass*G4Neutron::Neutron()->GetPDGMass());
149 G4double px, py, pz;
150 px = GetThermalPz(theTarget.GetMass(), currentTemp);
151 py = GetThermalPz(theTarget.GetMass(), currentTemp);
152 pz = GetThermalPz(theTarget.GetMass(), currentTemp);
153 theTarget.SetMomentum(px, py, pz);
154 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
155 G4double tEtot = std::sqrt((tMom+theTarget.GetMass())*
156 (tMom+theTarget.GetMass())-
157 2.*tMom*theTarget.GetMass());
158 // if(1-tEtot/theTarget.GetMass()>0.001) this line incorrect (Bug report 1911)
159 if (tEtot/theTarget.GetMass() - 1. > 0.001) {
160 // use relativistic energy for higher energies
161 theTarget.SetTotalEnergy(tEtot);
162
163 } else {
164 // use p**2/2M for lower energies (to preserve precision?)
165 theTarget.SetKineticEnergy(tMom*tMom/(2.*theTarget.GetMass()));
166 }
167 return theTarget;
168}
G4double GetThermalPz(const G4double mass, const G4double temp) const
Definition: G4Nucleus.cc:268
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetKineticEnergy(const G4double en)
void SetMass(const G4double mas)

Referenced by GetBiasedThermalNucleus(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), and G4ParticleHPInelasticData::GetCrossSection().

◆ GetThermalPz()

G4double G4Nucleus::GetThermalPz ( const G4double  mass,
const G4double  temp 
) const

Definition at line 268 of file G4Nucleus.cc.

269 {
270 G4double result = G4RandGauss::shoot();
271 result *= std::sqrt(k_Boltzmann*temp*mass); // Das ist impuls (Pz),
272 // nichtrelativistische rechnung
273 // Maxwell verteilung angenommen
274 return result;
275 }

Referenced by GetThermalNucleus().

◆ GetZ_asInt()

G4int G4Nucleus::GetZ_asInt ( ) const
inline

Definition at line 115 of file G4Nucleus.hh.

116 { return theZ; }

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4LightMedia::AntiLambdaExchange(), G4LightMedia::AntiNeutronExchange(), G4LightMedia::AntiOmegaMinusExchange(), G4LightMedia::AntiProtonExchange(), G4LightMedia::AntiSigmaMinusExchange(), G4LightMedia::AntiSigmaPlusExchange(), G4LightMedia::AntiXiMinusExchange(), G4LightMedia::AntiXiZeroExchange(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4LENDorBERTModel::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDCombinedModel::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDGammaModel::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4ParticleHPThermalScattering::ApplyYourself(), G4LEHadronProtonElastic::ApplyYourself(), G4NeutrinoElectronNcModel::ApplyYourself(), G4NeutronElectronElModel::ApplyYourself(), G4LFission::ApplyYourself(), G4ANuElNucleusCcModel::ApplyYourself(), G4ANuElNucleusNcModel::ApplyYourself(), G4ANuMuNucleusCcModel::ApplyYourself(), G4ANuMuNucleusNcModel::ApplyYourself(), G4NeutrinoElectronCcModel::ApplyYourself(), G4NuElNucleusCcModel::ApplyYourself(), G4NuElNucleusNcModel::ApplyYourself(), G4NuMuNucleusCcModel::ApplyYourself(), G4NuMuNucleusNcModel::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4LowEGammaNuclearModel::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LMsdGenerator::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4MuonMinusAtomicCapture::AtRestDoIt(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4HadronicProcess::CheckResult(), G4NeutrinoNucleusModel::CoherentPion(), G4CascadeInterface::createTarget(), G4NeutrinoNucleusModel::FermiMomentum(), G4HadronicProcess::FillResult(), G4NeutrinoNucleusModel::FinalBarion(), G4QuasiElasticChannel::GetFraction(), G4FTFModel::Init(), G4DiffuseElastic::IsApplicable(), G4DiffuseElasticV2::IsApplicable(), G4hhElastic::IsApplicable(), G4NeutrinoElectronNcModel::IsApplicable(), G4NeutronElectronElModel::IsApplicable(), G4ANuElNucleusCcModel::IsApplicable(), G4ANuElNucleusNcModel::IsApplicable(), G4ANuMuNucleusCcModel::IsApplicable(), G4ANuMuNucleusNcModel::IsApplicable(), G4NeutrinoElectronCcModel::IsApplicable(), G4NeutrinoNucleusModel::IsApplicable(), G4NuElNucleusCcModel::IsApplicable(), G4NuElNucleusNcModel::IsApplicable(), G4NuMuNucleusCcModel::IsApplicable(), G4NuMuNucleusNcModel::IsApplicable(), G4LightMedia::KaonPlusExchange(), G4LightMedia::KaonZeroShortExchange(), G4LightMedia::LambdaExchange(), G4LightMedia::NeutronExchange(), G4LightMedia::OmegaMinusExchange(), G4LightMedia::PionPlusExchange(), G4NeutrinoElectronProcess::PostStepDoIt(), G4HadronicProcess::PostStepDoIt(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4HadronElasticProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4LightMedia::ProtonExchange(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4ANuElNucleusCcModel::SampleLVkr(), G4ANuElNucleusNcModel::SampleLVkr(), G4ANuMuNucleusCcModel::SampleLVkr(), G4ANuMuNucleusNcModel::SampleLVkr(), G4NuElNucleusCcModel::SampleLVkr(), G4NuElNucleusNcModel::SampleLVkr(), G4NuMuNucleusCcModel::SampleLVkr(), G4NuMuNucleusNcModel::SampleLVkr(), G4VPartonStringModel::Scatter(), G4QuasiElasticChannel::Scatter(), G4LightMedia::SigmaMinusExchange(), G4LightMedia::SigmaPlusExchange(), G4LightMedia::XiMinusExchange(), and G4LightMedia::XiZeroExchange().

◆ operator!=()

G4bool G4Nucleus::operator!= ( const G4Nucleus right) const
inline

Definition at line 89 of file G4Nucleus.hh.

90 { return ( this != (G4Nucleus *) &right ); }

◆ operator=()

G4Nucleus & G4Nucleus::operator= ( const G4Nucleus right)
inline

Definition at line 64 of file G4Nucleus.hh.

65 {
66 if (this != &right) {
67 theA=right.theA;
68 theZ=right.theZ;
69 aEff=right.aEff;
70 zEff=right.zEff;
71 fIsotope = right.fIsotope;
72 pnBlackTrackEnergy=right.pnBlackTrackEnergy;
73 dtaBlackTrackEnergy=right.dtaBlackTrackEnergy;
74 pnBlackTrackEnergyfromAnnihilation =
75 right.pnBlackTrackEnergyfromAnnihilation;
76 dtaBlackTrackEnergyfromAnnihilation =
77 right.dtaBlackTrackEnergyfromAnnihilation;
78 theTemp = right.theTemp;
79 excitationEnergy = right.excitationEnergy;
80 momentum = right.momentum;
81 fermiMomentum = right.fermiMomentum;
82 }
83 return *this;
84 }

◆ operator==()

G4bool G4Nucleus::operator== ( const G4Nucleus right) const
inline

Definition at line 86 of file G4Nucleus.hh.

87 { return ( this == (G4Nucleus *) &right ); }

◆ ReturnTargetParticle()

G4DynamicParticle * G4Nucleus::ReturnTargetParticle ( ) const

Definition at line 241 of file G4Nucleus.cc.

242 {
243 // choose a proton or a neutron as the target particle
244
245 G4DynamicParticle *targetParticle = new G4DynamicParticle;
246 if( G4UniformRand() < zEff/aEff )
247 targetParticle->SetDefinition( G4Proton::Proton() );
248 else
249 targetParticle->SetDefinition( G4Neutron::Neutron() );
250 return targetParticle;
251 }
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
static G4Proton * Proton()
Definition: G4Proton.cc:92

Referenced by G4LightMedia::AntiLambdaExchange(), G4LightMedia::AntiNeutronExchange(), G4LightMedia::AntiOmegaMinusExchange(), G4LightMedia::AntiProtonExchange(), G4LightMedia::AntiSigmaMinusExchange(), G4LightMedia::AntiSigmaPlusExchange(), G4LightMedia::AntiXiMinusExchange(), G4LightMedia::AntiXiZeroExchange(), G4LEHadronProtonElastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4LightMedia::KaonPlusExchange(), G4LightMedia::KaonZeroShortExchange(), G4LightMedia::LambdaExchange(), G4LightMedia::NeutronExchange(), G4LightMedia::OmegaMinusExchange(), G4LightMedia::PionPlusExchange(), G4LightMedia::ProtonExchange(), G4LightMedia::SigmaMinusExchange(), G4LightMedia::SigmaPlusExchange(), G4LightMedia::XiMinusExchange(), and G4LightMedia::XiZeroExchange().

◆ SetIsotope()

void G4Nucleus::SetIsotope ( const G4Isotope iso)
inline

Definition at line 122 of file G4Nucleus.hh.

123 {
124 fIsotope = iso;
125 if(iso) {
126 theZ = iso->GetZ();
127 theA = iso->GetN();
128 aEff = theA;
129 zEff = theZ;
130 }
131 }

Referenced by G4FissLib::ApplyYourself(), G4ParticleHPCapture::ApplyYourself(), G4ParticleHPElastic::ApplyYourself(), G4ParticleHPFission::ApplyYourself(), G4ParticleHPInelastic::ApplyYourself(), and G4CrossSectionDataStore::SampleZandA().

◆ SetParameters() [1/2]

void G4Nucleus::SetParameters ( const G4double  A,
const G4double  Z 
)

Definition at line 212 of file G4Nucleus.cc.

213{
214 theZ = G4lrint(Z);
215 theA = G4lrint(A);
216 if (theA<1 || theZ<0 || theZ>theA) {
217 throw G4HadronicException(__FILE__, __LINE__,
218 "G4Nucleus::SetParameters called with non-physical parameters");
219 }
220 aEff = A; // atomic weight
221 zEff = Z; // atomic number
222 fIsotope = 0;
223}
double A(double temperature)
int G4lrint(double ad)
Definition: templates.hh:134

Referenced by G4FissLib::ApplyYourself(), G4ParticleHPCapture::ApplyYourself(), G4ParticleHPElastic::ApplyYourself(), G4ParticleHPFission::ApplyYourself(), G4ParticleHPInelastic::ApplyYourself(), G4Nucleus(), and G4ElementSelector::SelectZandA().

◆ SetParameters() [2/2]

void G4Nucleus::SetParameters ( const G4int  A,
const G4int  Z 
)

Definition at line 226 of file G4Nucleus.cc.

227{
228 theZ = Z;
229 theA = A;
230 if( theA<1 || theZ<0 || theZ>theA )
231 {
232 throw G4HadronicException(__FILE__, __LINE__,
233 "G4Nucleus::SetParameters called with non-physical parameters");
234 }
235 aEff = A; // atomic weight
236 zEff = Z; // atomic number
237 fIsotope = 0;
238}

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