Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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::G4Nucleus ( )

Definition at line 49 of file G4Nucleus.cc.

References python.hepunit::fermi, python.hepunit::hbarc, and python.hepunit::kelvin.

50  : theA(0), theZ(0), aEff(0.0), zEff(0)
51 {
52  pnBlackTrackEnergy = 0.0;
53  dtaBlackTrackEnergy = 0.0;
54  pnBlackTrackEnergyfromAnnihilation = 0.0;
55  dtaBlackTrackEnergyfromAnnihilation = 0.0;
56  excitationEnergy = 0.0;
57  momentum = G4ThreeVector(0.,0.,0.);
58  fermiMomentum = 1.52*hbarc/fermi;
59  theTemp = 293.16*kelvin;
60  fIsotope = 0;
61 }
CLHEP::Hep3Vector G4ThreeVector
G4Nucleus::G4Nucleus ( const G4double  A,
const G4double  Z 
)

Definition at line 63 of file G4Nucleus.cc.

References python.hepunit::fermi, python.hepunit::hbarc, python.hepunit::kelvin, and SetParameters().

64 {
65  SetParameters( A, Z );
66  pnBlackTrackEnergy = 0.0;
67  dtaBlackTrackEnergy = 0.0;
68  pnBlackTrackEnergyfromAnnihilation = 0.0;
69  dtaBlackTrackEnergyfromAnnihilation = 0.0;
70  excitationEnergy = 0.0;
71  momentum = G4ThreeVector(0.,0.,0.);
72  fermiMomentum = 1.52*hbarc/fermi;
73  theTemp = 293.16*kelvin;
74  fIsotope = 0;
75 }
CLHEP::Hep3Vector G4ThreeVector
void SetParameters(const G4double A, const G4double Z)
Definition: G4Nucleus.cc:198
G4Nucleus::G4Nucleus ( const G4int  A,
const G4int  Z 
)

Definition at line 77 of file G4Nucleus.cc.

References python.hepunit::fermi, python.hepunit::hbarc, python.hepunit::kelvin, and SetParameters().

78 {
79  SetParameters( A, Z );
80  pnBlackTrackEnergy = 0.0;
81  dtaBlackTrackEnergy = 0.0;
82  pnBlackTrackEnergyfromAnnihilation = 0.0;
83  dtaBlackTrackEnergyfromAnnihilation = 0.0;
84  excitationEnergy = 0.0;
85  momentum = G4ThreeVector(0.,0.,0.);
86  fermiMomentum = 1.52*hbarc/fermi;
87  theTemp = 293.16*kelvin;
88  fIsotope = 0;
89 }
CLHEP::Hep3Vector G4ThreeVector
void SetParameters(const G4double A, const G4double Z)
Definition: G4Nucleus.cc:198
G4Nucleus::G4Nucleus ( const G4Material aMaterial)

Definition at line 91 of file G4Nucleus.cc.

References ChooseParameters(), python.hepunit::fermi, G4Material::GetTemperature(), and python.hepunit::hbarc.

92 {
93  ChooseParameters( aMaterial );
94  pnBlackTrackEnergy = 0.0;
95  dtaBlackTrackEnergy = 0.0;
96  pnBlackTrackEnergyfromAnnihilation = 0.0;
97  dtaBlackTrackEnergyfromAnnihilation = 0.0;
98  excitationEnergy = 0.0;
99  momentum = G4ThreeVector(0.,0.,0.);
100  fermiMomentum = 1.52*hbarc/fermi;
101  theTemp = aMaterial->GetTemperature();
102  fIsotope = 0;
103 }
CLHEP::Hep3Vector G4ThreeVector
void ChooseParameters(const G4Material *aMaterial)
Definition: G4Nucleus.cc:158
G4double GetTemperature() const
Definition: G4Material.hh:180
G4Nucleus::~G4Nucleus ( )

Definition at line 105 of file G4Nucleus.cc.

105 {}
G4Nucleus::G4Nucleus ( const G4Nucleus right)
inline

Definition at line 61 of file G4Nucleus.hh.

References right.

62  { *this = right; }

Member Function Documentation

void G4Nucleus::AddExcitationEnergy ( G4double  anEnergy)

Definition at line 435 of file G4Nucleus.cc.

436  {
437  excitationEnergy+=anEnergy;
438  }
void G4Nucleus::AddMomentum ( const G4ThreeVector  aMomentum)

Definition at line 430 of file G4Nucleus.cc.

431  {
432  momentum+=(aMomentum);
433  }
G4double G4Nucleus::AnnihilationEvaporationEffects ( G4double  kineticEnergy,
G4double  ekOrg 
)

Definition at line 323 of file G4Nucleus.cc.

References G4UniformRand, python.hepunit::GeV, G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by G4RPGInelastic::CalculateMomenta().

324  {
325  // Nuclear evaporation as a function of atomic number and kinetic
326  // energy (MeV) of primary particle. Modified for annihilation effects.
327  //
328  if( aEff < 1.5 || ekOrg < 0.)
329  {
330  pnBlackTrackEnergyfromAnnihilation = 0.0;
331  dtaBlackTrackEnergyfromAnnihilation = 0.0;
332  return 0.0;
333  }
334  G4double ek = kineticEnergy/GeV;
335  G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
336  const G4float atno = std::min( 120., aEff );
337  const G4float gfa = 2.0*((aEff-1.0)/70.)*std::exp(-(aEff-1.0)/70.);
338 
339  G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*std::log(ekin) );
340  G4float exnu = 7.716 * cfa * std::exp(-cfa)
341  * ((atno-1.0)/120.)*std::exp(-(atno-1.0)/120.);
342  G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
343 
344  pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
345  dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
346 
347  G4double ran1 = -6.0;
348  G4double ran2 = -6.0;
349  for( G4int i=0; i<12; ++i ) {
350  ran1 += G4UniformRand();
351  ran2 += G4UniformRand();
352  }
353  pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
354  dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
355 
356  pnBlackTrackEnergyfromAnnihilation = std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
357  dtaBlackTrackEnergyfromAnnihilation = std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
358  G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
359  if (blackSum >= ekOrg/GeV) {
360  pnBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
361  dtaBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
362  }
363 
364  return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*GeV;
365  }
float G4float
Definition: G4Types.hh:77
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:87
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
G4double G4Nucleus::AtomicMass ( const G4double  A,
const G4double  Z 
) const

Definition at line 240 of file G4Nucleus.cc.

References G4NucleiProperties::GetNuclearMass().

Referenced by G4WilsonAbrasionModel::ApplyYourself().

241  {
242  // Now returns (atomic mass - electron masses)
244  }
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double G4Nucleus::AtomicMass ( const G4int  A,
const G4int  Z 
) const

Definition at line 247 of file G4Nucleus.cc.

References G4NucleiProperties::GetNuclearMass().

248  {
249  // Now returns (atomic mass - electron masses)
251  }
static G4double GetNuclearMass(const G4double A, const G4double Z)
void G4Nucleus::ChooseParameters ( const G4Material aMaterial)

Definition at line 158 of file G4Nucleus.cc.

References G4UniformRand, G4Material::GetElementVector(), G4Element::GetIsotope(), G4Isotope::GetN(), G4Element::GetN(), G4Material::GetNumberOfElements(), G4Element::GetNumberOfIsotopes(), G4Element::GetRelativeAbundanceVector(), G4Material::GetTotNbOfAtomsPerVolume(), G4Material::GetVecNbOfAtomsPerVolume(), G4Isotope::GetZ(), and G4Element::GetZ().

Referenced by G4Nucleus().

159 {
160  G4double random = G4UniformRand();
161  G4double sum = aMaterial->GetTotNbOfAtomsPerVolume();
162  const G4ElementVector* theElementVector = aMaterial->GetElementVector();
163  G4double running(0);
164  // G4Element* element(0);
165  G4Element* element = (*theElementVector)[aMaterial->GetNumberOfElements()-1];
166 
167  for (unsigned int i = 0; i < aMaterial->GetNumberOfElements(); ++i) {
168  running += aMaterial->GetVecNbOfAtomsPerVolume()[i];
169  if (running > random*sum) {
170  element = (*theElementVector)[i];
171  break;
172  }
173  }
174 
175  if (element->GetNumberOfIsotopes() > 0) {
176  G4double randomAbundance = G4UniformRand();
177  G4double sumAbundance = element->GetRelativeAbundanceVector()[0];
178  unsigned int iso=0;
179  while (iso < element->GetNumberOfIsotopes() &&
180  sumAbundance < randomAbundance) {
181  ++iso;
182  sumAbundance += element->GetRelativeAbundanceVector()[iso];
183  }
184  theA=element->GetIsotope(iso)->GetN();
185  theZ=element->GetIsotope(iso)->GetZ();
186  aEff=theA;
187  zEff=theZ;
188  } else {
189  aEff = element->GetN();
190  zEff = element->GetZ();
191  theZ = G4int(zEff + 0.5);
192  theA = G4int(aEff + 0.5);
193  }
194 }
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:158
std::vector< G4Element * > G4ElementVector
G4double GetN() const
Definition: G4Element.hh:134
G4double GetZ() const
Definition: G4Element.hh:131
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:188
int G4int
Definition: G4Types.hh:78
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:204
G4int GetN() const
Definition: G4Isotope.hh:94
#define G4UniformRand()
Definition: Randomize.hh:87
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:166
G4int GetZ() const
Definition: G4Isotope.hh:91
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:207
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:169
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
double G4double
Definition: G4Types.hh:76
G4double G4Nucleus::Cinema ( G4double  kineticEnergy)

Definition at line 368 of file G4Nucleus.cc.

References python.hepunit::GeV, G4INCL::Math::max(), and G4INCL::Math::min().

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

369  {
370  // derived from original FORTRAN code CINEMA by H. Fesefeldt (14-Oct-1987)
371  //
372  // input: kineticEnergy (MeV)
373  // returns modified kinetic energy (MeV)
374  //
375  static const G4double expxu = 82.; // upper bound for arg. of exp
376  static const G4double expxl = -expxu; // lower bound for arg. of exp
377 
378  G4double ek = kineticEnergy/GeV;
379  G4double ekLog = std::log( ek );
380  G4double aLog = std::log( aEff );
381  G4double em = std::min( 1.0, 0.2390 + 0.0408*aLog*aLog );
382  G4double temp1 = -ek * std::min( 0.15, 0.0019*aLog*aLog*aLog );
383  G4double temp2 = std::exp( std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
384  G4double result = 0.0;
385  if( std::abs( temp1 ) < 1.0 )
386  {
387  if( temp2 > 1.0e-10 )result = temp1*temp2;
388  }
389  else result = temp1*temp2;
390  if( result < -ek )result = -ek;
391  return result*GeV;
392  }
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
G4double G4Nucleus::EvaporationEffects ( G4double  kineticEnergy)

Definition at line 264 of file G4Nucleus.cc.

References G4UniformRand, python.hepunit::GeV, G4INCL::Math::max(), and G4INCL::Math::min().

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

265  {
266  // derived from original FORTRAN code EXNU by H. Fesefeldt (10-Dec-1986)
267  //
268  // Nuclear evaporation as function of atomic number
269  // and kinetic energy (MeV) of primary particle
270  //
271  // returns kinetic energy (MeV)
272  //
273  if( aEff < 1.5 )
274  {
275  pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
276  return 0.0;
277  }
278  G4double ek = kineticEnergy/GeV;
279  G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
280  const G4float atno = std::min( 120., aEff );
281  const G4float gfa = 2.0*((aEff-1.0)/70.)*std::exp(-(aEff-1.0)/70.);
282  //
283  // 0.35 value at 1 GeV
284  // 0.05 value at 0.1 GeV
285  //
286  G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*std::log(ekin) );
287  G4float exnu = 7.716 * cfa * std::exp(-cfa)
288  * ((atno-1.0)/120.)*std::exp(-(atno-1.0)/120.);
289  G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
290  //
291  // pnBlackTrackEnergy is the kinetic energy (in GeV) available for
292  // proton/neutron black track particles
293  // dtaBlackTrackEnergy is the kinetic energy (in GeV) available for
294  // deuteron/triton/alpha black track particles
295  //
296  pnBlackTrackEnergy = exnu*fpdiv;
297  dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
298 
299  if( G4int(zEff+0.1) != 82 )
300  {
301  G4double ran1 = -6.0;
302  G4double ran2 = -6.0;
303  for( G4int i=0; i<12; ++i )
304  {
305  ran1 += G4UniformRand();
306  ran2 += G4UniformRand();
307  }
308  pnBlackTrackEnergy *= 1.0 + ran1*gfa;
309  dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
310  }
311  pnBlackTrackEnergy = std::max( 0.0, pnBlackTrackEnergy );
312  dtaBlackTrackEnergy = std::max( 0.0, dtaBlackTrackEnergy );
313  while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek )
314  {
315  pnBlackTrackEnergy *= 1.0 - 0.5*G4UniformRand();
316  dtaBlackTrackEnergy *= 1.0 - 0.5*G4UniformRand();
317  }
318 // G4cout << "EvaporationEffects "<<kineticEnergy<<" "
319 // <<pnBlackTrackEnergy+dtaBlackTrackEnergy<<endl;
320  return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*GeV;
321  }
float G4float
Definition: G4Types.hh:77
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:87
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
G4ReactionProductVector * G4Nucleus::Fragmentate ( )

Definition at line 424 of file G4Nucleus.cc.

425  {
426  // needs implementation!
427  return NULL;
428  }
G4int G4Nucleus::GetA_asInt ( void  ) const
inline

Definition at line 109 of file G4Nucleus.hh.

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4LENDModel::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4LEpp::ApplyYourself(), G4LENDFission::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4LEnp::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4LFission::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4CascadeInterface::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4RPGInelastic::CalculateMomenta(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4HadronicProcess::CheckResult(), G4CascadeInterface::createTarget(), G4ReactionDynamics::GenerateXandPt(), G4QuasiElasticChannel::GetFraction(), G4FTFModel::Init(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4HadronElasticProcess::PostStepDoIt(), G4HadronicProcess::PostStepDoIt(), G4RPGPionSuppression::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4RPGReaction::Rotate(), G4QuasiElasticChannel::Scatter(), G4VPartonStringModel::Scatter(), G4HadronicWhiteBoard::SetTargetNucleus(), G4ReactionDynamics::SuppressChargedPions(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

110  { return theA; }
G4double G4Nucleus::GetAnnihilationDTABlackTrackEnergy ( ) const
inline

Definition at line 159 of file G4Nucleus.hh.

Referenced by G4ReactionDynamics::GenerateXandPt(), G4RPGTwoCluster::ReactionStage(), G4RPGFragmentation::ReactionStage(), and G4ReactionDynamics::TwoCluster().

160  { return dtaBlackTrackEnergyfromAnnihilation; }
G4double G4Nucleus::GetAnnihilationPNBlackTrackEnergy ( ) const
inline

Definition at line 156 of file G4Nucleus.hh.

Referenced by G4ReactionDynamics::GenerateXandPt(), G4RPGTwoCluster::ReactionStage(), G4RPGFragmentation::ReactionStage(), and G4ReactionDynamics::TwoCluster().

157  { return pnBlackTrackEnergyfromAnnihilation; }
G4ReactionProduct G4Nucleus::GetBiasedThermalNucleus ( G4double  aMass,
G4ThreeVector  aVelocity,
G4double  temp = -1 
) const

Definition at line 108 of file G4Nucleus.cc.

References G4UniformRand, G4ReactionProduct::GetMass(), G4ReactionProduct::GetMomentum(), G4ParticleDefinition::GetPDGMass(), GetThermalNucleus(), python.hepunit::k_Boltzmann, CLHEP::Hep3Vector::mag(), and G4Neutron::Neutron().

Referenced by G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), and G4NeutronHPThermalBoost::GetThermalEnergy().

109 {
110  G4double velMag = aVelocity.mag();
111  G4ReactionProduct result;
112  G4double value = 0;
113  G4double random = 1;
114  G4double norm = 3.*std::sqrt(k_Boltzmann*temp*aMass*G4Neutron::Neutron()->GetPDGMass());
115  norm /= G4Neutron::Neutron()->GetPDGMass();
116  norm *= 5.;
117  norm += velMag;
118  norm /= velMag;
119  while(value/norm<random)
120  {
121  result = GetThermalNucleus(aMass, temp);
122  G4ThreeVector targetVelocity = 1./result.GetMass()*result.GetMomentum();
123  value = (targetVelocity+aVelocity).mag()/velMag;
124  random = G4UniformRand();
125  }
126  return result;
127 }
G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const
Definition: G4Nucleus.cc:130
#define G4UniformRand()
Definition: Randomize.hh:87
float k_Boltzmann
Definition: hepunit.py:299
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetPDGMass() const
G4ThreeVector GetMomentum() const
const XML_Char int const XML_Char * value
double G4double
Definition: G4Types.hh:76
double mag() const
G4double GetMass() const
G4double G4Nucleus::GetDTABlackTrackEnergy ( ) const
inline
G4double G4Nucleus::GetEnergyDeposit ( )
inline

Definition at line 184 of file G4Nucleus.hh.

Referenced by G4WilsonAbrasionModel::ApplyYourself().

184 {return excitationEnergy; }
G4ThreeVector G4Nucleus::GetFermiMomentum ( )

Definition at line 398 of file G4Nucleus.cc.

References G4UniformRand, python.hepunit::pi, and G4INCL::DeJongSpin::shoot().

Referenced by CexmcChargeExchangeProductionModel< OutputParticle >::ApplyYourself().

399  {
400  // chv: .. we assume zero temperature!
401 
402  // momentum is equally distributed in each phasespace volume dpx, dpy, dpz.
403  G4double ranflat1=
404  G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
405  G4double ranflat2=
406  G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
407  G4double ranflat3=
408  G4RandFlat::shoot((G4double)0.,(G4double)fermiMomentum);
409  G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
410  ranmax = (ranmax>ranflat3? ranmax : ranflat3);
411 
412  // Isotropic momentum distribution
413  G4double costheta = 2.*G4UniformRand() - 1.0;
414  G4double sintheta = std::sqrt(1.0 - costheta*costheta);
415  G4double phi = 2.0*pi*G4UniformRand();
416 
417  G4double pz=costheta*ranmax;
418  G4double px=sintheta*std::cos(phi)*ranmax;
419  G4double py=sintheta*std::sin(phi)*ranmax;
420  G4ThreeVector p(px,py,pz);
421  return p;
422  }
ThreeVector shoot(const G4int Ap, const G4int Af)
const char * p
Definition: xmltok.h:285
#define G4UniformRand()
Definition: Randomize.hh:87
double G4double
Definition: G4Types.hh:76
const G4Isotope* G4Nucleus::GetIsotope ( )
inline
G4int G4Nucleus::GetN_asInt ( ) const
inline
G4double G4Nucleus::GetPNBlackTrackEnergy ( ) const
inline
G4ReactionProduct G4Nucleus::GetThermalNucleus ( G4double  aMass,
G4double  temp = -1 
) const

Definition at line 130 of file G4Nucleus.cc.

References G4ReactionProduct::GetMass(), GetThermalPz(), G4Neutron::Neutron(), G4ReactionProduct::SetKineticEnergy(), G4ReactionProduct::SetMass(), G4ReactionProduct::SetMomentum(), G4ReactionProduct::SetTotalEnergy(), and theTarget.

Referenced by GetBiasedThermalNucleus(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPCaptureData::GetCrossSection(), and G4NeutronHPElasticData::GetCrossSection().

131 {
132  G4double currentTemp = temp;
133  if(currentTemp < 0) currentTemp = theTemp;
135  theTarget.SetMass(targetMass*G4Neutron::Neutron()->GetPDGMass());
136  G4double px, py, pz;
137  px = GetThermalPz(theTarget.GetMass(), currentTemp);
138  py = GetThermalPz(theTarget.GetMass(), currentTemp);
139  pz = GetThermalPz(theTarget.GetMass(), currentTemp);
140  theTarget.SetMomentum(px, py, pz);
141  G4double tMom = std::sqrt(px*px+py*py+pz*pz);
142  G4double tEtot = std::sqrt((tMom+theTarget.GetMass())*
143  (tMom+theTarget.GetMass())-
144  2.*tMom*theTarget.GetMass());
145  if(1-tEtot/theTarget.GetMass()>0.001)
146  {
147  theTarget.SetTotalEnergy(tEtot);
148  }
149  else
150  {
151  theTarget.SetKineticEnergy(tMom*tMom/(2.*theTarget.GetMass()));
152  }
153  return theTarget;
154 }
G4double GetThermalPz(const G4double mass, const G4double temp) const
Definition: G4Nucleus.cc:254
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetMass(const G4double mas)
void SetTotalEnergy(const G4double en)
G4ErrorTarget * theTarget
Definition: errprop.cc:59
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
double G4double
Definition: G4Types.hh:76
G4double GetMass() const
G4double G4Nucleus::GetThermalPz ( const G4double  mass,
const G4double  temp 
) const

Definition at line 254 of file G4Nucleus.cc.

References python.hepunit::k_Boltzmann, and G4INCL::DeJongSpin::shoot().

Referenced by GetThermalNucleus().

255  {
256  G4double result = G4RandGauss::shoot();
257  result *= std::sqrt(k_Boltzmann*temp*mass); // Das ist impuls (Pz),
258  // nichtrelativistische rechnung
259  // Maxwell verteilung angenommen
260  return result;
261  }
ThreeVector shoot(const G4int Ap, const G4int Af)
float k_Boltzmann
Definition: hepunit.py:299
double G4double
Definition: G4Types.hh:76
G4int G4Nucleus::GetZ_asInt ( void  ) const
inline

Definition at line 115 of file G4Nucleus.hh.

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4LightMedia::AntiLambdaExchange(), G4LightMedia::AntiNeutronExchange(), G4LightMedia::AntiOmegaMinusExchange(), G4LightMedia::AntiProtonExchange(), G4LightMedia::AntiSigmaMinusExchange(), G4LightMedia::AntiSigmaPlusExchange(), G4LightMedia::AntiXiMinusExchange(), G4LightMedia::AntiXiZeroExchange(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4LENDModel::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4LEpp::ApplyYourself(), G4LENDFission::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4LEnp::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4NeutronHPThermalScattering::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4LFission::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4HadronicProcess::CheckResult(), G4CascadeInterface::createTarget(), G4ReactionDynamics::GenerateXandPt(), G4QuasiElasticChannel::GetFraction(), G4FTFModel::Init(), G4LightMedia::KaonPlusExchange(), G4LightMedia::KaonZeroShortExchange(), G4LightMedia::LambdaExchange(), G4LightMedia::NeutronExchange(), G4LightMedia::OmegaMinusExchange(), G4LightMedia::PionPlusExchange(), G4HadronElasticProcess::PostStepDoIt(), G4HadronicProcess::PostStepDoIt(), G4LightMedia::ProtonExchange(), G4RPGPionSuppression::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4QuasiElasticChannel::Scatter(), G4VPartonStringModel::Scatter(), G4HadronicWhiteBoard::SetTargetNucleus(), G4LightMedia::SigmaMinusExchange(), G4LightMedia::SigmaPlusExchange(), G4ReactionDynamics::SuppressChargedPions(), G4ReactionDynamics::TwoBody(), G4ReactionDynamics::TwoCluster(), G4LightMedia::XiMinusExchange(), and G4LightMedia::XiZeroExchange().

116  { return theZ; }
G4bool G4Nucleus::operator!= ( const G4Nucleus right) const
inline

Definition at line 89 of file G4Nucleus.hh.

90  { return ( this != (G4Nucleus *) &right ); }
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  }
G4bool G4Nucleus::operator== ( const G4Nucleus right) const
inline

Definition at line 86 of file G4Nucleus.hh.

87  { return ( this == (G4Nucleus *) &right ); }
G4DynamicParticle * G4Nucleus::ReturnTargetParticle ( ) const

Definition at line 227 of file G4Nucleus.cc.

References G4UniformRand, G4Neutron::Neutron(), G4Proton::Proton(), and G4DynamicParticle::SetDefinition().

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

228  {
229  // choose a proton or a neutron as the target particle
230 
231  G4DynamicParticle *targetParticle = new G4DynamicParticle;
232  if( G4UniformRand() < zEff/aEff )
233  targetParticle->SetDefinition( G4Proton::Proton() );
234  else
235  targetParticle->SetDefinition( G4Neutron::Neutron() );
236  return targetParticle;
237  }
#define G4UniformRand()
Definition: Randomize.hh:87
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void G4Nucleus::SetIsotope ( const G4Isotope iso)
inline

Definition at line 122 of file G4Nucleus.hh.

References G4Isotope::GetN(), and G4Isotope::GetZ().

Referenced by G4CrossSectionDataStore::SampleZandA().

123  {
124  fIsotope = iso;
125  if(iso) {
126  theZ = iso->GetZ();
127  theA = iso->GetN();
128  aEff = theA;
129  zEff = theZ;
130  }
131  }
G4int GetN() const
Definition: G4Isotope.hh:94
G4int GetZ() const
Definition: G4Isotope.hh:91
void G4Nucleus::SetParameters ( const G4double  A,
const G4double  Z 
)

Definition at line 198 of file G4Nucleus.cc.

References G4lrint().

Referenced by G4NeutronHPCapture::ApplyYourself(), G4NeutronHPElastic::ApplyYourself(), G4NeutronHPFission::ApplyYourself(), G4NeutronHPInelastic::ApplyYourself(), G4Nucleus(), and G4ElementSelector::SelectZandA().

199 {
200  theZ = G4lrint(Z);
201  theA = G4lrint(A);
202  if (theA<1 || theZ<0 || theZ>theA) {
203  throw G4HadronicException(__FILE__, __LINE__,
204  "G4Nucleus::SetParameters called with non-physical parameters");
205  }
206  aEff = A; // atomic weight
207  zEff = Z; // atomic number
208  fIsotope = 0;
209 }
int G4lrint(double ad)
Definition: templates.hh:163
void G4Nucleus::SetParameters ( const G4int  A,
const G4int  Z 
)

Definition at line 212 of file G4Nucleus.cc.

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

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