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

#include <G4CollisionNNElastic.hh>

+ Inheritance diagram for G4CollisionNNElastic:

Public Member Functions

 G4CollisionNNElastic ()
 
virtual ~G4CollisionNNElastic ()
 
G4bool operator== (const G4CollisionNNElastic &right) const
 
G4bool operator!= (const G4CollisionNNElastic &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 G4VCrossSectionSourceGetCrossSectionSource () const
 
virtual const G4VAngularDistributionGetAngularDistribution () 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 41 of file G4CollisionNNElastic.hh.

Constructor & Destructor Documentation

◆ G4CollisionNNElastic()

G4CollisionNNElastic::G4CollisionNNElastic ( )

Definition at line 42 of file G4CollisionNNElastic.cc.

43{
44 // Subtype of interacting particles
47
48 colliders1.push_back(subType1);
49 colliders2.push_back(subType2);
50
51 angularDistribution = new G4AngularDistributionPP();
52 crossSectionSource = new G4XNNElastic();
53}
static G4Neutron * NeutronDefinition()
Definition G4Neutron.cc:96
const G4String & GetParticleSubType() const
static G4Proton * ProtonDefinition()
Definition G4Proton.cc:85

◆ ~G4CollisionNNElastic()

G4CollisionNNElastic::~G4CollisionNNElastic ( )
virtual

Definition at line 56 of file G4CollisionNNElastic.cc.

57{
58 delete angularDistribution;
59 angularDistribution = 0;
60 delete crossSectionSource;
61 crossSectionSource = 0;
62}

Member Function Documentation

◆ GetAngularDistribution()

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

Implements G4VCollision.

Definition at line 65 of file G4CollisionNNElastic.hh.

65{ return angularDistribution; }

◆ GetCrossSectionSource()

virtual const G4VCrossSectionSource * G4CollisionNNElastic::GetCrossSectionSource ( ) const
inlineprotectedvirtual

Implements G4VCollision.

Definition at line 64 of file G4CollisionNNElastic.hh.

64{ return crossSectionSource; }

◆ GetListOfColliders()

const std::vector< G4String > & G4CollisionNNElastic::GetListOfColliders ( G4int whichOne) const
protectedvirtual

Implements G4VCollision.

Definition at line 85 of file G4CollisionNNElastic.cc.

86{
87 if (whichOne == 1) {
88 return colliders1;
89 }else if (whichOne == 2) {
90 return colliders2;
91 }
92 throw G4HadronicException(__FILE__, __LINE__, "G4CollisionNNElastic::GetListOfColliders - Argument outside valid range");
93}

◆ GetName()

virtual G4String G4CollisionNNElastic::GetName ( ) const
inlinevirtual

Implements G4VCollision.

Definition at line 56 of file G4CollisionNNElastic.hh.

56{ return "NN Elastic Collision"; }

◆ IsInCharge()

G4bool G4CollisionNNElastic::IsInCharge ( const G4KineticTrack & trk1,
const G4KineticTrack & trk2 ) const
virtual

Implements G4VCollision.

Definition at line 65 of file G4CollisionNNElastic.cc.

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

◆ operator!=()

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

◆ operator==()

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

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