source: trunk/source/processes/hadronic/cross_sections/src/G4IonProtonCrossSection.cc @ 1355

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

update to last version 4.9.4

File size: 3.6 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// $Id: G4IonProtonCrossSection.cc,v 1.4 2010/10/15 23:49:33 dennis Exp $
27// GEANT4 tag $Name: hadr-cross-V09-03-12 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name:  G4IonProtonCrossSection
35//
36// Author  Ivantchenko, Geant4, 30 July 2010
37//
38// Modifications:
39//
40
41#include "G4IonProtonCrossSection.hh"
42#include "G4ProtonInelasticCrossSection.hh"
43#include "G4DynamicParticle.hh"
44#include "G4Element.hh"
45#include "G4HadTmpUtil.hh"
46
47using namespace std;
48
49G4IonProtonCrossSection::G4IonProtonCrossSection() 
50  : G4VCrossSectionDataSet("AxenWellischIonH") 
51{
52  theForward = new G4ProtonInelasticCrossSection();
53}
54
55G4IonProtonCrossSection::~G4IonProtonCrossSection()
56{
57  delete theForward;
58}
59
60G4bool
61G4IonProtonCrossSection::IsApplicable(const G4DynamicParticle* dp, 
62                                      const G4Element* elm)
63{
64  G4int Z = G4lrint(elm->GetZ());
65  G4int A = G4lrint(elm->GetN());
66  return IsIsoApplicable(dp, Z, A);
67}
68
69
70G4bool
71G4IonProtonCrossSection::IsIsoApplicable(const G4DynamicParticle* dp,
72                                         G4int Z, G4int A)
73{
74  G4bool result = false;
75  if(Z < 2 && A < 2 && dp->GetDefinition()->GetPDGCharge()/eplus > 2.5) 
76    { result = true;}
77  return result;
78}
79
80
81G4double
82G4IonProtonCrossSection::GetCrossSection(const G4DynamicParticle* dp, 
83                                         const G4Element*, G4double)
84{
85  return GetZandACrossSection(dp);
86}
87
88
89G4double
90G4IonProtonCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 
91                                              G4int /*ZZ*/, G4int /*AA*/, 
92                                              G4double /*temperature*/)
93{
94  const G4ParticleDefinition* p = dp->GetDefinition();
95  G4double e = dp->GetKineticEnergy()*proton_mass_c2/p->GetPDGMass();
96  return theForward->GetCrossSection(e, p->GetBaryonNumber(),
97                                     G4lrint(p->GetPDGCharge()/eplus) );
98}
99
100void G4IonProtonCrossSection::BuildPhysicsTable(const G4ParticleDefinition&)
101{}
102
103void G4IonProtonCrossSection::DumpPhysicsTable(const G4ParticleDefinition&)
104{
105  G4cout << "G4IonProtonCrossSection: " << GetName() << " uses formula"
106         <<G4endl;
107}
108
Note: See TracBrowser for help on using the repository browser.