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 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc (Version 11.3.0) and /processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc (Version 9.0.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id: G4BGGPionInelasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
                                                   >>  27 // GEANT4 tag $Name: geant4-08-03-patch-01 $
                                                   >>  28 //
 26 // -------------------------------------------     29 // -------------------------------------------------------------------
 27 //                                                 30 //
 28 // GEANT4 Class file                               31 // GEANT4 Class file
 29 //                                                 32 //
 30 //                                                 33 //
 31 // File name:     G4BGGPionInelasticXS             34 // File name:     G4BGGPionInelasticXS
 32 //                                                 35 //
 33 // Author:        Vladimir Ivanchenko              36 // Author:        Vladimir Ivanchenko
 34 //                                                 37 //
 35 // Creation date: 01.10.2003                       38 // Creation date: 01.10.2003
 36 // Modifications:                                  39 // Modifications:
 37 //                                                 40 //
                                                   >>  41 //
 38 // -------------------------------------------     42 // -------------------------------------------------------------------
 39 //                                                 43 //
 40                                                    44 
 41 #include "G4BGGPionInelasticXS.hh"                 45 #include "G4BGGPionInelasticXS.hh"
 42 #include "G4SystemOfUnits.hh"                  <<  46 #include "G4GlauberGribovCrossSection.hh"
 43 #include "G4ComponentGGHadronNucleusXsc.hh"    << 
 44 #include "G4UPiNuclearCrossSection.hh"             47 #include "G4UPiNuclearCrossSection.hh"
 45 #include "G4HadronNucleonXsc.hh"               << 
 46 #include "G4NuclearRadii.hh"                   << 
 47                                                << 
 48 #include "G4Proton.hh"                         << 
 49 #include "G4PionPlus.hh"                           48 #include "G4PionPlus.hh"
 50 #include "G4PionMinus.hh"                          49 #include "G4PionMinus.hh"
 51 #include "G4NistManager.hh"                        50 #include "G4NistManager.hh"
 52 #include "G4Pow.hh"                            << 
 53 #include "G4HadronicParameters.hh"             << 
 54                                                    51 
 55 G4double G4BGGPionInelasticXS::theGlauberFacPi <<  52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 56 G4double G4BGGPionInelasticXS::theGlauberFacPi << 
 57 G4double G4BGGPionInelasticXS::theLowEPiPlus[9 << 
 58 G4double G4BGGPionInelasticXS::theLowEPiMinus[ << 
 59 G4int    G4BGGPionInelasticXS::theA[93] = {0}; << 
 60                                                    53 
 61 G4BGGPionInelasticXS::G4BGGPionInelasticXS(con     54 G4BGGPionInelasticXS::G4BGGPionInelasticXS(const G4ParticleDefinition* p) 
 62  : G4VCrossSectionDataSet("BarashenkovGlauberG << 
 63 {                                                  55 {
 64   verboseLevel = 0;                                56   verboseLevel = 0;
 65   fGlauberEnergy = 91.*CLHEP::GeV;             <<  57   thEnergy     = 100.*GeV;
 66   fLowEnergy = 20.*CLHEP::MeV;                 <<  58   if(p == G4PionPlus::PionPlus() || p == G4PionMinus::PionMinus()) {
 67   fLowestEnergy = 1.*CLHEP::MeV;               <<  59     fPion = new G4UPiNuclearCrossSection();
 68   SetMinKinEnergy(0.0);                        <<  60     fGlauber = new G4GlauberGribovCrossSection();
 69   SetMaxKinEnergy( G4HadronicParameters::Insta <<  61     particle = p;
 70                                                <<  62     Initialise();
 71   fPion    = new G4UPiNuclearCrossSection();   <<  63   } else {
 72   fGlauber = new G4ComponentGGHadronNucleusXsc <<  64     fPion = 0;
 73   fHadron  = new G4HadronNucleonXsc();         <<  65     fGlauber = 0;
 74                                                <<  66     particle = 0;
 75   fG4pow   = G4Pow::GetInstance();             <<  67     if(p) G4cout << "### G4BGGPionInelasticXS WARNING: is not applicable to " 
 76                                                <<  68      << p->GetParticleName()
 77   theProton = G4Proton::Proton();              <<  69      << G4endl;
 78   thePiPlus = G4PionPlus::PionPlus();          <<  70     else  G4cout << "### G4BGGPionInelasticXS WARNING: particle is not defined " 
 79   isPiplus = (p == thePiPlus);                 <<  71      << G4endl;
 80   SetForAllAtomsAndEnergies(true);             <<  72   }
 81                                                << 
 82   if (0 == theA[0]) { Initialise(); }          << 
 83 }                                                  73 }
 84                                                    74 
 85 //....oooOO0OOooo........oooOO0OOooo........oo     75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 86                                                    76 
 87 G4BGGPionInelasticXS::~G4BGGPionInelasticXS()      77 G4BGGPionInelasticXS::~G4BGGPionInelasticXS()
 88 {                                                  78 {
 89   delete fHadron;                              <<  79   delete fGlauber;
 90 }                                              <<  80   delete fPion;
 91                                                << 
 92 //....oooOO0OOooo........oooOO0OOooo........oo << 
 93                                                << 
 94 G4bool                                         << 
 95 G4BGGPionInelasticXS::IsElementApplicable(cons << 
 96                                           cons << 
 97 {                                              << 
 98   return true;                                 << 
 99 }                                                  81 }
100                                                    82 
101 //....oooOO0OOooo........oooOO0OOooo........oo     83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102                                                    84 
103 G4bool G4BGGPionInelasticXS::IsIsoApplicable(c <<  85 G4double G4BGGPionInelasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 
104                                              G <<  86                 G4double Z,
105                                              c <<  87                 G4double A, 
106                                              c <<  88                 G4double)
107 {                                                  89 {
108   return (1 == Z);                             << 
109 }                                              << 
110                                                << 
111 //....oooOO0OOooo........oooOO0OOooo........oo << 
112                                                << 
113 G4double                                       << 
114 G4BGGPionInelasticXS::GetElementCrossSection(c << 
115                                              G << 
116 {                                              << 
117   // this method should be called only for Z > << 
118                                                << 
119   G4double cross = 0.0;                            90   G4double cross = 0.0;
120   G4double ekin = std::max(dp->GetKineticEnerg <<  91   G4double ekin = dp->GetKineticEnergy();
121   G4int Z = std::min(ZZ, 92);                  <<  92   G4int iz = G4int(Z + 0.5);
                                                   >>  93   if(iz > 92) iz = 92;
122                                                    94 
123   if(1 == Z) {                                 <<  95   if(ekin > thEnergy) {
124     cross = 1.0115*GetIsoCrossSection(dp,1,1); <<  96     cross = theFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
125   } else if(ekin < fLowEnergy) {               << 
126     cross = (isPiplus) ? theLowEPiPlus[Z]*Coul << 
127       : theLowEPiMinus[Z]*FactorPiMinus(ekin); << 
128   } else if(ekin > fGlauberEnergy) {           << 
129     cross = (isPiplus) ? theGlauberFacPiPlus[Z << 
130     cross *= fGlauber->GetInelasticGlauberGrib << 
131   } else {                                         97   } else {
132     cross = fPion->GetInelasticCrossSection(dp <<  98     cross = fPion->GetInelasticCrossSection(dp, Z, A);
133   }                                                99   }
134 #ifdef G4VERBOSE                               << 100 
135   if(verboseLevel > 1) {                       << 101   if(verboseLevel > 1) 
136     G4cout << "G4BGGPionInelasticXS::GetCrossS    102     G4cout << "G4BGGPionInelasticXS::GetCrossSection  for "
137            << dp->GetDefinition()->GetParticle << 103      << dp->GetDefinition()->GetParticleName()
138            << "  Ekin(GeV)= " << dp->GetKineti << 104      << "  Ekin(GeV)= " << dp->GetKineticEnergy()
139            << " in nucleus Z= " << Z << "  A=  << 105      << " in nucleus Z= " << Z << "  A= " << A
140            << " XS(b)= " << cross/barn         << 106      << " XS(b)= " << cross/barn 
141            << G4endl;                          << 107      << G4endl;
142   }                                            << 108 
143 #endif                                         << 
144   return cross;                                   109   return cross;
145 }                                                 110 }
146                                                   111 
147 //....oooOO0OOooo........oooOO0OOooo........oo    112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148                                                   113 
149 G4double                                       << 114 void G4BGGPionInelasticXS::BuildPhysicsTable(const G4ParticleDefinition&)
150 G4BGGPionInelasticXS::GetIsoCrossSection(const << 115 {
151                                          G4int << 
152                                          const << 
153                                          const << 
154                                          const << 
155 {                                              << 
156   // this method should be called only for Z = << 
157   fHadron->HadronNucleonXscNS(dp->GetDefinitio << 
158                               dp->GetKineticEn << 
159   G4double cross = A*fHadron->GetInelasticHadr << 
160                                                << 
161 #ifdef G4VERBOSE                               << 
162   if(verboseLevel > 1) {                       << 
163     G4cout << "G4BGGPionInelasticXS::GetCrossS << 
164            << dp->GetDefinition()->GetParticle << 
165            << "  Ekin(GeV)= " << dp->GetKineti << 
166            << " in nucleus Z=1  A=" << A       << 
167            << " XS(b)= " << cross/barn         << 
168            << G4endl;                          << 
169   }                                            << 
170 #endif                                         << 
171   return cross;                                << 
172 }                                                 116 }
173                                                   117 
174 //....oooOO0OOooo........oooOO0OOooo........oo    118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
175                                                   119 
176 void G4BGGPionInelasticXS::BuildPhysicsTable(c << 120 void G4BGGPionInelasticXS::DumpPhysicsTable(const G4ParticleDefinition&) 
177 {                                                 121 {
178   if(verboseLevel > 1) {                       << 122   G4cout << "G4BGGPionInelasticXS:"<<G4endl;
179     G4cout << "G4BGGPionInelasticXS::BuildPhys << 
180            << p.GetParticleName() << G4endl;   << 
181   }                                            << 
182   if(&p == G4PionPlus::PionPlus() || &p == G4P << 
183     isPiplus = (&p == G4PionPlus::PionPlus()); << 
184   } else {                                     << 
185     G4ExceptionDescription ed;                 << 
186     ed << "This BGG cross section is applicabl << 
187        << p.GetParticleName() << G4endl;       << 
188     G4Exception("G4BGGPionInelasticXS::BuildPh << 
189                 FatalException, ed);           << 
190   }                                            << 
191 }                                                 123 }
192                                                   124 
193 //....oooOO0OOooo........oooOO0OOooo........oo    125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
194                                                   126 
195 void G4BGGPionInelasticXS::Initialise()        << 127 void G4BGGPionInelasticXS::Initialise() 
196 {                                                 128 {
197   theA[0] = theA[1] = 1;                       << 129   G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle);
198   G4ThreeVector mom(0.0,0.0,1.0);                 130   G4ThreeVector mom(0.0,0.0,1.0);
199   G4DynamicParticle dp(thePiPlus, mom, fGlaube << 131   G4DynamicParticle dp(part, mom, thEnergy);
200                                                   132 
201   G4NistManager* nist = G4NistManager::Instanc    133   G4NistManager* nist = G4NistManager::Instance();
                                                   >> 134   G4double A = nist->GetAtomicMassAmu(2);
                                                   >> 135 
202   G4double csup, csdn;                            136   G4double csup, csdn;
203                                                   137 
204   for (G4int iz=2; iz<93; ++iz) {              << 138   if(verboseLevel > 0) G4cout << "### G4BGGPionInelasticXS::Initialise for "
205     G4int A = G4lrint(nist->GetAtomicMassAmu(i << 139             << particle->GetParticleName() << G4endl;
206     theA[iz] = A;                              << 
207                                                << 
208     csup = fGlauber->GetInelasticGlauberGribov << 
209     csdn = fPion->GetInelasticCrossSection(&dp << 
210     theGlauberFacPiPlus[iz] = csdn/csup;       << 
211   }                                            << 
212                                                   140 
213   dp.SetDefinition(G4PionMinus::PionMinus());  << 141   for(G4int iz=2; iz<93; iz++) {
214   for (G4int iz=2; iz<93; ++iz) {              << 
215     csup = fGlauber->GetInelasticGlauberGribov << 
216     csdn = fPion->GetInelasticCrossSection(&dp << 
217     theGlauberFacPiMinus[iz] = csdn/csup;      << 
218                                                << 
219     if(verboseLevel > 1) {                     << 
220       G4cout << "Z= " << iz <<  "  A= " << the << 
221        << " factorPiPlus= " << theGlauberFacPi << 
222        << " factorPiMinus= " << theGlauberFacP << 
223        << G4endl;                              << 
224     }                                          << 
225   }                                            << 
226                                                   142 
227   theLowEPiPlus[1] = theLowEPiMinus[1]= 1.0;   << 143     G4double Z = G4double(iz);
228   dp.SetDefinition(thePiPlus);                 << 144     A = nist->GetAtomicMassAmu(iz);
229   dp.SetKineticEnergy(fLowEnergy);             << 
230   for (G4int iz=2; iz<93; ++iz) {              << 
231     theLowEPiPlus[iz] = fPion->GetInelasticCro << 
232       /CoulombFactorPiPlus(fLowEnergy, iz);    << 
233   }                                            << 
234                                                   145 
235   dp.SetDefinition(G4PionMinus::PionMinus());  << 146     csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);
236   for (G4int iz=2; iz<93; ++iz) {              << 147     csdn = fPion->GetInelasticCrossSection(&dp, Z, A);
237     theLowEPiMinus[iz] = fPion->GetInelasticCr << 
238       /FactorPiMinus(fLowEnergy);              << 
239                                                << 
240     if (verboseLevel > 1) {                    << 
241       G4cout << "Z= " << iz <<  "  A= " << the << 
242        << " LowEtorPiPlus= " << theLowEPiPlus[ << 
243        << " LowEtorPiMinus= " << theLowEPiMinu << 
244        << G4endl;                              << 
245     }                                          << 
246   }                                            << 
247 }                                              << 
248                                                   148 
249 //....oooOO0OOooo........oooOO0OOooo........oo << 149     theFac[iz] = csdn/csup;
250                                                << 150     if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A 
251 G4double G4BGGPionInelasticXS::CoulombFactorPi << 151         << " factor= " << theFac[iz] << G4endl; 
252 {                                              << 152   }
253   return (kinEnergy > 0.0) ?                   << 
254     G4NuclearRadii::CoulombFactor(Z, theA[Z],  << 
255 }                                              << 
256                                                << 
257 //....oooOO0OOooo........oooOO0OOooo........oo << 
258                                                << 
259 G4double G4BGGPionInelasticXS::FactorPiMinus(G << 
260 {                                              << 
261   return 1.0/std::sqrt(kinEnergy);             << 
262 }                                                 153 }
263                                                   154 
264 //....oooOO0OOooo........oooOO0OOooo........oo    155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
265                                                   156 
266 void                                           << 
267 G4BGGPionInelasticXS::CrossSectionDescription( << 
268 {                                              << 
269   outFile << "The Barashenkov-Glauber-Gribov c << 
270           << "pion scattering from nuclei at a << 
271           << "parameterization is used below 9 << 
272           << "parameterization is used above 9 << 
273 }                                              << 
274                                                   157 
275 //....oooOO0OOooo........oooOO0OOooo........oo << 
276                                                   158