Geant4  10.02.p03
G4XnpElasticLowE Class Reference

#include <G4XnpElasticLowE.hh>

Inheritance diagram for G4XnpElasticLowE:
Collaboration diagram for G4XnpElasticLowE:

Public Member Functions

 G4XnpElasticLowE ()
 
virtual ~G4XnpElasticLowE ()
 
G4bool operator== (const G4XnpElasticLowE &right) const
 
G4bool operator!= (const G4XnpElasticLowE &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 void PrintAll (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4double LowLimit () const
 

Private Member Functions

 G4XnpElasticLowE (const G4XnpElasticLowE &right)
 
const G4XnpElasticLowEoperator= (const G4XnpElasticLowE &right)
 

Private Attributes

G4PhysicsVector_sigma
 
G4double _eMin
 
G4double _eMax
 

Static Private Attributes

static const G4double _lowLimit = 0.
 
static const G4double _highLimit = 3.*GeV
 
static const G4double _sigmaTable [101]
 
static const G4int _tableSize = 101
 
static const G4double _eMinTable = 1.8964808
 
static const G4double _eStepLog = 0.01
 

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 51 of file G4XnpElasticLowE.hh.

Constructor & Destructor Documentation

◆ G4XnpElasticLowE() [1/2]

G4XnpElasticLowE::G4XnpElasticLowE ( )

Definition at line 88 of file G4XnpElasticLowE.cc.

89 {
90  // Cross-sections are available in the range (_eMin,_eMax)
91 
92  _eMin = _eMinTable * GeV;
95 
96  // Protections: validity limits must be compatible with available data
97 
98  if (_eMin < _lowLimit)
99  throw G4HadronicException(__FILE__, __LINE__, "G4XnpElasticLowE::G4XnpElasticLowE - Low energy limit not valid");
100 
101  if (_highLimit > _eMax)
102  throw G4HadronicException(__FILE__, __LINE__, "G4XnpElasticLowE::G4XnpElasticLowE - High energy limit not valid");
103 
105  G4int i;
106  for (i=0; i<_tableSize; i++)
107  {
108  G4double value = _sigmaTable[i] * millibarn;
109  _sigma->PutValue(i,value);
110  }
111 }
G4PhysicsVector * _sigma
static const G4double _sigmaTable[101]
static const G4int _tableSize
static const G4double _eMinTable
static const G4double _highLimit
int G4int
Definition: G4Types.hh:78
void PutValue(size_t index, G4double theValue)
static const double GeV
Definition: G4SIunits.hh:214
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const G4double _eStepLog
static const double millibarn
Definition: G4SIunits.hh:105
double G4double
Definition: G4Types.hh:76
static const G4double _lowLimit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~G4XnpElasticLowE()

G4XnpElasticLowE::~G4XnpElasticLowE ( )
virtual

Definition at line 114 of file G4XnpElasticLowE.cc.

115 {
116  delete _sigma;
117  _sigma = 0;
118 }
G4PhysicsVector * _sigma

◆ G4XnpElasticLowE() [2/2]

G4XnpElasticLowE::G4XnpElasticLowE ( const G4XnpElasticLowE right)
private

Member Function Documentation

◆ CrossSection()

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

Implements G4VCrossSectionSource.

Definition at line 133 of file G4XnpElasticLowE.cc.

134 {
135  G4double sigma = 0.;
136  G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
137  G4bool dummy = false;
138 
141 
142  const G4ParticleDefinition* def1 = trk1.GetDefinition();
143  const G4ParticleDefinition* def2 = trk2.GetDefinition();
144  if ( (def1 == proton && def2 == neutron) ||
145  (def1 == neutron && def2 == proton) )
146  {
147  if (sqrtS >= _eMin && sqrtS <= _eMax)
148  {
149  sigma = _sigma->GetValue(sqrtS,dummy);
150  } else if ( sqrtS < _eMin )
151  {
152  sigma = _sigma->GetValue(_eMin,dummy);
153  }
154  }
155 
156  return sigma;
157 }
const G4ParticleDefinition * GetDefinition() const
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
G4PhysicsVector * _sigma
bool G4bool
Definition: G4Types.hh:79
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
double G4double
Definition: G4Types.hh:76
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
const G4LorentzVector & Get4Momentum() const
Here is the call graph for this function:

◆ GetComponents()

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

Implements G4VCrossSectionSource.

Definition at line 65 of file G4XnpElasticLowE.hh.

65 { return 0; }
Here is the call graph for this function:

◆ HighLimit()

virtual G4double G4XnpElasticLowE::HighLimit ( ) const
inlinevirtual

Reimplemented from G4VCrossSectionSource.

Definition at line 73 of file G4XnpElasticLowE.hh.

73 { return _highLimit; }
static const G4double _highLimit
Here is the call graph for this function:

◆ IsValid()

G4bool G4XnpElasticLowE::IsValid ( G4double  e) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 184 of file G4XnpElasticLowE.cc.

185 {
187 
188  return answer;
189 }
static const G4double _highLimit
bool G4bool
Definition: G4Types.hh:79
G4bool InLimits(G4double e, G4double eLow, G4double eHigh) const
static const G4double _lowLimit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Name()

G4String G4XnpElasticLowE::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 177 of file G4XnpElasticLowE.cc.

178 {
179  G4String name("npElasticLowE");
180  return name;
181 }
G4String name
Definition: TRTMaterials.hh:40
Here is the caller graph for this function:

◆ operator!=()

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

Definition at line 127 of file G4XnpElasticLowE.cc.

128 {
129  return (this != (G4XnpElasticLowE *) &right);
130 }

◆ operator=()

const G4XnpElasticLowE& G4XnpElasticLowE::operator= ( const G4XnpElasticLowE right)
private
Here is the caller graph for this function:

◆ operator==()

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

Definition at line 121 of file G4XnpElasticLowE.cc.

122 {
123  return (this == (G4XnpElasticLowE *) &right);
124 }

◆ Print()

void G4XnpElasticLowE::Print ( void  ) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 159 of file G4XnpElasticLowE.cc.

160 {
161  // Dump the cross-section table
162  G4cout << Name() << "Cross-section table: " << G4endl;
163  G4bool dummy = false;
164  G4int i;
165 
166  for (i=0; i<_tableSize; i++)
167  {
169  G4double sigma = _sigma->GetValue(e,dummy) / millibarn;
170  G4cout << i << ") e = " << e << " GeV ---- Cross section = " << sigma << " mb " << G4endl;
171  }
172 
174 }
virtual void Print() const
G4PhysicsVector * _sigma
static const G4int _tableSize
int G4int
Definition: G4Types.hh:78
G4double GetLowEdgeEnergy(size_t binNumber) const
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static const double GeV
Definition: G4SIunits.hh:214
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
virtual G4String Name() const
static const double millibarn
Definition: G4SIunits.hh:105
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _eMax

G4double G4XnpElasticLowE::_eMax
private

Definition at line 93 of file G4XnpElasticLowE.hh.

◆ _eMin

G4double G4XnpElasticLowE::_eMin
private

Definition at line 92 of file G4XnpElasticLowE.hh.

◆ _eMinTable

const G4double G4XnpElasticLowE::_eMinTable = 1.8964808
staticprivate

Definition at line 88 of file G4XnpElasticLowE.hh.

◆ _eStepLog

const G4double G4XnpElasticLowE::_eStepLog = 0.01
staticprivate

Definition at line 89 of file G4XnpElasticLowE.hh.

◆ _highLimit

const G4double G4XnpElasticLowE::_highLimit = 3.*GeV
staticprivate

Definition at line 85 of file G4XnpElasticLowE.hh.

◆ _lowLimit

const G4double G4XnpElasticLowE::_lowLimit = 0.
staticprivate

Definition at line 84 of file G4XnpElasticLowE.hh.

◆ _sigma

G4PhysicsVector* G4XnpElasticLowE::_sigma
private

Definition at line 91 of file G4XnpElasticLowE.hh.

◆ _sigmaTable

const G4double G4XnpElasticLowE::_sigmaTable
staticprivate
Initial value:
=
{
1500.0,
248.20, 93.38, 55.26, 44.50, 41.33, 38.48, 37.20, 35.98,
35.02, 34.47, 32.48, 30.76, 29.46, 28.53, 27.84, 27.20,
26.53, 25.95, 25.59, 25.46, 25.00, 24.49, 24.08, 23.86,
23.17, 22.70, 21.88, 21.48, 20.22, 19.75, 18.97, 18.39,
17.98, 17.63, 17.21, 16.72, 16.68, 16.58, 16.42, 16.22,
15.98, 15.71, 15.42, 15.14, 14.87, 14.65, 14.44, 14.26,
14.10, 13.95, 13.80, 13.64, 13.47, 13.29, 13.09, 12.89,
12.68, 12.47, 12.27, 12.06, 11.84, 11.76, 11.69, 11.60,
11.50, 11.41, 11.29, 11.17, 11.06, 10.93, 10.81, 10.68,
10.56, 10.44, 10.33, 10.21, 10.12, 10.03, 9.96, 9.89,
9.83, 9.80, 9.77, 9.75, 9.74, 9.74, 9.74, 9.76,
9.73, 9.70, 9.68, 9.65, 9.63, 9.60, 9.57, 9.55,
9.52, 9.49, 9.46, 9.43
}

Definition at line 86 of file G4XnpElasticLowE.hh.

◆ _tableSize

const G4int G4XnpElasticLowE::_tableSize = 101
staticprivate

Definition at line 87 of file G4XnpElasticLowE.hh.


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