G4XnpElastic Class Reference

#include <G4XnpElastic.hh>

Inheritance diagram for G4XnpElastic:

G4CrossSectionPatch G4VCrossSectionSource

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

Detailed Description

Definition at line 50 of file G4XnpElastic.hh.


Constructor & Destructor Documentation

G4XnpElastic::G4XnpElastic (  ) 

Definition at line 53 of file G4XnpElastic.cc.

00054 { 
00055   components = new G4CrossSectionVector;
00056 
00057   G4VCrossSectionSource* xnpElasticLowE = new G4XnpElasticLowE;
00058   components->push_back(xnpElasticLowE);
00059 
00060 //  G4ParticleDefinition* proton = G4Proton::ProtonDefinition();
00061 //  G4ParticleDefinition* neutron = G4Neutron::NeutronDefinition();
00062   G4VCrossSectionSource* xnpElasticHighE = new G4XPDGElastic;
00063   components->push_back(xnpElasticHighE);
00064 }

G4XnpElastic::~G4XnpElastic (  )  [virtual]

Definition at line 67 of file G4XnpElastic.cc.

References GetComponents().

00068 { 
00069   if (components != 0) 
00070     {
00071       G4int nComponents = this->GetComponents()->size();
00072       G4int i;
00073       for (i=0; i<nComponents; i++)
00074         {
00075           G4CrossSectionSourcePtr componentPtr = (*components)[i];
00076           G4VCrossSectionSource* component = componentPtr();
00077           delete component;
00078           component = 0;
00079           componentPtr = 0;
00080         }
00081     }
00082   delete components;
00083   components = 0;
00084 }


Member Function Documentation

virtual const G4CrossSectionVector* G4XnpElastic::GetComponents (  )  const [inline, virtual]

Implements G4CrossSectionPatch.

Definition at line 62 of file G4XnpElastic.hh.

Referenced by ~G4XnpElastic().

00062 { return components; } 

G4String G4XnpElastic::Name (  )  const [virtual]

Implements G4VCrossSectionSource.

Definition at line 99 of file G4XnpElastic.cc.

00100 {
00101   G4String name("npElastic");
00102   return name;
00103 }

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

Definition at line 93 of file G4XnpElastic.cc.

00094 {
00095   return (this != (G4XnpElastic*) &right);
00096 }

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

Definition at line 87 of file G4XnpElastic.cc.

00088 {
00089   return (this == (G4XnpElastic*) &right);
00090 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:00 2013 for Geant4 by  doxygen 1.4.7