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

#include <G4ParticleHPFSFissionFS.hh>

+ Inheritance diagram for G4ParticleHPFSFissionFS:

Public Member Functions

 G4ParticleHPFSFissionFS ()
 
 ~G4ParticleHPFSFissionFS ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)
 
G4DynamicParticleVectorApplyYourself (G4int Prompt, G4int delayed, G4double *decayconst)
 
G4ParticleHPFinalStateNew ()
 
G4double GetMass ()
 
void SampleNeutronMult (G4int &all, G4int &Prompt, G4int &delayed, G4double energy, G4int off)
 
void SetNeutronRP (const G4ReactionProduct &aNeutron)
 
void SetTarget (const G4ReactionProduct &aTarget)
 
G4DynamicParticleVectorGetPhotons ()
 
G4ParticleHPFissionEReleaseGetEnergyRelease ()
 
- Public Member Functions inherited from G4ParticleHPFinalState
 G4ParticleHPFinalState ()
 
virtual ~G4ParticleHPFinalState ()
 
void Init (G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
 
virtual void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)=0
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &)
 
virtual G4ParticleHPFinalStateNew ()=0
 
G4bool HasXsec ()
 
G4bool HasFSData ()
 
G4bool HasAnyData ()
 
virtual G4double GetXsec (G4double)
 
virtual G4ParticleHPVectorGetXsec ()
 
void SetA_Z (G4double anA, G4double aZ, G4int aM=0)
 
G4double GetZ ()
 
G4double GetN ()
 
G4double GetA ()
 
G4int GetM ()
 
void SetAZMs (G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
 
void SetProjectile (G4ParticleDefinition *projectile)
 

Additional Inherited Members

- Protected Member Functions inherited from G4ParticleHPFinalState
void adjust_final_state (G4LorentzVector)
 
G4bool DoNotAdjustFinalState ()
 
- Protected Attributes inherited from G4ParticleHPFinalState
G4bool hasXsec
 
G4bool hasFSData
 
G4bool hasAnyData
 
G4ParticleHPNames theNames
 
G4Cache< G4HadFinalState * > theResult
 
G4ParticleDefinitiontheProjectile
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 

Detailed Description

Definition at line 45 of file G4ParticleHPFSFissionFS.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPFSFissionFS()

G4ParticleHPFSFissionFS::G4ParticleHPFSFissionFS ( )
inline

Definition at line 56 of file G4ParticleHPFSFissionFS.hh.

Referenced by New().

◆ ~G4ParticleHPFSFissionFS()

G4ParticleHPFSFissionFS::~G4ParticleHPFSFissionFS ( )
inline

Definition at line 57 of file G4ParticleHPFSFissionFS.hh.

57{}

Member Function Documentation

◆ ApplyYourself()

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

Definition at line 103 of file G4ParticleHPFSFissionFS.cc.

105 {
106 G4int i;
108 G4ReactionProduct boosted;
109 boosted.Lorentz( *(fCache.Get().theNeutronRP) , *(fCache.Get().theTarget) );
110 G4double eKinetic = boosted.GetKineticEnergy();
111
112// Build neutrons
113 G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt+nDelayed];
114 for(i=0; i<nPrompt+nDelayed; i++)
115 {
116 theNeutrons[i].SetDefinition(G4Neutron::Neutron());
117 }
118
119// sample energies
120 G4int it, dummy;
121 G4double tempE;
122 for(i=0; i<nPrompt; i++)
123 {
124 tempE = thePromptNeutronEnDis.Sample(eKinetic, dummy); // energy distribution (file5) always in lab
125 theNeutrons[i].SetKineticEnergy(tempE);
126 }
127 for(i=nPrompt; i<nPrompt+nDelayed; i++)
128 {
129 theNeutrons[i].SetKineticEnergy(theDelayedNeutronEnDis.Sample(eKinetic, it)); // dito
130 if(it==0) theNeutrons[i].SetKineticEnergy(thePromptNeutronEnDis.Sample(eKinetic, dummy));
131 theDecayConst[i-nPrompt] = theFinalStateNeutrons.GetDecayConstant(it); // this is returned
132 }
133
134// sample neutron angular distribution
135 for(i=0; i<nPrompt+nDelayed; i++)
136 {
137 theNeutronAngularDis.SampleAndUpdate(theNeutrons[i]); // angular comes back in lab automatically
138 }
139
140// already in lab. Add neutrons to dynamic particle vector
141 for(i=0; i<nPrompt+nDelayed; i++)
142 {
144 dp->SetDefinition(theNeutrons[i].GetDefinition());
145 dp->SetMomentum(theNeutrons[i].GetMomentum());
146 aResult->push_back(dp);
147 }
148 delete [] theNeutrons;
149// return the result
150 return aResult;
151 }
std::vector< G4DynamicParticle * > G4DynamicParticleVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
value_type & Get() const
Definition: G4Cache.hh:315
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
void SampleAndUpdate(G4ReactionProduct &anIncidentParticle)
G4double Sample(G4double anEnergy, G4int &it)
G4double GetKineticEnergy() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ GetEnergyRelease()

G4ParticleHPFissionERelease * G4ParticleHPFSFissionFS::GetEnergyRelease ( )
inline

Definition at line 96 of file G4ParticleHPFSFissionFS.hh.

97 {
98 return &theEnergyRelease;
99 }

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ GetMass()

G4double G4ParticleHPFSFissionFS::GetMass ( )
inline

Definition at line 71 of file G4ParticleHPFSFissionFS.hh.

72 {
73 return theFinalStateNeutrons.GetTargetMass();
74 }

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ GetPhotons()

G4DynamicParticleVector * G4ParticleHPFSFissionFS::GetPhotons ( )

Definition at line 177 of file G4ParticleHPFSFissionFS.cc.

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

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ Init()

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

Implements G4ParticleHPFinalState.

Definition at line 45 of file G4ParticleHPFSFissionFS.cc.

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

Referenced by G4ParticleHPFissionFS::Init().

◆ New()

G4ParticleHPFinalState * G4ParticleHPFSFissionFS::New ( )
inlinevirtual

◆ SampleNeutronMult()

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

Definition at line 153 of file G4ParticleHPFSFissionFS.cc.

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

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ SetNeutronRP()

void G4ParticleHPFSFissionFS::SetNeutronRP ( const G4ReactionProduct aNeutron)
inline

Definition at line 82 of file G4ParticleHPFSFissionFS.hh.

83 {
84 fCache.Get().theNeutronRP = &aNeutron;
85 theNeutronAngularDis.SetProjectileRP(aNeutron);
86 }
void SetProjectileRP(const G4ReactionProduct &anIncidentParticleRP)

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ SetTarget()

void G4ParticleHPFSFissionFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 88 of file G4ParticleHPFSFissionFS.hh.

89 {
90 fCache.Get().theTarget = &aTarget;
91 theNeutronAngularDis.SetTarget(aTarget);
92 }
void SetTarget(const G4ReactionProduct &aTarget)

Referenced by G4ParticleHPFissionFS::ApplyYourself().


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