Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4XNNTotalLowE Class Reference

#include <G4XNNTotalLowE.hh>

+ Inheritance diagram for G4XNNTotalLowE:

Public Member Functions

 G4XNNTotalLowE ()
 
virtual ~G4XNNTotalLowE ()
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual const G4CrossSectionVectorGetComponents () 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 G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0
 
virtual const G4CrossSectionVectorGetComponents () const =0
 
virtual G4String Name () const =0
 
virtual void Print () const
 
virtual void PrintAll (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4bool IsValid (G4double e) const
 
virtual G4double HighLimit () 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::G4XNNTotalLowE ( )

Definition at line 53 of file G4XNNTotalLowE.cc.

54{
55
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}
int G4int
Definition: G4Types.hh:85
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:98
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:87

◆ ~G4XNNTotalLowE()

G4XNNTotalLowE::~G4XNNTotalLowE ( )
virtual

Definition at line 72 of file G4XNNTotalLowE.cc.

73{
74
75 delete theCrossSections[G4Proton::ProtonDefinition()];
76 delete theCrossSections[G4Neutron::NeutronDefinition()];
77}

Member Function Documentation

◆ CrossSection()

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}
double G4double
Definition: G4Types.hh:83
const G4LorentzVector & Get4Momentum() const
const G4ParticleDefinition * FindKeyParticle(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const

◆ GetComponents()

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

Implements G4VCrossSectionSource.

Definition at line 50 of file G4XNNTotalLowE.hh.

50{ return 0; }

◆ HighLimit()

virtual G4double G4XNNTotalLowE::HighLimit ( ) const
inlinevirtual

Reimplemented from G4VCrossSectionSource.

Definition at line 54 of file G4XNNTotalLowE.hh.

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

◆ IsValid()

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}
bool G4bool
Definition: G4Types.hh:86

◆ Name()

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 char * name(G4int ptype)

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