G4NeutronHPFissionBaseFS Class Reference

#include <G4NeutronHPFissionBaseFS.hh>

Inheritance diagram for G4NeutronHPFissionBaseFS:

G4NeutronHPFinalState G4NeutronHPFCFissionFS G4NeutronHPFFFissionFS G4NeutronHPLCFissionFS G4NeutronHPSCFissionFS G4NeutronHPTCFissionFS

Public Member Functions

 G4NeutronHPFissionBaseFS ()
virtual ~G4NeutronHPFissionBaseFS ()
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &bit)
G4DynamicParticleVectorApplyYourself (G4int Prompt)
virtual G4double GetXsec (G4double anEnergy)
virtual G4NeutronHPVectorGetXsec ()
void SetNeutron (const G4ReactionProduct &aNeutron)
void SetTarget (const G4ReactionProduct &aTarget)

Detailed Description

Definition at line 41 of file G4NeutronHPFissionBaseFS.hh.


Constructor & Destructor Documentation

G4NeutronHPFissionBaseFS::G4NeutronHPFissionBaseFS (  )  [inline]

Definition at line 45 of file G4NeutronHPFissionBaseFS.hh.

References G4NeutronHPFinalState::hasXsec.

00046   { 
00047     hasXsec = true; 
00048     theXsection = new G4NeutronHPVector;
00049   }

virtual G4NeutronHPFissionBaseFS::~G4NeutronHPFissionBaseFS (  )  [inline, virtual]

Definition at line 50 of file G4NeutronHPFissionBaseFS.hh.

00051   {
00052     delete theXsection;
00053   }


Member Function Documentation

G4DynamicParticleVector * G4NeutronHPFissionBaseFS::ApplyYourself ( G4int  Prompt  ) 

Reimplemented in G4NeutronHPFCFissionFS, G4NeutronHPFFFissionFS, G4NeutronHPLCFissionFS, G4NeutronHPSCFissionFS, and G4NeutronHPTCFissionFS.

Definition at line 91 of file G4NeutronHPFissionBaseFS.cc.

References G4ReactionProduct::GetKineticEnergy(), G4NeutronHPFinalState::HasFSData(), G4ReactionProduct::Lorentz(), G4Neutron::Neutron(), G4NeutronHPEnergyDistribution::Sample(), and G4NeutronHPAngular::SampleAndUpdate().

Referenced by G4NeutronHPTCFissionFS::ApplyYourself(), G4NeutronHPSCFissionFS::ApplyYourself(), G4NeutronHPLCFissionFS::ApplyYourself(), G4NeutronHPFFFissionFS::ApplyYourself(), and G4NeutronHPFCFissionFS::ApplyYourself().

00092   {  
00093 // if therere were no data for this isotope, break out.    
00094     if(!HasFSData()) { return 0; }
00095     
00096     G4int i;
00097     G4DynamicParticleVector * aResult = new G4DynamicParticleVector;
00098     G4ReactionProduct boosted;
00099     boosted.Lorentz(theNeutron, theTarget);
00100     G4double eKinetic = boosted.GetKineticEnergy();
00101     
00102 // Build neutrons
00103     G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt];
00104     for(i=0; i<nPrompt; i++)
00105     {
00106       theNeutrons[i].SetDefinition(G4Neutron::Neutron());
00107     }
00108     
00109 // sample energies
00110    G4int dummy;
00111    for(i=0; i<nPrompt; i++)
00112    {
00113      // always in the lab system (if file-5)
00114      theNeutrons[i].SetKineticEnergy(theEnergyDistribution.Sample(eKinetic, dummy));
00115    }
00116 
00117 // sample neutron angular distribution
00118    for(i=0; i<nPrompt; i++)
00119    {
00120      theAngularDistribution.SampleAndUpdate(theNeutrons[i]);
00121    }
00122    
00123 // already in lab. Add neutrons to dynamic particle vector
00124    for(i=0; i<nPrompt; i++)
00125    {
00126       G4DynamicParticle * it = new G4DynamicParticle;
00127       it->SetDefinition(theNeutrons[i].GetDefinition());
00128       it->SetMomentum(theNeutrons[i].GetMomentum());
00129       aResult->push_back(it);
00130    }
00131    delete [] theNeutrons;
00132 
00133 // return the result
00134     return aResult;
00135   }

virtual G4NeutronHPVector* G4NeutronHPFissionBaseFS::GetXsec (  )  [inline, virtual]

Reimplemented from G4NeutronHPFinalState.

Definition at line 63 of file G4NeutronHPFissionBaseFS.hh.

00063 { return theXsection; }

virtual G4double G4NeutronHPFissionBaseFS::GetXsec ( G4double  anEnergy  )  [inline, virtual]

Reimplemented from G4NeutronHPFinalState.

Definition at line 59 of file G4NeutronHPFissionBaseFS.hh.

References G4NeutronHPVector::GetY().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00060   {
00061     return std::max(0., theXsection->GetY(anEnergy));
00062   }

void G4NeutronHPFissionBaseFS::Init ( G4double  A,
G4double  Z,
G4int  M,
G4String dirName,
G4String bit 
) [virtual]

Implements G4NeutronHPFinalState.

Reimplemented in G4NeutronHPFCFissionFS, G4NeutronHPFFFissionFS, G4NeutronHPLCFissionFS, G4NeutronHPSCFissionFS, and G4NeutronHPTCFissionFS.

Definition at line 42 of file G4NeutronHPFissionBaseFS.cc.

References G4NeutronHPDataUsed::GetName(), G4NeutronHPNames::GetName(), G4NeutronHPFinalState::hasAnyData, G4NeutronHPFinalState::hasFSData, G4NeutronHPFinalState::hasXsec, G4NeutronHPEnergyDistribution::Init(), G4NeutronHPAngular::Init(), G4NeutronHPVector::Init(), G4NeutronHPFinalState::SetAZMs(), G4NeutronHPFinalState::theNames, G4NeutronHPFinalState::theNDLDataA, and G4NeutronHPFinalState::theNDLDataZ.

Referenced by G4NeutronHPTCFissionFS::Init(), G4NeutronHPSCFissionFS::Init(), G4NeutronHPLCFissionFS::Init(), and G4NeutronHPFCFissionFS::Init().

00043   {
00044     G4String tString = dirName;
00045     G4bool dbool;
00046     G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, tString, bit, dbool);
00047     G4String filename = aFile.GetName();
00048     SetAZMs( A, Z, M, aFile ); 
00049     //theBaseA = aFile.GetA();
00050     //theBaseZ = aFile.GetZ();
00051     //if(!dbool  || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001) ) )
00052     if ( !dbool || ( Z<2.5 && ( std::abs(theNDLDataZ - Z)>0.0001 || std::abs(theNDLDataA - A)>0.0001)) )
00053     {
00054       hasAnyData = false;
00055       hasFSData = false; 
00056       hasXsec = false;
00057       return; // no data for exactly this isotope.
00058     }
00059 
00060     std::ifstream theData(filename, std::ios::in);
00061     G4int dummy;
00062     if(!(theData))
00063     {
00064       theData.close();
00065       hasFSData = false;
00066       hasXsec = false;
00067       hasAnyData = false;
00068       return; // no data for this FS for this isotope
00069     }
00070     theData >> dummy>>dummy;
00071     G4int total;
00072     theData >> total;
00073     theXsection->Init(theData, total, eV);
00074     if (!(theData >> dummy))
00075     {
00076       hasFSData = false;
00077       theData.close();
00078       return;
00079     }
00080     theData >> dummy;
00081 
00082     theAngularDistribution.Init(theData);
00083 
00084     theData >> dummy >> dummy;
00085 
00086     theEnergyDistribution.Init(theData);
00087     theData.close();
00088     
00089   }

void G4NeutronHPFissionBaseFS::SetNeutron ( const G4ReactionProduct aNeutron  )  [inline]

Definition at line 65 of file G4NeutronHPFissionBaseFS.hh.

References G4NeutronHPAngular::SetNeutron().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00066                         { 
00067                           theNeutron = aNeutron;
00068                           theAngularDistribution.SetNeutron(aNeutron);
00069                         }

void G4NeutronHPFissionBaseFS::SetTarget ( const G4ReactionProduct aTarget  )  [inline]

Definition at line 71 of file G4NeutronHPFissionBaseFS.hh.

References G4NeutronHPAngular::SetTarget().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00072                         { 
00073                           theTarget = aTarget; 
00074                           theAngularDistribution.SetTarget(aTarget);
00075                         }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:38 2013 for Geant4 by  doxygen 1.4.7