Geant4 11.1.1
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)
 
- 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
 
G4int secID
 

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 100 of file G4ParticleHPFSFissionFS.cc.

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

175{
176 // sample photons
178 G4ReactionProduct boosted;
179
180 // the photon distributions are in the Nucleus rest frame.
181 boosted.Lorentz( *(fCache.Get().theNeutronRP) , *(fCache.Get().theTarget) );
182 G4double anEnergy = boosted.GetKineticEnergy();
183 temp = theFinalStatePhotons.GetPhotons(anEnergy);
184 if(temp == 0) { return 0; }
185
186 // lorentz transform, and add photons to final state
187 unsigned int i;
189 for(i=0; i<temp->size(); ++i)
190 {
191 // back to lab
192 temp->operator[](i)->Lorentz(*(temp->operator[](i)), -1.* (*(fCache.Get().theTarget)) );
194 theOne->SetDefinition(temp->operator[](i)->GetDefinition());
195 theOne->SetMomentum(temp->operator[](i)->GetMomentum());
196 result->push_back(theOne);
197 delete temp->operator[](i);
198 }
199 delete temp;
200 return result;
201}
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
60 std::istringstream theData(std::ios::in);
62
63 G4int infoType, dataType;
64 hasFSData = false;
65 while (theData >> infoType) // Loop checking, 11.05.2015, T. Koi
66 {
67 hasFSData = true;
68 theData >> dataType;
69 switch(infoType)
70 {
71 case 1:
72 if(dataType==4) theNeutronAngularDis.Init(theData);
73 if(dataType==5) thePromptNeutronEnDis.Init(theData);
74 if(dataType==12) theFinalStatePhotons.InitMean(theData);
75 if(dataType==14) theFinalStatePhotons.InitAngular(theData);
76 if(dataType==15) theFinalStatePhotons.InitEnergies(theData);
77 break;
78 case 2:
79 if(dataType==1) theFinalStateNeutrons.InitMean(theData);
80 break;
81 case 3:
82 if(dataType==1) theFinalStateNeutrons.InitDelayed(theData);
83 if(dataType==5) theDelayedNeutronEnDis.Init(theData);
84 break;
85 case 4:
86 if(dataType==1) theFinalStateNeutrons.InitPrompt(theData);
87 break;
88 case 5:
89 if(dataType==1) theEnergyRelease.Init(theData);
90 break;
91 default:
92 G4cout << "G4ParticleHPFSFissionFS::Init: unknown data type"<<dataType<<G4endl;
93 throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPFSFissionFS::Init: unknown data type");
94 break;
95 }
96 }
97}
#define M(row, col)
bool G4bool
Definition: G4Types.hh:86
const G4int Z[17]
const G4double A[17]
#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 150 of file G4ParticleHPFSFissionFS.cc.

151{
152 G4double promptNeutronMulti = 0;
153 promptNeutronMulti = theFinalStateNeutrons.GetPrompt(eKinetic);
154 G4double delayedNeutronMulti = 0;
155 delayedNeutronMulti = theFinalStateNeutrons.GetDelayed(eKinetic);
156
157 if(delayedNeutronMulti==0&&promptNeutronMulti==0)
158 {
159 Prompt = 0;
160 delayed = 0;
161 G4double totalNeutronMulti = theFinalStateNeutrons.GetMean(eKinetic);
162 all = (G4int)G4Poisson(totalNeutronMulti-off);
163 all += off;
164 }
165 else
166 {
167 Prompt = (G4int)G4Poisson(promptNeutronMulti-off);
168 Prompt += off;
169 delayed = (G4int)G4Poisson(delayedNeutronMulti);
170 all = Prompt+delayed;
171 }
172}
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: