Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
G4FissionFragmentGenerator Class Reference

#include <G4FissionFragmentGenerator.hh>

Public Member Functions

 G4FissionFragmentGenerator (void)
 
 G4FissionFragmentGenerator (G4int Verbosity)
 
G4DynamicParticleVectorG4GenerateFission (void)
 
G4DynamicParticleVectorG4GenerateFission (const G4HadProjectile &Projectile)
 
const std::vector
< G4DynamicParticleVector * > 
G4GenerateFission (G4long NumberOfFissions, const G4HadProjectile &Projectile)
 
G4IonsG4GenerateFissionProduct (void)
 
G4double G4GetAlphaProduction (void)
 
G4double G4GetTernaryProbability (void)
 
G4FFGEnumerations::FissionCause G4GetCause (void)
 
G4double G4GetIncidentEnergy (void)
 
G4int G4GetIsotope (void)
 
G4FFGEnumerations::MetaState G4GetMetaState (void)
 
G4FFGEnumerations::FissionSamplingScheme G4GetSamplingScheme (void)
 
G4FFGEnumerations::YieldType G4GetYieldType (void)
 
bool InitializeFissionProductYieldClass (std::istringstream &dataFile)
 
void G4SetAlphaProduction (G4double WhatAlphaProduction)
 
void G4SetTernaryProbability (G4double WhatTernaryProbability)
 
void G4SetCause (G4FFGEnumerations::FissionCause WhichCause)
 
void G4SetIncidentEnergy (G4double WhatIncidentEnergy)
 
void G4SetIsotope (G4int WhichIsotope)
 
void G4SetMetaState (G4FFGEnumerations::MetaState WhichMetaState)
 
void G4SetSamplingScheme (G4FFGEnumerations::FissionSamplingScheme NewScheme)
 
void G4SetYieldType (G4FFGEnumerations::YieldType WhichYieldType)
 
void G4SetVerbosity (G4int WhatVerbosity)
 
 ~G4FissionFragmentGenerator ()
 

Static Public Member Functions

static G4int G4MakeIsotopeCode (G4int Z, G4int A, G4int M)
 

Protected Member Functions

void Initialize (void)
 

Protected Attributes

G4int Isotope_
 
G4FFGEnumerations::MetaState MetaState_
 
G4FFGEnumerations::FissionCause Cause_
 
G4double IncidentEnergy_
 
G4FFGEnumerations::YieldType YieldType_
 
G4double TernaryProbability_
 
G4double AlphaProduction_
 
G4bool IsReconstructionNeeded_
 
G4int Verbosity_
 
G4FFGEnumerations::FissionSamplingScheme SamplingScheme_
 
G4FissionProductYieldDistYieldData_
 

Detailed Description

G4FissionFragmentGenerator is the front end class to be used by the user for handling all fission event generation.

This class is intended to be instantiated for one type of fission event for as specific isotope/isomer, fission type, and incident neutron energy. For this reason no functions exist to change or modify these values once the class in constructed. A new class must be created by the user for each type of fission event, if such functionality is desired.

Definition at line 54 of file G4FissionFragmentGenerator.hh.

Constructor & Destructor Documentation

G4FissionFragmentGenerator::G4FissionFragmentGenerator ( void  )

Default constructor

Definition at line 50 of file G4FissionFragmentGenerator.cc.

References Initialize(), and Verbosity_.

51 {
52  // Set the default verbosity
53  Verbosity_ = G4FFGDefaultValues::Verbosity;
54 
55  // Initialize the class
56  Initialize();
57 }
G4FissionFragmentGenerator::G4FissionFragmentGenerator ( G4int  Verbosity)

Overloaded constructor

  • Usage:
    • Verbosity: Verbosity level
  • Notes:
    • Refer to the documentation for the default constructor for setting up the operating parameters.

Definition at line 60 of file G4FissionFragmentGenerator.cc.

References Initialize(), and Verbosity_.

61 {
62  // Set the verbosity
64 
65  // Initialize the class
66  Initialize();
67 }
G4FissionFragmentGenerator::~G4FissionFragmentGenerator ( )

Default deconstructor

Definition at line 755 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and YieldData_.

756 {
758 
759  delete YieldData_;
760 
762 }
G4FissionProductYieldDist * YieldData_
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

Member Function Documentation

G4DynamicParticleVector * G4FissionFragmentGenerator::G4GenerateFission ( void  )

Generates a single fission event

  • Usage: No arguments required
  • Notes:
    • Generates a single fission event by calling the overloaded function and passing an argument of '1'

Definition at line 93 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and G4Neutron::Neutron().

94 {
96 
98  G4ThreeVector(0, 0, 0),
99  G4FFGDefaultValues::ThermalNeutronEnergy));
100 
101  // Call the overloaded function and generate 1 fission
102  std::vector< G4DynamicParticleVector* > FissionEvent = G4GenerateFission(1, Projectile);
103  G4DynamicParticleVector* Container = FissionEvent[0];
104 
106  return Container;
107 }
CLHEP::Hep3Vector G4ThreeVector
G4DynamicParticleVector * G4GenerateFission(void)
std::vector< G4DynamicParticle * > G4DynamicParticleVector
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4DynamicParticleVector * G4FissionFragmentGenerator::G4GenerateFission ( const G4HadProjectile Projectile)

Generates a single fission event

  • Usage: -Projectile: G4HadProjectile of the fission-inducing particle
  • Notes:
    • Generates a single fission event by calling the overloaded function and passing an argument of '1'

Definition at line 110 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and G4GenerateFission().

Referenced by G4GenerateFission().

111 {
113 
114  // Call the overloaded function and generate 1 fission
115  std::vector< G4DynamicParticleVector* > FissionEvent = G4GenerateFission(1, Projectile);
116  G4DynamicParticleVector* const Container = FissionEvent[0];
117 
119  return Container;
120 }
G4DynamicParticleVector * G4GenerateFission(void)
std::vector< G4DynamicParticle * > G4DynamicParticleVector
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
const std::vector< G4DynamicParticleVector * > G4FissionFragmentGenerator::G4GenerateFission ( G4long  NumberOfFissions,
const G4HadProjectile Projectile 
)

Generates NumberOfFissions fission events

  • Usage: -NumberOfFissions: The number of fission events to generate
  • Notes:
    • Generates NumberOfFissions fission events

Definition at line 123 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FissionProductYieldDist::G4GetFission(), G4HadProjectile::GetDefinition(), IsReconstructionNeeded_, G4Neutron::Neutron(), TRUE, and YieldData_.

125 {
127 
128 
129  //TK Modified 131107
130  //std::vector< G4DynamicParticleVector* > FissionEvents(NumberOfFissions);
131  std::vector< G4DynamicParticleVector* > FissionEvents(0);
132 
133  if(Projectile.GetDefinition() == G4Neutron::Neutron())
134  {
136  {
137  // TODO Eliminate potential need for restructuring during run phase
138  //InitializeFissionProductYieldClass();
139  }
140 
141  for(G4long i = 0; i < NumberOfFissions; i++)
142  {
143  FissionEvents.push_back(YieldData_->G4GetFission());
144  // FIXME Use particle momentum in balance equation
145  // FissionEvents.push_back(YieldData_->G4GetFission(Projectile.Get4Momentum()));
146  }
147  } else
148  {
149  FissionEvents.push_back(NULL);
150  }
151 
153  return FissionEvents;
154 }
long G4long
Definition: G4Types.hh:80
G4DynamicParticleVector * G4GetFission(void)
G4FissionProductYieldDist * YieldData_
const G4ParticleDefinition * GetDefinition() const
#define TRUE
Definition: globals.hh:55
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4Ions * G4FissionFragmentGenerator::G4GenerateFissionProduct ( void  )

Returns a randomly sampled fission product

Definition at line 157 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FissionProductYieldDist::G4GetFissionProduct(), IsReconstructionNeeded_, TRUE, and YieldData_.

158 {
160 
162  {
163  // TODO Eliminate potential need for restructuring during run phase
164  //InitializeFissionProductYieldClass();
165  }
166 
167  G4Ions* Product = YieldData_->G4GetFissionProduct();
168 
170  return Product;
171 }
G4FissionProductYieldDist * YieldData_
Definition: G4Ions.hh:51
#define TRUE
Definition: globals.hh:55
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4double G4FissionFragmentGenerator::G4GetAlphaProduction ( void  )

Returns the production rate of alpha particles for fission events

Definition at line 174 of file G4FissionFragmentGenerator.cc.

References AlphaProduction_, G4FFG_FUNCTIONENTER__, and G4FFG_FUNCTIONLEAVE__.

175 {
177 
179  return AlphaProduction_;
180 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause G4FissionFragmentGenerator::G4GetCause ( void  )

Returns the FissionCause of the fission event.

Definition at line 192 of file G4FissionFragmentGenerator.cc.

References Cause_, G4FFG_FUNCTIONENTER__, and G4FFG_FUNCTIONLEAVE__.

193 {
195 
197  return Cause_;
198 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause Cause_
G4double G4FissionFragmentGenerator::G4GetIncidentEnergy ( void  )

Returns the energy of the fission inducing particle.

Definition at line 201 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and IncidentEnergy_.

202 {
204 
206  return IncidentEnergy_;
207 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4int G4FissionFragmentGenerator::G4GetIsotope ( void  )

Returns the code of the fission isotope in ZZZAAA format.

Definition at line 210 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and Isotope_.

211 {
213 
215  return Isotope_;
216 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::MetaState G4FissionFragmentGenerator::G4GetMetaState ( void  )

Returns the MetaState of the fission isotope.

Definition at line 219 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and MetaState_.

220 {
222 
224  return MetaState_;
225 }
G4FFGEnumerations::MetaState MetaState_
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionSamplingScheme G4FissionFragmentGenerator::G4GetSamplingScheme ( void  )

Returns the FissionSamplingScheme that is currently in use.

Definition at line 228 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and SamplingScheme_.

229 {
231 
233  return SamplingScheme_;
234 }
G4FFGEnumerations::FissionSamplingScheme SamplingScheme_
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4double G4FissionFragmentGenerator::G4GetTernaryProbability ( void  )

Returns the probability of ternary fission

Definition at line 183 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and TernaryProbability_.

184 {
186 
188  return TernaryProbability_;
189 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::YieldType G4FissionFragmentGenerator::G4GetYieldType ( void  )

Returns the yield type that is currently in use

Definition at line 237 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, and YieldType_.

238 {
240 
242  return YieldType_;
243 }
G4FFGEnumerations::YieldType YieldType_
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4int G4FissionFragmentGenerator::G4MakeIsotopeCode ( G4int  Z,
G4int  A,
G4int  M 
)
static

Converts the Z, A and M of an isotope into an integer representation

Definition at line 246 of file G4FissionFragmentGenerator.cc.

Referenced by G4WendtFissionFragmentGenerator::ApplyYourself(), and G4WendtFissionFragmentGenerator::InitializeANucleus().

247 {
248  // Sanity check;
249  A %= 1000;
250  Z %= 1000;
251  M %= 10;
252 
253  return (A + Z * 1000) * 10 + M;
254 }
void G4FissionFragmentGenerator::G4SetAlphaProduction ( G4double  WhatAlphaProduction)

Sets the number of alpha particles produced in fission.

  • Usage:
    • if AlphaProduction is negative then alpha particles are sampled on a Gaussian with a mean of abs(AlphaProduction).
  • Notes:
    • The maximum number of alpha particles that may be created is physically limited by the nucleons present in the parent nucleus. Setting the AlphaProduction too high will have unpredictable results on the sampling of the fission products.

Definition at line 257 of file G4FissionFragmentGenerator.cc.

References AlphaProduction_, G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FissionProductYieldDist::G4SetAlphaProduction(), G4FFGEnumerations::UPDATES, Verbosity_, and YieldData_.

258 {
260 
261  AlphaProduction_ = WhatAlphaProduction;
262  if(YieldData_ != NULL)
263  {
264  YieldData_->G4SetAlphaProduction(AlphaProduction_);
265  }
266 
268  {
271 
272  G4cout << " -- Alpha production set to " << AlphaProduction_ << G4endl;
273  }
274 
276 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
void G4SetAlphaProduction(G4double WhatAlphaProduction)
G4GLOB_DLL std::ostream G4cout
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetCause ( G4FFGEnumerations::FissionCause  WhichCause)

Sets the cause of fission event.

  • Usage:
    • WhichCause: SPONTANEOUS, N_INDUCED, P_INDUCED, or G_INDUCED
  • Notes:

Definition at line 301 of file G4FissionFragmentGenerator.cc.

References Cause_, G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FFGEnumerations::GAMMA_INDUCED, IncidentEnergy_, IsReconstructionNeeded_, G4FFGEnumerations::NEUTRON_INDUCED, G4FFGEnumerations::PROTON_INDUCED, G4FFGEnumerations::SILENT, G4FFGEnumerations::SPONTANEOUS, TRUE, G4FFGEnumerations::UPDATES, Verbosity_, G4FFGEnumerations::WARNING, and YieldData_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

302 {
304 
305  G4bool IsValidCause = (WhichCause == G4FFGEnumerations::SPONTANEOUS
306  || WhichCause == G4FFGEnumerations::NEUTRON_INDUCED );
307  G4bool IsSameCause = (Cause_ == WhichCause);
308 
309  if(!IsSameCause && IsValidCause)
310  {
311  Cause_ = WhichCause;
313  {
314  IncidentEnergy_ = 0;
315  }
317  }
318 
320  {
321  G4String CauseString;
322  switch(WhichCause)
323  {
325  CauseString = "SPONTANEOUS";
326  break;
328  CauseString = "NEUTRON_INDUCED";
329  break;
331  CauseString = "PROTON_INDUCED";
332  break;
334  CauseString = "GAMMA_INDUCED";
335  break;
336  }
337 
339  {
342 
343  if(IsValidCause)
344  {
345  if(IsSameCause && YieldData_ != NULL)
346  {
347  G4cout << " -- Already set to use " << CauseString << " as the fission cause. Yield data class will not be reconstructed." << G4endl;
348  } else if(YieldData_ == NULL)
349  {
350  G4cout << " -- Yield data class not yet constructed. " << CauseString << " will be applied when it is constructed." << G4endl;
351  }
352  } else
353  {
354  G4cout << " -- Invalid cause of fission" << G4endl;
355  }
356  }
357 
359  && IsValidCause)
360  {
363 
364  G4cout << " -- Fission cause set to " << CauseString << "." << G4endl;
365  }
366  }
367 
369 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause Cause_
void G4FissionFragmentGenerator::G4SetIncidentEnergy ( G4double  WhatIncidentEnergy)

Sets the incident energy, if any, of the particle that cause fission.

  • Usage:
    • WhatIncidentEnergy: Kinetic energy of the particle with units applied;
  • Notes:

Definition at line 372 of file G4FissionFragmentGenerator.cc.

References Cause_, G4FFGEnumerations::ENERGY_INFO, python.hepunit::eV, G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FissionProductYieldDist::G4SetEnergy(), python.hepunit::GeV, IncidentEnergy_, python.hepunit::keV, python.hepunit::MeV, G4FFGEnumerations::SILENT, G4FFGEnumerations::SPONTANEOUS, G4FFGEnumerations::UPDATES, Verbosity_, G4FFGEnumerations::WARNING, and YieldData_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

373 {
375 
377  {
378  IncidentEnergy_ = WhatIncidentEnergy;
379  if(YieldData_ != NULL)
380  {
382  }
383  }
384 
386  {
387  std::ostringstream EnergyString;
388  if(IncidentEnergy_ / GeV > 1)
389  {
390  EnergyString << IncidentEnergy_ / GeV << " GeV";
391  } else if(IncidentEnergy_ / MeV > 1)
392  {
393  EnergyString << IncidentEnergy_ / MeV << " MeV";
394  } else if(IncidentEnergy_ / keV > 1)
395  {
396  EnergyString << IncidentEnergy_ / keV << " keV";
397  } else
398  {
399  EnergyString << IncidentEnergy_ / eV << " eV";
400  }
401 
404  {
406  {
409 
410  G4cout << " -- Cannot set a non-zero energy for spontaneous fission" << G4endl;
411  } else if(YieldData_ == NULL)
412  {
415 
416  G4cout << " -- Yield data class not yet constructed. " << EnergyString.str() << " will be applied when it is constructed." << G4endl;
417 
418  }
419  }
420 
423  {
426 
427  G4cout << " -- Incident neutron energy set to " << EnergyString.str() << "." << G4endl;
428  }
429  }
430 
432 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
void G4SetEnergy(G4double WhatIncidentEnergy)
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause Cause_
void G4FissionFragmentGenerator::G4SetIsotope ( G4int  WhichIsotope)

Sets the fission isotope

  • Usage:
    • WhichIsotope: Code of the isotope in ZZZAAA format
  • Notes:

Definition at line 435 of file G4FissionFragmentGenerator.cc.

References G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, Isotope_, IsReconstructionNeeded_, G4FFGEnumerations::SILENT, TRUE, G4FFGEnumerations::UPDATES, Verbosity_, G4FFGEnumerations::WARNING, and YieldData_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

436 {
438 
439  G4bool IsSameIsotope = (Isotope_ == WhichIsotope);
440 
441  if(!IsSameIsotope)
442  {
443  Isotope_ = WhichIsotope;
445  }
446 
448  {
450  {
451  if(IsSameIsotope && YieldData_ != NULL)
452  {
455 
456  G4cout << " -- Isotope " << Isotope_ << " already in use. Yield data class will not be reconstructed." << G4endl;
457  } else if(YieldData_ == NULL)
458  {
461 
462  G4cout << " -- Yield data class not yet constructed. The isotope will be set to " << Isotope_ << " when it is constructed." << G4endl;
463  }
464  }
465 
467  {
470 
471  G4cout << " -- Isotope set to " << Isotope_ << "." << G4endl;
472  }
473  }
474 
476 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetMetaState ( G4FFGEnumerations::MetaState  WhichMetaState)

Sets the metastable state of the fission isotope.

  • Usage:
    • WhichMetaState: GROUND_STATE, META_1, or META_2
  • Notes:

Definition at line 479 of file G4FissionFragmentGenerator.cc.

References G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FFGEnumerations::GROUND_STATE, IsReconstructionNeeded_, G4FFGEnumerations::META_1, G4FFGEnumerations::META_2, MetaState_, G4FFGEnumerations::SILENT, TRUE, G4FFGEnumerations::UPDATES, Verbosity_, G4FFGEnumerations::WARNING, and YieldData_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

480 {
482 
483  G4bool IsValidMetaState = (WhichMetaState >= G4FFGEnumerations::MetaStateFirst
484  && WhichMetaState <= G4FFGEnumerations::MetaStateLast);
485  G4bool IsSameMetaState = (MetaState_ == WhichMetaState);
486 
487  if(!IsSameMetaState && IsValidMetaState)
488  {
489  MetaState_ = WhichMetaState;
491  }
492 
494  {
495  G4String MetaName;
496  switch(MetaState_)
497  {
499  MetaName = "GROUND_STATE";
500  break;
501 
503  MetaName = "META_1";
504  break;
505 
507  MetaName = "META_2";
508  break;
509  }
510 
512  {
515 
516  std::ostringstream Temp;
517  if(IsValidMetaState)
518  {
519  if(IsSameMetaState && YieldData_ != NULL)
520  {
521  G4cout << " -- Already set to use " << MetaName << " as the metastable state. Yield data class will not be reconstructed" << G4endl;
522  } else if(YieldData_ == NULL)
523  {
524  G4cout << " -- Yield data class not yet constructed. " << MetaName << " will be applied when it is constructed." << G4endl;
525  }
526  } else
527  {
528  G4cout << " -- Invalid metastable state." << G4endl;
529  }
530  }
531 
533  && IsValidMetaState)
534  {
537 
538  G4cout << " -- Metastable state set to " << MetaName << "." << G4endl;
539  }
540  }
541 
543 }
G4FFGEnumerations::MetaState MetaState_
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetSamplingScheme ( G4FFGEnumerations::FissionSamplingScheme  NewScheme)

Set the sampling scheme.

  • Usage:
    • NewScheme: The G4FissionSamplingScheme value for the sampling scheme to use.
  • Notes:
    • NORMAL: Sets the parameters of this class to sample fission events without any biasing.
    • LIGHT_FRAGMENT: Sets the parameters of this class to bias the fragment generation by always selecting a light fragment (A < 115) first.
    • WENDT: Sets the parameters of this class to sample fission events according to the Wendt sampling scheme. Please refer to the code documentation for G4FPYWendtSamplingDist for a more detailed explanation.

Definition at line 546 of file G4FissionFragmentGenerator.cc.

References G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FFGEnumerations::LIGHT_FRAGMENT, G4FFGEnumerations::NORMAL, G4FFGEnumerations::SILENT, TRUE, G4FFGEnumerations::UPDATES, and G4FFGEnumerations::WARNING.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

547 {
549 
550  G4bool IsValidScheme = (NewScheme >= G4FFGEnumerations::FissionSamplingSchemeFirst
551  && NewScheme <= G4FFGEnumerations::FissionSamplingSchemeLast);
552  G4bool IsSameScheme = (NewScheme == SamplingScheme_);
553 
554  if(!IsSameScheme && IsValidScheme)
555  {
556  SamplingScheme_ = NewScheme;
558  }
559 
561  {
562  G4String SchemeString;
563  switch(SamplingScheme_)
564  {
566  SchemeString = "NORMAL";
567  break;
568 
570  SchemeString = "LIGHT_FRAGMENT";
571  break;
572 
573  default:
574  SchemeString = "UNSUPPORTED";
575  break;
576  }
577 
579  {
582 
583  if(IsValidScheme)
584  {
585  if(IsSameScheme && YieldData_ != NULL)
586  {
587  G4cout << " -- Already set to use " << SchemeString << " as the sampling scheme. Yield data class will not be reconstructed." << G4endl;
588  } else if(YieldData_ == NULL)
589  {
590  G4cout << " -- Yield data class not yet constructed. " << SchemeString << " will be applied when it is constructed." << G4endl;
591  }
592  } else
593  {
594  G4cout << " -- Invalid sampling scheme." << G4endl;
595  }
596  }
597 
599  && IsValidScheme)
600  {
603 
604  G4cout << " -- Sampling scheme set to " << SchemeString << "." << G4endl;
605  }
606  }
607 
609 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
G4FFGEnumerations::FissionSamplingScheme SamplingScheme_
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetTernaryProbability ( G4double  WhatTernaryProbability)

Sets the probability of ternary fission

  • Usage:
    • WhatAlphaProductionProbability: Probability of generating alpha particles for a fission event. 1 = 100% chance of alpha production
  • Notes:

Definition at line 279 of file G4FissionFragmentGenerator.cc.

References G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FissionProductYieldDist::G4SetTernaryProbability(), TernaryProbability_, G4FFGEnumerations::UPDATES, Verbosity_, and YieldData_.

280 {
282 
283  TernaryProbability_ = WhatTernaryProbability;
284  if(YieldData_ != NULL)
285  {
286  YieldData_->G4SetTernaryProbability(TernaryProbability_);
287  }
288 
290  {
293 
294  G4cout << " -- Ternary fission probability set to " << TernaryProbability_ << G4endl;
295  }
296 
298 }
void G4SetTernaryProbability(G4double TernaryProbability)
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetVerbosity ( G4int  WhatVerbosity)

Sets the verbosity levels

  • Usage:
    • WhichVerbosity: Combination of levels
  • Notes:
    • SILENT: All verbose output is repressed
    • UPDATES: Only high-level internal changes are reported
    • DAUGHTER_INFO: Displays information about daughter product sampling
    • NEUTRON_INFO: Displays information about neutron sampling
    • GAMMA_INFO: Displays information about gamma sampling
    • ALPHA_INFO: Displays information about alpha sampling
    • MOMENTUM_INFO: Displays information about momentum balancing
    • EXTRAPOLATION_INTERPOLATION_INFO: Displays information about any data extrapolation or interpolation that occurs
    • DEBUG: Reports program flow as it steps through functions
    • PRINT_ALL: Displays any and all output

Definition at line 678 of file G4FissionFragmentGenerator.cc.

References G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FissionProductYieldDist::G4SetVerbosity(), Verbosity_, and YieldData_.

679 {
681 
683 
684  if(YieldData_ != NULL)
685  {
686  YieldData_->G4SetVerbosity(Verbosity_);
687  }
688 
690 }
G4FissionProductYieldDist * YieldData_
void G4SetVerbosity(G4int WhatVerbosity)
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::G4SetYieldType ( G4FFGEnumerations::YieldType  WhichYieldType)

Sets the ENDF yield type to be used for the data

  • Usage:
    • WhichYieldType: INDEPENDENT or COMULATIVE
  • Notes:

Definition at line 612 of file G4FissionFragmentGenerator.cc.

References G4FFGEnumerations::CUMULATIVE, G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FFGEnumerations::INDEPENDENT, IsReconstructionNeeded_, G4FFGEnumerations::SILENT, G4FFGEnumerations::SPONTANEOUS, TRUE, G4FFGEnumerations::UPDATES, Verbosity_, G4FFGEnumerations::WARNING, YieldData_, and YieldType_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

613 {
615 
616  G4bool IsValidYieldType = (WhichYieldType == G4FFGEnumerations::INDEPENDENT
617  ||WhichYieldType == G4FFGEnumerations::CUMULATIVE);
618  G4bool IsSameYieldType = (YieldType_ == WhichYieldType);
619 
620  if(!IsSameYieldType && IsValidYieldType)
621  {
622  YieldType_ = WhichYieldType;
624  }
625 
627  {
628  G4String YieldString;
629  switch((int)YieldType_)
630  {
632  YieldString = "INDEPENDENT";
633  break;
634 
636  YieldString = "SPONTANEOUS";
637  break;
638 
639  default:
640  YieldString = "UNSUPPORTED";
641  break;
642  }
643 
645  {
648 
649  if(IsValidYieldType)
650  {
651 
652  if(IsSameYieldType && YieldData_ != NULL)
653  {
654  } else if(YieldData_ == NULL)
655  {
656  G4cout << " -- Yield data class not yet constructed. Yield type " << YieldString << " will be applied when it is constructed." << G4endl;
657  }
658  } else
659  {
660  G4cout << " -- Invalid yield type." << G4endl;
661  }
662  }
663 
665  && IsValidYieldType)
666  {
669 
670  G4cout << " -- Yield type set to " << YieldString << G4endl;
671  }
672  }
673 
675 }
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
G4FFGEnumerations::YieldType YieldType_
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
void G4FissionFragmentGenerator::Initialize ( void  )
protected

Initialize is a common function called by all constructors.

Definition at line 70 of file G4FissionFragmentGenerator.cc.

References AlphaProduction_, Cause_, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, IncidentEnergy_, Isotope_, IsReconstructionNeeded_, MetaState_, SamplingScheme_, TernaryProbability_, TRUE, YieldData_, and YieldType_.

Referenced by G4FissionFragmentGenerator().

71 {
73 
74  // Initialize the class descriptor variables to the default values. These
75  // will be used unless the user redefines them.
76  Isotope_ = G4FFGDefaultValues::Isotope;
77  MetaState_ = G4FFGDefaultValues::MetaState;
78  Cause_ = G4FFGDefaultValues::FissionCause;
79  IncidentEnergy_ = G4FFGDefaultValues::ThermalNeutronEnergy;
80  YieldType_ = G4FFGDefaultValues::YieldType;
81  TernaryProbability_ = G4FFGDefaultValues::TernaryProbability;
82  AlphaProduction_ = G4FFGDefaultValues::AlphaProduction;
83  SamplingScheme_ = G4FFGDefaultValues::SamplingScheme;
84 
85  // No data class has been created yet
86  YieldData_ = NULL;
88 
90 }
G4FFGEnumerations::MetaState MetaState_
G4FissionProductYieldDist * YieldData_
#define TRUE
Definition: globals.hh:55
G4FFGEnumerations::YieldType YieldType_
G4FFGEnumerations::FissionSamplingScheme SamplingScheme_
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause Cause_
bool G4FissionFragmentGenerator::InitializeFissionProductYieldClass ( std::istringstream &  dataFile)

Initializes a new G4FPY...Dist class based on the class descriptor variables of G4FissionFragmentGenerator.

Definition at line 693 of file G4FissionFragmentGenerator.cc.

References AlphaProduction_, Cause_, FALSE, G4cout, G4endl, G4FFG_FUNCTIONENTER__, G4FFG_FUNCTIONLEAVE__, G4FFG_LOCATION__, G4FFG_SPACING__, G4FissionProductYieldDist::G4SetAlphaProduction(), G4FissionProductYieldDist::G4SetTernaryProbability(), Isotope_, IsReconstructionNeeded_, MetaState_, G4FFGEnumerations::NORMAL, SamplingScheme_, TernaryProbability_, G4FFGEnumerations::UPDATES, Verbosity_, YieldData_, and YieldType_.

Referenced by G4WendtFissionFragmentGenerator::InitializeANucleus().

694 {
696 
697  if(YieldData_ != NULL)
698  {
699  delete YieldData_;
700 
702  {
705 
706  G4cout << " -- Old yield data class deleted." << G4endl;
707  }
708  }
709 
710  try
711  {
713  {
715  MetaState_,
716  Cause_,
717  YieldType_,
718  Verbosity_,
719  dataStream);
720  } else
721  {
723  MetaState_,
724  Cause_,
725  YieldType_,
726  Verbosity_,
727  dataStream);
728  }
729 
730  if(AlphaProduction_ != 0 && TernaryProbability_ != 0)
731  {
734  }
735 
737  {
740 
741  G4cout << " -- Yield data class constructed with defined values." << G4endl;
742  }
743  } catch (std::exception& e)
744  {
745  YieldData_ = NULL;
746  }
747 
749 
751  return YieldData_;
752 }
G4FFGEnumerations::MetaState MetaState_
void G4SetTernaryProbability(G4double TernaryProbability)
#define G4FFG_LOCATION__
G4FissionProductYieldDist * YieldData_
void G4SetAlphaProduction(G4double WhatAlphaProduction)
G4GLOB_DLL std::ostream G4cout
#define FALSE
Definition: globals.hh:52
G4FFGEnumerations::YieldType YieldType_
G4FFGEnumerations::FissionSamplingScheme SamplingScheme_
#define G4FFG_FUNCTIONLEAVE__
#define G4endl
Definition: G4ios.hh:61
#define G4FFG_SPACING__
#define G4FFG_FUNCTIONENTER__
G4FFGEnumerations::FissionCause Cause_

Field Documentation

G4double G4FissionFragmentGenerator::AlphaProduction_
protected

Controls whether alpha particles are emitted, and how many

Definition at line 261 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetAlphaProduction(), G4SetAlphaProduction(), Initialize(), and InitializeFissionProductYieldClass().

G4FFGEnumerations::FissionCause G4FissionFragmentGenerator::Cause_
protected

The cause of fission: SPONTANEOUS or N_INDUCED.

Definition at line 253 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetCause(), G4SetCause(), G4SetIncidentEnergy(), Initialize(), and InitializeFissionProductYieldClass().

G4double G4FissionFragmentGenerator::IncidentEnergy_
protected

Kinetic energy, if any, of the incident particle in GeV.

Definition at line 255 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetIncidentEnergy(), G4SetCause(), G4SetIncidentEnergy(), and Initialize().

G4int G4FissionFragmentGenerator::Isotope_
protected

Number in ZZZAAA format of the isotope that G4FissionFragmentGenerator references

Definition at line 246 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetIsotope(), G4SetIsotope(), Initialize(), and InitializeFissionProductYieldClass().

G4bool G4FissionFragmentGenerator::IsReconstructionNeeded_
protected

If Isotope_, MetaState_, Cause_, or IncidentEnergy_ are changed in the middle of a run then the class pointed at by YieldData_ will need to be reconstructed

Definition at line 266 of file G4FissionFragmentGenerator.hh.

Referenced by G4GenerateFission(), G4GenerateFissionProduct(), G4SetCause(), G4SetIsotope(), G4SetMetaState(), G4SetYieldType(), Initialize(), and InitializeFissionProductYieldClass().

G4FFGEnumerations::MetaState G4FissionFragmentGenerator::MetaState_
protected

MetaState information of the isotope that G4FissionFragmentGenerator references
A value of 0 refers to the ground state

Definition at line 251 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetMetaState(), G4SetMetaState(), Initialize(), and InitializeFissionProductYieldClass().

G4FFGEnumerations::FissionSamplingScheme G4FissionFragmentGenerator::SamplingScheme_
protected

The sampling scheme that is used: NORMAL, LIGHT_FRAGMENT, or WENDT.

Definition at line 274 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetSamplingScheme(), Initialize(), and InitializeFissionProductYieldClass().

G4double G4FissionFragmentGenerator::TernaryProbability_
protected

Sets the ternary fission probability. Valid ranges are [0, 1]

Definition at line 259 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetTernaryProbability(), G4SetTernaryProbability(), Initialize(), and InitializeFissionProductYieldClass().

G4int G4FissionFragmentGenerator::Verbosity_
protected
G4FissionProductYieldDist* G4FissionFragmentGenerator::YieldData_
protected
G4FFGEnumerations::YieldType G4FissionFragmentGenerator::YieldType_
protected

The type of yield to be used: INDEPENDET or CUMULATIVE

Definition at line 257 of file G4FissionFragmentGenerator.hh.

Referenced by G4GetYieldType(), G4SetYieldType(), Initialize(), and InitializeFissionProductYieldClass().


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