Geant4 10.7.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 ()
 
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 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 (const 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 39 of file G4CollisionNN.hh.

Constructor & Destructor Documentation

◆ G4CollisionNN()

G4CollisionNN::G4CollisionNN ( )

Definition at line 54 of file G4CollisionNN.cc.

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

◆ ~G4CollisionNN()

G4CollisionNN::~G4CollisionNN ( )
virtual

Definition at line 63 of file G4CollisionNN.cc.

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

Member Function Documentation

◆ CrossSection()

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

Reimplemented from G4CollisionComposite.

Definition at line 81 of file G4CollisionNN.cc.

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

64{ return 0; }

◆ GetComponents()

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

Reimplemented from G4CollisionComposite.

Definition at line 66 of file G4CollisionNN.hh.

66{ return components; }

◆ GetCrossSectionSource()

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

Reimplemented from G4CollisionComposite.

Definition at line 63 of file G4CollisionNN.hh.

63{ return crossSectionSource; }

Referenced by CrossSection().

◆ GetListOfColliders()

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

Implements G4VCollision.

Definition at line 74 of file G4CollisionNN.cc.

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

◆ GetName()

virtual G4String G4CollisionNN::GetName ( ) const
inlinevirtual

Implements G4VCollision.

Definition at line 51 of file G4CollisionNN.hh.

51{ 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: