Geant4 9.6.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
 
G4ParticleDefinitionFindKeyParticle (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
G4double GetTransversePionMass () const
 
G4double GetMinStringMass () const
 

Detailed Description

Definition at line 40 of file G4XNNTotalLowE.hh.

Constructor & Destructor Documentation

◆ G4XNNTotalLowE()

G4XNNTotalLowE::G4XNNTotalLowE ( )

Definition at line 54 of file G4XNNTotalLowE.cc.

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

◆ ~G4XNNTotalLowE()

G4XNNTotalLowE::~G4XNNTotalLowE ( )
virtual

Definition at line 73 of file G4XNNTotalLowE.cc.

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

Member Function Documentation

◆ CrossSection()

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

Implements G4VCrossSectionSource.

Definition at line 80 of file G4XNNTotalLowE.cc.

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

113{
114 G4bool result = e>0&&e<3*GeV;
115 return result;
116}
bool G4bool
Definition: G4Types.hh:67

◆ Name()

G4String G4XNNTotalLowE::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 105 of file G4XNNTotalLowE.cc.

106{
107 G4String name("NNTotalLowE");
108 return name;
109}

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