source: trunk/source/processes/hadronic/models/im_r_matrix/src/G4CollisionNN.cc @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 4.1 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4CollisionNN.cc,v 1.4 2010/03/12 15:45:18 gunter Exp $ //
28
29
30#include "globals.hh"
31#include "G4CollisionNN.hh"
32#include "G4CollisionComposite.hh"
33#include "G4VCollision.hh"
34#include "G4CollisionVector.hh"
35#include "G4KineticTrack.hh"
36#include "G4VCrossSectionSource.hh"
37#include "G4XNNTotal.hh"
38#include "G4Proton.hh"
39#include "G4Neutron.hh"
40#include "G4CollisionNNElastic.hh"
41#include "G4CollisionnpElastic.hh"
42#include "G4CollisionNNToNDelta.hh"
43#include "G4CollisionNNToDeltaDelta.hh"
44#include "G4CollisionNNToNDeltastar.hh"
45#include "G4CollisionNNToDeltaDeltastar.hh"
46#include "G4CollisionNNToNNstar.hh"
47#include "G4CollisionNNToDeltaNstar.hh"
48#include "G4Pair.hh"
49
50typedef GROUP8(G4CollisionnpElastic, G4CollisionNNElastic, 
51              G4CollisionNNToNDelta, G4CollisionNNToDeltaDelta, 
52              G4CollisionNNToNDeltastar, G4CollisionNNToDeltaDeltastar,
53              G4CollisionNNToNNstar, G4CollisionNNToDeltaNstar) theChannels;
54
55G4CollisionNN::G4CollisionNN()
56{ 
57  crossSectionSource = new G4XNNTotal();
58  G4CollisionComposite::Register aR;
59  G4ForEach<theChannels>::Apply(&aR, this);
60}
61
62
63G4CollisionNN::~G4CollisionNN()
64{ 
65  delete crossSectionSource;
66  crossSectionSource = 0;
67}
68
69
70const std::vector<G4String>& G4CollisionNN::GetListOfColliders(G4int ) const
71{
72          throw G4HadronicException(__FILE__, __LINE__, "G4CollisionNN::GetListOfColliders - Argument outside valid range"); 
73          return colliders1;
74}
75
76
77G4double G4CollisionNN::CrossSection(const G4KineticTrack& aTrk1, 
78                                    const G4KineticTrack& aTrk2) const
79{
80  G4double sigma = 0.;
81
82  // nucleon-nucleon cross-sections made for on-shell particles.
83  // here we take the kinetic energy as the quantity relevant
84  // for calculating the scattering cross-sections for off-shell hadrons
85 
86  const G4VCrossSectionSource* xSource = GetCrossSectionSource();
87  G4LorentzVector p1 = aTrk1.Get4Momentum();
88  G4LorentzVector p2 = aTrk2.Get4Momentum();
89  G4double t1 = p1.e()-aTrk1.GetActualMass();
90  G4double t2 = p2.e()-aTrk2.GetActualMass();
91  p1.setE(t1+aTrk1.GetDefinition()->GetPDGMass());
92  p2.setE(t2+aTrk2.GetDefinition()->GetPDGMass());
93  G4KineticTrack trk1(aTrk1);
94  trk1.Set4Momentum(p1);
95  G4KineticTrack trk2(aTrk2);
96  trk2.Set4Momentum(p2);
97  if( (p1+p2).mag()<aTrk1.GetDefinition()->GetPDGMass()+aTrk2.GetDefinition()->GetPDGMass())
98  {
99    return 0.;
100  }
101
102  if (xSource != 0)
103    {
104      // There is a cross section for this Collision
105      sigma = xSource->CrossSection(trk1,trk2);
106    }
107  return sigma;
108}
109
Note: See TracBrowser for help on using the repository browser.