G4NeutronHPProduct Class Reference

#include <G4NeutronHPProduct.hh>


Public Member Functions

 G4NeutronHPProduct ()
 ~G4NeutronHPProduct ()
G4double GetMassCode ()
G4double GetMass ()
void Init (std::ifstream &aDataFile)
G4ReactionProductVectorSample (G4double anEnergy)
G4double GetMeanYield (G4double anEnergy)
void SetNeutron (G4ReactionProduct *aNeutron)
void SetTarget (G4ReactionProduct *aTarget)
G4ReactionProductGetTarget ()
G4ReactionProductGetNeutron ()
G4double MeanEnergyOfThisInteraction ()
G4double GetQValue ()


Detailed Description

Definition at line 49 of file G4NeutronHPProduct.hh.


Constructor & Destructor Documentation

G4NeutronHPProduct::G4NeutronHPProduct (  )  [inline]

Definition at line 52 of file G4NeutronHPProduct.hh.

00053   {
00054     theDist = 0;
00055   }

G4NeutronHPProduct::~G4NeutronHPProduct (  )  [inline]

Definition at line 56 of file G4NeutronHPProduct.hh.

00057   {
00058     if(theDist != 0) delete theDist;
00059   }


Member Function Documentation

G4double G4NeutronHPProduct::GetMass (  )  [inline]

Definition at line 65 of file G4NeutronHPProduct.hh.

00065 {return theMass;};

G4double G4NeutronHPProduct::GetMassCode (  )  [inline]

Definition at line 64 of file G4NeutronHPProduct.hh.

00064 {return theMassCode;};

G4double G4NeutronHPProduct::GetMeanYield ( G4double  anEnergy  )  [inline]

Definition at line 132 of file G4NeutronHPProduct.hh.

References G4NeutronHPVector::GetY().

00133   {
00134     return theYield.GetY(anEnergy);
00135   }

G4ReactionProduct* G4NeutronHPProduct::GetNeutron (  )  [inline]

Definition at line 149 of file G4NeutronHPProduct.hh.

00149 { return theNeutron; }

G4double G4NeutronHPProduct::GetQValue (  )  [inline]

Definition at line 166 of file G4NeutronHPProduct.hh.

Referenced by G4NeutronHPEnAngCorrelation::Sample().

00166 { return theActualStateQValue; }

G4ReactionProduct* G4NeutronHPProduct::GetTarget ( void   )  [inline]

Definition at line 147 of file G4NeutronHPProduct.hh.

00147 { return theTarget; }

void G4NeutronHPProduct::Init ( std::ifstream &  aDataFile  )  [inline]

Definition at line 67 of file G4NeutronHPProduct.hh.

References G4VNeutronHPEnergyAngular::Init(), G4NeutronHPVector::Init(), and G4VNeutronHPEnergyAngular::SetQValue().

00068   {
00069     aDataFile >> theMassCode>>theMass>>theIsomerFlag>>theDistLaw
00070               >> theGroundStateQValue>>theActualStateQValue;
00071     theGroundStateQValue*= CLHEP::eV;
00072     theActualStateQValue*= CLHEP::eV;
00073     theYield.Init(aDataFile, CLHEP::eV);
00074     if(theDistLaw==0)
00075     {
00076       // distribution not known, use E-independent, isotropic angular distribution
00077       theDist = new G4NeutronHPIsotropic;
00078     }
00079     else if(theDistLaw == 1)
00080     {
00081       // Continuum energy-angular distribution
00082       theDist = new G4NeutronHPContEnergyAngular;
00083     }
00084     else if(theDistLaw == 2)
00085     {
00086       // Discrete 2-body scattering
00087       theDist = new G4NeutronHPDiscreteTwoBody;
00088     }
00089     else if(theDistLaw == 3)
00090     {
00091       // Isotropic emission
00092       theDist = new G4NeutronHPIsotropic;
00093     }
00094     else if(theDistLaw == 4)
00095     {
00096       // Discrete 2-body recoil modification
00097       // not used for now. @@@@
00098       theDist = new G4NeutronHPDiscreteTwoBody; 
00099       // the above is only temporary;
00100       // recoils need to be addressed
00101       // properly
00102       delete theDist;
00103       theDist = 0;
00104     }
00105     else if(theDistLaw == 5)
00106     {
00107       // charged particles only, to be used in a later stage. @@@@
00108     }
00109     else if(theDistLaw == 6)
00110     {
00111       // N-Body phase space
00112       theDist = new G4NeutronHPNBodyPhaseSpace;
00113     }
00114     else if(theDistLaw == 7)
00115     {
00116       // Laboratory angular energy paraetrisation
00117       theDist = new G4NeutronHPLabAngularEnergy;
00118     }
00119     else
00120     {
00121       throw G4HadronicException(__FILE__, __LINE__, "distribution law unknown to G4NeutronHPProduct");
00122     }
00123     if(theDist!=0)
00124     {
00125       theDist->SetQValue(theActualStateQValue);      
00126       theDist->Init(aDataFile);
00127     }
00128   }

G4double G4NeutronHPProduct::MeanEnergyOfThisInteraction (  )  [inline]

Definition at line 151 of file G4NeutronHPProduct.hh.

References G4VNeutronHPEnergyAngular::MeanEnergyOfThisInteraction().

Referenced by G4NeutronHPEnAngCorrelation::Sample().

00152   { 
00153     G4double result;
00154     if(theDist == 0)
00155     {
00156       result = 0;
00157     }
00158     else
00159     {
00160       result=theDist->MeanEnergyOfThisInteraction();
00161       result *= theCurrentMultiplicity;
00162     }
00163     return result;
00164   }

G4ReactionProductVector * G4NeutronHPProduct::Sample ( G4double  anEnergy  ) 

Definition at line 42 of file G4NeutronHPProduct.cc.

References G4VNeutronHPEnergyAngular::ClearHistories(), G4Poisson(), G4NeutronHPVector::GetY(), G4VNeutronHPEnergyAngular::Sample(), G4VNeutronHPEnergyAngular::SetNeutron(), and G4VNeutronHPEnergyAngular::SetTarget().

Referenced by G4NeutronHPEnAngCorrelation::SampleOne().

00043 {
00044   if(theDist == 0) { return 0; }
00045   G4ReactionProductVector * result = new G4ReactionProductVector;
00046   G4double mean = theYield.GetY(anEnergy);
00047   G4int multi;
00048   multi = G4int(mean+0.0001);
00049   //if(theMassCode==0) multi = G4Poisson(mean); // @@@@gammas. please X-check this
00050   //080718
00051   if ( theMassCode == 0 )
00052   { 
00053      if ( G4int ( mean ) == mean )
00054      {
00055         multi = (G4int) mean;
00056      }
00057      else
00058      {
00059         multi = G4Poisson ( mean ); 
00060      }
00061   }
00062   theDist->SetTarget(theTarget);
00063   theDist->SetNeutron(theNeutron);
00064   G4int i;
00065 //  G4double eMax = GetTarget()->GetMass()+GetNeutron()->GetMass()
00066 //                  - theActualStateQValue;
00067   theCurrentMultiplicity = static_cast<G4int>(mean);
00068   G4ReactionProduct * tmp;
00069   theDist->ClearHistories();
00070   for(i=0;i<multi;i++)
00071   {
00072     tmp = theDist->Sample(anEnergy, theMassCode, theMass);
00073     if(tmp != 0) { result->push_back(tmp); }
00074   }
00075   if(multi == 0) 
00076   {
00077     tmp = theDist->Sample(anEnergy, theMassCode, theMass);
00078     delete  tmp;
00079   }
00080 /*
00081 //080901 TK Comment out, too many secondaries are produced in deuteron reactions
00082   if(theTarget->GetMass()<2*GeV) // @@@ take care of residuals in all cases
00083   {
00084     tmp = theDist->Sample(anEnergy, theMassCode, theMass);
00085     tmp->SetDefinition(G4Proton::Proton());
00086     if(tmp != 0) { result->push_back(tmp); }
00087   }
00088 */
00089   return result;
00090 }

void G4NeutronHPProduct::SetNeutron ( G4ReactionProduct aNeutron  )  [inline]

Definition at line 137 of file G4NeutronHPProduct.hh.

00138   { 
00139     theNeutron = aNeutron; 
00140   }

void G4NeutronHPProduct::SetTarget ( G4ReactionProduct aTarget  )  [inline]

Definition at line 142 of file G4NeutronHPProduct.hh.

00143   { 
00144     theTarget = aTarget; 
00145   }


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