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

#include <G4XnpElastic.hh>

+ Inheritance diagram for G4XnpElastic:

Public Member Functions

 G4XnpElastic ()
 
virtual ~G4XnpElastic ()
 
G4bool operator== (const G4XnpElastic &right) const
 
G4bool operator!= (const G4XnpElastic &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 const G4CrossSectionVectorGetComponents () const =0
 
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 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 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 G4XnpElastic.hh.

Constructor & Destructor Documentation

◆ G4XnpElastic()

G4XnpElastic::G4XnpElastic ( )

Definition at line 53 of file G4XnpElastic.cc.

54{
55 components = new G4CrossSectionVector;
56
57 G4VCrossSectionSource* xnpElasticLowE = new G4XnpElasticLowE;
58 components->push_back(xnpElasticLowE);
59
60// G4ParticleDefinition* proton = G4Proton::ProtonDefinition();
61// G4ParticleDefinition* neutron = G4Neutron::NeutronDefinition();
62 G4VCrossSectionSource* xnpElasticHighE = new G4XPDGElastic;
63 components->push_back(xnpElasticHighE);
64}
std::vector< G4CrossSectionSourcePtr > G4CrossSectionVector

◆ ~G4XnpElastic()

G4XnpElastic::~G4XnpElastic ( )
virtual

Definition at line 67 of file G4XnpElastic.cc.

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

Member Function Documentation

◆ GetComponents()

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

Implements G4CrossSectionPatch.

Definition at line 62 of file G4XnpElastic.hh.

62{ return components; }

Referenced by ~G4XnpElastic().

◆ Name()

G4String G4XnpElastic::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 98 of file G4XnpElastic.cc.

99{
100 G4String name("npElastic");
101 return name;
102}
const char * name(G4int ptype)

◆ operator!=()

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

Definition at line 92 of file G4XnpElastic.cc.

93{
94 return (this != (G4XnpElastic*) &right);
95}

◆ operator==()

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

Definition at line 86 of file G4XnpElastic.cc.

87{
88 return (this == (G4XnpElastic*) &right);
89}

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