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

#include <G4NeutronHPFissionBaseFS.hh>

+ Inheritance diagram for G4NeutronHPFissionBaseFS:

Public Member Functions

 G4NeutronHPFissionBaseFS ()
 
virtual ~G4NeutronHPFissionBaseFS ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &bit)
 
G4DynamicParticleVectorApplyYourself (G4int Prompt)
 
virtual G4double GetXsec (G4double anEnergy)
 
virtual G4NeutronHPVectorGetXsec ()
 
void SetNeutron (const G4ReactionProduct &aNeutron)
 
void SetTarget (const G4ReactionProduct &aTarget)
 
- Public Member Functions inherited from G4NeutronHPFinalState
 G4NeutronHPFinalState ()
 
virtual ~G4NeutronHPFinalState ()
 
void Init (G4double A, G4double Z, G4String &dirName, G4String &aFSType)
 
virtual void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType)=0
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &)
 
virtual G4NeutronHPFinalStateNew ()=0
 
G4bool HasXsec ()
 
G4bool HasFSData ()
 
G4bool HasAnyData ()
 
virtual G4double GetXsec (G4double)
 
virtual G4NeutronHPVectorGetXsec ()
 
void SetA_Z (G4double anA, G4double aZ, G4int aM=0)
 
G4double GetZ ()
 
G4double GetN ()
 
G4int GetM ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4NeutronHPFinalState
void SetAZMs (G4double anA, G4double aZ, G4int aM, G4NeutronHPDataUsed used)
 
void adjust_final_state (G4LorentzVector)
 
- Protected Attributes inherited from G4NeutronHPFinalState
G4bool hasXsec
 
G4bool hasFSData
 
G4bool hasAnyData
 
G4NeutronHPNames theNames
 
G4HadFinalState theResult
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 

Detailed Description

Definition at line 41 of file G4NeutronHPFissionBaseFS.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPFissionBaseFS()

G4NeutronHPFissionBaseFS::G4NeutronHPFissionBaseFS ( )
inline

Definition at line 45 of file G4NeutronHPFissionBaseFS.hh.

46 {
47 hasXsec = true;
48 theXsection = new G4NeutronHPVector;
49 }

◆ ~G4NeutronHPFissionBaseFS()

virtual G4NeutronHPFissionBaseFS::~G4NeutronHPFissionBaseFS ( )
inlinevirtual

Definition at line 50 of file G4NeutronHPFissionBaseFS.hh.

51 {
52 delete theXsection;
53 }

Member Function Documentation

◆ ApplyYourself()

G4DynamicParticleVector * G4NeutronHPFissionBaseFS::ApplyYourself ( G4int  Prompt)

Definition at line 91 of file G4NeutronHPFissionBaseFS.cc.

92 {
93// if therere were no data for this isotope, break out.
94 if(!HasFSData()) { return 0; }
95
96 G4int i;
98 G4ReactionProduct boosted;
99 boosted.Lorentz(theNeutron, theTarget);
100 G4double eKinetic = boosted.GetKineticEnergy();
101
102// Build neutrons
103 G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt];
104 for(i=0; i<nPrompt; i++)
105 {
106 theNeutrons[i].SetDefinition(G4Neutron::Neutron());
107 }
108
109// sample energies
110 G4int dummy;
111 for(i=0; i<nPrompt; i++)
112 {
113 // always in the lab system (if file-5)
114 theNeutrons[i].SetKineticEnergy(theEnergyDistribution.Sample(eKinetic, dummy));
115 }
116
117// sample neutron angular distribution
118 for(i=0; i<nPrompt; i++)
119 {
120 theAngularDistribution.SampleAndUpdate(theNeutrons[i]);
121 }
122
123// already in lab. Add neutrons to dynamic particle vector
124 for(i=0; i<nPrompt; i++)
125 {
127 it->SetDefinition(theNeutrons[i].GetDefinition());
128 it->SetMomentum(theNeutrons[i].GetMomentum());
129 aResult->push_back(it);
130 }
131 delete [] theNeutrons;
132
133// return the result
134 return aResult;
135 }
std::vector< G4DynamicParticle * > G4DynamicParticleVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
void SampleAndUpdate(G4ReactionProduct &aNeutron)
G4double Sample(G4double anEnergy, G4int &it)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetKineticEnergy() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
void SetDefinition(G4ParticleDefinition *aParticleDefinition)

Referenced by G4NeutronHPFCFissionFS::ApplyYourself(), G4NeutronHPFFFissionFS::ApplyYourself(), G4NeutronHPLCFissionFS::ApplyYourself(), G4NeutronHPSCFissionFS::ApplyYourself(), and G4NeutronHPTCFissionFS::ApplyYourself().

◆ GetXsec() [1/2]

virtual G4NeutronHPVector * G4NeutronHPFissionBaseFS::GetXsec ( )
inlinevirtual

Reimplemented from G4NeutronHPFinalState.

Definition at line 63 of file G4NeutronHPFissionBaseFS.hh.

63{ return theXsection; }

◆ GetXsec() [2/2]

virtual G4double G4NeutronHPFissionBaseFS::GetXsec ( G4double  anEnergy)
inlinevirtual

Reimplemented from G4NeutronHPFinalState.

Definition at line 59 of file G4NeutronHPFissionBaseFS.hh.

60 {
61 return std::max(0., theXsection->GetY(anEnergy));
62 }
G4double GetY(G4double x)

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ Init()

void G4NeutronHPFissionBaseFS::Init ( G4double  A,
G4double  Z,
G4int  M,
G4String dirName,
G4String bit 
)
virtual

Implements G4NeutronHPFinalState.

Reimplemented in G4NeutronHPLCFissionFS, G4NeutronHPSCFissionFS, and G4NeutronHPTCFissionFS.

Definition at line 42 of file G4NeutronHPFissionBaseFS.cc.

43 {
44 G4String tString = dirName;
45 G4bool dbool;
46 G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, tString, bit, dbool);
47 G4String filename = aFile.GetName();
48 SetAZMs( A, Z, M, aFile );
49 //theBaseA = aFile.GetA();
50 //theBaseZ = aFile.GetZ();
51 //if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001) ) )
52 if ( !dbool || ( Z<2.5 && ( std::abs(theNDLDataZ - Z)>0.0001 || std::abs(theNDLDataA - A)>0.0001)) )
53 {
54 hasAnyData = false;
55 hasFSData = false;
56 hasXsec = false;
57 return; // no data for exactly this isotope.
58 }
59
60 std::ifstream theData(filename, std::ios::in);
61 G4int dummy;
62 if(!(theData))
63 {
64 theData.close();
65 hasFSData = false;
66 hasXsec = false;
67 hasAnyData = false;
68 return; // no data for this FS for this isotope
69 }
70 theData >> dummy>>dummy;
71 G4int total;
72 theData >> total;
73 theXsection->Init(theData, total, eV);
74 if (!(theData >> dummy))
75 {
76 hasFSData = false;
77 theData.close();
78 return;
79 }
80 theData >> dummy;
81
82 theAngularDistribution.Init(theData);
83
84 theData >> dummy >> dummy;
85
86 theEnergyDistribution.Init(theData);
87 theData.close();
88
89 }
bool G4bool
Definition: G4Types.hh:67
void Init(std::ifstream &aDataFile)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4NeutronHPDataUsed used)
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void Init(std::ifstream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)

Referenced by G4NeutronHPFCFissionFS::Init(), G4NeutronHPLCFissionFS::Init(), G4NeutronHPSCFissionFS::Init(), and G4NeutronHPTCFissionFS::Init().

◆ SetNeutron()

void G4NeutronHPFissionBaseFS::SetNeutron ( const G4ReactionProduct aNeutron)
inline

Definition at line 65 of file G4NeutronHPFissionBaseFS.hh.

66 {
67 theNeutron = aNeutron;
68 theAngularDistribution.SetNeutron(aNeutron);
69 }
void SetNeutron(const G4ReactionProduct &aNeutron)

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ SetTarget()

void G4NeutronHPFissionBaseFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 71 of file G4NeutronHPFissionBaseFS.hh.

72 {
73 theTarget = aTarget;
74 theAngularDistribution.SetTarget(aTarget);
75 }
void SetTarget(const G4ReactionProduct &aTarget)

Referenced by G4NeutronHPFissionFS::ApplyYourself().


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