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

#include <G4XNNTotal.hh>

+ Inheritance diagram for G4XNNTotal:

Public Member Functions

 G4XNNTotal ()
 
virtual ~G4XNNTotal ()
 
G4bool operator== (const G4XNNTotal &right) const
 
G4bool operator!= (const G4XNNTotal &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 37 of file G4XNNTotal.hh.

Constructor & Destructor Documentation

◆ G4XNNTotal()

G4XNNTotal::G4XNNTotal ( )

Definition at line 38 of file G4XNNTotal.cc.

39{
40 components = new G4CrossSectionVector;
41
42 G4VCrossSectionSource* xNNTotalLowE = new G4XNNTotalLowE;
43 components->push_back(xNNTotalLowE);
44
45 G4VCrossSectionSource* xNNTotalHighE = new G4XPDGTotal;
46 components->push_back(xNNTotalHighE);
47}
std::vector< G4CrossSectionSourcePtr > G4CrossSectionVector

◆ ~G4XNNTotal()

G4XNNTotal::~G4XNNTotal ( )
virtual

Definition at line 50 of file G4XNNTotal.cc.

51{
52 if (components != nullptr)
53 {
54 std::size_t nComponents = GetComponents()->size();
55 for (std::size_t i=0; i<nComponents; ++i)
56 {
57 G4CrossSectionSourcePtr componentPtr = (*components)[i];
58 G4VCrossSectionSource* component = componentPtr();
59 delete component;
60 component = nullptr;
61 componentPtr = nullptr;
62 }
63 }
64 delete components;
65 components = nullptr;
66}
virtual const G4CrossSectionVector * GetComponents() const
Definition G4XNNTotal.hh:48

Member Function Documentation

◆ GetComponents()

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

Implements G4CrossSectionPatch.

Definition at line 48 of file G4XNNTotal.hh.

48{ return components; }

Referenced by ~G4XNNTotal().

◆ Name()

G4String G4XNNTotal::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 81 of file G4XNNTotal.cc.

82{
83 G4String name("NNTotal");
84 return name;
85}
const char * name(G4int ptype)

◆ operator!=()

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

Definition at line 75 of file G4XNNTotal.cc.

76{
77 return (this != (G4XNNTotal*) &right);
78}

◆ operator==()

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

Definition at line 69 of file G4XNNTotal.cc.

70{
71 return (this == (G4XNNTotal*) &right);
72}

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