Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4FissionLibrary Class Reference

#include <G4FissionLibrary.hh>

Inheritance diagram for G4FissionLibrary:
Collaboration 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)
 
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
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 
G4ParticleDefinitiontheProjectile
 

Detailed Description

Definition at line 77 of file G4FissionLibrary.hh.

Constructor & Destructor Documentation

G4FissionLibrary::G4FissionLibrary ( )

Definition at line 67 of file G4FissionLibrary.cc.

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

Here is the caller graph for this function:

G4FissionLibrary::~G4FissionLibrary ( )

Definition at line 74 of file G4FissionLibrary.cc.

75 {}

Member Function Documentation

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

Reimplemented from G4ParticleHPFinalState.

Definition at line 142 of file G4FissionLibrary.cc.

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

Here is the call graph for this function:

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

Implements G4ParticleHPFinalState.

Definition at line 84 of file G4FissionLibrary.cc.

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

Here is the call graph for this function:

G4ParticleHPFinalState * G4FissionLibrary::New ( )
virtual

Implements G4ParticleHPFinalState.

Definition at line 77 of file G4FissionLibrary.cc.

78 {
79  G4FissionLibrary * theNew = new G4FissionLibrary;
80  return theNew;
81 }

Here is the call graph for this function:


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