Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4CollisionNN Class Reference

#include <G4CollisionNN.hh>

Inheritance diagram for G4CollisionNN:
Collaboration 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 G4KineticTrackVectorFinalState (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
void AddComponent (G4VCollision *aC)
 
- 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 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 G4CollisionVectorGetComponents () const
 
virtual const std::vector
< G4String > & 
GetListOfColliders (G4int whichOne) const
 
- Protected Member Functions inherited from G4VCollision
G4int GetNumberOfPartons (const G4ParticleDefinition *aP) const
 

Detailed Description

Definition at line 40 of file G4CollisionNN.hh.

Constructor & Destructor Documentation

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

Here is the call graph for this function:

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

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 }
void Set4Momentum(const G4LorentzVector &a4Momentum)
virtual const G4VCrossSectionSource * GetCrossSectionSource() const
double G4double
Definition: G4Types.hh:76
virtual G4double CrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0

Here is the call graph for this function:

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

Reimplemented from G4CollisionComposite.

Definition at line 65 of file G4CollisionNN.hh.

65 { return 0; }
virtual const G4CollisionVector* G4CollisionNN::GetComponents ( ) const
inlineprotectedvirtual

Reimplemented from G4CollisionComposite.

Definition at line 67 of file G4CollisionNN.hh.

67 { return components; }
virtual const G4VCrossSectionSource* G4CollisionNN::GetCrossSectionSource ( ) const
inlineprotectedvirtual

Reimplemented from G4CollisionComposite.

Definition at line 64 of file G4CollisionNN.hh.

64 { return crossSectionSource; }

Here is the caller graph for this function:

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 }
virtual G4String G4CollisionNN::GetName ( ) const
inlinevirtual

Implements G4VCollision.

Definition at line 52 of file G4CollisionNN.hh.

52 { return "NN CollisionComposite"; }
G4bool G4CollisionNN::operator!= ( const G4CollisionNN right) const
G4bool G4CollisionNN::operator== ( const G4CollisionNN right) const

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