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

#include <G4LFission.hh>

Inheritance diagram for G4LFission:
G4HadronicInteraction

Public Member Functions

 G4LFission (const G4String &name="G4LFission")
 
 ~G4LFission ()
 
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual const std::pair
< G4double, G4double
GetFatalEnergyCheckLevels () const
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
const G4HadronicInteractionGetMyPointer () const
 
virtual G4int GetVerboseLevel () const
 
virtual void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) const
 
virtual std::pair< G4double,
G4double
GetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 

Static Public Member Functions

static G4double Atomas (const G4double A, const G4double Z)
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 65 of file G4LFission.hh.

Constructor & Destructor Documentation

G4LFission::G4LFission ( const G4String name = "G4LFission")

Definition at line 50 of file G4LFission.cc.

References DBL_MAX, python.hepunit::GeV, G4HadronicInteraction::SetMaxEnergy(), and G4HadronicInteraction::SetMinEnergy().

51  : G4HadronicInteraction(name)
52 {
53  init();
54  SetMinEnergy(0.0*GeV);
56 }
void SetMinEnergy(G4double anEnergy)
G4HadronicInteraction(const G4String &modelName="HadronicModel")
void SetMaxEnergy(const G4double anEnergy)
#define DBL_MAX
Definition: templates.hh:83
G4LFission::~G4LFission ( )

Definition at line 59 of file G4LFission.cc.

References G4HadFinalState::Clear(), and G4HadronicInteraction::theParticleChange.

60 {
62 }

Member Function Documentation

G4HadFinalState * G4LFission::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)
virtual

Implements G4HadronicInteraction.

Definition at line 94 of file G4LFission.cc.

References test::a, G4HadFinalState::AddSecondary(), Atomas(), G4HadFinalState::Clear(), G4cout, G4endl, G4UniformRand, G4Gamma::GammaDefinition(), G4HadProjectile::Get4Momentum(), G4Nucleus::GetA_asInt(), G4HadProjectile::GetDefinition(), G4DynamicParticle::GetDefinition(), G4HadProjectile::GetKineticEnergy(), G4HadSecondary::GetParticle(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), G4HadFinalState::GetSecondary(), G4HadProjectile::GetTotalEnergy(), G4DynamicParticle::GetTotalEnergy(), G4HadProjectile::GetTotalMomentum(), G4DynamicParticle::GetTotalMomentum(), G4Nucleus::GetZ_asInt(), python.hepunit::MeV, N, G4Neutron::NeutronDefinition(), G4InuclParticleNames::nn, G4InuclParticleNames::pp, G4DynamicParticle::SetKineticEnergy(), G4DynamicParticle::SetMomentumDirection(), G4HadFinalState::SetStatusChange(), G4INCL::DeJongSpin::shoot(), stopAndKill, G4HadronicInteraction::theParticleChange, python.hepunit::twopi, CLHEP::HepLorentzVector::vect(), G4HadronicInteraction::verboseLevel, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

96 {
98  const G4HadProjectile* aParticle = &aTrack;
99 
100  G4double N = targetNucleus.GetA_asInt();
101  G4double Z = targetNucleus.GetZ_asInt();
103 
104  G4double P = aParticle->GetTotalMomentum()/MeV;
105  G4double Px = aParticle->Get4Momentum().vect().x();
106  G4double Py = aParticle->Get4Momentum().vect().y();
107  G4double Pz = aParticle->Get4Momentum().vect().z();
108  G4double E = aParticle->GetTotalEnergy()/MeV;
109  G4double E0 = aParticle->GetDefinition()->GetPDGMass()/MeV;
110  G4double Q = aParticle->GetDefinition()->GetPDGCharge();
111  if (verboseLevel > 1) {
112  G4cout << "G4LFission:ApplyYourself: incident particle:" << G4endl;
113  G4cout << "P " << P << " MeV/c" << G4endl;
114  G4cout << "Px " << Px << " MeV/c" << G4endl;
115  G4cout << "Py " << Py << " MeV/c" << G4endl;
116  G4cout << "Pz " << Pz << " MeV/c" << G4endl;
117  G4cout << "E " << E << " MeV" << G4endl;
118  G4cout << "mass " << E0 << " MeV" << G4endl;
119  G4cout << "charge " << Q << G4endl;
120  }
121  // GHEISHA ADD operation to get total energy, mass, charge:
122  if (verboseLevel > 1) {
123  G4cout << "G4LFission:ApplyYourself: material:" << G4endl;
124  G4cout << "A " << N << G4endl;
125  G4cout << "Z " << Z << G4endl;
126  G4cout << "atomic mass " <<
127  Atomas(N, Z) << "MeV" << G4endl;
128  }
129  E = E + Atomas(N, Z);
130  G4double E02 = E*E - P*P;
131  E0 = std::sqrt(std::abs(E02));
132  if (E02 < 0) E0 = -E0;
133  Q = Q + Z;
134  if (verboseLevel > 1) {
135  G4cout << "G4LFission:ApplyYourself: total:" << G4endl;
136  G4cout << "E " << E << " MeV" << G4endl;
137  G4cout << "mass " << E0 << " MeV" << G4endl;
138  G4cout << "charge " << Q << G4endl;
139  }
140  Px = -Px;
141  Py = -Py;
142  Pz = -Pz;
143 
144  G4double e1 = aParticle->GetKineticEnergy()/MeV;
145  if (e1 < 1.) e1 = 1.;
146 
147 // Average number of neutrons
148  G4double avern = 2.569 + 0.559*std::log(e1);
149  G4bool photofission = 0; // For now
150 // Take the following value if photofission is not included
151  if (!photofission) avern = 2.569 + 0.900*std::log(e1);
152 
153 // Average number of gammas
154  G4double averg = 9.500 + 0.600*std::log(e1);
155 
157 // Number of neutrons
158  G4int nn = static_cast<G4int>(avern + ran*1.23 + 0.5);
159  ran = G4RandGauss::shoot();
160 // Number of gammas
161  G4int ng = static_cast<G4int>(averg + ran*3. + 0.5);
162  if (nn < 1) nn = 1;
163  if (ng < 1) ng = 1;
164  G4double exn = 0.;
165  G4double exg = 0.;
166 
167 // Make secondary neutrons and distribute kinetic energy
168  G4DynamicParticle* aNeutron;
169  G4int i;
170  for (i = 1; i <= nn; i++) {
171  ran = G4UniformRand();
172  G4int j;
173  for (j = 1; j <= 10; j++) {
174  if (ran < spneut[j-1]) goto label12;
175  }
176  j = 10;
177  label12:
178  ran = G4UniformRand();
179  G4double ekin = (j - 1)*1. + ran;
180  exn = exn + ekin;
182  G4ParticleMomentum(1.,0.,0.),
183  ekin*MeV);
185  }
186 
187 // Make secondary gammas and distribute kinetic energy
188  G4DynamicParticle* aGamma;
189  for (i = 1; i <= ng; i++) {
190  ran = G4UniformRand();
191  G4double ekin = -0.87*std::log(ran);
192  exg = exg + ekin;
194  G4ParticleMomentum(1.,0.,0.),
195  ekin*MeV);
197  }
198 
199 // Distribute momentum vectors and do Lorentz transformation
200 
201  G4HadSecondary* theSecondary;
202 
203  for (i = 1; i <= nn + ng; i++) {
204  G4double ran1 = G4UniformRand();
205  G4double ran2 = G4UniformRand();
206  G4double cost = -1. + 2.*ran1;
207  G4double sint = std::sqrt(std::abs(1. - cost*cost));
208  G4double phi = ran2*twopi;
209  // G4cout << ran1 << " " << ran2 << G4endl;
210  // G4cout << cost << " " << sint << " " << phi << G4endl;
211  theSecondary = theParticleChange.GetSecondary(i - 1);
212  G4double pp = theSecondary->GetParticle()->GetTotalMomentum()/MeV;
213  G4double px = pp*sint*std::sin(phi);
214  G4double py = pp*sint*std::cos(phi);
215  G4double pz = pp*cost;
216  // G4cout << pp << G4endl;
217  // G4cout << px << " " << py << " " << pz << G4endl;
218  G4double e = theSecondary->GetParticle()->GetTotalEnergy()/MeV;
219  G4double e0 = theSecondary->GetParticle()->GetDefinition()->GetPDGMass()/MeV;
220 
221  G4double a = px*Px + py*Py + pz*Pz;
222  a = (a/(E + E0) - e)/E0;
223 
224  px = px + a*Px;
225  py = py + a*Py;
226  pz = pz + a*Pz;
227  G4double p2 = px*px + py*py + pz*pz;
228  pp = std::sqrt(p2);
229  e = std::sqrt(e0*e0 + p2);
230  G4double ekin = e - theSecondary->GetParticle()->GetDefinition()->GetPDGMass()/MeV;
231  theSecondary->GetParticle()->SetMomentumDirection(G4ParticleMomentum(px/pp,
232  py/pp,
233  pz/pp));
234  theSecondary->GetParticle()->SetKineticEnergy(ekin*MeV);
235  }
236 
237  return &theParticleChange;
238 }
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
ThreeVector shoot(const G4int Ap, const G4int Af)
G4HadSecondary * GetSecondary(size_t i)
G4double GetTotalEnergy() const
double x() const
void SetMomentumDirection(const G4ThreeVector &aDirection)
G4ParticleDefinition * GetDefinition() const
static G4double Atomas(const G4double A, const G4double Z)
Definition: G4LFission.cc:243
int G4int
Definition: G4Types.hh:78
double z() const
G4double GetTotalMomentum() const
void SetStatusChange(G4HadFinalStateStatus aS)
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
bool G4bool
Definition: G4Types.hh:79
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void SetKineticEnergy(G4double aEnergy)
G4double GetPDGMass() const
G4DynamicParticle * GetParticle()
double y() const
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
G4ThreeVector G4ParticleMomentum
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
void AddSecondary(G4DynamicParticle *aP)
G4double GetTotalMomentum() const
G4double GetTotalEnergy() const
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81
G4double G4LFission::Atomas ( const G4double  A,
const G4double  Z 
)
static

Definition at line 243 of file G4LFission.cc.

References G4Alpha::AlphaDefinition(), G4Deuteron::DeuteronDefinition(), G4Electron::ElectronDefinition(), G4ParticleDefinition::GetPDGMass(), iz, python.hepunit::MeV, G4Neutron::NeutronDefinition(), and G4Proton::ProtonDefinition().

Referenced by ApplyYourself().

244 {
250 
251  G4int ia = static_cast<G4int>(A + 0.5);
252  if (ia < 1) return 0;
253  G4int iz = static_cast<G4int>(Z + 0.5);
254  if (iz < 0) return 0;
255  if (iz > ia) return 0;
256 
257  if (ia == 1) {
258  if (iz == 0) return rmn; //neutron
259  if (iz == 1) return rmp + rmel; //Hydrogen
260  }
261  else if (ia == 2 && iz == 1) {
262  return rmd; //Deuteron
263  }
264  else if (ia == 4 && iz == 2) {
265  return rma; //Alpha
266  }
267 
268  G4double mass = (A - Z)*rmn + Z*rmp + Z*rmel - 15.67*A
269  + 17.23*std::pow(A, 2./3.)
270  + 93.15*(A/2. - Z)*(A/2. - Z)/A
271  + 0.6984523*Z*Z/std::pow(A, 1./3.);
272  G4int ipp = (ia - iz)%2;
273  G4int izz = iz%2;
274  if (ipp == izz) mass = mass + (ipp + izz -1)*12.*std::pow(A, -0.5);
275 
276  return mass;
277 }
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
int G4int
Definition: G4Types.hh:78
G4double iz
Definition: TRTMaterials.hh:39
G4double GetPDGMass() const
double G4double
Definition: G4Types.hh:76
static G4Deuteron * DeuteronDefinition()
Definition: G4Deuteron.cc:89
static G4Alpha * AlphaDefinition()
Definition: G4Alpha.cc:84
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
const std::pair< G4double, G4double > G4LFission::GetFatalEnergyCheckLevels ( ) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 279 of file G4LFission.cc.

References python.hepunit::GeV, and python.hepunit::perCent.

280 {
281  // max energy non-conservation is mass of heavy nucleus
282  return std::pair<G4double, G4double>(5*perCent,250*GeV);
283 }
float perCent
Definition: hepunit.py:239
void G4LFission::ModelDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 65 of file G4LFission.cc.

66 {
67  outFile << "G4LFission is one of the Low Energy Parameterized\n"
68  << "(LEP) models used to implement neutron-induced fission of\n"
69  << "nuclei. It is a re-engineered version of the GHEISHA code\n"
70  << "of H. Fesefeldt which emits neutrons and gammas but no\n"
71  << "nuclear fragments. The model is applicable to all incident\n"
72  << "neutron energies.\n";
73 }
std::ofstream outFile
Definition: GammaRayTel.cc:68

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