Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4XNNTotalLowE Class Reference

#include <G4XNNTotalLowE.hh>

Inheritance diagram for G4XNNTotalLowE:
G4VCrossSectionSource

Public Member Functions

 G4XNNTotalLowE ()
 
virtual ~G4XNNTotalLowE ()
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual const
G4CrossSectionVector
GetComponents () 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 void Print () const
 
virtual void PrintAll (const G4KineticTrack &trk1, const G4KineticTrack &trk2) 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 ( )

Definition at line 54 of file G4XNNTotalLowE.cc.

References G4Neutron::NeutronDefinition(), G4InuclParticleNames::pp, and G4Proton::ProtonDefinition().

55 {
56 
58  G4LowEXsection* np = new G4LowEXsection();
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 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
int G4int
Definition: G4Types.hh:78
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
G4XNNTotalLowE::~G4XNNTotalLowE ( )
virtual

Definition at line 73 of file G4XNNTotalLowE.cc.

References G4Neutron::NeutronDefinition(), and G4Proton::ProtonDefinition().

74 {
75 
76  delete theCrossSections[G4Proton::ProtonDefinition()];
77  delete theCrossSections[G4Neutron::NeutronDefinition()];
78 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Member Function Documentation

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

Implements G4VCrossSectionSource.

Definition at line 80 of file G4XNNTotalLowE.cc.

References G4VCrossSectionSource::FindKeyParticle(), and G4KineticTrack::Get4Momentum().

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

Implements G4VCrossSectionSource.

Definition at line 50 of file G4XNNTotalLowE.hh.

50 { return 0; }
virtual G4double G4XNNTotalLowE::HighLimit ( ) const
inlinevirtual

Reimplemented from G4VCrossSectionSource.

Definition at line 54 of file G4XNNTotalLowE.hh.

54 { return 3.*CLHEP::GeV; }
G4bool G4XNNTotalLowE::IsValid ( G4double  e) const
virtual

Reimplemented from G4VCrossSectionSource.

Definition at line 112 of file G4XNNTotalLowE.cc.

References python.hepunit::GeV.

113 {
114  G4bool result = e>0&&e<3*GeV;
115  return result;
116 }
bool G4bool
Definition: G4Types.hh:79
G4String G4XNNTotalLowE::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 105 of file G4XNNTotalLowE.cc.

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

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