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

#include <G4XnpTotalLowE.hh>

+ Inheritance diagram for G4XnpTotalLowE:

Public Member Functions

 G4XnpTotalLowE ()
 
virtual ~G4XnpTotalLowE ()
 
G4bool operator== (const G4XnpTotalLowE &right) const
 
G4bool operator!= (const G4XnpTotalLowE &right) const
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual const G4CrossSectionVectorGetComponents () const
 
virtual G4bool IsValid (G4double e) const
 
virtual void Print () 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 51 of file G4XnpTotalLowE.hh.

Constructor & Destructor Documentation

◆ G4XnpTotalLowE()

G4XnpTotalLowE::G4XnpTotalLowE ( )

Definition at line 87 of file G4XnpTotalLowE.cc.

88{
89 // Cross-sections are available in the range (_eMin,_eMax)
90
91 _eMin = _eMinTable * GeV;
92 _eMin = std::exp(std::log(_eMinTable)-_eStepLog)*GeV;
93 _eMax = std::exp(std::log(_eMinTable) + _tableSize * _eStepLog) * GeV;
94
95 // Protections: validity limits must be compatible with available data
96// @@GF this ought to be _lowLimit < _eMin
97 if (_eMin < _lowLimit)
98 throw G4HadronicException(__FILE__, __LINE__, "G4XnpTotalLowE::G4XnpTotalLowE - Low energy limit not valid");
99
100 if (_highLimit > _eMax)
101 throw G4HadronicException(__FILE__, __LINE__, "G4XnpTotalLowE::G4XnpTotalLowE - High energy limit not valid");
102
103 _sigma = new G4PhysicsLnVector(_eMin,_eMax,_tableSize);
104 G4int i;
105 for (i=0; i<_tableSize; i++)
106 {
107 G4double value = _sigmaTable[i] * millibarn;
108 _sigma->PutValue(i,value);
109 }
110}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void PutValue(size_t index, G4double theValue)

◆ ~G4XnpTotalLowE()

G4XnpTotalLowE::~G4XnpTotalLowE ( )
virtual

Definition at line 113 of file G4XnpTotalLowE.cc.

114{
115 delete _sigma;
116}

Member Function Documentation

◆ CrossSection()

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

Implements G4VCrossSectionSource.

Definition at line 131 of file G4XnpTotalLowE.cc.

132{
133 G4double sigma = 0.;
134 G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
135 G4bool dummy = false;
136
139
140 G4ParticleDefinition* def1 = trk1.GetDefinition();
141 G4ParticleDefinition* def2 = trk2.GetDefinition();
142 if ( (def1 == proton && def2 == neutron) ||
143 (def1 == neutron && def2 == proton) )
144 {
145 if (sqrtS >= _eMin && sqrtS <= _eMax)
146 {
147 sigma = _sigma->GetValue(sqrtS,dummy);
148 } else if ( sqrtS < _eMin )
149 {
150 sigma = _sigma->GetValue(_eMin,dummy);
151 }
152 }
153
154 return sigma;
155}
@ neutron
bool G4bool
Definition: G4Types.hh:67
G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
G4double GetValue(G4double theEnergy, G4bool &isOutRange)
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88

◆ GetComponents()

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

Implements G4VCrossSectionSource.

Definition at line 65 of file G4XnpTotalLowE.hh.

65{return 0; }

◆ HighLimit()

virtual G4double G4XnpTotalLowE::HighLimit ( ) const
inlinevirtual

Reimplemented from G4VCrossSectionSource.

Definition at line 73 of file G4XnpTotalLowE.hh.

73{ return _highLimit; }

◆ IsValid()

G4bool G4XnpTotalLowE::IsValid ( G4double  e) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 183 of file G4XnpTotalLowE.cc.

184{
185 G4bool answer = InLimits(e,_lowLimit,_highLimit);
186
187 return answer;
188}
G4bool InLimits(G4double e, G4double eLow, G4double eHigh) const

◆ Name()

G4String G4XnpTotalLowE::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 176 of file G4XnpTotalLowE.cc.

177{
178 G4String name("NNTotalLowE");
179 return name;
180}

Referenced by Print().

◆ operator!=()

G4bool G4XnpTotalLowE::operator!= ( const G4XnpTotalLowE right) const

Definition at line 125 of file G4XnpTotalLowE.cc.

126{
127 return (this != (G4XnpTotalLowE *) &right);
128}

◆ operator==()

G4bool G4XnpTotalLowE::operator== ( const G4XnpTotalLowE right) const

Definition at line 119 of file G4XnpTotalLowE.cc.

120{
121 return (this == (G4XnpTotalLowE *) &right);
122}

◆ Print()

void G4XnpTotalLowE::Print ( ) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 157 of file G4XnpTotalLowE.cc.

158{
159 // Dump the cross-section table
160
161 G4cout << Name() << "Cross-section table: " << G4endl;
162 G4bool dummy = false;
163 G4int i;
164
165 for (i=0; i<_tableSize; i++)
166 {
167 G4double e = _sigma->GetLowEdgeEnergy(i) / GeV;
168 G4double sigma = _sigma->GetValue(e,dummy) / millibarn;
169 G4cout << i << ") e = " << e << " GeV ---- Cross section = " << sigma << " mb " << G4endl;
170 }
171
173}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
virtual G4double GetLowEdgeEnergy(size_t binNumber) const
virtual void Print() const
virtual G4String Name() const

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