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

#include <G4FissionLibrary.hh>

+ Inheritance diagram for G4FissionLibrary:

Public Member Functions

 G4FissionLibrary ()
 
 ~G4FissionLibrary ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &, G4ParticleDefinition *)
 
G4HadFinalStateApplyYourself (const G4HadProjectile &theTrack)
 
G4ParticleHPFinalStateNew ()
 
- 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 76 of file G4FissionLibrary.hh.

Constructor & Destructor Documentation

◆ G4FissionLibrary()

G4FissionLibrary::G4FissionLibrary ( )

Definition at line 66 of file G4FissionLibrary.cc.

67 : G4ParticleHPFinalState(), theIsotope(0), targetMass(0.0)
68{
69 hasXsec = false;
70 fe=0;
71}

Referenced by New().

◆ ~G4FissionLibrary()

G4FissionLibrary::~G4FissionLibrary ( )

Definition at line 73 of file G4FissionLibrary.cc.

74{}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4FissionLibrary::ApplyYourself ( const G4HadProjectile theTrack)
virtual

Reimplemented from G4ParticleHPFinalState.

Definition at line 141 of file G4FissionLibrary.cc.

142{
143
144 if ( theResult.Get() == NULL ) theResult.Put( new G4HadFinalState );
145 theResult.Get()->Clear();
146
147 // prepare neutron
148 G4double eKinetic = theTrack.GetKineticEnergy();
149 const G4HadProjectile* incidentParticle = &theTrack;
150 G4ReactionProduct theNeutron(incidentParticle->GetDefinition() );
151 theNeutron.SetMomentum(incidentParticle->Get4Momentum().vect() );
152 theNeutron.SetKineticEnergy(eKinetic);
153
154 // prepare target
155 G4Nucleus aNucleus;
156 G4ReactionProduct theTarget;
157 G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum();
158 theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature());
159
160 // set neutron and target in the FS classes
161 //theNeutronAngularDis.SetNeutron(theNeutron);
162 theNeutronAngularDis.SetProjectileRP(theNeutron);
163 theNeutronAngularDis.SetTarget(theTarget);
164
165 // boost to target rest system
166 theNeutron.Lorentz(theNeutron, -1*theTarget);
167
168 eKinetic = theNeutron.GetKineticEnergy();
169
170 // dice neutron and gamma multiplicities, energies and momenta in Lab. @@
171 // no energy conservation on an event-to-event basis. we rely on the data to be ok. @@
172 // also for mean, we rely on the consistency of the data. @@
173
174 G4int nPrompt=0, gPrompt=0;
175 SampleMult(theTrack, &nPrompt, &gPrompt, eKinetic);
176
177 // Build neutrons and add them to dynamic particle vector
178 G4double momentum;
179 for(G4int i=0; i<nPrompt; i++)
180 {
183 it->SetKineticEnergy(fe->getNeutronEnergy(i)*MeV);
184 momentum = it->GetTotalMomentum();
185 G4ThreeVector temp(momentum*fe->getNeutronDircosu(i),
186 momentum*fe->getNeutronDircosv(i),
187 momentum*fe->getNeutronDircosw(i));
188 it->SetMomentum( temp );
189// it->SetGlobalTime(fe->getNeutronAge(i)*second);
191// G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt neutron " << i << " = " << it->GetKineticEnergy()<<G4endl;
192 }
193
194 // Build gammas, lorentz transform them, and add them to dynamic particle vector
195 for(G4int i=0; i<gPrompt; i++)
196 {
197 G4ReactionProduct * thePhoton = new G4ReactionProduct;
198 thePhoton->SetDefinition(G4Gamma::Gamma());
199 thePhoton->SetKineticEnergy(fe->getPhotonEnergy(i)*MeV);
200 momentum = thePhoton->GetTotalMomentum();
201 G4ThreeVector temp(momentum*fe->getPhotonDircosu(i),
202 momentum*fe->getPhotonDircosv(i),
203 momentum*fe->getPhotonDircosw(i));
204 thePhoton->SetMomentum( temp );
205 thePhoton->Lorentz(*thePhoton, -1.*theTarget);
206
208 it->SetDefinition(thePhoton->GetDefinition());
209 it->SetMomentum(thePhoton->GetMomentum());
210// it->SetGlobalTime(fe->getPhotonAge(i)*second);
211// G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt photon " << i << " = " << it->GetKineticEnergy()<<G4endl;
213 delete thePhoton;
214 }
215// G4cout <<"G4FissionLibrary::ApplyYourself: Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl;
216// G4cout <<"G4FissionLibrary::ApplyYourself: Number of induced prompt neutron = "<<nPrompt<<G4endl;
217// G4cout <<"G4FissionLibrary::ApplyYourself: Number of induced prompt photons = "<<gPrompt<<G4endl;
218
219 // finally deal with local energy depositions.
220 G4double eDepByFragments = theEnergyRelease.GetFragmentKinetic();
221 theResult.Get()->SetLocalEnergyDeposit(eDepByFragments);
222// G4cout << "G4FissionLibrary::local energy deposit" << eDepByFragments<<G4endl;
223 // clean up the primary neutron
225 return theResult.Get();
226}
@ stopAndKill
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
Hep3Vector vect() const
value_type & Get() const
Definition: G4Cache.hh:315
void Put(const value_type &val) const
Definition: G4Cache.hh:321
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
G4double GetTotalMomentum() const
void SetKineticEnergy(G4double aEnergy)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetLocalEnergyDeposit(G4double aE)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetTemperature() const
Definition: G4Material.hh:180
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
Definition: G4Nucleus.cc:113
void SetTarget(const G4ReactionProduct &aTarget)
void SetProjectileRP(const G4ReactionProduct &anIncidentParticleRP)
G4Cache< G4HadFinalState * > theResult
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4double getPhotonDircosu(G4int index)
G4double getNeutronEnergy(G4int index)
G4double getPhotonEnergy(G4int index)
G4double getNeutronDircosv(G4int index)
G4double getPhotonDircosw(G4int index)
G4double getNeutronDircosw(G4int index)
G4double getNeutronDircosu(G4int index)
G4double getPhotonDircosv(G4int index)

◆ Init()

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

Implements G4ParticleHPFinalState.

Definition at line 83 of file G4FissionLibrary.cc.

84{
85 G4String tString = "/FS/";
86 G4bool dbool;
87 theIsotope = static_cast<G4int>(1000*Z+A);
88 G4ParticleHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, dirName, tString, dbool);
89 G4String filename = aFile.GetName();
90
91 if(!dbool)
92 {
93 hasAnyData = false;
94 hasFSData = false;
95 hasXsec = false;
96 return;
97 }
98 //std::ifstream theData(filename, std::ios::in);
99 std::istringstream theData(std::ios::in);
101
102 // here it comes
103 G4int infoType, dataType;
104 hasFSData = false;
105 while (theData >> infoType) // Loop checking, 11.03.2015, T. Koi
106 {
107 hasFSData = true;
108 theData >> dataType;
109 switch(infoType)
110 {
111 case 1:
112 if(dataType==4) theNeutronAngularDis.Init(theData);
113 if(dataType==5) thePromptNeutronEnDis.Init(theData);
114 if(dataType==12) theFinalStatePhotons.InitMean(theData);
115 if(dataType==14) theFinalStatePhotons.InitAngular(theData);
116 if(dataType==15) theFinalStatePhotons.InitEnergies(theData);
117 break;
118 case 2:
119 if(dataType==1) theFinalStateNeutrons.InitMean(theData);
120 break;
121 case 3:
122 if(dataType==1) theFinalStateNeutrons.InitDelayed(theData);
123 if(dataType==5) theDelayedNeutronEnDis.Init(theData);
124 break;
125 case 4:
126 if(dataType==1) theFinalStateNeutrons.InitPrompt(theData);
127 break;
128 case 5:
129 if(dataType==1) theEnergyRelease.Init(theData);
130 break;
131 default:
132 G4cout << "G4FissionLibrary::Init: unknown data type"<<dataType<<G4endl;
133 throw G4HadronicException(__FILE__, __LINE__, "G4FissionLibrary::Init: unknown data type");
134 break;
135 }
136 }
137 targetMass = theFinalStateNeutrons.GetTargetMass();
138 //theData.close();
139}
double A(double temperature)
bool G4bool
Definition: G4Types.hh:86
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void Init(std::istream &aDataFile)
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)

◆ New()

G4ParticleHPFinalState * G4FissionLibrary::New ( )
virtual

Implements G4ParticleHPFinalState.

Definition at line 76 of file G4FissionLibrary.cc.

77{
79 return theNew;
80}

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