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

#include <G4CollisionNN.hh>

+ Inheritance diagram for G4CollisionNN:

Public Member Functions

 G4CollisionNN ()
 
virtual ~G4CollisionNN ()
 
G4bool operator== (const G4CollisionNN &right) const
 
G4bool operator!= (const G4CollisionNN &right) const
 
virtual G4String GetName () const
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
- Public Member Functions inherited from G4GeneralNNCollision
G4bool IsInCharge (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
- Public Member Functions inherited from G4CollisionComposite
 G4CollisionComposite ()
 
virtual ~G4CollisionComposite ()
 
virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4KineticTrackVectorFinalState (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual G4bool IsInCharge (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
void AddComponent (G4VCollision *aC)
 
virtual const G4VCrossSectionSourceGetCrossSectionSource () const
 
virtual const G4VAngularDistributionGetAngularDistribution () const
 
virtual const G4CollisionVectorGetComponents () const
 
- Public Member Functions inherited from G4VCollision
 G4VCollision ()
 
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 G4KineticTrackVectorFinalState (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0
 
virtual G4bool IsInCharge (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0
 
virtual G4String GetName () const =0
 
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 G4CollisionVectorGetComponents () const
 
virtual const std::vector< G4String > & GetListOfColliders (G4int whichOne) const
 
- Protected Member Functions inherited from G4VCollision
G4int GetNumberOfPartons (G4ParticleDefinition *aP) const
 
virtual const G4CollisionVectorGetComponents () const
 
virtual const G4VCrossSectionSourceGetCrossSectionSource () const =0
 
virtual const G4VAngularDistributionGetAngularDistribution () const =0
 
virtual const std::vector< G4String > & GetListOfColliders (G4int whichOne) const =0
 

Detailed Description

Definition at line 40 of file G4CollisionNN.hh.

Constructor & Destructor Documentation

◆ G4CollisionNN()

G4CollisionNN::G4CollisionNN ( )

Definition at line 55 of file G4CollisionNN.cc.

56{
57 components=0;
58 crossSectionSource = new G4XNNTotal();
61}
static void Apply()
Definition: G4Pair.hh:179

◆ ~G4CollisionNN()

G4CollisionNN::~G4CollisionNN ( )
virtual

Definition at line 64 of file G4CollisionNN.cc.

65{
66 if (components) {
67 delete components;
68 components=0;
69 }
70 delete crossSectionSource;
71 crossSectionSource = 0;
72}

Member Function Documentation

◆ CrossSection()

G4double G4CollisionNN::CrossSection ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtual

Reimplemented from G4CollisionComposite.

Definition at line 82 of file G4CollisionNN.cc.

84{
85 G4double sigma = 0.;
86
87 // nucleon-nucleon cross-sections made for on-shell particles.
88 // here we take the kinetic energy as the quantity relevant
89 // for calculating the scattering cross-sections for off-shell hadrons
90
92 G4LorentzVector p1 = aTrk1.Get4Momentum();
93 G4LorentzVector p2 = aTrk2.Get4Momentum();
94 G4double t1 = p1.e()-aTrk1.GetActualMass();
95 G4double t2 = p2.e()-aTrk2.GetActualMass();
96 p1.setE(t1+aTrk1.GetDefinition()->GetPDGMass());
97 p2.setE(t2+aTrk2.GetDefinition()->GetPDGMass());
98 G4KineticTrack trk1(aTrk1);
99 trk1.Set4Momentum(p1);
100 G4KineticTrack trk2(aTrk2);
101 trk2.Set4Momentum(p2);
102 if( (p1+p2).mag()<aTrk1.GetDefinition()->GetPDGMass()+aTrk2.GetDefinition()->GetPDGMass())
103 {
104 return 0.;
105 }
106
107 if (xSource != 0)
108 {
109 // There is a cross section for this Collision
110 sigma = xSource->CrossSection(trk1,trk2);
111 }
112 return sigma;
113}
double G4double
Definition: G4Types.hh:64
virtual const G4VCrossSectionSource * GetCrossSectionSource() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
virtual G4double CrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0

◆ GetAngularDistribution()

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

Reimplemented from G4CollisionComposite.

Definition at line 65 of file G4CollisionNN.hh.

65{ return 0; }

◆ GetComponents()

virtual const G4CollisionVector * G4CollisionNN::GetComponents ( ) const
inlineprotectedvirtual

Reimplemented from G4CollisionComposite.

Definition at line 67 of file G4CollisionNN.hh.

67{ return components; }

◆ GetCrossSectionSource()

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

Reimplemented from G4CollisionComposite.

Definition at line 64 of file G4CollisionNN.hh.

64{ return crossSectionSource; }

Referenced by CrossSection().

◆ GetListOfColliders()

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

Implements G4VCollision.

Definition at line 75 of file G4CollisionNN.cc.

76{
77 throw G4HadronicException(__FILE__, __LINE__, "G4CollisionNN::GetListOfColliders - Argument outside valid range");
78 return colliders1;
79}

◆ GetName()

virtual G4String G4CollisionNN::GetName ( ) const
inlinevirtual

Implements G4VCollision.

Definition at line 52 of file G4CollisionNN.hh.

52{ return "NN CollisionComposite"; }

◆ operator!=()

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

◆ operator==()

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

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