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

#include <G4NeutronHPFSFissionFS.hh>

+ Inheritance diagram for G4NeutronHPFSFissionFS:

Public Member Functions

 G4NeutronHPFSFissionFS ()
 
 ~G4NeutronHPFSFissionFS ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType)
 
G4DynamicParticleVectorApplyYourself (G4int Prompt, G4int delayed, G4double *decayconst)
 
G4NeutronHPFinalStateNew ()
 
G4double GetMass ()
 
void SampleNeutronMult (G4int &all, G4int &Prompt, G4int &delayed, G4double energy, G4int off)
 
void SetNeutron (const G4ReactionProduct &aNeutron)
 
void SetTarget (const G4ReactionProduct &aTarget)
 
G4DynamicParticleVectorGetPhotons ()
 
G4NeutronHPFissionEReleaseGetEnergyRelease ()
 
- 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 44 of file G4NeutronHPFSFissionFS.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPFSFissionFS()

G4NeutronHPFSFissionFS::G4NeutronHPFSFissionFS ( )
inline

Definition at line 48 of file G4NeutronHPFSFissionFS.hh.

48{ hasXsec = true; }

Referenced by New().

◆ ~G4NeutronHPFSFissionFS()

G4NeutronHPFSFissionFS::~G4NeutronHPFSFissionFS ( )
inline

Definition at line 49 of file G4NeutronHPFSFissionFS.hh.

49{}

Member Function Documentation

◆ ApplyYourself()

G4DynamicParticleVector * G4NeutronHPFSFissionFS::ApplyYourself ( G4int  Prompt,
G4int  delayed,
G4double decayconst 
)

Definition at line 98 of file G4NeutronHPFSFissionFS.cc.

100 {
101 G4int i;
103 G4ReactionProduct boosted;
104 boosted.Lorentz(theNeutron, theTarget);
105 G4double eKinetic = boosted.GetKineticEnergy();
106
107// Build neutrons
108 G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt+nDelayed];
109 for(i=0; i<nPrompt+nDelayed; i++)
110 {
111 theNeutrons[i].SetDefinition(G4Neutron::Neutron());
112 }
113
114// sample energies
115 G4int it, dummy;
116 G4double tempE;
117 for(i=0; i<nPrompt; i++)
118 {
119 tempE = thePromptNeutronEnDis.Sample(eKinetic, dummy); // energy distribution (file5) always in lab
120 theNeutrons[i].SetKineticEnergy(tempE);
121 }
122 for(i=nPrompt; i<nPrompt+nDelayed; i++)
123 {
124 theNeutrons[i].SetKineticEnergy(theDelayedNeutronEnDis.Sample(eKinetic, it)); // dito
125 if(it==0) theNeutrons[i].SetKineticEnergy(thePromptNeutronEnDis.Sample(eKinetic, dummy));
126 theDecayConst[i-nPrompt] = theFinalStateNeutrons.GetDecayConstant(it); // this is returned
127 }
128
129// sample neutron angular distribution
130 for(i=0; i<nPrompt+nDelayed; i++)
131 {
132 theNeutronAngularDis.SampleAndUpdate(theNeutrons[i]); // angular comes back in lab automatically
133 }
134
135// already in lab. Add neutrons to dynamic particle vector
136 for(i=0; i<nPrompt+nDelayed; i++)
137 {
139 dp->SetDefinition(theNeutrons[i].GetDefinition());
140 dp->SetMomentum(theNeutrons[i].GetMomentum());
141 aResult->push_back(dp);
142 }
143 delete [] theNeutrons;
144// return the result
145 return aResult;
146 }
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 G4NeutronHPFissionFS::ApplyYourself().

◆ GetEnergyRelease()

G4NeutronHPFissionERelease * G4NeutronHPFSFissionFS::GetEnergyRelease ( )
inline

Definition at line 83 of file G4NeutronHPFSFissionFS.hh.

84 {
85 return &theEnergyRelease;
86 }

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ GetMass()

G4double G4NeutronHPFSFissionFS::GetMass ( )
inline

Definition at line 61 of file G4NeutronHPFSFissionFS.hh.

61{ return targetMass; }

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ GetPhotons()

G4DynamicParticleVector * G4NeutronHPFSFissionFS::GetPhotons ( )

Definition at line 172 of file G4NeutronHPFSFissionFS.cc.

173{
174// sample photons
176 G4ReactionProduct boosted;
177// the photon distributions are in the Nucleus rest frame.
178 boosted.Lorentz(theNeutron, theTarget);
179 G4double anEnergy = boosted.GetKineticEnergy();
180 temp = theFinalStatePhotons.GetPhotons(anEnergy);
181 if(temp == 0) { return 0; }
182
183// lorentz transform, and add photons to final state
184 unsigned int i;
186 for(i=0; i<temp->size(); i++)
187 {
188 // back to lab
189 temp->operator[](i)->Lorentz(*(temp->operator[](i)), -1.*theTarget);
191 theOne->SetDefinition(temp->operator[](i)->GetDefinition());
192 theOne->SetMomentum(temp->operator[](i)->GetMomentum());
193 result->push_back(theOne);
194 delete temp->operator[](i);
195 }
196 delete temp;
197 return result;
198}
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4ReactionProductVector * GetPhotons(G4double anEnergy)

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ Init()

void G4NeutronHPFSFissionFS::Init ( G4double  A,
G4double  Z,
G4int  M,
G4String dirName,
G4String aFSType 
)
virtual

Implements G4NeutronHPFinalState.

Definition at line 42 of file G4NeutronHPFSFissionFS.cc.

43 {
44 G4String tString = "/FS/";
45 G4bool dbool;
46 G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, dirName, tString, dbool);
47 G4String filename = aFile.GetName();
48 SetAZMs( A, Z, M, aFile );
49 if(!dbool)
50 {
51 hasAnyData = false;
52 hasFSData = false;
53 hasXsec = false;
54 return;
55 }
56 std::ifstream theData(filename, std::ios::in);
57
58 // here it comes
59 G4int infoType, dataType;
60 hasFSData = false;
61 while (theData >> infoType)
62 {
63 hasFSData = true;
64 theData >> dataType;
65 switch(infoType)
66 {
67 case 1:
68 if(dataType==4) theNeutronAngularDis.Init(theData);
69 if(dataType==5) thePromptNeutronEnDis.Init(theData);
70 if(dataType==12) theFinalStatePhotons.InitMean(theData);
71 if(dataType==14) theFinalStatePhotons.InitAngular(theData);
72 if(dataType==15) theFinalStatePhotons.InitEnergies(theData);
73 break;
74 case 2:
75 if(dataType==1) theFinalStateNeutrons.InitMean(theData);
76 break;
77 case 3:
78 if(dataType==1) theFinalStateNeutrons.InitDelayed(theData);
79 if(dataType==5) theDelayedNeutronEnDis.Init(theData);
80 break;
81 case 4:
82 if(dataType==1) theFinalStateNeutrons.InitPrompt(theData);
83 break;
84 case 5:
85 if(dataType==1) theEnergyRelease.Init(theData);
86 break;
87 default:
88 G4cout << "G4NeutronHPFSFissionFS::Init: unknown data type"<<dataType<<G4endl;
89 throw G4HadronicException(__FILE__, __LINE__, "G4NeutronHPFSFissionFS::Init: unknown data type");
90 break;
91 }
92 }
93 targetMass = theFinalStateNeutrons.GetTargetMass();
94 theData.close();
95 }
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void Init(std::ifstream &aDataFile)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4NeutronHPDataUsed used)
void Init(std::ifstream &aDataFile)
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void InitMean(std::ifstream &aDataFile)
void InitDelayed(std::ifstream &aDataFile)
void InitPrompt(std::ifstream &aDataFile)
G4bool InitMean(std::ifstream &aDataFile)
void InitEnergies(std::ifstream &aDataFile)
void InitAngular(std::ifstream &aDataFile)

Referenced by G4NeutronHPFissionFS::Init().

◆ New()

G4NeutronHPFinalState * G4NeutronHPFSFissionFS::New ( )
inlinevirtual

◆ SampleNeutronMult()

void G4NeutronHPFSFissionFS::SampleNeutronMult ( G4int all,
G4int Prompt,
G4int delayed,
G4double  energy,
G4int  off 
)

Definition at line 148 of file G4NeutronHPFSFissionFS.cc.

149{
150 G4double promptNeutronMulti = 0;
151 promptNeutronMulti = theFinalStateNeutrons.GetPrompt(eKinetic);
152 G4double delayedNeutronMulti = 0;
153 delayedNeutronMulti = theFinalStateNeutrons.GetDelayed(eKinetic);
154
155 if(delayedNeutronMulti==0&&promptNeutronMulti==0)
156 {
157 Prompt = 0;
158 delayed = 0;
159 G4double totalNeutronMulti = theFinalStateNeutrons.GetMean(eKinetic);
160 all = G4Poisson(totalNeutronMulti-off);
161 all += off;
162 }
163 else
164 {
165 Prompt = G4Poisson(promptNeutronMulti-off);
166 Prompt += off;
167 delayed = G4Poisson(delayedNeutronMulti);
168 all = Prompt+delayed;
169 }
170}
G4long G4Poisson(G4double mean)
Definition: G4Poisson.hh:50
G4double GetMean(G4double anEnergy)
G4double GetDelayed(G4double anEnergy)
G4double GetPrompt(G4double anEnergy)

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ SetNeutron()

void G4NeutronHPFSFissionFS::SetNeutron ( const G4ReactionProduct aNeutron)
inline

Definition at line 69 of file G4NeutronHPFSFissionFS.hh.

70 {
71 theNeutron = aNeutron;
72 theNeutronAngularDis.SetNeutron(aNeutron);
73 }
void SetNeutron(const G4ReactionProduct &aNeutron)

Referenced by G4NeutronHPFissionFS::ApplyYourself().

◆ SetTarget()

void G4NeutronHPFSFissionFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 75 of file G4NeutronHPFSFissionFS.hh.

76 {
77 theTarget = aTarget;
78 theNeutronAngularDis.SetTarget(aTarget);
79 }
void SetTarget(const G4ReactionProduct &aTarget)

Referenced by G4NeutronHPFissionFS::ApplyYourself().


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