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

#include <G4CollisionnpElastic.hh>

Inheritance diagram for G4CollisionnpElastic:
Collaboration diagram for G4CollisionnpElastic:

Public Member Functions

 G4CollisionnpElastic ()
 
virtual ~G4CollisionnpElastic ()
 
G4bool operator== (const G4CollisionnpElastic &right) const
 
G4bool operator!= (const G4CollisionnpElastic &right) const
 
virtual G4bool IsInCharge (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4String GetName () const
 
- Public Member Functions inherited from G4VElasticCollision
 G4VElasticCollision ()
 
virtual ~G4VElasticCollision ()
 
G4bool operator== (const G4VElasticCollision &right) const
 
G4bool operator!= (const G4VElasticCollision &right) const
 
virtual G4KineticTrackVectorFinalState (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
- Public Member Functions inherited from G4VCollision
 G4VCollision ()
 
void establish_G4MT_TLS_G4VCollision ()
 
 G4VCollision (void *s1, void *s2, void *s3, void *s4, void *s5, void *s6, void *s7)
 
virtual ~G4VCollision ()
 
G4bool operator== (const G4VCollision &right) const
 
G4bool operator!= (const G4VCollision &right) const
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual void Print () const
 
virtual void Print (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 

Protected Member Functions

virtual const
G4VCrossSectionSource
GetCrossSectionSource () const
 
virtual const
G4VAngularDistribution
GetAngularDistribution () const
 
virtual const std::vector
< G4String > & 
GetListOfColliders (G4int whichOne) const
 
- Protected Member Functions inherited from G4VCollision
G4int GetNumberOfPartons (const G4ParticleDefinition *aP) const
 
virtual const G4CollisionVectorGetComponents () const
 

Detailed Description

Definition at line 42 of file G4CollisionnpElastic.hh.

Constructor & Destructor Documentation

G4CollisionnpElastic::G4CollisionnpElastic ( )

Definition at line 42 of file G4CollisionnpElastic.cc.

43 {
44  // Subtype of interacting particles
47 
48  colliders1.push_back(subType1);
49  colliders2.push_back(subType2);
50 
51 // angularDistribution = new G4AngularDistribution(true);
52  angularDistribution = new G4AngularDistributionNP();
53  crossSectionSource = new G4XnpElastic();
54 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
const G4String & GetParticleSubType() const
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Here is the call graph for this function:

G4CollisionnpElastic::~G4CollisionnpElastic ( )
virtual

Definition at line 57 of file G4CollisionnpElastic.cc.

58 {
59  delete angularDistribution;
60  delete crossSectionSource;
61 }

Member Function Documentation

virtual const G4VAngularDistribution* G4CollisionnpElastic::GetAngularDistribution ( ) const
inlineprotectedvirtual

Implements G4VCollision.

Definition at line 66 of file G4CollisionnpElastic.hh.

66 { return angularDistribution; }
virtual const G4VCrossSectionSource* G4CollisionnpElastic::GetCrossSectionSource ( ) const
inlineprotectedvirtual

Implements G4VCollision.

Definition at line 65 of file G4CollisionnpElastic.hh.

65 { return crossSectionSource; }
const std::vector< G4String > & G4CollisionnpElastic::GetListOfColliders ( G4int  whichOne) const
protectedvirtual

Implements G4VCollision.

Definition at line 84 of file G4CollisionnpElastic.cc.

85 {
86  if (whichOne == 1) {
87  return colliders1;
88  } else if (whichOne == 2) {
89  return colliders2;
90  }
91 
92  throw G4HadronicException(__FILE__, __LINE__, "G4CollisionnpElastic::GetListOfColliders - Argument outside valid range");
93 }
virtual G4String G4CollisionnpElastic::GetName ( void  ) const
inlinevirtual

Implements G4VCollision.

Definition at line 57 of file G4CollisionnpElastic.hh.

57 { return "np Elastic Collision"; }
G4bool G4CollisionnpElastic::IsInCharge ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtual

Implements G4VCollision.

Definition at line 64 of file G4CollisionnpElastic.cc.

66 {
67  G4bool isInCharge = false;
68 
69  const G4ParticleDefinition* def1 = trk1.GetDefinition();
70  const G4ParticleDefinition* def2 = trk2.GetDefinition();
71 
72  if ( (def1 == G4Neutron::NeutronDefinition() &&
73  def2 == G4Proton::ProtonDefinition() )
74  ||
75  (def1 == G4Proton::ProtonDefinition() &&
76  def2 == G4Neutron::NeutronDefinition() ) )
77  {
78  isInCharge = true;
79  }
80  return isInCharge;
81 }
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
bool G4bool
Definition: G4Types.hh:79
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Here is the call graph for this function:

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

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