Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BGGPionElasticXS.cc
Go to the documentation of this file.
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 66241 2012-12-13 18:34:42Z gunter $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 //
33 // File name: G4BGGPionElasticXS
34 //
35 // Author: Vladimir Ivanchenko
36 //
37 // Creation date: 01.10.2003
38 // Modifications:
39 //
40 // -------------------------------------------------------------------
41 //
42 
43 #include "G4BGGPionElasticXS.hh"
44 #include "G4SystemOfUnits.hh"
47 #include "G4HadronNucleonXsc.hh"
49 #include "G4Proton.hh"
50 #include "G4PionPlus.hh"
51 #include "G4PionMinus.hh"
52 #include "G4NistManager.hh"
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57  : G4VCrossSectionDataSet("Barashenkov-Glauber")
58 {
59  verboseLevel = 0;
60  fGlauberEnergy = 91.*GeV;
61  fLowEnergy = 20.*MeV;
62  fSAIDHighEnergyLimit = 2.6*GeV;
63  SetMinKinEnergy(0.0);
64  SetMaxKinEnergy(100*TeV);
65 
66  for (G4int i = 0; i < 93; i++) {
67  theGlauberFac[i] = 0.0;
68  theCoulombFac[i] = 0.0;
69  theA[i] = 1;
70  }
71  fPion = 0;
72  fGlauber = 0;
73  fHadron = 0;
74  fSAID = 0;
75  particle = 0;
76  theProton= G4Proton::Proton();
77  isPiplus = false;
78  isInitialized = false;
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84 {
85  delete fGlauber;
86  delete fPion;
87  delete fHadron;
88  delete fSAID;
89 }
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
93 G4bool
95  const G4Material*)
96 {
97  return true;
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103  G4int Z, G4int A,
104  const G4Element*,
105  const G4Material*)
106 {
107  return (1 == Z && 2 >= A);
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
112 G4double
114  G4int ZZ, const G4Material*)
115 {
116  // this method should be called only for Z > 1
117 
118  G4double cross = 0.0;
119  G4double ekin = dp->GetKineticEnergy();
120  G4int Z = ZZ;
121  if(1 == Z) {
122  cross = 1.0115*GetIsoCrossSection(dp,1,1);
123  } else {
124  if(Z > 92) { Z = 92; }
125 
126  if(ekin <= fLowEnergy) {
127  cross = theCoulombFac[Z];
128  } else if(ekin > fGlauberEnergy) {
129  cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, theA[Z]);
130  } else {
131  cross = fPion->GetElasticCrossSection(dp, Z, theA[Z]);
132  }
133  }
134  if(verboseLevel > 1) {
135  G4cout << "G4BGGPionElasticXS::GetElementCrossSection for "
136  << dp->GetDefinition()->GetParticleName()
137  << " Ekin(GeV)= " << dp->GetKineticEnergy()
138  << " in nucleus Z= " << Z << " A= " << theA[Z]
139  << " XS(b)= " << cross/barn
140  << G4endl;
141  }
142  return cross;
143 }
144 
145 G4double
147  G4int Z, G4int A,
148  const G4Isotope*,
149  const G4Element*,
150  const G4Material*)
151 {
152  // this method should be called only for Z = 1
153 
154  G4double cross = 0.0;
155  G4double ekin = dp->GetKineticEnergy();
156 
157  if(ekin <= fSAIDHighEnergyLimit) {
158  cross = fSAID->GetElasticIsotopeCrossSection(particle, ekin, 1, 1);
159  } else {
160  fHadron->GetHadronNucleonXscPDG(dp, theProton);
161  cross = theCoulombFac[1]*fHadron->GetElasticHadronNucleonXsc();
162  }
163  cross *= A;
164  /*
165  if(ekin <= fLowEnergy) {
166  cross = theCoulombFac[1];
167 
168  } else if( A < 2) {
169  fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
170  cross = fHadron->GetElasticHadronNucleonXsc();
171  } else {
172  fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
173  cross = fHadron->GetElasticHadronNucleonXsc();
174  fHadron->GetHadronNucleonXscNS(dp, G4Neutron::Neutron());
175  cross += fHadron->GetElasticHadronNucleonXsc();
176  }
177  */
178  if(verboseLevel > 1) {
179  G4cout << "G4BGGPionElasticXS::GetIsoCrossSection for "
180  << dp->GetDefinition()->GetParticleName()
181  << " Ekin(GeV)= " << dp->GetKineticEnergy()
182  << " in nucleus Z= " << Z << " A= " << A
183  << " XS(b)= " << cross/barn
184  << G4endl;
185  }
186  return cross;
187 }
188 
189 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
190 
192 {
193  if(&p == G4PionPlus::PionPlus() || &p == G4PionMinus::PionMinus()) {
194  particle = &p;
195  } else {
196  G4cout << "### G4BGGPionElasticXS WARNING: is not applicable to "
197  << p.GetParticleName()
198  << G4endl;
199  throw G4HadronicException(__FILE__, __LINE__,
200  "G4BGGPionElasticXS::BuildPhysicsTable is used for wrong particle");
201  return;
202  }
203 
204  if(isInitialized) { return; }
205  isInitialized = true;
206 
207  fPion = new G4UPiNuclearCrossSection();
208  fGlauber = new G4GlauberGribovCrossSection();
209  fHadron = new G4HadronNucleonXsc();
210  fSAID = new G4ComponentSAIDTotalXS();
211  fPion->BuildPhysicsTable(*particle);
212  fGlauber->BuildPhysicsTable(*particle);
213  if(particle == G4PionPlus::PionPlus()) { isPiplus = true; }
214 
215  G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle);
216  G4ThreeVector mom(0.0,0.0,1.0);
217  G4DynamicParticle dp(part, mom, fGlauberEnergy);
218 
220 
221  G4double csup, csdn;
222  G4int A;
223 
224  if(verboseLevel > 0) {
225  G4cout << "### G4BGGPionElasticXS::Initialise for "
226  << particle->GetParticleName() << G4endl;
227  }
228  for(G4int iz=2; iz<93; iz++) {
229 
230  A = G4lrint(nist->GetAtomicMassAmu(iz));
231  theA[iz] = A;
232 
233  csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A);
234  csdn = fPion->GetElasticCrossSection(&dp, iz, A);
235 
236  theGlauberFac[iz] = csdn/csup;
237  if(verboseLevel > 0) {
238  G4cout << "Z= " << iz << " A= " << A
239  << " factor= " << theGlauberFac[iz] << G4endl;
240  }
241  }
242  /*
243  dp.SetKineticEnergy(fLowEnergy);
244  fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton());
245  theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc();
246  */
247  dp.SetKineticEnergy(fSAIDHighEnergyLimit);
248  fHadron->GetHadronNucleonXscPDG(&dp, theProton);
249  theCoulombFac[1] =
250  fSAID->GetElasticIsotopeCrossSection(particle,fSAIDHighEnergyLimit,1,1)
251  /fHadron->GetElasticHadronNucleonXsc();
252 
253  dp.SetKineticEnergy(fLowEnergy);
254  for(G4int iz=2; iz<93; iz++) {
255  theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, iz, theA[iz]);
256  if(verboseLevel > 0) {
257  G4cout << "Z= " << iz << " A= " << A
258  << " factor= " << theCoulombFac[iz] << G4endl;
259  }
260  }
261 }
262 
263 void
265 {
266  outFile << "The Barashenkov-Glauber-Gribov cross section handles elastic\n"
267  << "scattering of pions from nuclei at all energies. The\n"
268  << "Barashenkov parameterization is used below 91 GeV and the\n"
269  << "Glauber-Gribov parameterization is used above 91 GeV.\n";
270 }
G4double GetElasticHadronNucleonXsc()
G4double GetElasticCrossSection(const G4DynamicParticle *aParticle, G4int Z, G4int A)
G4double GetKineticEnergy() const
std::ofstream outFile
Definition: GammaRayTel.cc:68
const char * p
Definition: xmltok.h:285
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual G4double GetElasticIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
void SetMinKinEnergy(G4double value)
G4BGGPionElasticXS(const G4ParticleDefinition *)
bool G4bool
Definition: G4Types.hh:79
G4double iz
Definition: TRTMaterials.hh:39
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
void SetKineticEnergy(G4double aEnergy)
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
void SetMaxKinEnergy(G4double value)
int G4lrint(double ad)
Definition: templates.hh:163
virtual G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *)
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
G4double GetAtomicMassAmu(const G4String &symb) const
G4double GetHadronNucleonXscPDG(const G4DynamicParticle *, const G4ParticleDefinition *)
#define G4endl
Definition: G4ios.hh:61
virtual G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
virtual void CrossSectionDescription(std::ostream &) const
void BuildPhysicsTable(const G4ParticleDefinition &)
G4double GetElasticGlauberGribov(const G4DynamicParticle *, G4int Z, G4int A)