G4NeutronHPFSFissionFS Class Reference

#include <G4NeutronHPFSFissionFS.hh>

Inheritance diagram for G4NeutronHPFSFissionFS:

G4NeutronHPFinalState

Public Member Functions

 G4NeutronHPFSFissionFS ()
 ~G4NeutronHPFSFissionFS ()
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType)
G4DynamicParticleVectorApplyYourself (G4int Prompt, G4int delayed, G4double *decayconst)
G4NeutronHPFinalStateNew ()
G4double GetMass ()
void SampleNeutronMult (G4int &all, G4int &Prompt, G4int &delayed, G4double energy, G4int off)
void SetNeutron (const G4ReactionProduct &aNeutron)
void SetTarget (const G4ReactionProduct &aTarget)
G4DynamicParticleVectorGetPhotons ()
G4NeutronHPFissionEReleaseGetEnergyRelease ()

Detailed Description

Definition at line 44 of file G4NeutronHPFSFissionFS.hh.


Constructor & Destructor Documentation

G4NeutronHPFSFissionFS::G4NeutronHPFSFissionFS (  )  [inline]

Definition at line 48 of file G4NeutronHPFSFissionFS.hh.

References G4NeutronHPFinalState::hasXsec.

00048 { hasXsec = true; }

G4NeutronHPFSFissionFS::~G4NeutronHPFSFissionFS (  )  [inline]

Definition at line 49 of file G4NeutronHPFSFissionFS.hh.

00049 {}


Member Function Documentation

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

Definition at line 98 of file G4NeutronHPFSFissionFS.cc.

References G4NeutronHPNeutronYield::GetDecayConstant(), G4ReactionProduct::GetKineticEnergy(), G4ReactionProduct::Lorentz(), G4Neutron::Neutron(), G4NeutronHPEnergyDistribution::Sample(), G4NeutronHPAngular::SampleAndUpdate(), and G4ReactionProduct::SetKineticEnergy().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00100   {  
00101     G4int i;
00102     G4DynamicParticleVector * aResult = new G4DynamicParticleVector;
00103     G4ReactionProduct boosted;
00104     boosted.Lorentz(theNeutron, theTarget);
00105     G4double eKinetic = boosted.GetKineticEnergy();
00106     
00107 // Build neutrons
00108     G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt+nDelayed];
00109     for(i=0; i<nPrompt+nDelayed; i++)
00110     {
00111       theNeutrons[i].SetDefinition(G4Neutron::Neutron());
00112     }
00113     
00114 // sample energies
00115    G4int it, dummy;
00116    G4double tempE;
00117    for(i=0; i<nPrompt; i++)
00118    {
00119      tempE = thePromptNeutronEnDis.Sample(eKinetic, dummy); // energy distribution (file5) always in lab
00120      theNeutrons[i].SetKineticEnergy(tempE);
00121    }
00122    for(i=nPrompt; i<nPrompt+nDelayed; i++)
00123    {
00124      theNeutrons[i].SetKineticEnergy(theDelayedNeutronEnDis.Sample(eKinetic, it));  // dito
00125      if(it==0) theNeutrons[i].SetKineticEnergy(thePromptNeutronEnDis.Sample(eKinetic, dummy));
00126      theDecayConst[i-nPrompt] = theFinalStateNeutrons.GetDecayConstant(it); // this is returned
00127    }
00128 
00129 // sample neutron angular distribution
00130    for(i=0; i<nPrompt+nDelayed; i++)
00131    {
00132      theNeutronAngularDis.SampleAndUpdate(theNeutrons[i]); // angular comes back in lab automatically
00133    }
00134    
00135 // already in lab. Add neutrons to dynamic particle vector
00136    for(i=0; i<nPrompt+nDelayed; i++)
00137    {
00138       G4DynamicParticle * dp = new G4DynamicParticle;
00139       dp->SetDefinition(theNeutrons[i].GetDefinition());
00140       dp->SetMomentum(theNeutrons[i].GetMomentum());
00141       aResult->push_back(dp);
00142    }
00143    delete [] theNeutrons;
00144 // return the result
00145    return aResult;
00146   }

G4NeutronHPFissionERelease* G4NeutronHPFSFissionFS::GetEnergyRelease (  )  [inline]

Definition at line 83 of file G4NeutronHPFSFissionFS.hh.

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00084   {
00085     return &theEnergyRelease;
00086   }

G4double G4NeutronHPFSFissionFS::GetMass (  )  [inline]

Definition at line 61 of file G4NeutronHPFSFissionFS.hh.

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00061 { return targetMass; }

G4DynamicParticleVector * G4NeutronHPFSFissionFS::GetPhotons (  ) 

Definition at line 172 of file G4NeutronHPFSFissionFS.cc.

References G4ReactionProduct::GetKineticEnergy(), G4NeutronHPPhotonDist::GetPhotons(), G4ReactionProduct::Lorentz(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetMomentum().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00173 {
00174 // sample photons
00175    G4ReactionProductVector * temp;
00176    G4ReactionProduct boosted;
00177 // the photon distributions are in the Nucleus rest frame.
00178    boosted.Lorentz(theNeutron, theTarget);
00179    G4double anEnergy = boosted.GetKineticEnergy();
00180    temp = theFinalStatePhotons.GetPhotons(anEnergy);
00181    if(temp == 0) { return 0; }
00182 
00183 // lorentz transform, and add photons to final state
00184    unsigned int i;
00185    G4DynamicParticleVector * result = new G4DynamicParticleVector;
00186    for(i=0; i<temp->size(); i++)
00187    {
00188      // back to lab
00189      temp->operator[](i)->Lorentz(*(temp->operator[](i)), -1.*theTarget);
00190      G4DynamicParticle * theOne = new G4DynamicParticle;
00191      theOne->SetDefinition(temp->operator[](i)->GetDefinition());
00192      theOne->SetMomentum(temp->operator[](i)->GetMomentum());
00193      result->push_back(theOne);
00194      delete temp->operator[](i);
00195    }
00196    delete temp;
00197    return result;
00198 }

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

Implements G4NeutronHPFinalState.

Definition at line 42 of file G4NeutronHPFSFissionFS.cc.

References G4cout, G4endl, G4NeutronHPDataUsed::GetName(), G4NeutronHPNames::GetName(), G4NeutronHPNeutronYield::GetTargetMass(), G4NeutronHPFinalState::hasAnyData, G4NeutronHPFinalState::hasFSData, G4NeutronHPFinalState::hasXsec, G4NeutronHPFissionERelease::Init(), G4NeutronHPEnergyDistribution::Init(), G4NeutronHPAngular::Init(), G4NeutronHPPhotonDist::InitAngular(), G4NeutronHPNeutronYield::InitDelayed(), G4NeutronHPPhotonDist::InitEnergies(), G4NeutronHPNeutronYield::InitMean(), G4NeutronHPPhotonDist::InitMean(), G4NeutronHPNeutronYield::InitPrompt(), and G4NeutronHPFinalState::SetAZMs().

Referenced by G4NeutronHPFissionFS::Init().

00043   {
00044     G4String tString = "/FS/";
00045     G4bool dbool;
00046     G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, dirName, tString, dbool);
00047     G4String filename = aFile.GetName();
00048     SetAZMs( A, Z, M, aFile ); 
00049     if(!dbool)
00050     {
00051       hasAnyData = false;
00052       hasFSData = false; 
00053       hasXsec = false;
00054       return;
00055     }
00056     std::ifstream theData(filename, std::ios::in);
00057 
00058     // here it comes
00059     G4int infoType, dataType;
00060     hasFSData = false; 
00061     while (theData >> infoType)
00062     {
00063       hasFSData = true; 
00064       theData >> dataType;
00065       switch(infoType)
00066       {
00067         case 1: 
00068           if(dataType==4) theNeutronAngularDis.Init(theData); 
00069           if(dataType==5) thePromptNeutronEnDis.Init(theData); 
00070           if(dataType==12) theFinalStatePhotons.InitMean(theData); 
00071           if(dataType==14) theFinalStatePhotons.InitAngular(theData); 
00072           if(dataType==15) theFinalStatePhotons.InitEnergies(theData); 
00073           break;
00074         case 2:
00075           if(dataType==1) theFinalStateNeutrons.InitMean(theData); 
00076           break;
00077         case 3:
00078           if(dataType==1) theFinalStateNeutrons.InitDelayed(theData); 
00079           if(dataType==5) theDelayedNeutronEnDis.Init(theData);
00080           break;
00081         case 4:
00082           if(dataType==1) theFinalStateNeutrons.InitPrompt(theData); 
00083           break;
00084         case 5:
00085           if(dataType==1) theEnergyRelease.Init(theData); 
00086           break;
00087         default:
00088           G4cout << "G4NeutronHPFSFissionFS::Init: unknown data type"<<dataType<<G4endl;
00089           throw G4HadronicException(__FILE__, __LINE__, "G4NeutronHPFSFissionFS::Init: unknown data type");
00090           break;
00091       }
00092     }
00093     targetMass = theFinalStateNeutrons.GetTargetMass();
00094     theData.close();
00095   }

G4NeutronHPFinalState* G4NeutronHPFSFissionFS::New (  )  [inline, virtual]

Implements G4NeutronHPFinalState.

Definition at line 55 of file G4NeutronHPFSFissionFS.hh.

00056   {
00057    G4NeutronHPFSFissionFS * theNew = new G4NeutronHPFSFissionFS;
00058    return theNew;
00059   }

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

Definition at line 148 of file G4NeutronHPFSFissionFS.cc.

References G4Poisson(), G4NeutronHPNeutronYield::GetDelayed(), G4NeutronHPNeutronYield::GetMean(), and G4NeutronHPNeutronYield::GetPrompt().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00149 {
00150    G4double promptNeutronMulti = 0;
00151    promptNeutronMulti = theFinalStateNeutrons.GetPrompt(eKinetic);
00152    G4double delayedNeutronMulti = 0;
00153    delayedNeutronMulti = theFinalStateNeutrons.GetDelayed(eKinetic);
00154    
00155    if(delayedNeutronMulti==0&&promptNeutronMulti==0)
00156    {
00157      Prompt = 0;
00158      delayed = 0;
00159      G4double totalNeutronMulti = theFinalStateNeutrons.GetMean(eKinetic);
00160      all = G4Poisson(totalNeutronMulti-off);
00161      all += off;
00162    }
00163    else
00164    {   
00165      Prompt  = G4Poisson(promptNeutronMulti-off);
00166      Prompt += off;
00167      delayed = G4Poisson(delayedNeutronMulti);
00168      all = Prompt+delayed;
00169    }
00170 }

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

Definition at line 69 of file G4NeutronHPFSFissionFS.hh.

References G4NeutronHPAngular::SetNeutron().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00070                         { 
00071                           theNeutron = aNeutron;
00072                           theNeutronAngularDis.SetNeutron(aNeutron);
00073                         }

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

Definition at line 75 of file G4NeutronHPFSFissionFS.hh.

References G4NeutronHPAngular::SetTarget().

Referenced by G4NeutronHPFissionFS::ApplyYourself().

00076                         { 
00077                           theTarget = aTarget; 
00078                           theNeutronAngularDis.SetTarget(aTarget);
00079                         }


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