source: trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc @ 846

Last change on this file since 846 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.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// $Id: G4BGGPionElasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
27// GEANT4 tag $Name:  $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name:     G4BGGPionElasticXS
35//
36// Author:        Vladimir Ivanchenko
37//
38// Creation date: 01.10.2003
39// Modifications:
40//
41//
42// -------------------------------------------------------------------
43//
44
45#include "G4BGGPionElasticXS.hh"
46#include "G4GlauberGribovCrossSection.hh"
47#include "G4UPiNuclearCrossSection.hh"
48#include "G4PionPlus.hh"
49#include "G4PionMinus.hh"
50#include "G4NistManager.hh"
51
52//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53
54G4BGGPionElasticXS::G4BGGPionElasticXS(const G4ParticleDefinition* p) 
55{
56  verboseLevel = 0;
57  thEnergy     = 100.*GeV;
58  if(p == G4PionPlus::PionPlus() || p == G4PionMinus::PionMinus()) {
59    fPion = new G4UPiNuclearCrossSection();
60    fGlauber = new G4GlauberGribovCrossSection();
61    particle = p;
62    Initialise();
63  } else {
64    fPion = 0;
65    fGlauber = 0;
66    particle = 0;
67    if(p) G4cout << "### G4BGGPionElasticXS WARNING: is not applicable to " 
68                 << p->GetParticleName()
69                 << G4endl;
70    else  G4cout << "### G4BGGPionElasticXS WARNING: particle is not defined " 
71                 << G4endl;
72  }
73}
74
75//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76
77G4BGGPionElasticXS::~G4BGGPionElasticXS()
78{
79  delete fGlauber;
80  delete fPion;
81}
82
83//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85G4double G4BGGPionElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 
86                                                    G4double Z,
87                                                    G4double A, 
88                                                    G4double)
89{
90  G4double cross = 0.0;
91  G4double ekin = dp->GetKineticEnergy();
92  G4int iz = G4int(Z + 0.5);
93  if(iz > 92) iz = 92;
94
95  if(ekin > thEnergy) {
96    cross = theFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
97  } else {
98    cross = fPion->GetElasticCrossSection(dp, Z, A);
99  }
100
101  if(verboseLevel > 1) 
102    G4cout << "G4BGGPionElasticXS::GetCrossSection  for "
103           << dp->GetDefinition()->GetParticleName()
104           << "  Ekin(GeV)= " << dp->GetKineticEnergy()
105           << " in nucleus Z= " << Z << "  A= " << A
106           << " XS(b)= " << cross/barn
107           << G4endl;
108
109  return cross;
110}
111
112//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
113
114void G4BGGPionElasticXS::BuildPhysicsTable(const G4ParticleDefinition&)
115{
116}
117
118//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119
120void G4BGGPionElasticXS::DumpPhysicsTable(const G4ParticleDefinition&) 
121{
122  G4cout << "G4BGGPionElasticXS:"<<G4endl;
123}
124
125//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126
127void G4BGGPionElasticXS::Initialise() 
128{
129  G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle);
130  G4ThreeVector mom(0.0,0.0,1.0);
131  G4DynamicParticle dp(part, mom, thEnergy);
132
133  G4NistManager* nist = G4NistManager::Instance();
134  G4double A = nist->GetAtomicMassAmu(2);
135
136  G4double csup, csdn;
137
138  if(verboseLevel > 0) G4cout << "### G4BGGPionElasticXS::Initialise for "
139                              << particle->GetParticleName() << G4endl;
140
141  for(G4int iz=2; iz<93; iz++) {
142
143    G4double Z = G4double(iz);
144    A = nist->GetAtomicMassAmu(iz);
145
146    csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);
147    csdn = fPion->GetElasticCrossSection(&dp, Z, A);
148
149    theFac[iz] = csdn/csup;
150    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
151                                << " factor= " << theFac[iz] << G4endl; 
152  }
153}
154
155//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
156
157
Note: See TracBrowser for help on using the repository browser.