Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4XNNTotalLowE Class Reference

#include <G4XNNTotalLowE.hh>

Inheritance diagram for G4XNNTotalLowE:
Collaboration diagram for G4XNNTotalLowE:

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
 
- Public Member Functions inherited from G4VCrossSectionSource
 G4VCrossSectionSource ()
 
virtual ~G4VCrossSectionSource ()
 
G4bool operator== (const G4VCrossSectionSource &right) const
 
G4bool operator!= (const G4VCrossSectionSource &right) const
 
virtual void Print () const
 
virtual void PrintAll (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4double LowLimit () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VCrossSectionSource
G4bool InLimits (G4double e, G4double eLow, G4double eHigh) const
 
const G4ParticleDefinitionFindLightParticle (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
G4double FcrossX (G4double e, G4double e0, G4double sigma, G4double eParam, G4double power) const
 
const G4ParticleDefinitionFindKeyParticle (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 

Detailed Description

Definition at line 40 of file G4XNNTotalLowE.hh.

Constructor & Destructor Documentation

G4XNNTotalLowE::G4XNNTotalLowE ( )

Definition at line 53 of file G4XNNTotalLowE.cc.

54 {
55 
57  G4LowEXsection* np = new G4LowEXsection();
58 
59  G4int i;
60  for (i=0; i<tableSize; i++)
61  {
62  std::pair<double,double> it;
63  it.first=ss[i];
64  it.second=ppTot[i]; pp->push_back(it);
65  it.second=npTot[i]; np->push_back(it);
66  }
67  theCrossSections[G4Proton::ProtonDefinition()] = pp;
68  theCrossSections[G4Neutron::NeutronDefinition()] = np;
69 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
int G4int
Definition: G4Types.hh:78
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Here is the call graph for this function:

G4XNNTotalLowE::~G4XNNTotalLowE ( )
virtual

Definition at line 72 of file G4XNNTotalLowE.cc.

73 {
74 
75  delete theCrossSections[G4Proton::ProtonDefinition()];
76  delete theCrossSections[G4Neutron::NeutronDefinition()];
77 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Here is the call graph for this function:

Member Function Documentation

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

Implements G4VCrossSectionSource.

Definition at line 79 of file G4XNNTotalLowE.cc.

80 {
81  G4double result = 0.;
82  G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
83  const G4ParticleDefinition * key = FindKeyParticle(trk1,trk2);
84 
85  if (theCrossSections.find(key)!= theCrossSections.end())
86  {
87  LowEMap::const_iterator iter;
88  for (iter = theCrossSections.begin(); iter != theCrossSections.end(); ++iter)
89  {
90  if ((*iter).first == key)
91  {
92  result = (*iter).second->CrossSection(sqrtS);
93  }
94  }
95  }
96  else
97  {
98  throw G4HadronicException(__FILE__, __LINE__, "G4XNNTotalLowE: particle key out of range");
99  }
100 
101  return result;
102 }
G4double G4ParticleHPJENDLHEData::G4double result
const G4ParticleDefinition * FindKeyParticle(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
double G4double
Definition: G4Types.hh:76
const G4LorentzVector & Get4Momentum() const

Here is the call graph for this function:

virtual const G4CrossSectionVector* G4XNNTotalLowE::GetComponents ( ) const
inlinevirtual

Implements G4VCrossSectionSource.

Definition at line 50 of file G4XNNTotalLowE.hh.

50 { return 0; }
virtual G4double G4XNNTotalLowE::HighLimit ( ) const
inlinevirtual

Reimplemented from G4VCrossSectionSource.

Definition at line 54 of file G4XNNTotalLowE.hh.

54 { return 3.*CLHEP::GeV; }
static constexpr double GeV
G4bool G4XNNTotalLowE::IsValid ( G4double  e) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 111 of file G4XNNTotalLowE.cc.

112 {
113  G4bool result = e>0&&e<3*GeV;
114  return result;
115 }
G4double G4ParticleHPJENDLHEData::G4double result
bool G4bool
Definition: G4Types.hh:79
static constexpr double GeV
Definition: G4SIunits.hh:217
G4String G4XNNTotalLowE::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 104 of file G4XNNTotalLowE.cc.

105 {
106  G4String name("NNTotalLowE");
107  return name;
108 }
const XML_Char * name
Definition: expat.h:151

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