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

#include <G4XNNElastic.hh>

Inheritance diagram for G4XNNElastic:

Public Member Functions

 G4XNNElastic ()
virtual ~G4XNNElastic ()
G4bool operator== (const G4XNNElastic &right) const
G4bool operator!= (const G4XNNElastic &right) const
virtual const G4CrossSectionVectorGetComponents () const
virtual G4String Name () const
Public Member Functions inherited from G4CrossSectionPatch
 G4CrossSectionPatch ()
virtual ~G4CrossSectionPatch ()
G4bool operator== (const G4CrossSectionPatch &right) const
G4bool operator!= (const G4CrossSectionPatch &right) const
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
virtual G4bool IsValid (G4double e) 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 HighLimit () const
virtual G4double LowLimit () const

Additional Inherited Members

Protected Member Functions inherited from G4CrossSectionPatch
G4double Transition (const G4KineticTrack &trk1, const G4KineticTrack &trk2, const G4VCrossSectionSource *comp1, const G4VCrossSectionSource *comp2) const
G4double Transition (G4double ecm, G4double sigma1, G4double sigma2, G4double e1, G4double e2) const
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 50 of file G4XNNElastic.hh.

Constructor & Destructor Documentation

◆ G4XNNElastic()

G4XNNElastic::G4XNNElastic ( )

Definition at line 53 of file G4XNNElastic.cc.

54{
55 components = new G4CrossSectionVector;
56
57 G4VCrossSectionSource* xNNElasticLowE = new G4XNNElasticLowE;
58 components->push_back(xNNElasticLowE);
59
60 G4VCrossSectionSource* xNNElasticHighE = new G4XPDGElastic;
61 components->push_back(xNNElasticHighE);
62}
std::vector< G4CrossSectionSourcePtr > G4CrossSectionVector

Referenced by operator!=(), and operator==().

◆ ~G4XNNElastic()

G4XNNElastic::~G4XNNElastic ( )
virtual

Definition at line 65 of file G4XNNElastic.cc.

66{
67 if (components != nullptr)
68 {
69 std::size_t nComponents = GetComponents()->size();
70 for (std::size_t i=0; i<nComponents; ++i)
71 {
72 G4CrossSectionSourcePtr componentPtr = (*components)[i];
73 G4VCrossSectionSource* component = componentPtr();
74 delete component;
75 component = nullptr;
76 componentPtr = nullptr;
77 }
78 }
79 delete components;
80 components = nullptr;
81}
virtual const G4CrossSectionVector * GetComponents() const

Member Function Documentation

◆ GetComponents()

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

Implements G4CrossSectionPatch.

Definition at line 62 of file G4XNNElastic.hh.

62{ return components; }

Referenced by ~G4XNNElastic().

◆ Name()

G4String G4XNNElastic::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 96 of file G4XNNElastic.cc.

97{
98 G4String name("NNElastic");
99 return name;
100}
const char * name(G4int ptype)

◆ operator!=()

G4bool G4XNNElastic::operator!= ( const G4XNNElastic & right) const

Definition at line 90 of file G4XNNElastic.cc.

91{
92 return (this != (G4XNNElastic*) &right);
93}

◆ operator==()

G4bool G4XNNElastic::operator== ( const G4XNNElastic & right) const

Definition at line 84 of file G4XNNElastic.cc.

85{
86 return (this == (G4XNNElastic*) &right);
87}

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