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

#include <G4PiData.hh>

Inheritance diagram for G4PiData:
Collaboration diagram for G4PiData:

Classes

struct  Delete
 

Public Member Functions

 G4PiData (const G4double *aTotal, const G4double *aInelastic, const G4double *anEnergy, G4int nPoints)
 
G4bool AppliesTo (G4double kineticEnergy)
 
G4double ReactionXSection (G4double kineticEnergy)
 
G4double ElasticXSection (G4double kineticEnergy)
 
G4double TotalXSection (G4double kineticEnergy)
 

Detailed Description

Definition at line 35 of file G4PiData.hh.

Constructor & Destructor Documentation

G4PiData::G4PiData ( const G4double aTotal,
const G4double aInelastic,
const G4double anEnergy,
G4int  nPoints 
)

Definition at line 36 of file G4PiData.cc.

38 {
39  G4int i=0;
40 
41  for( i = 0; i < nP; i++ )
42  {
43  std::pair<G4double, G4double> x;
44  x.first=aT[i]*millibarn;
45  x.second=aIn[i]*millibarn;
46  std::pair<G4double, std::pair<G4double, G4double > > aP;
47  aP.first=anE[i]*GeV;
48  aP.second=x;
49  push_back(aP);
50  }
51 }
tuple x
Definition: test.py:50
int G4int
Definition: G4Types.hh:78
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double millibarn
Definition: G4SIunits.hh:106

Member Function Documentation

G4bool G4PiData::AppliesTo ( G4double  kineticEnergy)

Definition at line 55 of file G4PiData.cc.

56 {
57  G4bool result = true;
58  if(kineticEnergy>back().first) result = false;
59  return result;
60 }
G4double G4ParticleHPJENDLHEData::G4double result
bool G4bool
Definition: G4Types.hh:79
G4double G4PiData::ElasticXSection ( G4double  kineticEnergy)

Definition at line 86 of file G4PiData.cc.

87 {
88  G4double result = 0;
89  G4PiData::iterator it=begin();
90  while(it!=end()&&kineticEnergy>(*it).first) {it++;} /* Loop checking, 08.01.2016, W. Pokorski */
91  if(it==end())
92  {
93  throw G4HadronicException(__FILE__, __LINE__,
94  "G4PiData::ElasticXSection: used outside validity range");
95  }
96  if(it==begin()) it++;
97  G4double x1,x2,e1,e2;
98  e1=(*(it-1)).first;
99  x1=(*(it-1)).second.first - (*(it-1)).second.second;
100  e2=(*(it)).first;
101  x2=(*(it)).second.first - (*(it)).second.second;
102  result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
103  return result;
104 }
G4double G4ParticleHPJENDLHEData::G4double result
T max(const T t1, const T t2)
brief Return the largest of the two arguments
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4PiData::ReactionXSection ( G4double  kineticEnergy)

Definition at line 64 of file G4PiData.cc.

65 {
66  G4double result = 0;
67  G4PiData::iterator it=begin();
68  while(it!=end()&&kineticEnergy>(*it).first) {it++;} /* Loop checking, 08.01.2016, W. Pokorski */
69  if(it==end())
70  {
71  throw G4HadronicException(__FILE__, __LINE__,
72  "G4PiData::ReactionXSection: used outside validity range");
73  }
74  if(it==begin()) it++;
75  G4double x1,x2,e1,e2;
76  e1=(*(it-1)).first;
77  x1=(*(it-1)).second.second;
78  e2=(*(it)).first;
79  x2=(*(it)).second.second;
80  result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
81  return result;
82 }
G4double G4ParticleHPJENDLHEData::G4double result
T max(const T t1, const T t2)
brief Return the largest of the two arguments
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4PiData::TotalXSection ( G4double  kineticEnergy)

Definition at line 108 of file G4PiData.cc.

109 {
110  G4double result = 0;
111  G4PiData::iterator it=begin();
112  while(it!=end()&&kineticEnergy>(*it).first) {it++;} /* Loop checking, 08.01.2016, W. Pokorski */
113  if(it==end())
114  {
115  throw G4HadronicException(__FILE__, __LINE__,
116  "G4PiData::TotalXSection: used outside validity range");
117  }
118  if(it==begin()) it++;
119  G4double x1,x2,e1,e2;
120  e1=(*(it-1)).first;
121  x1=(*(it-1)).second.first;
122  e2=(*(it)).first;
123  x2=(*(it)).second.first;
124  result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
125  return result;
126 }
G4double G4ParticleHPJENDLHEData::G4double result
T max(const T t1, const T t2)
brief Return the largest of the two arguments
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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