G4XNNTotalLowE Class Reference

#include <G4XNNTotalLowE.hh>

Inheritance diagram for G4XNNTotalLowE:

G4VCrossSectionSource

Public Member Functions

 G4XNNTotalLowE ()
virtual ~G4XNNTotalLowE ()
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
virtual const G4CrossSectionVector * GetComponents () const
virtual G4bool IsValid (G4double e) const
virtual G4String Name () const
virtual G4double HighLimit () const

Detailed Description

Definition at line 40 of file G4XNNTotalLowE.hh.


Constructor & Destructor Documentation

G4XNNTotalLowE::G4XNNTotalLowE (  ) 

Definition at line 54 of file G4XNNTotalLowE.cc.

References G4Neutron::NeutronDefinition(), G4InuclParticleNames::pp, and G4Proton::ProtonDefinition().

00055 { 
00056     
00057   G4LowEXsection* pp = new G4LowEXsection();
00058   G4LowEXsection* np = new G4LowEXsection();
00059 
00060   G4int i;
00061   for (i=0; i<tableSize; i++)
00062     {
00063       std::pair<double,double> it;
00064       it.first=ss[i];
00065       it.second=ppTot[i]; pp->push_back(it);
00066       it.second=npTot[i]; np->push_back(it);
00067     }
00068   theCrossSections[G4Proton::ProtonDefinition()] = pp;
00069   theCrossSections[G4Neutron::NeutronDefinition()] = np;
00070 }

G4XNNTotalLowE::~G4XNNTotalLowE (  )  [virtual]

Definition at line 73 of file G4XNNTotalLowE.cc.

References G4Neutron::NeutronDefinition(), and G4Proton::ProtonDefinition().

00074 {
00075   
00076   delete theCrossSections[G4Proton::ProtonDefinition()];
00077   delete theCrossSections[G4Neutron::NeutronDefinition()];
00078 }


Member Function Documentation

G4double G4XNNTotalLowE::CrossSection ( const G4KineticTrack &  trk1,
const G4KineticTrack &  trk2 
) const [virtual]

Implements G4VCrossSectionSource.

Definition at line 80 of file G4XNNTotalLowE.cc.

References G4VCrossSectionSource::FindKeyParticle(), and G4KineticTrack::Get4Momentum().

00081 {
00082   G4double result = 0.;
00083   G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
00084   G4ParticleDefinition * key = FindKeyParticle(trk1,trk2);
00085 
00086   if (theCrossSections.find(key)!= theCrossSections.end())
00087   {
00088     LowEMap::const_iterator iter;
00089     for (iter = theCrossSections.begin(); iter != theCrossSections.end(); ++iter)
00090     {
00091       if ((*iter).first == key)
00092       {
00093         result = (*iter).second->CrossSection(sqrtS);
00094       }
00095     }
00096   }
00097   else
00098   {
00099     throw G4HadronicException(__FILE__, __LINE__, "G4XNNTotalLowE: particle key out of range");
00100   }
00101 
00102   return result;
00103 }

virtual const G4CrossSectionVector* G4XNNTotalLowE::GetComponents (  )  const [inline, virtual]

Implements G4VCrossSectionSource.

Definition at line 50 of file G4XNNTotalLowE.hh.

00050 { return 0; }

virtual G4double G4XNNTotalLowE::HighLimit (  )  const [inline, virtual]

Reimplemented from G4VCrossSectionSource.

Definition at line 54 of file G4XNNTotalLowE.hh.

00054 { return 3.*CLHEP::GeV; }

G4bool G4XNNTotalLowE::IsValid ( G4double  e  )  const [virtual]

Reimplemented from G4VCrossSectionSource.

Definition at line 112 of file G4XNNTotalLowE.cc.

00113 {
00114   G4bool result = e>0&&e<3*GeV;
00115   return result;
00116 }

G4String G4XNNTotalLowE::Name (  )  const [virtual]

Implements G4VCrossSectionSource.

Definition at line 105 of file G4XNNTotalLowE.cc.

00106 {
00107   G4String name("NNTotalLowE");
00108   return name;
00109 }


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