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

#include <G4XnpElastic.hh>

Inheritance diagram for G4XnpElastic:
Collaboration diagram for G4XnpElastic:

Public Member Functions

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

Constructor & Destructor Documentation

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 ( )
virtual

Definition at line 67 of file G4XnpElastic.cc.

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

Here is the call graph for this function:

Member Function Documentation

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

Implements G4CrossSectionPatch.

Definition at line 62 of file G4XnpElastic.hh.

62 { return components; }

Here is the caller graph for this function:

G4String G4XnpElastic::Name ( ) const
virtual

Implements G4VCrossSectionSource.

Definition at line 99 of file G4XnpElastic.cc.

100 {
101  G4String name("npElastic");
102  return name;
103 }
const XML_Char * name
Definition: expat.h:151
G4bool G4XnpElastic::operator!= ( const G4XnpElastic right) const

Definition at line 93 of file G4XnpElastic.cc.

94 {
95  return (this != (G4XnpElastic*) &right);
96 }
G4bool G4XnpElastic::operator== ( const G4XnpElastic right) const

Definition at line 87 of file G4XnpElastic.cc.

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

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