Changeset 1340 for trunk/source/processes/hadronic/cross_sections
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/processes/hadronic/cross_sections
- Files:
-
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/cross_sections/History
r1337 r1340 15 15 --------------------------------------------------------------- 16 16 17 24 October 2010 Vladimir Ivanchenko (hadr-cross-V09-03-12) 18 - G4VComponentCrossSection - use G4ParticleDefinition and kinetic 19 energy instead of G4DynamicParticle 20 21 20 October 2010 Gunter Folger (hadr-cross-V09-03-11) 22 - add missing inline for GetCrossSection in G4BGGPionElasticXS.hh 23 24 15 October 2010 Dennis Wright (hadr-cross-V09-03-10) 25 ---------------------------------------------------- 26 - integer Z and A migration: 27 in all cross section data sets, replace IsZAApplicable with IsIsoApplicable 28 and replace GetIsoZACrossSection with GetZandACrossSection 29 30 23 September 2010 Vladimir Ivanchenko (hadr-cross-V09-03-09) 31 ------------------------------------------------------------ 32 - G4NeutronElasticXS, G4NeutronInelasticXS, G4NeutronCaptureXS cleanup: 33 use std vectors instead of C arrays; 34 use G4HadronNucleonXsc class and PDG parameterisation 35 for high energy cross sections off Hydrogen; 36 removed Get/Set methods for verboseLevel 37 38 30 July 2010 Vladimir Ivanchenko (hadr-cross-V09-03-08) 39 - G4IonProtonCrossSection - move virtual methods to source, 40 add constructor and destructor, 41 make G4ProtonInelasticCrossSection class member, 42 fix bug in kinematics 43 44 05 July 2010 Vladimir Ivanchenko (hadr-cross-V09-03-07) 45 - G4VComponentCrossSection - new interface for cross sections 46 - G4VCrossSectionDataSet - added name, min and max kinetic energy and access 47 methods 48 17 49 11 Jun 2010 Vladimir Ivanchenko (hadr-cross-V09-03-06) 18 50 - G4UPiNuclearCrossSection - fixed memory leak at destruction … … 20 52 21 53 03 Jun 2010 Vladimir Ivanchenko (hadr-cross-V09-03-05) 54 ------------------------------------------------------ 22 55 - G4NeutronElasticXS, G4NeutronInelasticXS, G4NeutronCaptureXS - substitute 23 56 environment variable G4NEUTRONXS by G4NEUTRONXSDATA 24 57 25 58 02 Jun 2010 Gunter Folger (hadr-cross-V09-03-04) 59 ------------------------------------------------------ 26 60 - fix compilation error on Windows: use G4lrint not lrint 27 61 -
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonElasticXS.hh,v 1. 5 2009/11/19 11:41:30 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGNucleonElasticXS.hh,v 1.6 2010/10/12 06:02:09 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4ParticleDefinition.hh" 56 56 #include "G4Element.hh" 57 #include "G4HadTmpUtil.hh" 57 58 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......59 59 60 60 class G4GlauberGribovCrossSection; … … 74 74 75 75 virtual 76 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);76 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 77 77 78 78 virtual … … 81 81 82 82 virtual 83 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,84 G4double/*A*/, G4double aTemperature = 0.);83 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 84 G4int /*A*/, G4double aTemperature = 0.); 85 85 86 86 virtual … … 94 94 void Initialise(); 95 95 96 G4double CoulombFactor(G4double kinEnergy, G4 doubleA);96 G4double CoulombFactor(G4double kinEnergy, G4int A); 97 97 98 98 G4double fGlauberEnergy; … … 109 109 }; 110 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......112 111 113 112 inline … … 116 115 { 117 116 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN());119 117 } 120 118 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......122 119 123 120 inline 124 G4bool G4BGGNucleonElasticXS::Is ZAApplicable(const G4DynamicParticle*,125 G4double /*Z*/, G4double/* A*/)121 G4bool G4BGGNucleonElasticXS::IsIsoApplicable(const G4DynamicParticle*, 122 G4int /*Z*/, G4int/* A*/) 126 123 { 127 124 return true; 128 // return (dp->GetDefinition() == particle);129 125 } 130 126 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......132 127 133 128 inline … … 136 131 G4double temp) 137 132 { 138 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 133 // return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 134 G4int Z = G4lrint(elm->GetZ()); 135 G4int N = G4lrint(elm->GetN()); 136 return GetZandACrossSection(dp, Z, N, temp); 139 137 } 140 138 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......142 143 139 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonInelasticXS.hh,v 1. 6 2009/11/19 11:44:46 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGNucleonInelasticXS.hh,v 1.7 2010/10/12 06:02:28 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4ParticleDefinition.hh" 56 56 #include "G4Element.hh" 57 #include "G4HadTmpUtil.hh" 57 58 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......59 59 60 60 class G4GlauberGribovCrossSection; … … 74 74 75 75 virtual 76 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);76 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 77 77 78 78 virtual … … 81 81 82 82 virtual 83 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,84 G4double/*A*/, G4double aTemperature = 0.);83 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 84 G4int /*A*/, G4double aTemperature = 0.); 85 85 86 86 virtual … … 94 94 void Initialise(); 95 95 96 G4double CoulombFactor(G4double kinEnergy, G4 doubleA);96 G4double CoulombFactor(G4double kinEnergy, G4int A); 97 97 98 98 G4double fGlauberEnergy; … … 109 109 }; 110 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......112 111 113 112 inline … … 116 115 { 117 116 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN());119 117 } 120 118 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......122 119 123 120 inline 124 G4bool G4BGGNucleonInelasticXS::Is ZAApplicable(const G4DynamicParticle*,125 G4double /*Z*/, G4double/* A*/)121 G4bool G4BGGNucleonInelasticXS::IsIsoApplicable(const G4DynamicParticle*, 122 G4int /*Z*/, G4int/* A*/) 126 123 { 127 124 return false; 128 // return (dp->GetDefinition() == particle);129 125 } 130 126 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......132 127 133 128 inline … … 136 131 G4double temp) 137 132 { 138 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 133 G4int Z = G4lrint(elm->GetZ()); 134 G4int N = G4lrint(elm->GetN()); 135 return GetZandACrossSection(dp, Z, N, temp); 139 136 } 140 137 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......142 138 143 139 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionElasticXS.hh,v 1. 5 2009/11/19 11:46:13 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGPionElasticXS.hh,v 1.7 2010/10/20 09:07:38 stesting Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4ParticleDefinition.hh" 56 56 #include "G4Element.hh" 57 #include "G4HadTmpUtil.hh" 57 58 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......59 59 60 60 class G4GlauberGribovCrossSection; … … 73 73 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 74 74 75 // virtual 76 // G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A); 77 75 78 virtual 76 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);79 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 77 80 78 81 virtual … … 80 83 const G4Element*, G4double aTemperature = 0.); 81 84 85 // virtual 86 // G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/, 87 // G4double /*A*/, G4double aTemperature = 0.); 88 82 89 virtual 83 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,84 G4double/*A*/, G4double aTemperature = 0.);90 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 91 G4int /*A*/, G4double aTemperature = 0.); 85 92 86 93 virtual … … 94 101 void Initialise(); 95 102 96 G4double CoulombFactor(G4double kinEnergy, G4double A); 103 // G4double CoulombFactor(G4double kinEnergy, G4double A); 104 G4double CoulombFactor(G4double kinEnergy, G4int A); 97 105 98 106 G4double fGlauberEnergy; … … 116 124 { 117 125 return true; 118 //return IsZAApplicable(dp, elm->GetZ(), elm->GetN());119 126 } 120 127 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 128 //inline 129 //G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle*, 130 // G4double /*Z*/, G4double/* A*/) 122 131 123 132 inline 124 G4bool G4BGGPionElasticXS::Is ZAApplicable(const G4DynamicParticle*,125 G4double /*Z*/, G4double/* A*/)133 G4bool G4BGGPionElasticXS::IsIsoApplicable(const G4DynamicParticle*, 134 G4int /*Z*/, G4int/* A*/) 126 135 { 127 136 return false; 128 // return (dp->GetDefinition() == particle);129 137 } 130 138 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......132 139 133 inline 140 inline 134 141 G4double G4BGGPionElasticXS::GetCrossSection(const G4DynamicParticle* dp, 135 142 const G4Element* elm, 136 143 G4double temp) 137 144 { 138 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 145 // return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 146 G4int Z = G4lrint(elm->GetZ()); 147 G4int N = G4lrint(elm->GetN()); 148 return GetZandACrossSection(dp, Z, N, temp); 139 149 } 140 150 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......142 143 151 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionInelasticXS.hh,v 1. 5 2009/11/19 11:47:19 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGPionInelasticXS.hh,v 1.6 2010/10/12 06:04:02 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4ParticleDefinition.hh" 56 56 #include "G4Element.hh" 57 #include "G4HadTmpUtil.hh" 57 58 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......59 59 60 60 class G4GlauberGribovCrossSection; … … 73 73 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 74 74 75 // virtual 76 // G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A); 77 75 78 virtual 76 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);79 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 77 80 78 81 virtual … … 80 83 const G4Element*, G4double aTemperature = 0.); 81 84 85 // virtual 86 // G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/, 87 // G4double /*A*/, G4double aTemperature = 0.); 88 82 89 virtual 83 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,84 G4double/*A*/, G4double aTemperature = 0.);90 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 91 G4int /*A*/, G4double aTemperature = 0.); 85 92 86 93 virtual … … 94 101 void Initialise(); 95 102 96 G4double CoulombFactor(G4double kinEnergy, G4 doubleA);103 G4double CoulombFactor(G4double kinEnergy, G4int A); 97 104 98 105 G4double fGlauberEnergy; … … 109 116 }; 110 117 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......112 118 113 119 inline … … 116 122 { 117 123 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN());119 124 } 120 125 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......122 126 123 127 inline 124 G4bool G4BGGPionInelasticXS::Is ZAApplicable(const G4DynamicParticle*,125 G4double /*Z*/, G4double/* A*/)128 G4bool G4BGGPionInelasticXS::IsIsoApplicable(const G4DynamicParticle*, 129 G4int /*Z*/, G4int/* A*/) 126 130 { 127 131 return false; 128 // return (dp->GetDefinition() == particle);129 132 } 130 133 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......132 134 133 135 inline … … 136 138 G4double temp) 137 139 { 138 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 140 // return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); 141 G4int Z = G4lrint(elm->GetZ()); 142 G4int N = G4lrint(elm->GetN()); 143 return GetZandACrossSection(dp, Z, N, temp); 139 144 } 140 145 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......142 143 146 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4EMDissociationCrossSection.hh
r819 r1340 79 79 virtual G4bool IsApplicable (const G4DynamicParticle*, const G4Element*); 80 80 81 virtual G4bool IsZAApplicable(const G4DynamicParticle*, G4double ZZ, 82 G4double AA); 81 virtual G4bool IsIsoApplicable(const G4DynamicParticle*, G4int ZZ, G4int AA); 83 82 84 83 virtual G4double GetCrossSection (const G4DynamicParticle *, 85 84 const G4Element *, G4double); 86 85 87 virtual G4double Get IsoZACrossSection(const G4DynamicParticle*,88 G4 double ZZ, G4doubleAA,86 virtual G4double GetZandACrossSection(const G4DynamicParticle*, 87 G4int ZZ, G4int AA, 89 88 G4double temperature); 90 89 … … 110 109 G4double xd; 111 110 }; 112 /////////////////////////////////////////////////////////////////////////////// 113 // 111 114 112 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh
r1337 r1340 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // … … 55 55 G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* ) 56 56 { 57 return Is ZAApplicable(aParticle, 0., 0.);57 return IsIsoApplicable(aParticle, 0, 0); 58 58 } 59 59 60 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle, G4double /*ZZ*/,61 G4double/*AA*/)60 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 61 G4int /*ZZ*/, G4int /*AA*/) 62 62 { 63 63 G4bool result = false; 64 if( aParticle->GetDefinition()==G4Electron::ElectronDefinition()) result = true; 65 if( aParticle->GetDefinition()==G4Positron::PositronDefinition()) result = true; 64 if (aParticle->GetDefinition() == G4Electron::ElectronDefinition()) 65 result = true; 66 if (aParticle->GetDefinition() == G4Positron::PositronDefinition()) 67 result = true; 66 68 return result; 67 69 } … … 71 73 const G4Element* anElement, G4double T=0.); 72 74 73 G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle, 74 G4double ZZ, G4double AA, G4double T=0.); 75 75 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 76 G4int ZZ, G4int AA, G4double T=0.); 76 77 77 78 G4double GetEquivalentPhotonEnergy(); … … 87 88 private: 88 89 G4int GetFunctions(G4double a, G4double* x, G4double* y, G4double* z); 89 //G4double LinearFit(G4double X, G4int N, const G4double* XN, const G4double* YN); 90 90 91 G4double ThresholdEnergy(G4int Z, G4int N); 91 92 G4double HighEnergyJ1(G4double lE); … … 111 112 static G4double lastH; // Last value of the High energy A-dependence 112 113 113 static std::vector <G4double*> J1; // Vector of pointers to the J1 tabulated functions 114 static std::vector <G4double*> J2; // Vector of pointers to the J2 tabulated functions 115 static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions 114 // Vector of pointers to the J1 tabulated functions 115 static std::vector <G4double*> J1; 116 117 // Vector of pointers to the J2 tabulated functions 118 static std::vector <G4double*> J2; 119 120 // Vector of pointers to the J3 tabulated functions 121 static std::vector <G4double*> J3; 116 122 }; 117 123 118 inline G4double G4ElectroNuclearCrossSection::DFun(G4double x)// Parametrization of the PhotoNucCS 124 125 inline G4double 126 G4ElectroNuclearCrossSection::DFun(G4double x) 119 127 { 120 static const G4double shd=1.0734; // HE PomShadowing(D) 121 static const G4double poc=0.0375; // HE Pomeron coefficient 122 static const G4double pos=16.5; // HE Pomeron shift 123 static const G4double reg=.11; // HE Reggeon slope 124 static const G4double mel=0.5109989; // Mass of an electron in MeV 125 static const G4double lmel=std::log(mel); // Log of an electron mass 126 G4double y=std::exp(x-lastG-lmel); // y for the x 127 G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor 128 // Parametrization of the PhotoNucCS 129 static const G4double shd=1.0734; // HE PomShadowing(D) 130 static const G4double poc=0.0375; // HE Pomeron coefficient 131 static const G4double pos=16.5; // HE Pomeron shift 132 static const G4double reg=.11; // HE Reggeon slope 133 static const G4double mel=0.5109989; // Mass of an electron in MeV 134 static const G4double lmel=std::log(mel); // Log of an electron mass 135 G4double y=std::exp(x-lastG-lmel); // y for the x 136 G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor 128 137 return (poc*(x-pos)+shd*std::exp(-reg*x))*flux; 129 138 } 130 139 131 inline G4double G4ElectroNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc cross section 140 141 inline G4double 142 G4ElectroNuclearCrossSection::Fun(G4double x) 132 143 { 144 // Integrated PhoNuc cross section 133 145 G4double dlg1=lastG+lastG-1.; 134 146 G4double lgoe=lastG/lastE; … … 137 149 } 138 150 139 inline G4double G4ElectroNuclearCrossSection::HighEnergyJ1(G4double lEn) 151 152 inline G4double 153 G4ElectroNuclearCrossSection::HighEnergyJ1(G4double lEn) 140 154 { 141 155 static const G4double le=std::log(50000.); // std::log(E0) … … 150 164 } 151 165 152 inline G4double G4ElectroNuclearCrossSection::HighEnergyJ2(G4double lEn) 166 167 inline G4double 168 G4ElectroNuclearCrossSection::HighEnergyJ2(G4double lEn) 153 169 { 154 170 static const G4double e=50000.; // E0 … … 164 180 } 165 181 166 inline G4double G4ElectroNuclearCrossSection::HighEnergyJ3(G4double lEn) 182 183 inline G4double 184 G4ElectroNuclearCrossSection::HighEnergyJ3(G4double lEn) 167 185 { 168 186 static const G4double e=50000.; // E0 -
trunk/source/processes/hadronic/cross_sections/include/G4GGNuclNuclCrossSection.hh
r1228 r1340 31 31 // 32 32 // 33 //34 //35 //36 33 // 24.11.08 V. Grichine - first implementation based on G4GlauberGribovCrossSection 37 34 // … … 60 57 61 58 virtual 62 G4bool Is ZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4doubleA);59 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, G4int Z, G4int A); 63 60 64 61 virtual … … 68 65 69 66 virtual 70 G4double Get IsoZACrossSection(const G4DynamicParticle*,71 G4 double Z, G4doubleA,67 G4double GetZandACrossSection(const G4DynamicParticle*, 68 G4int Z, G4int A, 72 69 G4double aTemperature = 0.0); 73 70 74 71 G4double GetCoulombBarier(const G4DynamicParticle*, 75 72 G4double Z, G4double A, G4double pR, G4double tR); 76 73 77 74 virtual … … 87 84 88 85 G4double GetHadronNucleonXsc(const G4DynamicParticle*, const G4Element*); 89 G4double GetHadronNucleonXsc(const G4DynamicParticle*, G4 double At, G4doubleZt);86 G4double GetHadronNucleonXsc(const G4DynamicParticle*, G4int At, G4int Zt); 90 87 91 88 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, const G4Element*); 92 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, G4double At, G4double Zt); 93 94 // G4double GetHadronNucleonXscNS(const G4DynamicParticle*, const G4Element*); 95 // G4double GetHadronNucleonXscNS(const G4DynamicParticle*,G4double At, G4double Zt); 96 89 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, G4int At, G4int Zt); 97 90 G4double GetHadronNucleonXscNS(G4ParticleDefinition*,G4double pTkin, G4ParticleDefinition*); 98 91 99 // G4double GetHNinelasticXsc(const G4DynamicParticle*, const G4Element*); 100 // G4double GetHNinelasticXsc(const G4DynamicParticle*, G4double At, G4double Zt); 101 102 G4double GetHNinelasticXscVU(const G4DynamicParticle*, G4double At, G4double Zt); 103 104 G4double CalculateEcmValue ( const G4double , const G4double , const G4double ); 105 92 G4double GetHNinelasticXscVU(const G4DynamicParticle*, G4int At, G4int Zt); 93 G4double CalculateEcmValue(const G4double, const G4double, const G4double); 106 94 G4double CalcMandelstamS( const G4double , const G4double , const G4double ); 107 95 108 G4double GetElasticGlauberGribov(const G4DynamicParticle*,G4 double Z, G4doubleA);109 G4double GetInelasticGlauberGribov(const G4DynamicParticle*,G4 double Z, G4doubleA);96 G4double GetElasticGlauberGribov(const G4DynamicParticle*,G4int Z, G4int A); 97 G4double GetInelasticGlauberGribov(const G4DynamicParticle*,G4int Z, G4int A); 110 98 111 99 G4double GetTotalGlauberGribovXsc() { return fTotalXsc; }; … … 118 106 G4double GetNucleusRadius(const G4DynamicParticle*, const G4Element*); 119 107 120 121 108 G4double GetNucleusRadius(G4double At); 122 109 G4double GetNucleusRadiusGG(G4double At); 123 110 G4double GetNucleusRadiusDE(G4double At); 124 125 111 126 112 inline void SetEnergyLowerLimit(G4double E ){fLowerLimit=E;}; … … 144 130 // Inlines 145 131 146 inline 147 G4 double G4GGNuclNuclCrossSection::GetElasticGlauberGribov(148 const G4DynamicParticle* dp, G4double Z, G4doubleA)132 inline G4double 133 G4GGNuclNuclCrossSection::GetElasticGlauberGribov(const G4DynamicParticle* dp, 134 G4int Z, G4int A) 149 135 { 150 Get IsoZACrossSection(dp, Z, A);136 GetZandACrossSection(dp, Z, A); 151 137 return fElasticXsc; 152 138 } … … 154 140 ///////////////////////////////////////////////////////////////// 155 141 156 inline 157 G4 double G4GGNuclNuclCrossSection::GetInelasticGlauberGribov(158 const G4DynamicParticle* dp, G4double Z, G4doubleA)142 inline G4double 143 G4GGNuclNuclCrossSection::GetInelasticGlauberGribov(const G4DynamicParticle* dp, 144 G4int Z, G4int A) 159 145 { 160 Get IsoZACrossSection(dp, Z, A);146 GetZandACrossSection(dp, Z, A); 161 147 return fInelasticXsc; 162 148 } 163 149 164 165 166 150 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4GeneralSpaceNNCrossSection.hh
r819 r1340 91 91 const G4Element* theTarget); 92 92 93 virtual G4bool Is ZAApplicable(const G4DynamicParticle* theProjectile,94 G4 double ZZ, G4doubleAA);93 virtual G4bool IsIsoApplicable(const G4DynamicParticle* theProjectile, 94 G4int ZZ, G4int AA); 95 95 96 96 virtual G4double GetCrossSection(const G4DynamicParticle* theProjectile, 97 97 const G4Element* theTarget, G4double theTemperature); 98 98 99 virtual G4double Get IsoZACrossSection(const G4DynamicParticle* theProjectile,100 G4 double ZZ, G4doubleAA, G4double theTemperature);99 virtual G4double GetZandACrossSection(const G4DynamicParticle* theProjectile, 100 G4int ZZ, G4int AA, G4double theTemperature); 101 101 102 102 virtual void BuildPhysicsTable(const G4ParticleDefinition&) … … 114 114 G4IonsShenCrossSection *Shen; 115 115 }; 116 //////////////////////////////////////////////////////////////////////////////// 117 // 116 118 117 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4GlauberGribovCrossSection.hh
r1228 r1340 47 47 #include "G4Proton.hh" 48 48 #include "G4Nucleus.hh" 49 #include "G4HadTmpUtil.hh" 49 50 50 51 #include "G4VCrossSectionDataSet.hh" … … 63 64 64 65 virtual 65 G4bool Is ZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4doubleA);66 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, G4int Z, G4int A); 66 67 67 68 virtual … … 71 72 72 73 virtual 73 G4double Get IsoZACrossSection(const G4DynamicParticle*,74 G4double Z, G4double A, 75 74 G4double GetZandACrossSection(const G4DynamicParticle*, 75 G4int Z, G4int A, 76 G4double aTemperature = 0.0); 76 77 77 78 virtual … … 83 84 {G4cout << "G4GlauberGribovCrossSection: uses Glauber-Gribov formula"<<G4endl;} 84 85 85 G4double GetRatioSD(const G4DynamicParticle*, G4 double At, G4doubleZt);86 G4double GetRatioQE(const G4DynamicParticle*, G4 double At, G4doubleZt);86 G4double GetRatioSD(const G4DynamicParticle*, G4int At, G4int Zt); 87 G4double GetRatioQE(const G4DynamicParticle*, G4int At, G4int Zt); 87 88 88 89 G4double GetHadronNucleonXsc(const G4DynamicParticle*, const G4Element*); 89 G4double GetHadronNucleonXsc(const G4DynamicParticle*, G4 double At, G4doubleZt);90 G4double GetHadronNucleonXsc(const G4DynamicParticle*, G4int At, G4int Zt); 90 91 91 92 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, const G4Element*); 92 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, G4 double At, G4doubleZt);93 G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, G4int At, G4int Zt); 93 94 94 95 G4double GetHadronNucleonXscNS(const G4DynamicParticle*, const G4Element*); 95 G4double GetHadronNucleonXscNS(const G4DynamicParticle*, G4double At, G4doubleZt);96 G4double GetHadronNucleonXscNS(const G4DynamicParticle*, G4int At, G4int Zt); 96 97 97 98 G4double GetHNinelasticXsc(const G4DynamicParticle*, const G4Element*); 98 G4double GetHNinelasticXsc(const G4DynamicParticle*, G4 double At, G4doubleZt);99 G4double GetHNinelasticXscVU(const G4DynamicParticle*, G4 double At, G4doubleZt);99 G4double GetHNinelasticXsc(const G4DynamicParticle*, G4int At, G4int Zt); 100 G4double GetHNinelasticXscVU(const G4DynamicParticle*, G4int At, G4int Zt); 100 101 101 102 G4double CalculateEcmValue ( const G4double , const G4double , const G4double ); … … 103 104 G4double CalcMandelstamS( const G4double , const G4double , const G4double ); 104 105 105 G4double GetElasticGlauberGribov(const G4DynamicParticle*, G4double Z, G4doubleA);106 G4double GetInelasticGlauberGribov(const G4DynamicParticle*, G4double Z, G4doubleA);106 G4double GetElasticGlauberGribov(const G4DynamicParticle*, G4int Z, G4int A); 107 G4double GetInelasticGlauberGribov(const G4DynamicParticle*, G4int Z, G4int A); 107 108 108 109 G4double GetTotalGlauberGribovXsc() { return fTotalXsc; }; … … 114 115 115 116 G4double GetNucleusRadius(const G4DynamicParticle*, const G4Element*); 116 G4double GetNucleusRadius(G4 doubleAt);117 118 inline G4double GetParticleBarCorTot( const G4ParticleDefinition* theParticle, G4double Z);119 inline G4double GetParticleBarCorIn( const G4ParticleDefinition* theParticle, G4double Z);117 G4double GetNucleusRadius(G4int At); 118 119 inline G4double GetParticleBarCorTot(const G4ParticleDefinition* theParticle, G4int Z); 120 inline G4double GetParticleBarCorIn(const G4ParticleDefinition* theParticle, G4int Z); 120 121 121 122 inline void SetEnergyLowerLimit(G4double E ){fLowerLimit=E;}; … … 180 181 181 182 inline 182 G4double G4GlauberGribovCrossSection::GetElasticGlauberGribov( 183 const G4DynamicParticle* dp, G4double Z, G4double A) 184 { 185 GetIsoZACrossSection(dp, Z, A); 183 G4double 184 G4GlauberGribovCrossSection::GetElasticGlauberGribov(const G4DynamicParticle* dp, 185 G4int Z, G4int A) 186 { 187 GetZandACrossSection(dp, Z, A); 186 188 return fElasticXsc; 187 189 } … … 190 192 191 193 inline 192 G4double G4GlauberGribovCrossSection::GetInelasticGlauberGribov( 193 const G4DynamicParticle* dp, G4double Z, G4double A) 194 { 195 GetIsoZACrossSection(dp, Z, A); 194 G4double 195 G4GlauberGribovCrossSection::GetInelasticGlauberGribov(const G4DynamicParticle* dp, 196 G4int Z, G4int A) 197 { 198 GetZandACrossSection(dp, Z, A); 196 199 return fInelasticXsc; 197 200 } … … 204 207 205 208 inline G4double G4GlauberGribovCrossSection::GetParticleBarCorTot( 206 const G4ParticleDefinition* theParticle, G4double Z ) 207 { 208 G4int iZ = G4int(Z); 209 210 if( iZ >= 2 && iZ <= 92) 209 const G4ParticleDefinition* theParticle, G4int Z) 210 { 211 if(Z >= 2 && Z <= 92) 211 212 { 212 if( theParticle == theProton ) return fProtonBarCorrectionTot[ iZ];213 else if( theParticle == theNeutron) return fNeutronBarCorrectionTot[ iZ];214 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionTot[ iZ];215 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionTot[ iZ];213 if( theParticle == theProton ) return fProtonBarCorrectionTot[Z]; 214 else if( theParticle == theNeutron) return fNeutronBarCorrectionTot[Z]; 215 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionTot[Z]; 216 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionTot[Z]; 216 217 else return 1.0; 217 218 } … … 226 227 227 228 inline G4double G4GlauberGribovCrossSection::GetParticleBarCorIn( 228 const G4ParticleDefinition* theParticle, G4double Z ) 229 { 230 G4int iZ = G4int(Z); 231 232 if( iZ >= 2 && iZ <= 92) 229 const G4ParticleDefinition* theParticle, G4int Z) 230 { 231 if(Z >= 2 && Z <= 92) 233 232 { 234 if( theParticle == theProton ) return fProtonBarCorrectionIn[ iZ];235 else if( theParticle == theNeutron) return fNeutronBarCorrectionIn[ iZ];236 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionIn[ iZ];237 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionIn[ iZ];233 if( theParticle == theProton ) return fProtonBarCorrectionIn[Z]; 234 else if( theParticle == theNeutron) return fNeutronBarCorrectionIn[Z]; 235 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionIn[Z]; 236 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionIn[Z]; 238 237 else return 1.0; 239 238 } -
trunk/source/processes/hadronic/cross_sections/include/G4HadronCaptureDataSet.hh
r819 r1340 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 //26 25 // 27 26 // … … 64 63 } 65 64 66 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle,67 G4double ZZ, G4doubleAA)65 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 66 G4int ZZ, G4int AA) 68 67 { 69 68 return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA); … … 77 76 } 78 77 79 G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle, 80 G4double ZZ, G4double AA, 81 G4double /*aTemperature*/) 78 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 79 G4int ZZ, G4int AA, G4double /*aTemperature*/) 82 80 { 83 81 return theHadronCrossSections->GetCaptureCrossSection(aParticle, ZZ, AA); -
trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh
r1337 r1340 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // … … 55 55 #include "G4VProcess.hh" 56 56 #include "G4DynamicParticle.hh" 57 //#include "G4ParticleTypes.hh"57 #include "G4HadTmpUtil.hh" 58 58 #include "G4PionPlus.hh" 59 59 #include "G4PionZero.hh" … … 84 84 #include "G4OmegaMinus.hh" 85 85 #include "G4AntiOmegaMinus.hh" 86 //#include "G4LPhysicsFreeVector.hh"87 86 88 87 … … 95 94 G4HadronCrossSections() 96 95 : prevParticleDefinition(0), lastEkx(0.), lastEkxPower(0.), verboseLevel(0) 97 { 98 } 96 {} 99 97 100 98 ~G4HadronCrossSections() 101 { 102 } 99 {} 103 100 104 101 static G4HadronCrossSections* Instance() … … 123 120 124 121 G4double GetElasticCrossSection(const G4DynamicParticle*, 125 G4 double /*ZZ*/, G4double/*AA*/);122 G4int /*ZZ*/, G4int /*AA*/); 126 123 127 124 G4double GetInelasticCrossSection(const G4DynamicParticle*, … … 129 126 130 127 G4double GetInelasticCrossSection(const G4DynamicParticle*, 131 G4 double /*ZZ*/, G4double/*AA*/);128 G4int /*ZZ*/, G4int /*AA*/); 132 129 133 130 G4double GetCaptureCrossSection(const G4DynamicParticle* aParticle, 134 131 const G4Element* anElement) 135 132 { 136 return GetCaptureCrossSection(aParticle, anElement->GetZ(), 137 anElement->GetN()); 133 G4int Z = G4lrint(anElement->GetZ()); 134 G4int A = G4lrint(anElement->GetN()); 135 return GetCaptureCrossSection(aParticle, Z, A); 138 136 } 139 137 140 138 G4double GetCaptureCrossSection(const G4DynamicParticle*, 141 G4 double /*ZZ*/, G4double/*AA*/);139 G4int /*ZZ*/, G4int /*AA*/); 142 140 143 141 G4double GetFissionCrossSection(const G4DynamicParticle* aParticle, 144 142 const G4Element* anElement) 145 143 { 146 return GetFissionCrossSection(aParticle, anElement->GetZ(), 147 anElement->GetN()); 144 G4int Z = G4lrint(anElement->GetZ()); 145 G4int A = G4lrint(anElement->GetN()); 146 return GetFissionCrossSection(aParticle, Z, A); 148 147 } 149 148 150 149 G4double GetFissionCrossSection(const G4DynamicParticle*, 151 G4 double /*ZZ*/, G4double/*AA*/);150 G4int /*ZZ*/, G4int /*AA*/); 152 151 153 152 … … 177 176 178 177 void CalcScatteringCrossSections(const G4DynamicParticle*, 179 G4 double /*ZZ*/, G4double/*AA*/);178 G4int /*ZZ*/, G4int /*AA*/); 180 179 181 180 static G4HadronCrossSections* theInstance; … … 199 198 static G4float csin[NPARTS][TSIZE]; 200 199 201 202 200 static G4float cspiel[3][TSIZE]; 203 201 static G4float cspiin[3][TSIZE]; -
trunk/source/processes/hadronic/cross_sections/include/G4HadronElasticDataSet.hh
r819 r1340 63 63 } 64 64 65 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle,66 G4double ZZ, G4doubleAA)65 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 66 G4int ZZ, G4int AA) 67 67 { 68 68 return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA); … … 77 77 } 78 78 79 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,80 G4double ZZ, G4doubleAA,81 G4double /*aTemperature*/)79 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 80 G4int ZZ, G4int AA, 81 G4double /*aTemperature*/) 82 82 { 83 83 return theHadronCrossSections->GetElasticCrossSection(aParticle, ZZ, AA); -
trunk/source/processes/hadronic/cross_sections/include/G4HadronFissionDataSet.hh
r819 r1340 62 62 } 63 63 64 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle,65 G4double ZZ, G4doubleAA)64 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 65 G4int ZZ, G4int AA) 66 66 { 67 67 return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA); … … 76 76 } 77 77 78 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,79 G4double ZZ, G4doubleAA,80 G4double /*aTemperature*/)78 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 79 G4int ZZ, G4int AA, 80 G4double /*aTemperature*/) 81 81 { 82 82 return theHadronCrossSections->GetFissionCrossSection(aParticle, ZZ, AA); -
trunk/source/processes/hadronic/cross_sections/include/G4HadronInelasticDataSet.hh
r819 r1340 63 63 64 64 65 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle,66 G4double ZZ, G4doubleAA)65 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 66 G4int ZZ, G4int AA) 67 67 { 68 68 return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA); … … 77 77 } 78 78 79 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,80 G4double ZZ, G4doubleAA,81 G4double /*aTemperature*/)79 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 80 G4int ZZ, G4int AA, 81 G4double /*aTemperature*/) 82 82 { 83 83 return theHadronCrossSections->GetInelasticCrossSection(aParticle, ZZ, AA); -
trunk/source/processes/hadronic/cross_sections/include/G4HadronNucleonXsc.hh
r1228 r1340 31 31 // 32 32 // 33 //34 //35 33 // 14.03.07 V. Grichine - first implementation 36 34 // … … 59 57 60 58 virtual 61 G4bool Is ZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4doubleA);59 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, G4int Z, G4int A); 62 60 63 61 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4IonProtonCrossSection.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 #ifndef G4IonProtonCrossSection_h 27 #define G4IonProtonCrossSection_h 28 29 #include "globals.hh" 30 #include "G4Proton.hh" 31 // Class Description 26 // $Id: G4IonProtonCrossSection.hh,v 1.12 2010/10/15 21:05:10 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class header file 32 // 33 // File name: G4IonProtonCrossSection 34 // 35 // 32 36 // Cross-sections for ion proton scattering up to 20 GeV, getting the low 33 37 // energy threshold behaviour right. 34 38 // H.P. Wellisch (TRIUMF), D. Axen (British Columbia U.). 1996. 35 39 // Published in Phys.Rev.C54:1329-1332,1996 36 // Class Description - End 40 // 41 // Original by H.P.Wellisch 28 June 2001 42 // 43 // Modifications: 44 // 30-07-2010 V.Ivanchenko move virtual methods to source, 45 // add constructor and destructor, 46 // make G4ProtonInelasticCrossSection class member, 47 // fix bug in kinematics 48 // 49 50 #ifndef G4IonProtonCrossSection_h 51 #define G4IonProtonCrossSection_h 1 37 52 38 53 #include "G4VCrossSectionDataSet.hh" 39 #include "G4ProtonInelasticCrossSection.hh" 54 #include "globals.hh" 55 56 class G4ProtonInelasticCrossSection; 40 57 41 58 class G4IonProtonCrossSection : public G4VCrossSectionDataSet 42 59 { 43 60 public: 44 61 45 virtual 46 G4bool IsZAApplicable(const G4DynamicParticle* aPart, G4double /*ZZ*/, 47 G4double AA) 48 { 49 G4bool result = false; 50 if((AA < 1.1) && 51 ( aPart->GetKineticEnergy()/aPart->GetDefinition() 52 ->GetBaryonNumber() < 20*GeV && 53 aPart->GetDefinition()->GetBaryonNumber() > 4) 54 ) result = true; 55 return result; 56 } 62 G4IonProtonCrossSection(); 57 63 58 virtual 59 G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element* anEle) 60 { 61 return IsZAApplicable(aPart, 0., anEle->GetN()); 62 } 64 virtual ~G4IonProtonCrossSection(); 63 65 64 virtual 65 G4double GetCrossSection(const G4DynamicParticle* aPart, 66 const G4Element*, G4double ) 67 { 68 return GetIsoZACrossSection(aPart, 0., 0., 0.); 69 } 66 virtual 67 G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element* anEle); 70 68 71 virtual 72 G4double GetIsoZACrossSection(const G4DynamicParticle* aPart, 73 G4double /*ZZ*/, G4double /*AA*/, 74 G4double /*temperature*/) 75 { 76 G4ProtonInelasticCrossSection theForward; 77 return theForward.GetCrossSection(aPart->GetKineticEnergy(), 78 aPart->GetDefinition()->GetBaryonNumber(), 79 aPart->GetDefinition()->GetPDGCharge()); 80 } 69 virtual 70 G4bool IsIsoApplicable(const G4DynamicParticle* aPart, 71 G4int Z, G4int A); 81 72 73 virtual 74 G4double GetCrossSection(const G4DynamicParticle* aPart, 75 const G4Element*, G4double); 76 77 virtual 78 G4double GetZandACrossSection(const G4DynamicParticle* aPart, 79 G4int Z=1, G4int A=1, G4double T=0.); 82 80 83 virtual 84 void BuildPhysicsTable(const G4ParticleDefinition&) 85 {} 81 virtual void BuildPhysicsTable(const G4ParticleDefinition&); 86 82 87 virtual 88 void DumpPhysicsTable(const G4ParticleDefinition&) 89 {G4cout << "G4IonProtonCrossSection: uses formula"<<G4endl;} 83 virtual void DumpPhysicsTable(const G4ParticleDefinition&); 84 85 private: // Without Description 86 87 G4IonProtonCrossSection & operator=(const G4IonProtonCrossSection &right); 88 G4IonProtonCrossSection(const G4IonProtonCrossSection&); 89 90 G4ProtonInelasticCrossSection* theForward; 90 91 91 92 }; -
trunk/source/processes/hadronic/cross_sections/include/G4IonsKoxCrossSection.hh
r819 r1340 57 57 G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*) 58 58 { 59 return Is ZAApplicable(aDP, 0., 0.);59 return IsIsoApplicable(aDP, 0, 0); 60 60 } 61 61 62 62 63 virtual 63 G4bool Is ZAApplicable(const G4DynamicParticle* aDP, G4double /*ZZ*/,64 G4double/*AA*/)64 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, 65 G4int /*ZZ*/, G4int /*AA*/) 65 66 { 66 67 G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber(); … … 71 72 } 72 73 74 73 75 virtual 74 76 G4double GetCrossSection(const G4DynamicParticle*, 75 77 const G4Element*, G4double aTemperature); 76 78 79 77 80 virtual 78 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4doubleZZ,79 G4 doubleAA, G4double aTemperature);81 G4double GetZandACrossSection(const G4DynamicParticle*, G4int ZZ, 82 G4int AA, G4double aTemperature); 80 83 81 84 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4IonsShenCrossSection.hh
r819 r1340 61 61 G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*) 62 62 { 63 return IsZAApplicable(aDP, 0., 0.);63 return IsIsoApplicable(aDP, 0, 0); 64 64 } 65 65 66 66 virtual 67 G4bool Is ZAApplicable(const G4DynamicParticle* aDP,68 G4double /*ZZ*/, G4double/*AA*/)67 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, 68 G4int /*ZZ*/, G4int /*AA*/) 69 69 { 70 71 72 73 74 70 G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber(); 71 G4double kineticEnergy = aDP->GetKineticEnergy(); 72 if ( kineticEnergy / baryonNumber <= upperLimit ) 73 return true; 74 return false; 75 75 } 76 76 … … 81 81 82 82 virtual 83 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4doubleZZ,84 G4 doubleAA, G4double aTemperature);83 G4double GetZandACrossSection(const G4DynamicParticle*, G4int ZZ, 84 G4int AA, G4double aTemperature); 85 85 86 86 virtual … … 97 97 const G4double r0; 98 98 99 G4double calEcmValue ( const G4double , const G4double , const G4double);100 G4double calCeValue ( const G4double);99 G4double calEcmValue(const G4double, const G4double, const G4double); 100 G4double calCeValue(const G4double); 101 101 }; 102 102 -
trunk/source/processes/hadronic/cross_sections/include/G4IonsSihverCrossSection.hh
r819 r1340 54 54 G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*) 55 55 { 56 return Is ZAApplicable(aDP, 0., 0.);56 return IsIsoApplicable(aDP, 0, 0); 57 57 } 58 58 59 59 virtual 60 G4bool Is ZAApplicable(const G4DynamicParticle* aDP, G4double/*ZZ*/,61 G4double/*AA*/)60 G4bool IsIsoApplicable(const G4DynamicParticle* aDP, G4int /*ZZ*/, 61 G4int /*AA*/) 62 62 { 63 63 G4int BaryonNumber = aDP->GetDefinition()->GetBaryonNumber(); … … 73 73 74 74 virtual 75 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4doubleZZ,76 G4 doubleAA, G4double aTemperature);75 G4double GetZandACrossSection(const G4DynamicParticle*, G4int ZZ, 76 G4int AA, G4double aTemperature); 77 77 78 78 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4NeutronCaptureXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronCaptureXS.hh,v 1. 1 2009/11/12 00:36:01 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronCaptureXS.hh,v 1.4 2010/10/15 22:32:40 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Modifications: 39 39 // 40 41 // Class Description: 42 // This is a base class for neutron radiative capture cross section based on 43 // data files from G4NEUTRONXSDATA data set 44 // Class Description - End 40 45 41 42 46 #ifndef G4NeutronCaptureXS_h 43 47 #define G4NeutronCaptureXS_h 1 … … 45 49 #include "G4VCrossSectionDataSet.hh" 46 50 #include "globals.hh" 51 #include <vector> 47 52 48 53 class G4DynamicParticle; … … 55 60 public: // With Description 56 61 57 G4int Z;58 62 G4NeutronCaptureXS(); 59 63 60 64 virtual ~G4NeutronCaptureXS(); 61 65 62 // The following methods need to be implemented for each new data set.63 66 virtual 64 67 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 65 68 66 69 virtual 67 G4bool IsZAApplicable(const G4DynamicParticle*, 68 G4double /*Z*/, G4double /*A*/); 70 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int /*Z*/, G4int /*A*/); 69 71 70 72 virtual … … 79 81 void DumpPhysicsTable(const G4ParticleDefinition&); 80 82 81 82 public: // Without Description 83 84 inline void SetVerboseLevel(G4int value) 85 { 86 verboseLevel = value; 87 } 88 inline G4int GetVerboseLevel() 89 { 90 return verboseLevel; 91 } 92 93 private: // Without Description 83 private: 94 84 95 85 void Initialise(G4int Z, const char* = 0); … … 98 88 G4NeutronCaptureXS(const G4NeutronCaptureXS&); 99 89 100 G4double emax; 101 G4PhysicsVector* data[93]; 90 G4double emax; 91 G4int maxZ; 92 std::vector<G4PhysicsVector*> data; 102 93 103 94 G4bool isInitialized; -
trunk/source/processes/hadronic/cross_sections/include/G4NeutronElasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronElasticXS.hh,v 1. 3 2009/11/19 11:51:46 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronElasticXS.hh,v 1.6 2010/10/15 22:32:55 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 39 39 // 40 40 41 // Class Description: 42 // This is a base class for neutron elastic hadronic cross section based on 43 // data files from G4NEUTRONXSDATA data set 44 // Class Description - End 41 45 42 46 #ifndef G4NeutronElasticXS_h … … 45 49 #include "G4VCrossSectionDataSet.hh" 46 50 #include "globals.hh" 51 #include <vector> 47 52 48 53 class G4DynamicParticle; … … 51 56 class G4PhysicsVector; 52 57 class G4GlauberGribovCrossSection; 58 class G4HadronNucleonXsc; 53 59 54 60 class G4NeutronElasticXS : public G4VCrossSectionDataSet … … 56 62 public: // With Description 57 63 58 G4int Z;59 64 G4NeutronElasticXS(); 60 65 61 66 virtual ~G4NeutronElasticXS(); 62 67 63 // The following methods need to be implemented for each new data set.64 68 virtual 65 69 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 66 70 67 71 virtual 68 G4bool IsZAApplicable(const G4DynamicParticle*, 69 G4double /*Z*/, G4double /*A*/); 72 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int /*Z*/, G4int /*A*/); 70 73 71 74 virtual … … 80 83 void DumpPhysicsTable(const G4ParticleDefinition&); 81 84 82 public: // Without Description 83 84 inline void SetVerboseLevel(G4int value) 85 { 86 verboseLevel = value; 87 } 88 inline G4int GetVerboseLevel() 89 { 90 return verboseLevel; 91 } 92 93 private: // Without Description 85 private: 94 86 95 87 void Initialise(G4int Z, G4DynamicParticle* dp = 0, const char* = 0); … … 99 91 100 92 G4GlauberGribovCrossSection* ggXsection; 93 G4HadronNucleonXsc* fNucleon; 101 94 102 G4PhysicsVector* data[93]; 103 G4double coeff[93]; 95 const G4ParticleDefinition* proton; 96 97 std::vector<G4PhysicsVector*> data; 98 std::vector<G4double> coeff; 99 G4int maxZ; 104 100 105 101 G4bool isInitialized; -
trunk/source/processes/hadronic/cross_sections/include/G4NeutronInelasticCrossSection.hh
r1228 r1340 58 58 } 59 59 60 G4bool Is ZAApplicable(const G4DynamicParticle* aPart,61 G4double ZZ, G4double/*AA*/)60 G4bool IsIsoApplicable(const G4DynamicParticle* aPart, 61 G4int ZZ, G4int /*AA*/) 62 62 { 63 63 G4bool result = false; … … 74 74 const G4Element*, G4double aTemperature); 75 75 76 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,77 G4 double ZZ, G4doubleAA,76 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 77 G4int ZZ, G4int AA, 78 78 G4double /*aTemperature*/) 79 79 { … … 82 82 83 83 84 G4double GetCrossSection(G4double anEnergy, G4double anA, G4double aZ); 84 G4double GetCrossSection(G4double anEnergy, G4int anA, G4int aZ); 85 85 86 86 87 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4NeutronInelasticXS.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronInelasticXS.hh,v 1. 3 2009/11/19 11:52:27 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronInelasticXS.hh,v 1.6 2010/10/15 22:33:22 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Modifications: 39 39 // 40 41 // Class Description: 42 // This is a base class for neutron inelastic hadronic cross section based on 43 // data files from G4NEUTRONXSDATA data set 44 // Class Description - End 40 45 41 42 46 #ifndef G4NeutronInelasticXS_h 43 47 #define G4NeutronInelasticXS_h 1 … … 45 49 #include "G4VCrossSectionDataSet.hh" 46 50 #include "globals.hh" 51 #include <vector> 47 52 48 53 class G4DynamicParticle; … … 51 56 class G4PhysicsVector; 52 57 class G4GlauberGribovCrossSection; 58 class G4HadronNucleonXsc; 53 59 54 60 class G4NeutronInelasticXS : public G4VCrossSectionDataSet 55 61 { 56 public: // With Description62 public: 57 63 58 G4int Z;59 64 G4NeutronInelasticXS(); 60 65 61 66 virtual ~G4NeutronInelasticXS(); 62 67 63 // The following methods need to be implemented for each new data set.64 68 virtual 65 69 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 66 70 67 71 virtual 68 G4bool IsZAApplicable(const G4DynamicParticle*, 69 G4double /*Z*/, G4double /*A*/); 72 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int /*Z*/, G4int /*A*/); 70 73 71 74 virtual 72 G4double GetCrossSection(const G4DynamicParticle*, 73 const G4Element*, 75 G4double GetCrossSection(const G4DynamicParticle*, const G4Element*, 74 76 G4double aTemperature = 0.); 75 77 … … 80 82 void DumpPhysicsTable(const G4ParticleDefinition&); 81 83 82 public: // Without Description 83 84 inline void SetVerboseLevel(G4int value) 85 { 86 verboseLevel = value; 87 } 88 inline G4int GetVerboseLevel() 89 { 90 return verboseLevel; 91 } 92 93 private: // Without Description 84 private: 94 85 95 86 void Initialise(G4int Z, G4DynamicParticle* dp = 0, const char* = 0); … … 99 90 100 91 G4GlauberGribovCrossSection* ggXsection; 92 G4HadronNucleonXsc* fNucleon; 101 93 102 G4PhysicsVector* data[93]; 103 G4double coeff[93]; 94 const G4ParticleDefinition* proton; 95 96 std::vector<G4PhysicsVector*> data; 97 std::vector<G4double> coeff; 98 G4int maxZ; 104 99 105 100 G4bool isInitialized; -
trunk/source/processes/hadronic/cross_sections/include/G4NucleonNuclearCrossSection.hh
r819 r1340 52 52 virtual ~G4NucleonNuclearCrossSection(); 53 53 54 virtual G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement); 55 56 virtual G4bool IsZAApplicable(const G4DynamicParticle* aParticle, G4double Z, G4double A); 54 virtual G4bool IsApplicable(const G4DynamicParticle* aParticle, 55 const G4Element* anElement); 56 57 virtual G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 58 G4int Z, G4int A); 57 59 58 60 G4double GetCrossSection(const G4DynamicParticle* aParticle, … … 60 62 G4double T=0.); 61 63 62 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,63 G4 double ZZ, G4doubleAA, G4double T=0. );64 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 65 G4int ZZ, G4int AA, G4double T=0. ); 64 66 65 67 G4double GetElasticCrossSection(const G4DynamicParticle* aParticle, 66 G4 double ZZ, G4doubleAA);68 G4int ZZ, G4int AA); 67 69 68 70 G4double GetTotalXsc() { return fTotalXsc; }; … … 190 192 inline 191 193 G4double G4NucleonNuclearCrossSection::GetElasticCrossSection( 192 const G4DynamicParticle* dp, G4 double ZZ, G4doubleAA)194 const G4DynamicParticle* dp, G4int ZZ, G4int AA) 193 195 { 194 Get IsoZACrossSection(dp, ZZ, AA);196 GetZandACrossSection(dp, ZZ, AA); 195 197 return fElasticXsc; 196 198 } -
trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh
r1337 r1340 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // … … 53 53 G4bool IsApplicable(const G4DynamicParticle* particle, const G4Element* ) 54 54 { 55 return Is ZAApplicable(particle, 0, 0);55 return IsIsoApplicable(particle, 0, 0); 56 56 } 57 57 58 G4bool Is ZAApplicable(const G4DynamicParticle* particle,59 G4double /*ZZ*/, G4double/*AA*/)58 G4bool IsIsoApplicable(const G4DynamicParticle* particle, 59 G4int /*ZZ*/, G4int /*AA*/) 60 60 { 61 61 G4bool result = false; … … 68 68 const G4Element* element, G4double temp = 0.); 69 69 70 G4double GetIsoZACrossSection(const G4DynamicParticle* particle, 71 G4double ZZ, G4double AA,72 G4 double /*aTemperature*/);70 71 G4double GetZandACrossSection(const G4DynamicParticle* particle, 72 G4int ZZ, G4int AA, G4double /*aTemperature*/); 73 73 74 74 … … 78 78 79 79 private: 80 G4int GetFunctions(G4double a, G4double* y, G4double* z); 81 G4double EquLinearFit(G4double X, G4int N,const G4double X0,const G4double XD, const G4double* Y); 80 81 G4int GetFunctions(G4double a, G4double* y, G4double* z); 82 G4double EquLinearFit(G4double X, G4int N, const G4double X0, 83 const G4double XD, const G4double* Y); 82 84 G4double ThresholdEnergy(G4int Z, G4int N); 83 85 84 86 // Body 85 87 private: 88 86 89 static G4int lastN; // The last N of calculated nucleus 87 90 static G4int lastZ; // The last Z of calculated nucleus … … 93 96 static G4double lastSP; // Last value of the ShadowingPomeron (A-dependent) 94 97 95 static std::vector <G4double*> GDR; // Vector of pointers to the GDRPhotonuclearCrossSection 96 static std::vector <G4double*> HEN; // Vector of pointers to the HighEnPhotonuclearCrossSect 98 // Vector of pointers to the GDRPhotonuclearCrossSection 99 static std::vector <G4double*> GDR; 100 101 // Vector of pointers to the HighEnPhotonuclearCrossSect 102 static std::vector <G4double*> HEN; 97 103 98 104 }; -
trunk/source/processes/hadronic/cross_sections/include/G4PiNuclearCrossSection.hh
r1228 r1340 42 42 virtual ~G4PiNuclearCrossSection(); 43 43 44 G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement) 44 G4bool IsApplicable(const G4DynamicParticle* aParticle, 45 const G4Element* anElement) 45 46 { 46 47 G4bool result = false; … … 52 53 } 53 54 54 G4bool IsZAApplicable(const G4DynamicParticle* particle,55 G4double ZZ, G4double/*AA*/)55 G4bool 56 IsIsoApplicable(const G4DynamicParticle* particle, G4int ZZ, G4int /*AA*/) 56 57 { 57 58 G4bool result = false; 58 59 if(particle->GetDefinition() == G4PionMinus::PionMinus()) result=true; 59 60 if(particle->GetDefinition() == G4PionPlus::PionPlus()) result=true; 60 if( G4lrint(ZZ)== 1) result = false;61 if(ZZ == 1) result = false; 61 62 if(particle->GetKineticEnergy() > 99.9*TeV) result=false; 62 63 return result; 63 64 } 65 64 66 65 67 G4double GetCrossSection(const G4DynamicParticle* particle, … … 67 69 G4double temperature) 68 70 { 69 return GetIsoZACrossSection(particle, element->GetZ(), 70 element->GetN(), temperature); 71 G4int Z = G4lrint(element->GetZ()); 72 G4int A = G4lrint(element->GetN()); 73 return GetZandACrossSection(particle, Z, A, temperature); 71 74 } 72 75 73 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,74 G4 double ZZ, G4doubleAA,76 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 77 G4int ZZ, G4int AA, 75 78 G4double /*aTemperature*/); 76 79 77 G4double GetTotalXsc() { return fTotalXsc;};78 G4double GetElasticXsc() { return fElasticXsc;};80 G4double GetTotalXsc() {return fTotalXsc;}; 81 G4double GetElasticXsc() {return fElasticXsc;}; 79 82 80 83 -
trunk/source/processes/hadronic/cross_sections/include/G4ProtonInelasticCrossSection.hh
r1228 r1340 56 56 { 57 57 G4bool result = false; 58 if ((aPart->GetDefinition()==G4Proton::Proton()) &&58 if ( (aPart->GetDefinition()==G4Proton::Proton()) && 59 59 ( aPart->GetKineticEnergy()<100*TeV) ) result = true; 60 60 if(aEle->GetZ()<3) result = false; … … 62 62 } 63 63 64 G4bool IsZAApplicable(const G4DynamicParticle* aParticle, 65 G4double ZZ, G4double /*AA*/) 64 65 G4bool 66 IsIsoApplicable(const G4DynamicParticle* aParticle, G4int ZZ, G4int /*AA*/) 66 67 { 67 68 G4bool result = false; … … 72 73 } 73 74 75 74 76 virtual 75 77 G4double GetCrossSection(const G4DynamicParticle*, 76 78 const G4Element*, G4double aTemperature); 79 77 80 78 G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,79 G4double ZZ, G4double AA,80 81 G4double 82 GetZandACrossSection(const G4DynamicParticle* aParticle, 83 G4int ZZ, G4int AA, G4double /*aTemperature*/) 81 84 { 82 85 return GetCrossSection(aParticle->GetKineticEnergy(), AA, ZZ); … … 84 87 85 88 86 G4double GetCrossSection(G4double anEnergy, G4double anA, G4double aZ); 89 G4double GetCrossSection(G4double anEnergy, G4int anA, G4int aZ); 90 87 91 88 92 virtual 89 93 void BuildPhysicsTable(const G4ParticleDefinition&) 90 94 {} 95 91 96 92 97 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4TripathiCrossSection.hh
r1196 r1340 49 49 G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*) 50 50 { 51 return Is ZAApplicable(aPart, 0., 0.);51 return IsIsoApplicable(aPart, 0, 0); 52 52 } 53 53 54 54 virtual 55 G4bool Is ZAApplicable(const G4DynamicParticle* aPart, G4double /*ZZ*/,56 G4double/*AA*/)55 G4bool IsIsoApplicable(const G4DynamicParticle* aPart, 56 G4int /*ZZ*/, G4int /*AA*/) 57 57 { 58 58 G4bool result = false; 59 if ((aPart->GetDefinition()->GetBaryonNumber()>2.5) &&59 if ( (aPart->GetDefinition()->GetBaryonNumber()>2.5) && 60 60 ( aPart->GetKineticEnergy()/aPart->GetDefinition()->GetBaryonNumber()<1*GeV) ) result = true; 61 61 return result; … … 68 68 69 69 virtual 70 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4doubleZZ,71 G4 doubleAA, G4double aTemperature);70 G4double GetZandACrossSection(const G4DynamicParticle*, G4int ZZ, 71 G4int AA, G4double aTemperature); 72 72 73 73 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4TripathiLightCrossSection.hh
r819 r1340 86 86 const G4Element* theTarget); 87 87 88 virtual G4bool Is ZAApplicable(const G4DynamicParticle* theProjectile,89 G4double ZZ, G4doubleAA);88 virtual G4bool IsIsoApplicable(const G4DynamicParticle* theProjectile, 89 G4int ZZ, G4int AA); 90 90 91 91 virtual G4double GetCrossSection(const G4DynamicParticle* theProjectile, … … 93 93 94 94 virtual 95 G4double Get IsoZACrossSection(const G4DynamicParticle* theProjectile,96 G4 double ZZ, G4doubleAA,95 G4double GetZandACrossSection(const G4DynamicParticle* theProjectile, 96 G4int ZZ, G4int AA, 97 97 G4double theTemperature); 98 98 … … 102 102 virtual void DumpPhysicsTable(const G4ParticleDefinition&) 103 103 {G4cout << "G4TripathiLightCrossSection: uses formula"<<G4endl;} 104 void SetLowEnergyCheck 104 void SetLowEnergyCheck(G4bool); 105 105 106 106 private: … … 110 110 G4bool lowEnergyCheck; 111 111 }; 112 /////////////////////////////////////////////////////////////////////////////// 113 // 112 114 113 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4UElasticCrossSection.hh
r819 r1340 61 61 62 62 virtual 63 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);63 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 64 64 65 65 virtual … … 68 68 69 69 virtual 70 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,71 G4double/*A*/, G4double aTemperature = 0.);70 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 71 G4int /*A*/, G4double aTemperature = 0.); 72 72 73 73 virtual -
trunk/source/processes/hadronic/cross_sections/include/G4UInelasticCrossSection.hh
r819 r1340 61 61 62 62 virtual 63 G4bool Is ZAApplicable(const G4DynamicParticle*, G4double Z, G4doubleA);63 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A); 64 64 65 65 virtual … … 68 68 69 69 virtual 70 G4double Get IsoZACrossSection(const G4DynamicParticle*, G4double/*Z*/,71 G4 double/*A*/, G4double aTemperature = 0.);70 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 71 G4int /*A*/, G4double aTemperature = 0.); 72 72 73 73 virtual … … 90 90 G4HadronCrossSections* fGheisha; 91 91 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......93 94 92 }; 95 93 -
trunk/source/processes/hadronic/cross_sections/include/G4UPiNuclearCrossSection.hh
r1315 r1340 39 39 #include "G4DynamicParticle.hh" 40 40 #include "G4DataVector.hh" 41 #include "G4HadTmpUtil.hh" 41 42 #include "globals.hh" 42 43 #include <vector> … … 57 58 58 59 virtual 59 G4bool Is ZAApplicable(const G4DynamicParticle* aParticle,60 G4double Z, G4doubleA);60 G4bool IsIsoApplicable(const G4DynamicParticle* aParticle, 61 G4int Z, G4int A); 61 62 62 63 virtual … … 65 66 66 67 virtual 67 G4double Get IsoZACrossSection(const G4DynamicParticle* aParticle,68 G4 double Z, G4doubleA, G4double T=0.);68 G4double GetZandACrossSection(const G4DynamicParticle* aParticle, 69 G4int Z, G4int A, G4double T=0.); 69 70 70 71 G4double GetElasticCrossSection(const G4DynamicParticle* aParticle, … … 72 73 73 74 G4double GetElasticCrossSection(const G4DynamicParticle* aParticle, 74 G4 double Z, G4doubleA);75 G4int Z, G4int A); 75 76 76 77 G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle, … … 78 79 79 80 G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle, 80 G4 double Z, G4doubleA);81 G4int Z, G4int A); 81 82 82 83 void BuildPhysicsTable(const G4ParticleDefinition&); … … 91 92 const G4double* in, const G4double* e, G4int n); 92 93 93 G4double Interpolate(G4 double Z, G4doubleA, G4double ekin,94 G4double Interpolate(G4int Z, G4int A, G4double ekin, 94 95 G4PhysicsTable*); 95 96 … … 115 116 const G4Element* elm) 116 117 { 117 return IsZAApplicable(part, elm->GetZ(), elm->GetN()); 118 G4int Z = G4lrint(elm->GetZ()); 119 G4int A = G4lrint(elm->GetN()); 120 return IsIsoApplicable(part, Z, A); 118 121 } 119 122 120 inline G4bool G4UPiNuclearCrossSection::IsZAApplicable(121 122 G4double Z, G4double)123 inline G4bool 124 G4UPiNuclearCrossSection::IsIsoApplicable(const G4DynamicParticle* part, 125 G4int Z, G4int) 123 126 { 124 127 return ((part->GetDefinition() == piMinus || 125 128 part->GetDefinition() == piPlus) && 126 Z > 1 .5);129 Z > 1); 127 130 } 128 131 … … 131 134 const G4Element* elm, G4double) 132 135 { 133 return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN()); 136 G4int Z = G4lrint(elm->GetZ()); 137 G4int A = G4lrint(elm->GetN()); 138 return GetInelasticCrossSection(dp, Z, A); 134 139 } 135 140 136 inline G4double G4UPiNuclearCrossSection::GetIsoZACrossSection(137 138 G4double Z, G4doubleA, G4double)141 inline G4double 142 G4UPiNuclearCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 143 G4int Z, G4int A, G4double) 139 144 { 140 145 return GetInelasticCrossSection(dp, Z, A); … … 145 150 const G4Element* elm) 146 151 { 147 return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN()); 152 G4int Z = G4lrint(elm->GetZ()); 153 G4int A = G4lrint(elm->GetN()); 154 return GetInelasticCrossSection(dp, Z, A); 148 155 } 149 156 … … 152 159 const G4Element* elm) 153 160 { 154 return GetElasticCrossSection(dp, elm->GetZ(), elm->GetN()); 161 G4int Z = G4lrint(elm->GetZ()); 162 G4int A = G4lrint(elm->GetN()); 163 return GetElasticCrossSection(dp, Z, A); 155 164 } 156 165 -
trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VCrossSectionDataSet.hh,v 1.1 3 2009/01/24 11:54:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4VCrossSectionDataSet.hh,v 1.14 2010/07/05 13:39:11 vnivanch Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Modifications: 39 39 // 23.01.2009 V.Ivanchenko move constructor and destructor to source 40 // 05.07.2010 V.Ivanchenko added name, min and max energy limit and 41 // corresponding access methods 40 42 // 41 43 … … 58 60 public: //with description 59 61 60 G4VCrossSectionDataSet( );62 G4VCrossSectionDataSet(const G4String& nam = ""); 61 63 62 64 virtual ~G4VCrossSectionDataSet(); … … 68 70 virtual 69 71 G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/); 72 73 virtual 74 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int /*Z*/, G4int /*N*/); 70 75 71 76 virtual … … 83 88 84 89 virtual 90 G4double GetZandACrossSection(const G4DynamicParticle*, G4int /*Z*/, 91 G4int /*A*/, G4double aTemperature = 0.); 92 93 virtual 85 94 void BuildPhysicsTable(const G4ParticleDefinition&) = 0; 86 95 … … 90 99 public: // Without Description 91 100 92 inline void SetVerboseLevel(G4int value) 93 { 94 verboseLevel = value; 95 } 101 inline void SetVerboseLevel(G4int value); 96 102 97 inline G4int GetVerboseLevel() 98 { 99 return verboseLevel; 100 } 103 inline G4double GetMinKinEnergy() const; 104 105 inline void SetMinKinEnergy(G4double value); 106 107 inline G4double GetMaxKinEnergy() const; 108 109 inline void SetMaxKinEnergy(G4double value); 110 111 inline const G4String& GetName() const; 101 112 102 113 protected: 103 114 104 115 G4int verboseLevel; 116 117 private: 118 119 G4VCrossSectionDataSet & operator=(const G4VCrossSectionDataSet &right); 120 G4VCrossSectionDataSet(const G4VCrossSectionDataSet&); 121 122 G4double minKinEnergy; 123 G4double maxKinEnergy; 124 125 const G4String name; 105 126 }; 106 127 128 inline void G4VCrossSectionDataSet::SetVerboseLevel(G4int value) 129 { 130 verboseLevel = value; 131 } 132 133 inline void G4VCrossSectionDataSet::SetMinKinEnergy(G4double value) 134 { 135 minKinEnergy = value; 136 } 137 138 inline G4double G4VCrossSectionDataSet::GetMinKinEnergy() const 139 { 140 return minKinEnergy; 141 } 142 143 inline void G4VCrossSectionDataSet::SetMaxKinEnergy(G4double value) 144 { 145 maxKinEnergy = value; 146 } 147 148 inline G4double G4VCrossSectionDataSet::GetMaxKinEnergy() const 149 { 150 return maxKinEnergy; 151 } 152 153 inline const G4String& G4VCrossSectionDataSet::GetName() const 154 { 155 return name; 156 } 157 107 158 #endif -
trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonElasticXS.cc,v 1. 7 2009/11/19 19:40:45 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGNucleonElasticXS.cc,v 1.8 2010/10/12 06:02:41 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 51 51 #include "G4NistManager.hh" 52 52 53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......54 53 55 54 G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(const G4ParticleDefinition*) … … 75 74 } 76 75 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 79 G4double G4BGGNucleonElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 80 G4double Z, 81 G4double A, 82 G4double) 76 77 G4double 78 G4BGGNucleonElasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 79 G4int Z, G4int A, G4double) 83 80 { 84 81 G4double cross = 0.0; 85 82 G4double ekin = dp->GetKineticEnergy(); 86 G4int iz = G4int(Z); 87 if(iz > 92) iz = 92; 83 if(Z > 92) Z = 92; 88 84 89 85 if(ekin <= fLowEnergy) { 90 cross = theCoulombFac[ iz];86 cross = theCoulombFac[Z]; 91 87 if(isProton) { cross *= CoulombFactor(ekin, A); } 92 88 93 } else if( iz== 1) {94 if( A < 1.5) {89 } else if(Z == 1) { 90 if( A < 2) { 95 91 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); 96 92 cross = fHadron->GetElasticHadronNucleonXsc(); … … 102 98 } 103 99 } else if(ekin > fGlauberEnergy) { 104 cross = theGlauberFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);100 cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 105 101 } else { 106 102 cross = fNucleon->GetElasticCrossSection(dp, Z, A); … … 159 155 G4NistManager* nist = G4NistManager::Instance(); 160 156 161 G4double A, csup, csdn; 157 G4double csup, csdn; 158 G4int A; 162 159 163 160 if(verboseLevel > 0) G4cout << "### G4BGGNucleonElasticXS::Initialise for " … … 167 164 168 165 G4double Z = G4double(iz); 169 A = nist->GetAtomicMassAmu(iz);170 171 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);172 csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);166 A = G4lrint(nist->GetAtomicMassAmu(iz)); 167 168 csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A); 169 csdn = fNucleon->GetElasticCrossSection(&dp, iz, A); 173 170 174 171 theGlauberFac[iz] = csdn/csup; … … 179 176 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 180 177 theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc(); 181 if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1 .0); }178 if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1); } 182 179 183 180 for(G4int iz=2; iz<93; iz++) { 184 181 185 182 G4double Z = G4double(iz); 186 A = nist->GetAtomicMassAmu(iz);187 188 theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, Z, A);183 A = G4lrint(nist->GetAtomicMassAmu(iz)); 184 185 theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, iz, A); 189 186 if(isProton) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy, A); } 190 187 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A … … 195 192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 196 193 197 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4 doubleA)198 { 199 G4double res = 0.0;194 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4int A) 195 { 196 G4double res = 0.0; 200 197 if(kinEnergy <= DBL_MIN) return res; 201 else if(A < 1.5) return kinEnergy*kinEnergy;198 else if(A < 2) return kinEnergy*kinEnergy; 202 199 203 200 G4double elog = std::log10(kinEnergy/GeV); 201 G4double aa = A; 204 202 205 203 // from G4ProtonInelasticCrossSection 206 G4double f1 = 8.0 - 8.0/ A - 0.008*A;207 G4double f2 = 2.34 - 5.4/ A - 0.0028*A;204 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; 205 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 208 206 209 207 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 210 208 211 f1 = 5.6 - 0.016* A;212 f2 = 1.37 + 1.37/ A;213 res *= ( 1.0 + (0.8 + 18./ A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));209 f1 = 5.6 - 0.016*aa; 210 f2 = 1.37 + 1.37/aa; 211 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 214 212 return res; 215 213 } 216 214 217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 218 219 215 -
trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonInelasticXS.cc,v 1. 7 2009/11/19 19:40:45 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGNucleonInelasticXS.cc,v 1.9 2010/10/12 06:16:19 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 75 75 } 76 76 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 79 G4double G4BGGNucleonInelasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 80 G4double Z, 81 G4double A, 82 G4double) 77 78 G4double 79 G4BGGNucleonInelasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 80 G4int Z, G4int A, G4double) 83 81 { 84 82 G4double cross = 0.0; 85 83 G4double ekin = dp->GetKineticEnergy(); 86 G4int iz = G4int(Z);87 if( iz > 92) iz= 92;84 // G4int iz = G4int(Z); 85 if(Z > 92) Z = 92; 88 86 89 87 if(ekin <= fLowEnergy) { 90 cross = theCoulombFac[ iz]*CoulombFactor(ekin, A);91 } else if( iz== 1) {92 if( A < 1.5) {88 cross = theCoulombFac[Z]*CoulombFactor(ekin, A); 89 } else if(Z == 1) { 90 if( A < 2) { 93 91 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); 94 92 cross = fHadron->GetInelasticHadronNucleonXsc(); … … 100 98 } 101 99 } else if(ekin > fGlauberEnergy) { 102 cross = theGlauberFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);100 cross = theGlauberFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 103 101 } else { 104 cross = fNucleon->Get IsoZACrossSection(dp, Z, A);102 cross = fNucleon->GetZandACrossSection(dp, Z, A); 105 103 } 106 104 … … 156 154 157 155 G4NistManager* nist = G4NistManager::Instance(); 158 G4 double A = nist->GetAtomicMassAmu(2);156 G4int A = G4lrint(nist->GetAtomicMassAmu(2)); 159 157 160 158 G4double csup, csdn; … … 166 164 167 165 G4double Z = G4double(iz); 168 A = nist->GetAtomicMassAmu(iz); 169 170 csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A); 171 csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A); 166 A = G4lrint(nist->GetAtomicMassAmu(iz)); 167 168 csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A); 169 // csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A); 170 csdn = fNucleon->GetZandACrossSection(&dp, iz, A); 172 171 173 172 theGlauberFac[iz] = csdn/csup; … … 178 177 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 179 178 theCoulombFac[1] = 180 fHadron->GetInelasticHadronNucleonXsc()/CoulombFactor(fLowEnergy,1 .0);179 fHadron->GetInelasticHadronNucleonXsc()/CoulombFactor(fLowEnergy,1); 181 180 182 181 for(G4int iz=2; iz<93; iz++) { 183 182 184 183 G4double Z = G4double(iz); 185 A = nist->GetAtomicMassAmu(iz);184 A = G4lrint(nist->GetAtomicMassAmu(iz)); 186 185 187 186 theCoulombFac[iz] = 188 fNucleon->Get IsoZACrossSection(&dp, Z, A)/CoulombFactor(fLowEnergy,A);187 fNucleon->GetZandACrossSection(&dp, iz, A)/CoulombFactor(fLowEnergy,A); 189 188 190 189 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A … … 193 192 } 194 193 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 196 197 G4double G4BGGNucleonInelasticXS::CoulombFactor(G4double kinEnergy, G4double A) 194 195 G4double G4BGGNucleonInelasticXS::CoulombFactor(G4double kinEnergy, G4int A) 198 196 { 199 197 G4double res= 0.0; 200 198 if(kinEnergy <= DBL_MIN) return res; 201 else if (A < 1.5) return kinEnergy*kinEnergy;199 else if (A < 2) return kinEnergy*kinEnergy; 202 200 203 201 G4double elog = std::log10(kinEnergy/GeV); 202 G4double aa = A; 204 203 205 204 // from G4ProtonInelasticCrossSection 206 205 if(isProton) { 207 G4double f1 = 8.0 - 8.0/ A - 0.008*A;208 G4double f2 = 2.34 - 5.4/ A - 0.0028*A;206 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; 207 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 209 208 210 209 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 211 210 212 f1 = 5.6 - 0.016* A;213 f2 = 1.37 + 1.37/ A;214 res *= ( 1.0 + (0.8 + 18./ A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));211 f1 = 5.6 - 0.016*aa; 212 f2 = 1.37 + 1.37/aa; 213 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 215 214 } else { 216 215 217 G4double p3 = 0.6 + 13./ A - 0.0005*A;218 G4double p4 = 7.2449 - 0.018242* A;219 G4double p5 = 1.36 + 1.8/ A + 0.0005*A;220 G4double p6 = 1. + 200./ A + 0.02*A;221 G4double p7 = 3.0 - ( A-70.)*(A-200.)/11000.;216 G4double p3 = 0.6 + 13./aa - 0.0005*aa; 217 G4double p4 = 7.2449 - 0.018242*aa; 218 G4double p5 = 1.36 + 1.8/aa + 0.0005*aa; 219 G4double p6 = 1. + 200./aa + 0.02*aa; 220 G4double p7 = 3.0 - (aa-70.)*(aa-200.)/11000.; 222 221 223 222 res = (1.+p3/(1. + std::exp(p4*(elog+p5))))/(1.+std::exp(-p6*(elog+p7))); … … 227 226 } 228 227 229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......230 -
trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionElasticXS.cc,v 1. 7 2009/11/19 19:40:45 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGPionElasticXS.cc,v 1.8 2010/10/12 06:03:37 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 77 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 78 79 G4double G4BGGPionElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 80 G4double Z, 81 G4double A, 82 G4double) 79 G4double 80 G4BGGPionElasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 81 G4int Z, G4int A, G4double) 83 82 { 84 83 G4double cross = 0.0; 85 84 G4double ekin = dp->GetKineticEnergy(); 86 G4int iz = G4int(Z);87 if( iz > 92) iz= 92;85 // G4int iz = G4int(Z); 86 if(Z > 92) Z = 92; 88 87 89 88 if(ekin <= fLowEnergy) { 90 cross = theCoulombFac[ iz];89 cross = theCoulombFac[Z]; 91 90 if(isPiplus) { cross *= CoulombFactor(ekin, A); } 92 91 93 } else if( iz== 1) {94 if( A < 1.5) {92 } else if(Z == 1) { 93 if( A < 2) { 95 94 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); 96 95 cross = fHadron->GetElasticHadronNucleonXsc(); … … 102 101 } 103 102 } else if(ekin > fGlauberEnergy) { 104 cross = theGlauberFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);103 cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 105 104 } else { 106 105 cross = fPion->GetElasticCrossSection(dp, Z, A); … … 159 158 G4NistManager* nist = G4NistManager::Instance(); 160 159 161 G4double A, csup, csdn; 160 G4double csup, csdn; 161 G4int A; 162 162 163 163 if(verboseLevel > 0) G4cout << "### G4BGGPionElasticXS::Initialise for " … … 167 167 168 168 G4double Z = G4double(iz); 169 A = nist->GetAtomicMassAmu(iz);170 171 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);172 csdn = fPion->GetElasticCrossSection(&dp, Z, A);169 A = G4lrint(nist->GetAtomicMassAmu(iz)); 170 171 csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A); 172 csdn = fPion->GetElasticCrossSection(&dp, iz, A); 173 173 174 174 theGlauberFac[iz] = csdn/csup; … … 179 179 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 180 180 theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc(); 181 if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1 .0); }181 if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1); } 182 182 183 183 for(G4int iz=2; iz<93; iz++) { 184 184 185 185 G4double Z = G4double(iz); 186 A = nist->GetAtomicMassAmu(iz);187 188 theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, Z, A);186 A = G4lrint(nist->GetAtomicMassAmu(iz)); 187 188 theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, iz, A); 189 189 if(isPiplus) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy,A); } 190 190 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A … … 193 193 } 194 194 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 196 197 G4double G4BGGPionElasticXS::CoulombFactor(G4double kinEnergy, G4double A) 195 196 G4double G4BGGPionElasticXS::CoulombFactor(G4double kinEnergy, G4int A) 198 197 { 199 198 G4double res= 0.0; 200 199 if(kinEnergy <= DBL_MIN) return res; 201 else if(A < 1.5) return kinEnergy*kinEnergy;200 else if(A < 2) return kinEnergy*kinEnergy; 202 201 203 202 G4double elog = std::log10(kinEnergy/GeV); 203 G4double aa = A; 204 204 205 205 // from G4ProtonInelasticCrossSection 206 G4double f1 = 8.0 - 8.0/ A - 0.008*A;207 G4double f2 = 2.34 - 5.4/ A - 0.0028*A;206 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; 207 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 208 208 209 209 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 210 210 211 f1 = 5.6 - 0.016* A;212 f2 = 1.37 + 1.37/ A;213 res *= ( 1.0 + (0.8 + 18./ A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));211 f1 = 5.6 - 0.016*aa; 212 f2 = 1.37 + 1.37/aa; 213 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 214 214 return res; 215 215 } 216 216 217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......218 219 -
trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionInelasticXS.cc,v 1. 8 2009/11/19 19:40:45 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGPionInelasticXS.cc,v 1.9 2010/10/12 06:03:49 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 77 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 78 79 G4double G4BGGPionInelasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 80 G4double Z, 81 G4double A, 82 G4double) 79 G4double 80 G4BGGPionInelasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 81 G4int Z, G4int A, G4double) 83 82 { 84 83 G4double cross = 0.0; 85 84 G4double ekin = dp->GetKineticEnergy(); 86 G4int iz = G4int(Z);87 if( iz > 92) iz= 92;85 // G4int iz = G4int(Z); 86 if(Z > 92) Z = 92; 88 87 89 88 if(ekin <= fLowEnergy) { 90 cross = theCoulombFac[ iz];89 cross = theCoulombFac[Z]; 91 90 if(isPiplus) { cross *= CoulombFactor(ekin, A); } 92 91 93 } else if( iz== 1) {94 95 if( A < 1.5) {92 } else if(Z == 1) { 93 94 if( A < 2) { 96 95 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); 97 96 cross = fHadron->GetInelasticHadronNucleonXsc(); … … 104 103 105 104 } else if(ekin > fGlauberEnergy) { 106 cross = theGlauberFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);105 cross = theGlauberFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 107 106 108 107 } else { … … 162 161 G4NistManager* nist = G4NistManager::Instance(); 163 162 164 G4double A, csup, csdn; 163 G4double csup, csdn; 164 G4int A; 165 165 166 166 if(verboseLevel > 0) G4cout << "### G4BGGPionInelasticXS::Initialise for " … … 172 172 173 173 G4double Z = G4double(iz); 174 A = nist->GetAtomicMassAmu(iz);175 176 csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);177 csdn = fPion->GetInelasticCrossSection(&dp, Z, A);174 A = G4lrint(nist->GetAtomicMassAmu(iz)); 175 176 csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A); 177 csdn = fPion->GetInelasticCrossSection(&dp, iz, A); 178 178 179 179 theGlauberFac[iz] = csdn/csup; … … 184 184 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 185 185 theCoulombFac[1] = fHadron->GetInelasticHadronNucleonXsc(); 186 if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1 .0); }186 if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1); } 187 187 188 188 for(G4int iz=2; iz<93; iz++) { 189 189 190 190 G4double Z = G4double(iz); 191 A = nist->GetAtomicMassAmu(iz);192 193 theCoulombFac[iz] = fPion->GetIsoZACrossSection(&dp, Z, A);191 A = G4lrint(nist->GetAtomicMassAmu(iz)); 192 193 theCoulombFac[iz] = fPion->GetIsoZACrossSection(&dp, iz, A); 194 194 if(isPiplus) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy,A); } 195 195 … … 199 199 } 200 200 201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 202 203 G4double G4BGGPionInelasticXS::CoulombFactor(G4double kinEnergy, G4double A) 201 202 G4double G4BGGPionInelasticXS::CoulombFactor(G4double kinEnergy, G4int A) 204 203 { 205 204 G4double res= 0.0; 206 205 if(kinEnergy <= DBL_MIN) return res; 207 else if(A < 1.5) return kinEnergy*kinEnergy;206 else if(A < 2) return kinEnergy*kinEnergy; 208 207 209 208 G4double elog = std::log10(kinEnergy/GeV); 209 G4double aa = A; 210 210 211 211 // from G4ProtonInelasticCrossSection 212 G4double f1 = 8.0 - 8.0/ A - 0.008*A;213 G4double f2 = 2.34 - 5.4/ A - 0.0028*A;212 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; 213 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 214 214 215 215 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 216 216 217 f1 = 5.6 - 0.016* A;218 f2 = 1.37 + 1.37/ A;219 res *= ( 1.0 + (0.8 + 18./ A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));217 f1 = 5.6 - 0.016*aa; 218 f2 = 1.37 + 1.37/aa; 219 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 220 220 return res; 221 221 } 222 222 223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 224 225 223 -
trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc
r819 r1340 34 34 // ******************************************************************** 35 35 // 36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 37 // 38 38 // MODULE: G4EMDissociationCrossSection.cc … … 45 45 // Contract: 17191/03/NL/LvH 46 46 // 47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 48 // 49 49 // CHANGE HISTORY … … 56 56 // Beta release 57 57 // 58 // 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for gant4 7.1. 59 // 60 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 61 //////////////////////////////////////////////////////////////////////////////// 58 // 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for 59 // geant4 7.1. 60 // 61 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 62 ////////////////////////////////////////////////////////////////////////////// 62 63 // 63 64 #include "G4EMDissociationCrossSection.hh" … … 65 66 #include "G4ParticleTable.hh" 66 67 #include "G4IonTable.hh" 68 #include "G4HadTmpUtil.hh" 67 69 #include "globals.hh" 68 //////////////////////////////////////////////////////////////////////////////// 69 // 70 71 70 72 G4EMDissociationCrossSection::G4EMDissociationCrossSection () 71 73 { 72 //73 74 // 74 75 // This function makes use of the class which can sample the virtual photon … … 86 87 xd = 0.25; 87 88 } 88 ////////////////////////////////////////////////////////////////////////////// //89 ////////////////////////////////////////////////////////////////////////////// 89 90 // 90 91 G4EMDissociationCrossSection::~G4EMDissociationCrossSection() … … 92 93 delete thePhotonSpectrum; 93 94 } 94 /////////////////////////////////////////////////////////////////////////////// 95 // 96 G4bool G4EMDissociationCrossSection::IsZAApplicable 97 (const G4DynamicParticle* theDynamicParticle, G4double /*ZZ*/, G4double AA) 95 ///////////////////////////////////////////////////////////////////////////// 96 // 97 G4bool 98 G4EMDissociationCrossSection::IsIsoApplicable(const G4DynamicParticle* theDynamicParticle, 99 G4int /*ZZ*/, G4int AA) 98 100 { 99 101 // … … 105 107 // 106 108 if (G4ParticleTable::GetParticleTable()->GetIonTable()-> 107 IsIon(theDynamicParticle->GetDefinition()) && AA > 1 .0)109 IsIon(theDynamicParticle->GetDefinition()) && AA > 1) 108 110 return true; 109 111 else … … 114 116 (const G4DynamicParticle* theDynamicParticle, const G4Element* theElement) 115 117 { 116 return Is ZAApplicable(theDynamicParticle, 0., theElement->GetN());118 return IsIsoApplicable(theDynamicParticle, 0, G4lrint(theElement->GetN())); 117 119 } 118 120 … … 130 132 G4IsotopeVector* isoVector = theElement->GetIsotopeVector(); 131 133 G4double* abundVector = theElement->GetRelativeAbundanceVector(); 132 G4 doubleZZ;133 G4 doubleAA;134 G4int ZZ; 135 G4int AA; 134 136 135 137 for (G4int i = 0; i < nIso; i++) { 136 ZZ = G4double( (*isoVector)[i]->GetZ());137 AA = G4double( (*isoVector)[i]->GetN());138 sig = Get IsoZACrossSection(theDynamicParticle, ZZ, AA, temperature);138 ZZ = (*isoVector)[i]->GetZ(); 139 AA = (*isoVector)[i]->GetN(); 140 sig = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature); 139 141 crossSection += sig*abundVector[i]; 140 142 } 141 143 142 144 } else { 143 crossSection =144 GetIsoZACrossSection(theDynamicParticle, theElement->GetZ(),145 theElement->GetN(), temperature);145 G4int ZZ = G4lrint(theElement->GetZ()); 146 G4int AA = G4lrint(theElement->GetN()); 147 crossSection = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature); 146 148 } 147 149 … … 150 152 151 153 152 G4double G4EMDissociationCrossSection::GetIsoZACrossSection 153 (const G4DynamicParticle *theDynamicParticle, G4double ZZ, G4double AA, 154 G4double /*temperature*/) 155 { 156 // 154 G4double 155 G4EMDissociationCrossSection::GetZandACrossSection(const G4DynamicParticle *theDynamicParticle, 156 G4int ZZ, G4int AA, G4double /*temperature*/) 157 { 157 158 // 158 159 // Get relevant information about the projectile and target (A, Z) and … … 240 241 return theCrossSectionVector; 241 242 } 243 242 244 //////////////////////////////////////////////////////////////////////////////// 243 245 // … … 247 249 { 248 250 // 249 //250 251 // This is a cheaky little member function to calculate the probability of 251 252 // EMD for the target in the field of the projectile ... just by reversing the … … 254 255 return GetCrossSectionForProjectile (AT, ZT, AP, ZP, b, bmin); 255 256 } 256 //////////////////////////////////////////////////////////////////////////////// 257 // 257 258 258 259 G4double 259 G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation 260 (G4double A, G4double Z) 261 { 262 // 260 G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation(G4double A, 261 G4double Z) 262 { 263 263 // 264 264 // This is a simple algorithm to choose whether a proton or neutron is ejected … … 282 282 return p; 283 283 } 284 ////////////////////////////////////////////////////////////////////////////////285 // -
trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ElectroNuclearCrossSection.cc,v 1. 29 2008/10/24 19:15:17dennis Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ElectroNuclearCrossSection.cc,v 1.30 2010/10/14 05:25:22 dennis Exp $ 28 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 29 29 // 30 30 // … … 33 33 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 34 34 // 35 //============================================================================ ===================35 //============================================================================ 36 36 37 37 ///#define debug … … 43 43 44 44 #include "G4ElectroNuclearCrossSection.hh" 45 #include "G4HadTmpUtil.hh" 45 46 46 47 // Initialization of statics 47 G4double G4ElectroNuclearCrossSection::lastE=0.; // Last used in the cross section TheEnergy 48 G4int G4ElectroNuclearCrossSection::lastF=0; // Last used in the cross section TheFirstBin 49 G4double G4ElectroNuclearCrossSection::lastG=0.; // Last used in the cross section TheGamma 48 // Last used in the cross section TheEnergy 49 G4double G4ElectroNuclearCrossSection::lastE=0.; 50 51 // Last used in the cross section TheFirstBin 52 G4int G4ElectroNuclearCrossSection::lastF=0; 53 54 // Last used in the cross section TheGamma 55 G4double G4ElectroNuclearCrossSection::lastG=0.; 56 50 57 G4double G4ElectroNuclearCrossSection::lastH=0.; // Last value of the High Energy A-dependence 51 58 G4double* G4ElectroNuclearCrossSection::lastJ1=0; // Pointer to the last array of the J1 function … … 58 65 G4double G4ElectroNuclearCrossSection::lastSig=0.;// Last value of the Cross Section 59 66 60 std::vector<G4double*> G4ElectroNuclearCrossSection::J1; // Vector of pointers to the J1 tabulated functions 61 std::vector<G4double*> G4ElectroNuclearCrossSection::J2; // Vector of pointers to the J2 tabulated functions 62 std::vector<G4double*> G4ElectroNuclearCrossSection::J3; // Vector of pointers to the J3 tabulated functions 67 // Vector of pointers to the J1 tabulated functions 68 std::vector<G4double*> G4ElectroNuclearCrossSection::J1; 69 70 // Vector of pointers to the J2 tabulated functions 71 std::vector<G4double*> G4ElectroNuclearCrossSection::J2; 72 73 // Vector of pointers to the J3 tabulated functions 74 std::vector<G4double*> G4ElectroNuclearCrossSection::J3; 75 63 76 64 77 G4ElectroNuclearCrossSection::G4ElectroNuclearCrossSection() 65 { 66 } 78 {} 79 67 80 68 81 G4ElectroNuclearCrossSection::~G4ElectroNuclearCrossSection() … … 95 108 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 96 109 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 97 G4 doubleZZ;98 G4 doubleAA;110 G4int ZZ; 111 G4int AA; 99 112 100 113 for (G4int i = 0; i < nIso; i++) { 101 ZZ = G4double( (*isoVector)[i]->GetZ());102 AA = G4double( (*isoVector)[i]->GetN());103 sig = Get IsoZACrossSection(aPart, ZZ, AA, temperature);114 ZZ = (*isoVector)[i]->GetZ(); 115 AA = (*isoVector)[i]->GetN(); 116 sig = GetZandACrossSection(aPart, ZZ, AA, temperature); 104 117 xsection += sig*abundVector[i]; 105 118 } … … 107 120 } else { 108 121 xsection = 109 GetIsoZACrossSection(aPart, anEle->GetZ(), anEle->GetN(), 122 GetZandACrossSection(aPart, 123 G4lrint(anEle->GetZ()), 124 G4lrint(anEle->GetN()), 110 125 temperature); 111 126 } … … 116 131 117 132 G4double 118 G4ElectroNuclearCrossSection::Get IsoZACrossSection(const G4DynamicParticle* aPart,119 G4double ZZ, G4doubleAA,120 G4double /*temperature*/)133 G4ElectroNuclearCrossSection::GetZandACrossSection(const G4DynamicParticle* aPart, 134 G4int ZZ, G4int AA, 135 G4double /*temperature*/) 121 136 { 122 137 static const G4int nE=336; // !! If you change this, change it in GetFunctions() (*.hh) !! 123 138 static const G4int mL=nE-1; 124 static const G4double EMi=2.0612; 125 static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron126 static const G4double lEMi=std::log(EMi); 127 static const G4double lEMa=std::log(EMa); 139 static const G4double EMi=2.0612; // Minimum tabulated Energy of the Electron 140 static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron 141 static const G4double lEMi=std::log(EMi); // Minimum tabulated logarithmic Energy of the Electron 142 static const G4double lEMa=std::log(EMa); // Maximum tabulated logarithmic Energy of the Electron 128 143 static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic step in the table for the electron Energy 129 144 static const G4double alop=1./137.036/3.14159265; //coef. for the calculated functions (Ee>50000.) … … 137 152 static std::vector <G4double> colH; // Vector of HighEnergyCoefficients (functional calculations) 138 153 // *** End of Static Definitions (Associative Memory) *** 154 139 155 const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the electron 140 const G4int targetAtomicNumber = static_cast<int>(AA+.499); //@@ Nat mixture (?!)141 const G4int targZ = static_cast<int>(ZZ+.001);156 const G4int targetAtomicNumber = AA; 157 const G4int targZ = ZZ; 142 158 const G4int targN = targetAtomicNumber-targZ; // @@ Get isotops (can change initial A) 143 159 if (Energy<=EMi) return 0.; // Energy is below the minimum energy in the table 160 144 161 G4int PDG=aPart->GetDefinition()->GetPDGEncoding(); 145 if (PDG == 11 || PDG == -11) // @@ Now only for electrons, but can be fo muons162 if (PDG == 11 || PDG == -11) // @@ Now only for electrons, but can be fo muons 146 163 { 147 G4double A =targN+targZ;// New A (can differ from G4double targetAtomicNumber)148 if(targN!=lastN || targZ!=lastZ) 164 G4double A = targN + targZ; // New A (can differ from G4double targetAtomicNumber) 165 if(targN!=lastN || targZ!=lastZ) // This nucleus was not the last used isotop 149 166 { 150 167 lastE = 0.; // New history in the electron Energy … … 185 202 } // End of creation of the new set of parameters 186 203 } // End of parameters udate 204 187 205 else if(std::abs((lastE-Energy)/Energy)<.001) return lastSig*millibarn; // Don't calc. same CS twice 188 206 // ============================== NOW Calculate the Cross Section ========================== … … 268 286 } 269 287 270 // Correction function for Be,C @@ Move to header // @@@ !!! NOT used !!!271 //G4double G4ElectroNuclearCrossSection::LinearFit(G4double X, G4int N, const G4double* XN,272 // const G4double* YN)273 //{274 // G4double Xj=XN[0];275 // G4double Xh=XN[N-1];276 // if(X<=Xj) return YN[0]; //-------+ !!! If you correct this, correct upper copy too!!277 // else if(X>=Xh) return YN[N-1];//-|278 // G4double Xp=0.; // |279 // G4int j=0; // |280 // while (X>Xj && j<N)//<-----------+281 // {282 // j++;283 // Xp=Xj;284 // Xj=XN[j];285 // }286 // return YN[j]-(Xj-X)*(YN[j]-YN[j-1])/(Xj-Xp);287 //}288 288 289 289 // Calculate the functions for the std::log(A) -
trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc
r1228 r1340 33 33 #include "G4IonTable.hh" 34 34 #include "G4ParticleDefinition.hh" 35 36 37 38 /////////////////////////////////////////////////////////////////////////////// /35 #include "G4HadTmpUtil.hh" 36 37 38 /////////////////////////////////////////////////////////////////////////////// 39 39 // 40 40 // … … 49 49 } 50 50 51 /////////////////////////////////////////////////////////////////////////////// ////////51 /////////////////////////////////////////////////////////////////////////////// 52 52 // 53 53 // 54 54 55 55 G4GGNuclNuclCrossSection::~G4GGNuclNuclCrossSection() 56 { 57 } 58 59 60 //////////////////////////////////////////////////////////////////////////////////////// 56 {} 57 58 /////////////////////////////////////////////////////////////////////////////// 61 59 // 62 60 // … … 65 63 G4bool 66 64 G4GGNuclNuclCrossSection::IsApplicable(const G4DynamicParticle* aDP, 67 const G4Element* anElement) 68 { 69 return IsZAApplicable(aDP, anElement->GetZ(), anElement->GetN()); 65 const G4Element* anElement) 66 { 67 G4int Z = G4lrint(anElement->GetZ()); 68 G4int N = G4lrint(anElement->GetN()); 69 return IsIsoApplicable(aDP, Z, N); 70 70 } 71 71 72 /////////////////////////////////////////////////////////////////////////////// /////////72 /////////////////////////////////////////////////////////////////////////////// 73 73 // 74 74 // 75 75 76 76 G4bool 77 G4GGNuclNuclCrossSection::IsZAApplicable(const G4DynamicParticle* aDP, 78 G4double Z, G4double) 79 { 80 G4bool applicable = false; 81 // G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber(); 77 G4GGNuclNuclCrossSection::IsIsoApplicable(const G4DynamicParticle* aDP, 78 G4int Z, G4int) 79 { 80 G4bool applicable = false; 82 81 G4double kineticEnergy = aDP->GetKineticEnergy(); 83 82 84 // const G4ParticleDefinition* theParticle = aDP->GetDefinition(); 85 86 if ( kineticEnergy >= fLowerLimit && Z > 1.5 ) applicable = true; 87 83 if (kineticEnergy >= fLowerLimit && Z > 1) applicable = true; 88 84 return applicable; 89 85 } 90 86 91 /////////////////////////////////////////////////////////////////////////////// /////////92 // 93 // Calculates total and inelastic Xsc, derives elastic as total - inelastic accordong to94 // Glauber model with Gribov correction calculated in the dipole approximation on95 // light cone. Gaussian density helps to calculate rest integrals of the model.96 // [1] B.Z. Kopeliovich, nucl-th/030604487 /////////////////////////////////////////////////////////////////////////////// 88 // 89 // Calculates total and inelastic Xsc, derives elastic as total - inelastic 90 // accordong to Glauber model with Gribov correction calculated in the dipole 91 // approximation on light cone. Gaussian density helps to calculate rest 92 // integrals of the model. [1] B.Z. Kopeliovich, nucl-th/0306044 97 93 98 94 99 95 G4double G4GGNuclNuclCrossSection:: 100 GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement, G4double T) 101 { 102 return GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(), T); 103 } 104 105 //////////////////////////////////////////////////////////////////////////////////////// 106 // 107 // Calculates total and inelastic Xsc, derives elastic as total - inelastic accordong to 108 // Glauber model with Gribov correction calculated in the dipole approximation on 109 // light cone. Gaussian density of point-like nucleons helps to calculate rest integrals of the model. 110 // [1] B.Z. Kopeliovich, nucl-th/0306044 + simplification above 111 96 GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement, 97 G4double T) 98 { 99 G4int Z = G4lrint(anElement->GetZ()); 100 G4int N = G4lrint(anElement->GetN()); 101 return GetZandACrossSection(aParticle, Z, N, T); 102 } 103 104 /////////////////////////////////////////////////////////////////////////////// 105 // 106 // Calculates total and inelastic Xsc, derives elastic as total - inelastic 107 // accordong to Glauber model with Gribov correction calculated in the dipole 108 // approximation on light cone. Gaussian density of point-like nucleons helps 109 // to calculate rest integrals of the model. [1] B.Z. Kopeliovich, 110 // nucl-th/0306044 + simplification above 112 111 113 112 114 113 G4double G4GGNuclNuclCrossSection:: 115 GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double) 116 { 117 G4double xsection, sigma, cofInelastic = 2.4, cofTotal = 2.0, nucleusSquare, cB, ratio; 114 GetZandACrossSection(const G4DynamicParticle* aParticle, 115 G4int tZ, G4int tA, G4double) 116 { 117 G4double xsection; 118 G4double sigma; 119 G4double cofInelastic = 2.4; 120 G4double cofTotal = 2.0; 121 G4double nucleusSquare; 122 G4double cB; 123 G4double ratio; 118 124 119 125 G4double pZ = aParticle->GetDefinition()->GetPDGCharge(); … … 132 138 G4double pR = GetNucleusRadius(pA); 133 139 134 cB = GetCoulombBarier(aParticle, tZ, tA, pR, tR); 135 136 if(cB > 0.) 137 { 140 cB = GetCoulombBarier(aParticle, G4double(tZ), G4double(tA), pR, tR); 141 if (cB > 0.) { 138 142 139 143 sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) + … … 143 147 144 148 ratio = sigma/nucleusSquare; 145 146 149 xsection = nucleusSquare*std::log( 1. + ratio ); 147 148 150 fTotalXsc = xsection; 149 150 151 fTotalXsc *= cB; 151 152 … … 153 154 154 155 fInelasticXsc *= cB; 155 156 156 fElasticXsc = fTotalXsc - fInelasticXsc; 157 157 … … 171 171 172 172 ratio = sigma/nucleusSquare; 173 174 173 fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic; 175 174 … … 186 185 } 187 186 188 /////////////////////////////////////////////////////////////////////////////// /////////187 /////////////////////////////////////////////////////////////////////////////// 189 188 // 190 189 // 191 190 192 191 G4double G4GGNuclNuclCrossSection:: 193 GetCoulombBarier(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double pR, G4double tR) 192 GetCoulombBarier(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, 193 G4double pR, G4double tR) 194 194 { 195 195 G4double ratio; 196 196 G4double pZ = aParticle->GetDefinition()->GetPDGCharge(); 197 198 197 199 198 G4double pTkin = aParticle->GetKineticEnergy(); … … 254 253 255 254 nucleusSquare = cofTotal*pi*( pR*pR + tR*tR ); // basically 2piRR 256 257 255 ratio = sigma/nucleusSquare; 258 259 260 fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic; 261 256 fInelasticXsc = nucleusSquare*std::log(1. + cofInelastic*ratio)/cofInelastic; 262 257 G4double difratio = ratio/(1.+ratio); 263 258 … … 272 267 ////////////////////////////////////////////////////////////////////////// 273 268 // 274 // Return suasi-elastic/inelastic cross-section ratio269 // Return quasi-elastic/inelastic cross-section ratio 275 270 276 271 G4double G4GGNuclNuclCrossSection:: … … 298 293 299 294 nucleusSquare = cofTotal*pi*( pR*pR + tR*tR ); // basically 2piRR 300 301 295 ratio = sigma/nucleusSquare; 302 303 fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic; 296 fInelasticXsc = nucleusSquare*std::log(1. + cofInelastic*ratio)/cofInelastic; 304 297 305 298 // sigma = GetHNinelasticXsc(aParticle, tA, tZ); 306 299 ratio = sigma/nucleusSquare; 307 308 fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic; 300 fProductionXsc = nucleusSquare*std::log(1. + cofInelastic*ratio)/cofInelastic; 309 301 310 302 if (fInelasticXsc > fProductionXsc) ratio = (fInelasticXsc-fProductionXsc)/fInelasticXsc; … … 315 307 } 316 308 317 /////////////////////////////////////////////////////////////////////////////// //////309 /////////////////////////////////////////////////////////////////////////////// 318 310 // 319 311 // Returns hadron-nucleon Xsc according to differnt parametrisations: … … 324 316 G4double 325 317 G4GGNuclNuclCrossSection::GetHadronNucleonXsc(const G4DynamicParticle* aParticle, 326 const G4Element* anElement ) 327 { 328 G4double At = anElement->GetN(); // number of nucleons 329 G4double Zt = anElement->GetZ(); // number of protons 330 331 332 return GetHadronNucleonXsc( aParticle, At, Zt ); 333 } 334 335 336 337 338 ///////////////////////////////////////////////////////////////////////////////////// 318 const G4Element* anElement) 319 { 320 G4int At = G4lrint(anElement->GetN()); // number of nucleons 321 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 322 return GetHadronNucleonXsc(aParticle, At, Zt); 323 } 324 325 326 327 328 /////////////////////////////////////////////////////////////////////////////// 339 329 // 340 330 // Returns hadron-nucleon Xsc according to differnt parametrisations: … … 345 335 G4double 346 336 G4GGNuclNuclCrossSection::GetHadronNucleonXsc(const G4DynamicParticle* aParticle, 347 G4 double At, G4double Zt)337 G4int At, G4int Zt) 348 338 { 349 339 G4double xsection = 0.; 350 340 351 352 341 G4double targ_mass = G4ParticleTable::GetParticleTable()-> 353 GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5) ); 354 342 GetIonTable()->GetIonMass(Zt, At); 355 343 targ_mass = 0.939*GeV; // ~mean neutron and proton ??? 356 344 357 G4double proj_mass 345 G4double proj_mass = aParticle->GetMass(); 358 346 G4double proj_momentum = aParticle->GetMomentum().mag(); 359 347 G4double sMand = CalcMandelstamS ( proj_mass , targ_mass , proj_momentum ); … … 361 349 sMand /= GeV*GeV; // in GeV for parametrisation 362 350 proj_momentum /= GeV; 363 364 351 const G4ParticleDefinition* pParticle = aParticle->GetDefinition(); 365 366 352 367 353 if(pParticle == theNeutron) // as proton ??? 368 354 { 369 xsection = At*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525));355 xsection = G4double(At)*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 370 356 } 371 357 else if(pParticle == theProton) 372 358 { 373 xsection = At*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 374 // xsection = At*( 49.51*std::pow(sMand,-0.097) + 0.314*std::log(sMand)*std::log(sMand) ); 375 // xsection = At*( 38.4 + 0.85*std::abs(std::pow(log(sMand),1.47)) ); 359 xsection = G4double(At)*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 376 360 } 377 361 … … 381 365 382 366 383 /////////////////////////////////////////////////////////////////////////////// //////367 /////////////////////////////////////////////////////////////////////////////// 384 368 // 385 369 // Returns hadron-nucleon Xsc according to PDG parametrisation (2005): … … 388 372 G4double 389 373 G4GGNuclNuclCrossSection::GetHadronNucleonXscPDG(const G4DynamicParticle* aParticle, 390 const G4Element* anElement ) 391 { 392 G4double At = anElement->GetN(); // number of nucleons 393 G4double Zt = anElement->GetZ(); // number of protons 394 395 374 const G4Element* anElement) 375 { 376 G4int At = G4lrint(anElement->GetN()); // number of nucleons 377 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 396 378 return GetHadronNucleonXscPDG( aParticle, At, Zt ); 397 379 } 398 380 399 381 400 401 402 ///////////////////////////////////////////////////////////////////////////////////// 382 /////////////////////////////////////////////////////////////////////////////// 403 383 // 404 384 // Returns hadron-nucleon Xsc according to PDG parametrisation (2005): … … 408 388 G4double 409 389 G4GGNuclNuclCrossSection::GetHadronNucleonXscPDG(const G4DynamicParticle* aParticle, 410 G4double At, G4double Zt)390 G4int At, G4int Zt) 411 391 { 412 392 G4double xsection = 0.; … … 415 395 if (Nt < 0.) Nt = 0.; 416 396 417 418 397 G4double targ_mass = G4ParticleTable::GetParticleTable()-> 419 GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5) ); 420 398 GetIonTable()->GetIonMass(Zt, At); 421 399 targ_mass = 0.939*GeV; // ~mean neutron and proton ??? 422 400 423 401 G4double proj_mass = aParticle->GetMass(); 424 402 G4double proj_momentum = aParticle->GetMomentum().mag(); 425 426 403 G4double sMand = CalcMandelstamS ( proj_mass , targ_mass , proj_momentum ); 427 428 404 sMand /= GeV*GeV; // in GeV for parametrisation 429 405 … … 435 411 G4double B = 0.308; 436 412 437 438 413 const G4ParticleDefinition* pParticle = aParticle->GetDefinition(); 439 414 440 441 415 if(pParticle == theNeutron) // proton-neutron fit 442 416 { 443 xsection = Zt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)444 445 xsection += Nt*(35.45 + B*std::pow(std::log(sMand/s0),2.)446 417 xsection = G4double(Zt)*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 418 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 419 xsection += Nt*(35.45 + B*std::pow(std::log(sMand/s0),2.) 420 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); // pp for nn 447 421 } 448 422 else if(pParticle == theProton) 449 423 { 450 451 xsection = Zt*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 452 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); 453 454 xsection += Nt*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 455 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 424 xsection = G4double(Zt)*(35.45 + B*std::pow(std::log(sMand/s0),2.) 425 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); 426 427 xsection += Nt*(35.80 + B*std::pow(std::log(sMand/s0),2.) 428 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 456 429 } 457 430 xsection *= millibarn; // parametrised in mb … … 460 433 461 434 462 463 464 ///////////////////////////////////////////////////////////////////////////////////// 435 /////////////////////////////////////////////////////////////////////////////// 465 436 // 466 437 // Returns nucleon-nucleon cross-section based on N. Starkov parametrisation of … … 469 440 470 441 G4double 471 G4GGNuclNuclCrossSection::GetHadronNucleonXscNS( 442 G4GGNuclNuclCrossSection::GetHadronNucleonXscNS(G4ParticleDefinition* pParticle, 472 443 G4double pTkin, 473 444 G4ParticleDefinition* tParticle) … … 477 448 G4double hnXsc(0); 478 449 479 480 G4double targ_mass = tParticle->GetPDGMass(); 481 G4double proj_mass = pParticle->GetPDGMass(); 450 G4double targ_mass = tParticle->GetPDGMass(); 451 G4double proj_mass = pParticle->GetPDGMass(); 482 452 483 453 G4double proj_energy = proj_mass + pTkin; … … 497 467 // G4double eta2 = 0.458; 498 468 // G4double B = 0.308; 499 500 501 502 503 469 504 470 if( proj_momentum >= 10. ) // high energy: pp = nn = np … … 506 472 { 507 473 Delta = 1.; 508 509 if( proj_energy < 40. ) Delta = 0.916+0.0021*proj_energy; 510 511 if( proj_momentum >= 10.) 512 { 513 B0 = 7.5; 514 A0 = 100. - B0*std::log(3.0e7); 515 516 xsection = A0 + B0*std::log(proj_energy) - 11 517 + 103*std::pow(2*0.93827*proj_energy + proj_mass*proj_mass+ 518 0.93827*0.93827,-0.165); // mb 474 if (proj_energy < 40.) Delta = 0.916+0.0021*proj_energy; 475 476 if (proj_momentum >= 10.) { 477 B0 = 7.5; 478 A0 = 100. - B0*std::log(3.0e7); 479 480 xsection = A0 + B0*std::log(proj_energy) - 11 481 + 103*std::pow(2*0.93827*proj_energy + proj_mass*proj_mass+ 482 0.93827*0.93827,-0.165); // mb 519 483 } 520 484 } … … 562 526 } 563 527 564 /* 565 ///////////////////////////////////////////////////////////////////////////////////// 566 // 567 // Returns hadron-nucleon inelastic cross-section based on proper parametrisation 568 569 G4double 570 G4GGNuclNuclCrossSection::GetHNinelasticXsc(const G4DynamicParticle* aParticle, 571 const G4Element* anElement ) 572 { 573 G4double At = anElement->GetN(); // number of nucleons 574 G4double Zt = anElement->GetZ(); // number of protons 575 576 577 return GetHNinelasticXsc( aParticle, At, Zt ); 578 } 579 580 ///////////////////////////////////////////////////////////////////////////////////// 528 ///////////////////////////////////////////////////////////////////////////////// 581 529 // 582 530 // Returns hadron-nucleon inelastic cross-section based on FTF-parametrisation 583 531 584 532 G4double 585 G4GGNuclNuclCrossSection::GetHNinelasticXsc(const G4DynamicParticle* aParticle,586 G4double At, G4double Zt )587 {588 // G4ParticleDefinition* hadron = aParticle->GetDefinition();589 G4double sumInelastic, Nt = At - Zt;590 591 if(Nt < 0.) Nt = 0.;592 593 sumInelastic = Zt*GetHadronNucleonXscNS(aParticle, theProton);594 sumInelastic += Nt*GetHadronNucleonXscNS(aParticle, theNeutron);595 596 return sumInelastic;597 }598 */599 600 /////////////////////////////////////////////////////////////////////////////////////601 //602 // Returns hadron-nucleon inelastic cross-section based on FTF-parametrisation603 604 G4double605 533 G4GGNuclNuclCrossSection::GetHNinelasticXscVU(const G4DynamicParticle* aParticle, 606 G4double At, G4double Zt)607 { 608 G4int PDGcode 534 G4int At, G4int Zt) 535 { 536 G4int PDGcode = aParticle->GetDefinition()->GetPDGEncoding(); 609 537 G4int absPDGcode = std::abs(PDGcode); 610 611 538 G4double Elab = aParticle->GetTotalEnergy(); 612 539 // (s - 2*0.88*GeV*GeV)/(2*0.939*GeV)/GeV; … … 650 577 NumberOfTargetNeutrons * XelPN ); 651 578 } 579 652 580 Xinelastic = Xtotal - Xelastic; 653 654 581 if(Xinelastic < 0.) Xinelastic = 0.; 655 582 … … 657 584 } 658 585 659 /////////////////////////////////////////////////////////////////////////////// /////660 // 661 // 662 663 G4double 664 G4GGNuclNuclCrossSection::GetNucleusRadius( 665 666 { 667 G4double At 586 /////////////////////////////////////////////////////////////////////////////// 587 // 588 // 589 590 G4double 591 G4GGNuclNuclCrossSection::GetNucleusRadius(const G4DynamicParticle* , 592 const G4Element* anElement) 593 { 594 G4double At = anElement->GetN(); 668 595 G4double oneThird = 1.0/3.0; 669 596 G4double cubicrAt = std::pow (At, oneThird); 670 597 671 672 598 G4double R; // = fRadiusConst*cubicrAt; 673 /*674 G4double tmp = std::pow( cubicrAt-1., 3.);675 tmp += At;676 tmp *= 0.5;677 678 if (At > 20.) // 20.679 {680 R = fRadiusConst*std::pow (tmp, oneThird);681 }682 else683 {684 R = fRadiusConst*cubicrAt;685 }686 */687 688 599 R = fRadiusConst*cubicrAt; 689 600 690 // return R; // !!!!691 692 693 694 601 G4double meanA = 21.; 695 696 602 G4double tauA1 = 40.; 697 603 G4double tauA2 = 10.; … … 715 621 { 716 622 R *= ( 1.0 + b3*( 1. - std::exp( (At - meanA)/tauA3) ) ); 717 } 623 } 624 718 625 return R; 719 720 } 721 722 //////////////////////////////////////////////////////////////////////////////////// 626 } 627 628 /////////////////////////////////////////////////////////////////////////////// 723 629 // 724 630 // … … 728 634 { 729 635 G4double R; 730 731 // R = GetNucleusRadiusGG(At);732 733 636 R = GetNucleusRadiusDE(At); 734 637 … … 741 644 G4GGNuclNuclCrossSection::GetNucleusRadiusGG(G4double At) 742 645 { 743 744 646 G4double oneThird = 1.0/3.0; 745 647 G4double cubicrAt = std::pow (At, oneThird); 746 648 747 748 G4double R; // = fRadiusConst*cubicrAt; 749 750 /* 751 G4double tmp = std::pow( cubicrAt-1., 3.); 752 tmp += At; 753 tmp *= 0.5; 754 755 if (At > 20.) 756 { 757 R = fRadiusConst*std::pow (tmp, oneThird); 649 G4double R; // = fRadiusConst*cubicrAt; 650 R = fRadiusConst*cubicrAt; 651 652 G4double meanA = 20.; 653 G4double tauA = 20.; 654 655 if ( At > 20.) // 20. 656 { 657 R *= ( 0.8 + 0.2*std::exp( -(At - meanA)/tauA) ); 758 658 } 759 659 else 760 660 { 761 R = fRadiusConst*cubicrAt;762 }763 */764 765 R = fRadiusConst*cubicrAt;766 767 G4double meanA = 20.;768 G4double tauA = 20.;769 770 if ( At > 20.) // 20.771 {772 R *= ( 0.8 + 0.2*std::exp( -(At - meanA)/tauA) );773 }774 else775 {776 661 R *= ( 1.0 + 0.1*( 1. - std::exp( (At - meanA)/tauA) ) ); 777 662 } 778 663 779 664 return R; 780 781 665 } 782 666 … … 785 669 G4GGNuclNuclCrossSection::GetNucleusRadiusDE(G4double A) 786 670 { 787 788 671 // algorithm from diffuse-elastic 789 672 … … 797 680 798 681 799 if ( A < 50.)682 if (A < 50.) 800 683 { 801 684 if( 10 < A && A <= 15. ) r0 = a11*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi; … … 816 699 817 700 818 /////////////////////////////////////////////////////////////////////////////// /////819 // 820 // 821 822 G4double G4GGNuclNuclCrossSection::CalculateEcmValue( const G4double mp,823 const G4double mt,824 const G4double Plab)701 /////////////////////////////////////////////////////////////////////////////// 702 // 703 // 704 705 G4double G4GGNuclNuclCrossSection::CalculateEcmValue(const G4double mp, 706 const G4double mt, 707 const G4double Plab) 825 708 { 826 709 G4double Elab = std::sqrt ( mp * mp + Plab * Plab ); … … 833 716 834 717 835 /////////////////////////////////////////////////////////////////////////////// /////836 // 837 // 838 839 G4double G4GGNuclNuclCrossSection::CalcMandelstamS( const G4double mp,840 const G4double mt,841 const G4double Plab)718 /////////////////////////////////////////////////////////////////////////////// 719 // 720 // 721 722 G4double G4GGNuclNuclCrossSection::CalcMandelstamS(const G4double mp, 723 const G4double mt, 724 const G4double Plab) 842 725 { 843 726 G4double Elab = std::sqrt ( mp * mp + Plab * Plab ); … … 847 730 } 848 731 849 850 // 851 // 852 /////////////////////////////////////////////////////////////////////////////////////// 732 // 733 // 734 /////////////////////////////////////////////////////////////////////////////// -
trunk/source/processes/hadronic/cross_sections/src/G4GeneralSpaceNNCrossSection.cc
r819 r1340 65 65 #include "G4ParticleTable.hh" 66 66 #include "G4IonTable.hh" 67 #include "G4HadTmpUtil.hh" 67 68 68 69 #include <iomanip> 69 /////////////////////////////////////////////////////////////////////////////// 70 // 70 71 71 72 G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection () 72 73 { … … 79 80 return; 80 81 } 81 /////////////////////////////////////////////////////////////////////////////// 82 // 82 83 83 84 G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection () 84 85 { … … 92 93 // 93 94 94 G4bool G4GeneralSpaceNNCrossSection::Is ZAApplicable95 (const G4DynamicParticle* theProjectile, G4 double ZZ, G4doubleAA)96 { 97 G4bool result = protonInelastic->Is ZAApplicable(theProjectile, ZZ, AA);95 G4bool G4GeneralSpaceNNCrossSection::IsIsoApplicable 96 (const G4DynamicParticle* theProjectile, G4int ZZ, G4int AA) 97 { 98 G4bool result = protonInelastic->IsIsoApplicable(theProjectile, ZZ, AA); 98 99 if (!result) 99 100 { 100 result = ionProton->Is ZAApplicable(theProjectile, ZZ, AA);101 result = ionProton->IsIsoApplicable(theProjectile, ZZ, AA); 101 102 if (!result) 102 103 { 103 result = TripathiGeneral->Is ZAApplicable(theProjectile, ZZ, AA);104 result = TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA); 104 105 if (!result) 105 result = Shen->Is ZAApplicable(theProjectile, ZZ, AA);106 result = Shen->IsIsoApplicable(theProjectile, ZZ, AA); 106 107 } 107 108 } … … 139 140 G4IsotopeVector* isoVector = theTarget->GetIsotopeVector(); 140 141 G4double* abundVector = theTarget->GetRelativeAbundanceVector(); 141 G4 doubleZZ;142 G4 doubleAA;142 G4int ZZ; 143 G4int AA; 143 144 144 145 for (G4int i = 0; i < nIso; i++) { 145 ZZ = G4double( (*isoVector)[i]->GetZ());146 AA = G4double( (*isoVector)[i]->GetN());147 sig = Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);146 ZZ = (*isoVector)[i]->GetZ(); 147 AA = (*isoVector)[i]->GetN(); 148 sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 148 149 xsection += sig*abundVector[i]; 149 150 } 150 151 151 152 } else { 152 xsection =153 GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),154 153 G4int ZZ = G4lrint(theTarget->GetZ()); 154 G4int AA = G4lrint(theTarget->GetN()); 155 xsection = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 155 156 } 156 157 … … 159 160 160 161 161 G4double G4GeneralSpaceNNCrossSection::GetIsoZACrossSection162 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA,163 G4double theTemperature)162 G4double 163 G4GeneralSpaceNNCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile, 164 G4int ZZ, G4int AA, G4double theTemperature) 164 165 { 165 166 G4double result = 0.0; … … 186 187 { 187 188 result = protonInelastic-> 188 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);189 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 189 190 if (verboseLevel >= 2) 190 191 G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl; … … 193 194 { 194 195 result = TripathiLight-> 195 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);196 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 196 197 if (verboseLevel >= 2) 197 198 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; … … 203 204 { 204 205 result = ionProton-> 205 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);206 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 206 207 if (verboseLevel >= 2) 207 208 G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl; … … 210 211 { 211 212 result = TripathiLight-> 212 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);213 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 213 214 if (verboseLevel >= 2) 214 215 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; … … 217 218 else 218 219 { 219 if (TripathiLight->Is ZAApplicable(theProjectile, ZZ, AA))220 if (TripathiLight->IsIsoApplicable(theProjectile, ZZ, AA)) 220 221 { 221 222 result = TripathiLight-> 222 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);223 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 223 224 if (verboseLevel >= 2) 224 225 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; 225 226 } 226 else if (TripathiGeneral->Is ZAApplicable(theProjectile, ZZ, AA))227 else if (TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA)) 227 228 { 228 229 result = TripathiGeneral-> 229 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);230 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 230 231 if (verboseLevel >= 2) 231 232 G4cout <<"Selecting G4TripathiCrossSection" <<G4endl; 232 233 } 233 else if (Shen->Is ZAApplicable(theProjectile, ZZ, AA))234 else if (Shen->IsIsoApplicable(theProjectile, ZZ, AA)) 234 235 { 235 236 result = Shen-> 236 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);237 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 237 238 if (verboseLevel >= 2) 238 239 G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl; … … 247 248 return result; 248 249 } 249 /////////////////////////////////////////////////////////////////////////////// 250 // 250 -
trunk/source/processes/hadronic/cross_sections/src/G4GlauberGribovCrossSection.cc
r1337 r1340 279 279 const G4Element* anElement) 280 280 { 281 return IsZAApplicable(aDP, anElement->GetZ(), anElement->GetN()); 281 return IsIsoApplicable(aDP, G4lrint(anElement->GetZ()), 282 G4lrint(anElement->GetN())); 282 283 } 283 284 … … 287 288 288 289 G4bool 289 G4GlauberGribovCrossSection::Is ZAApplicable(const G4DynamicParticle* aDP,290 G4double Z, G4double)290 G4GlauberGribovCrossSection::IsIsoApplicable(const G4DynamicParticle* aDP, 291 G4int Z, G4int) 291 292 { 292 293 G4bool applicable = false; … … 297 298 298 299 if ( ( kineticEnergy >= fLowerLimit && 299 Z > 1 .5&& // >= He300 Z > 1 && // >= He 300 301 ( theParticle == theAProton || 301 302 theParticle == theGamma || … … 305 306 306 307 ( kineticEnergy >= fLowerLimit && 307 Z > 1 .5&& // >= He308 Z > 1 && // >= He 308 309 ( theParticle == theProton || 309 310 theParticle == theNeutron || … … 325 326 GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement, G4double T) 326 327 { 327 return GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(), T); 328 return GetZandACrossSection(aParticle, G4lrint(anElement->GetZ()), 329 G4lrint(anElement->GetN()), T); 328 330 } 329 331 … … 338 340 339 341 G4double G4GlauberGribovCrossSection:: 340 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4double Z, G4doubleA, G4double)342 GetZandACrossSection(const G4DynamicParticle* aParticle, G4int Z, G4int A, G4double) 341 343 { 342 344 G4double xsection, sigma, cofInelastic, cofTotal, nucleusSquare, ratio; … … 362 364 // cofInelastic = 2.0; 363 365 364 if( A > 1 .5)366 if( A > 1 ) 365 367 { 366 368 nucleusSquare = cofTotal*pi*R*R; // basically 2piRR … … 420 422 421 423 G4double G4GlauberGribovCrossSection:: 422 GetRatioSD(const G4DynamicParticle* aParticle, G4 double A, G4doubleZ)424 GetRatioSD(const G4DynamicParticle* aParticle, G4int A, G4int Z) 423 425 { 424 426 G4double sigma, cofInelastic, cofTotal, nucleusSquare, ratio; … … 462 464 463 465 G4double G4GlauberGribovCrossSection:: 464 GetRatioQE(const G4DynamicParticle* aParticle, G4 double A, G4doubleZ)466 GetRatioQE(const G4DynamicParticle* aParticle, G4int A, G4int Z) 465 467 { 466 468 G4double sigma, cofInelastic, cofTotal, nucleusSquare, ratio; … … 510 512 G4double 511 513 G4GlauberGribovCrossSection::GetHadronNucleonXsc(const G4DynamicParticle* aParticle, 512 const G4Element* anElement ) 513 { 514 G4double At = anElement->GetN(); // number of nucleons 515 G4double Zt = anElement->GetZ(); // number of protons 516 517 518 return GetHadronNucleonXsc( aParticle, At, Zt ); 514 const G4Element* anElement) 515 { 516 G4int At = G4lrint(anElement->GetN()); // number of nucleons 517 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 518 519 return GetHadronNucleonXsc(aParticle, At, Zt); 519 520 } 520 521 … … 531 532 G4double 532 533 G4GlauberGribovCrossSection::GetHadronNucleonXsc(const G4DynamicParticle* aParticle, 533 G4double At, G4double Zt)534 G4int At, G4int Zt) 534 535 { 535 536 G4double xsection; 536 537 537 538 538 G4double targ_mass = G4ParticleTable::GetParticleTable()-> 539 GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5) ); 539 GetIonTable()->GetIonMass(Zt, At); 540 // GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5) ); 540 541 541 542 targ_mass = 0.939*GeV; // ~mean neutron and proton ??? … … 550 551 const G4ParticleDefinition* theParticle = aParticle->GetDefinition(); 551 552 553 G4double aa = At; 552 554 553 555 if(theParticle == theGamma) 554 556 { 555 xsection = At*(0.0677*std::pow(sMand,0.0808) + 0.129*std::pow(sMand,-0.4525));557 xsection = aa*(0.0677*std::pow(sMand,0.0808) + 0.129*std::pow(sMand,-0.4525)); 556 558 } 557 559 else if(theParticle == theNeutron) // as proton ??? 558 560 { 559 xsection = At*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525));561 xsection = aa*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 560 562 } 561 563 else if(theParticle == theProton) 562 564 { 563 xsection = At*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525));565 xsection = aa*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 564 566 // xsection = At*( 49.51*std::pow(sMand,-0.097) + 0.314*std::log(sMand)*std::log(sMand) ); 565 567 // xsection = At*( 38.4 + 0.85*std::abs(std::pow(log(sMand),1.47)) ); … … 567 569 else if(theParticle == theAProton) 568 570 { 569 xsection = At*( 21.70*std::pow(sMand,0.0808) + 98.39*std::pow(sMand,-0.4525));571 xsection = aa*( 21.70*std::pow(sMand,0.0808) + 98.39*std::pow(sMand,-0.4525)); 570 572 } 571 573 else if(theParticle == thePiPlus) 572 574 { 573 xsection = At*(13.63*std::pow(sMand,0.0808) + 27.56*std::pow(sMand,-0.4525));575 xsection = aa*(13.63*std::pow(sMand,0.0808) + 27.56*std::pow(sMand,-0.4525)); 574 576 } 575 577 else if(theParticle == thePiMinus) 576 578 { 577 579 // xsection = At*( 55.2*std::pow(sMand,-0.255) + 0.346*std::log(sMand)*std::log(sMand) ); 578 xsection = At*(13.63*std::pow(sMand,0.0808) + 36.02*std::pow(sMand,-0.4525));580 xsection = aa*(13.63*std::pow(sMand,0.0808) + 36.02*std::pow(sMand,-0.4525)); 579 581 } 580 582 else if(theParticle == theKPlus) 581 583 { 582 xsection = At*(11.82*std::pow(sMand,0.0808) + 8.15*std::pow(sMand,-0.4525));584 xsection = aa*(11.82*std::pow(sMand,0.0808) + 8.15*std::pow(sMand,-0.4525)); 583 585 } 584 586 else if(theParticle == theKMinus) 585 587 { 586 xsection = At*(11.82*std::pow(sMand,0.0808) + 26.36*std::pow(sMand,-0.4525));588 xsection = aa*(11.82*std::pow(sMand,0.0808) + 26.36*std::pow(sMand,-0.4525)); 587 589 } 588 590 else // as proton ??? 589 591 { 590 xsection = At*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525));592 xsection = aa*(21.70*std::pow(sMand,0.0808) + 56.08*std::pow(sMand,-0.4525)); 591 593 } 592 594 xsection *= millibarn; … … 602 604 G4double 603 605 G4GlauberGribovCrossSection::GetHadronNucleonXscPDG(const G4DynamicParticle* aParticle, 604 const G4Element* anElement ) 605 { 606 G4double At = anElement->GetN(); // number of nucleons 607 G4double Zt = anElement->GetZ(); // number of protons 608 609 610 return GetHadronNucleonXscPDG( aParticle, At, Zt ); 606 const G4Element* anElement) 607 { 608 G4int At = G4lrint(anElement->GetN()); // number of nucleons 609 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 610 611 return GetHadronNucleonXscPDG(aParticle, At, Zt); 611 612 } 612 613 … … 622 623 G4double 623 624 G4GlauberGribovCrossSection::GetHadronNucleonXscPDG(const G4DynamicParticle* aParticle, 624 G4double At, G4double Zt)625 G4int At, G4int Zt) 625 626 { 626 627 G4double xsection; 627 628 628 G4double Nt = At-Zt; // number of neutrons 629 630 if (Nt < 0.) Nt = 0.; 631 629 G4int Nt = At-Zt; // number of neutrons 630 if (Nt < 0) Nt = 0; 631 632 G4double zz = Zt; 633 G4double aa = At; 634 G4double nn = Nt; 632 635 633 636 G4double targ_mass = G4ParticleTable::GetParticleTable()-> 634 GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5));637 GetIonTable()->GetIonMass(Zt, At); 635 638 636 639 targ_mass = 0.939*GeV; // ~mean neutron and proton ??? … … 656 659 if(theParticle == theNeutron) // proton-neutron fit 657 660 { 658 xsection = Zt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)661 xsection = zz*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 659 662 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 660 xsection += Nt*( 35.45 + B*std::pow(std::log(sMand/s0),2.)663 xsection += nn*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 661 664 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); // pp for nn 662 665 } … … 664 667 { 665 668 666 xsection = Zt*( 35.45 + B*std::pow(std::log(sMand/s0),2.)669 xsection = zz*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 667 670 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); 668 671 669 xsection += Nt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)672 xsection += nn*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 670 673 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 671 674 } 672 675 else if(theParticle == theAProton) 673 676 { 674 xsection = Zt*( 35.45 + B*std::pow(std::log(sMand/s0),2.)677 xsection = zz*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 675 678 + 42.53*std::pow(sMand,-eta1) + 33.34*std::pow(sMand,-eta2)); 676 679 677 xsection += Nt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)680 xsection += nn*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 678 681 + 40.15*std::pow(sMand,-eta1) + 30.*std::pow(sMand,-eta2)); 679 682 } 680 683 else if(theParticle == thePiPlus) 681 684 { 682 xsection = At*( 20.86 + B*std::pow(std::log(sMand/s0),2.)685 xsection = aa*( 20.86 + B*std::pow(std::log(sMand/s0),2.) 683 686 + 19.24*std::pow(sMand,-eta1) - 6.03*std::pow(sMand,-eta2)); 684 687 } 685 688 else if(theParticle == thePiMinus) 686 689 { 687 xsection = At*( 20.86 + B*std::pow(std::log(sMand/s0),2.)690 xsection = aa*( 20.86 + B*std::pow(std::log(sMand/s0),2.) 688 691 + 19.24*std::pow(sMand,-eta1) + 6.03*std::pow(sMand,-eta2)); 689 692 } 690 693 else if(theParticle == theKPlus) 691 694 { 692 xsection = Zt*( 17.91 + B*std::pow(std::log(sMand/s0),2.)695 xsection = zz*( 17.91 + B*std::pow(std::log(sMand/s0),2.) 693 696 + 7.14*std::pow(sMand,-eta1) - 13.45*std::pow(sMand,-eta2)); 694 697 695 xsection += Nt*( 17.87 + B*std::pow(std::log(sMand/s0),2.)698 xsection += nn*( 17.87 + B*std::pow(std::log(sMand/s0),2.) 696 699 + 5.17*std::pow(sMand,-eta1) - 7.23*std::pow(sMand,-eta2)); 697 700 } 698 701 else if(theParticle == theKMinus) 699 702 { 700 xsection = Zt*( 17.91 + B*std::pow(std::log(sMand/s0),2.)703 xsection = zz*( 17.91 + B*std::pow(std::log(sMand/s0),2.) 701 704 + 7.14*std::pow(sMand,-eta1) + 13.45*std::pow(sMand,-eta2)); 702 705 703 xsection += Nt*( 17.87 + B*std::pow(std::log(sMand/s0),2.)706 xsection += nn*( 17.87 + B*std::pow(std::log(sMand/s0),2.) 704 707 + 5.17*std::pow(sMand,-eta1) + 7.23*std::pow(sMand,-eta2)); 705 708 } 706 709 else if(theParticle == theSMinus) 707 710 { 708 xsection = At*( 35.20 + B*std::pow(std::log(sMand/s0),2.)711 xsection = aa*( 35.20 + B*std::pow(std::log(sMand/s0),2.) 709 712 - 199.*std::pow(sMand,-eta1) + 264.*std::pow(sMand,-eta2)); 710 713 } 711 714 else if(theParticle == theGamma) // modify later on 712 715 { 713 xsection = At*( 0.0 + B*std::pow(std::log(sMand/s0),2.)716 xsection = aa*( 0.0 + B*std::pow(std::log(sMand/s0),2.) 714 717 + 0.032*std::pow(sMand,-eta1) - 0.0*std::pow(sMand,-eta2)); 715 718 … … 717 720 else // as proton ??? 718 721 { 719 xsection = Zt*( 35.45 + B*std::pow(std::log(sMand/s0),2.)722 xsection = zz*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 720 723 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); 721 724 722 xsection += Nt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)725 xsection += nn*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 723 726 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 724 727 } … … 735 738 G4double 736 739 G4GlauberGribovCrossSection::GetHadronNucleonXscNS(const G4DynamicParticle* aParticle, 737 const G4Element* anElement ) 738 { 739 G4double At = anElement->GetN(); // number of nucleons 740 G4double Zt = anElement->GetZ(); // number of protons 741 742 743 return GetHadronNucleonXscNS( aParticle, At, Zt ); 740 const G4Element* anElement) 741 { 742 G4int At = G4lrint(anElement->GetN()); // number of nucleons 743 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 744 745 return GetHadronNucleonXscNS(aParticle, At, Zt); 744 746 } 745 747 … … 754 756 G4double 755 757 G4GlauberGribovCrossSection::GetHadronNucleonXscNS(const G4DynamicParticle* aParticle, 756 G4double At, G4double Zt)758 G4int At, G4int Zt) 757 759 { 758 760 G4double xsection(0), Delta, A0, B0; … … 760 762 G4double hnXsc(0); 761 763 762 G4double Nt = At-Zt; // number of neutrons 763 764 if (Nt < 0.) Nt = 0.; 765 764 G4int Nt = At-Zt; // number of neutrons 765 if (Nt < 0) Nt = 0; 766 767 G4double aa = At; 768 G4double zz = Zt; 769 G4double nn = Nt; 766 770 767 771 G4double targ_mass = G4ParticleTable::GetParticleTable()-> 768 GetIonTable()->GetIonMass( G4int(Zt+0.5) , G4int(At+0.5));772 GetIonTable()->GetIonMass(Zt, At); 769 773 770 774 targ_mass = 0.939*GeV; // ~mean neutron and proton ??? … … 810 814 0.93827*0.93827,-0.165); // mb 811 815 } 812 xsection *= Zt + Nt;816 xsection *= zz + nn; 813 817 } 814 818 else … … 846 850 (std::pow(proj_momentum,2.50)+0.95); 847 851 } 848 xsection = hpXsc* Zt + hnXsc*Nt;852 xsection = hpXsc*zz + hnXsc*nn; 849 853 } 850 854 } … … 867 871 0.93827*0.93827,-0.165); // mb 868 872 } 869 xsection *= Zt + Nt;873 xsection *= zz + nn; 870 874 } 871 875 else … … 903 907 (std::pow(proj_momentum,2.50)+0.95); 904 908 } 905 xsection = hpXsc* Zt + hnXsc*Nt;909 xsection = hpXsc*zz + hnXsc*nn; 906 910 // xsection = hpXsc*(Zt + Nt); 907 911 // xsection = hnXsc*(Zt + Nt); … … 921 925 if( proj_momentum <= 1.0 ) 922 926 { 923 xsection = Zt*(65.55 + 53.84/(proj_momentum+1.e-6) );927 xsection = zz*(65.55 + 53.84/(proj_momentum+1.e-6) ); 924 928 } 925 929 else 926 930 { 927 xsection = Zt*( 41.1 + 77.2*std::pow( proj_momentum, -0.68)931 xsection = zz*( 41.1 + 77.2*std::pow( proj_momentum, -0.68) 928 932 + 0.293*logP*logP - 1.82*logP ); 929 933 } 930 if ( Nt> 0.)931 { 932 xsection += Nt*( 41.9 + 96.2*std::pow( proj_momentum, -0.99) - 0.154*logP);934 if ( nn > 0.) 935 { 936 xsection += nn*( 41.9 + 96.2*std::pow( proj_momentum, -0.99) - 0.154*logP); 933 937 } 934 938 else // H … … 987 991 hnXsc = 10.6+2*std::log(proj_energy)+30*std::pow(proj_energy,-0.43); 988 992 } 989 xsection = hpXsc* Zt + hnXsc*Nt;993 xsection = hpXsc*zz + hnXsc*nn; 990 994 } 991 995 else if(theParticle == thePiMinus) … … 1039 1043 hpXsc = 10.6+2*std::log(proj_energy)+30*std::pow(proj_energy,-0.43); 1040 1044 } 1041 xsection = hpXsc* Zt + hnXsc*Nt;1045 xsection = hpXsc*zz + hnXsc*nn; 1042 1046 } 1043 1047 else if(theParticle == theKPlus) 1044 1048 { 1045 xsection = Zt*( 17.91 + B*std::pow(std::log(sMand/s0),2.)1049 xsection = zz*( 17.91 + B*std::pow(std::log(sMand/s0),2.) 1046 1050 + 7.14*std::pow(sMand,-eta1) - 13.45*std::pow(sMand,-eta2)); 1047 1051 1048 xsection += Nt*( 17.87 + B*std::pow(std::log(sMand/s0),2.)1052 xsection += nn*( 17.87 + B*std::pow(std::log(sMand/s0),2.) 1049 1053 + 5.17*std::pow(sMand,-eta1) - 7.23*std::pow(sMand,-eta2)); 1050 1054 } 1051 1055 else if(theParticle == theKMinus) 1052 1056 { 1053 xsection = Zt*( 17.91 + B*std::pow(std::log(sMand/s0),2.)1057 xsection = zz*( 17.91 + B*std::pow(std::log(sMand/s0),2.) 1054 1058 + 7.14*std::pow(sMand,-eta1) + 13.45*std::pow(sMand,-eta2)); 1055 1059 1056 xsection += Nt*( 17.87 + B*std::pow(std::log(sMand/s0),2.)1060 xsection += nn*( 17.87 + B*std::pow(std::log(sMand/s0),2.) 1057 1061 + 5.17*std::pow(sMand,-eta1) + 7.23*std::pow(sMand,-eta2)); 1058 1062 } 1059 1063 else if(theParticle == theSMinus) 1060 1064 { 1061 xsection = At*( 35.20 + B*std::pow(std::log(sMand/s0),2.)1065 xsection = aa*( 35.20 + B*std::pow(std::log(sMand/s0),2.) 1062 1066 - 199.*std::pow(sMand,-eta1) + 264.*std::pow(sMand,-eta2)); 1063 1067 } 1064 1068 else if(theParticle == theGamma) // modify later on 1065 1069 { 1066 xsection = At*( 0.0 + B*std::pow(std::log(sMand/s0),2.)1070 xsection = aa*( 0.0 + B*std::pow(std::log(sMand/s0),2.) 1067 1071 + 0.032*std::pow(sMand,-eta1) - 0.0*std::pow(sMand,-eta2)); 1068 1072 … … 1070 1074 else // as proton ??? 1071 1075 { 1072 xsection = Zt*( 35.45 + B*std::pow(std::log(sMand/s0),2.)1076 xsection = zz*( 35.45 + B*std::pow(std::log(sMand/s0),2.) 1073 1077 + 42.53*std::pow(sMand,-eta1) - 33.34*std::pow(sMand,-eta2)); 1074 1078 1075 xsection += Nt*( 35.80 + B*std::pow(std::log(sMand/s0),2.)1079 xsection += nn*( 35.80 + B*std::pow(std::log(sMand/s0),2.) 1076 1080 + 40.15*std::pow(sMand,-eta1) - 30.*std::pow(sMand,-eta2)); 1077 1081 } … … 1087 1091 G4double 1088 1092 G4GlauberGribovCrossSection::GetHNinelasticXsc(const G4DynamicParticle* aParticle, 1089 const G4Element* anElement ) 1090 { 1091 G4double At = anElement->GetN(); // number of nucleons 1092 G4double Zt = anElement->GetZ(); // number of protons 1093 1094 1095 return GetHNinelasticXsc( aParticle, At, Zt ); 1093 const G4Element* anElement) 1094 { 1095 G4int At = G4lrint(anElement->GetN()); // number of nucleons 1096 G4int Zt = G4lrint(anElement->GetZ()); // number of protons 1097 1098 return GetHNinelasticXsc(aParticle, At, Zt); 1096 1099 } 1097 1100 … … 1102 1105 G4double 1103 1106 G4GlauberGribovCrossSection::GetHNinelasticXsc(const G4DynamicParticle* aParticle, 1104 G4 double At, G4double Zt)1107 G4int At, G4int Zt) 1105 1108 { 1106 1109 G4ParticleDefinition* hadron = aParticle->GetDefinition(); 1107 G4double sumInelastic, Nt = At - Zt; 1108 if(Nt < 0.) Nt = 0.; 1110 G4double sumInelastic; 1111 G4int Nt = At - Zt; 1112 if(Nt < 0) Nt = 0; 1109 1113 1110 1114 if( hadron == theKPlus ) … … 1116 1120 //sumInelastic = Zt*GetHadronNucleonXscMK(aParticle, theProton); 1117 1121 // sumInelastic += Nt*GetHadronNucleonXscMK(aParticle, theNeutron); 1118 sumInelastic = Zt*GetHadronNucleonXscNS(aParticle, 1.0, 1.0);1119 sumInelastic += Nt*GetHadronNucleonXscNS(aParticle, 1.0, 0.0);1122 sumInelastic = G4double(Zt)*GetHadronNucleonXscNS(aParticle, 1, 1); 1123 sumInelastic += G4double(Nt)*GetHadronNucleonXscNS(aParticle, 1, 0); 1120 1124 } 1121 1125 return sumInelastic; … … 1129 1133 G4double 1130 1134 G4GlauberGribovCrossSection::GetHNinelasticXscVU(const G4DynamicParticle* aParticle, 1131 G4double At, G4double Zt)1135 G4int At, G4int Zt) 1132 1136 { 1133 1137 G4int PDGcode = aParticle->GetDefinition()->GetPDGEncoding(); … … 1147 1151 //G4cout<<"Plab = "<<Plab<<G4endl; 1148 1152 1149 G4double NumberOfTargetProtons = Zt;1150 G4double NumberOfTargetNucleons = At;1153 G4double NumberOfTargetProtons = G4double(Zt); 1154 G4double NumberOfTargetNucleons = G4double(At); 1151 1155 G4double NumberOfTargetNeutrons = NumberOfTargetNucleons - NumberOfTargetProtons; 1152 1156 1153 if( NumberOfTargetNeutrons < 0.) NumberOfTargetNeutrons = 0.;1157 if(NumberOfTargetNeutrons < 0.0) NumberOfTargetNeutrons = 0.0; 1154 1158 1155 1159 G4double Xtotal, Xelastic, Xinelastic; … … 1169 1173 0.169*sqrLogPlab - 1.85*LogPlab; 1170 1174 1171 Xtotal = ( NumberOfTargetProtons* XtotPP +1172 NumberOfTargetNeutrons * XtotPN);1173 1174 Xelastic = ( NumberOfTargetProtons * XelPP+1175 NumberOfTargetNeutrons * XelPN);1175 Xtotal = (NumberOfTargetProtons * XtotPP + 1176 NumberOfTargetNeutrons * XtotPN); 1177 1178 Xelastic = (NumberOfTargetProtons * XelPP + 1179 NumberOfTargetNeutrons * XelPN); 1176 1180 } 1177 1181 else if( PDGcode == 211 ) //------Projectile is PionPlus ------- … … 1340 1344 1341 1345 G4double 1342 G4GlauberGribovCrossSection::GetNucleusRadius( 1343 1344 { 1345 G4 double At = anElement->GetN();1346 G4GlauberGribovCrossSection::GetNucleusRadius(const G4DynamicParticle* , 1347 const G4Element* anElement) 1348 { 1349 G4int At = G4lrint(anElement->GetN()); 1346 1350 G4double oneThird = 1.0/3.0; 1347 G4double cubicrAt = std::pow (At, oneThird);1351 G4double cubicrAt = std::pow(G4double(At), oneThird); 1348 1352 1349 1353 G4double R; // = fRadiusConst*cubicrAt; … … 1377 1381 G4double b3 = 4.; 1378 1382 1379 if (At > 20 .) // 20.1383 if (At > 20) // 20. 1380 1384 { 1381 1385 R *= ( a1 + b1*std::exp( -(At - meanA)/tauA1) ); 1382 1386 } 1383 else if (At > 3 .5)1387 else if (At > 3) 1384 1388 { 1385 1389 R *= ( 1.0 + b2*( 1. - std::exp( (At - meanA)/tauA2) ) ); … … 1397 1401 1398 1402 G4double 1399 G4GlauberGribovCrossSection::GetNucleusRadius(G4 doubleAt)1403 G4GlauberGribovCrossSection::GetNucleusRadius(G4int At) 1400 1404 { 1401 1405 G4double oneThird = 1.0/3.0; 1402 G4double cubicrAt = std::pow (At, oneThird);1406 G4double cubicrAt = std::pow(G4double(At), oneThird); 1403 1407 1404 1408 G4double R; // = fRadiusConst*cubicrAt; … … 1424 1428 G4double tauA = 20.; 1425 1429 1426 if (At > 20 .) // 20.1427 { 1428 R *= ( 0.8 + 0.2*std::exp( -( At- meanA)/tauA) );1430 if (At > 20) // 20. 1431 { 1432 R *= ( 0.8 + 0.2*std::exp( -(G4double(At) - meanA)/tauA) ); 1429 1433 } 1430 1434 else 1431 1435 { 1432 R *= ( 1.0 + 0.1*( 1. - std::exp( ( At- meanA)/tauA) ) );1436 R *= ( 1.0 + 0.1*( 1. - std::exp( (G4double(At) - meanA)/tauA) ) ); 1433 1437 } 1434 1438 -
trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc
r1337 r1340 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // … … 1230 1230 G4IsotopeVector* isoVector = element->GetIsotopeVector(); 1231 1231 G4double* abundVector = element->GetRelativeAbundanceVector(); 1232 G4 doubleZZ;1233 G4 doubleAA;1232 G4int ZZ; 1233 G4int AA; 1234 1234 1235 1235 for (G4int i = 0; i < nIso; i++) { 1236 ZZ = G4double( (*isoVector)[i]->GetZ());1237 AA = G4double( (*isoVector)[i]->GetN());1236 ZZ = (*isoVector)[i]->GetZ(); 1237 AA = (*isoVector)[i]->GetN(); 1238 1238 CalcScatteringCrossSections(particle, ZZ, AA); 1239 1239 cross_section += siginelastic*abundVector[i]; … … 1241 1241 siginelastic = cross_section; 1242 1242 1243 } else { 1244 CalcScatteringCrossSections(particle, element->GetZ(), element->GetN()); 1243 } else { 1244 G4int ZZ = G4lrint(element->GetZ()); 1245 G4int AA = G4lrint(element->GetN()); 1246 CalcScatteringCrossSections(particle, ZZ, AA); 1245 1247 } 1246 1248 } … … 1249 1251 1250 1252 1251 G4double G4HadronCrossSections::GetInelasticCrossSection(1252 1253 G4double ZZ, G4doubleAA)1253 G4double 1254 G4HadronCrossSections::GetInelasticCrossSection(const G4DynamicParticle* particle, 1255 G4int ZZ, G4int AA) 1254 1256 { 1255 1257 prevElement = 0; // force new cross section calculation for next call of … … 1274 1276 G4IsotopeVector* isoVector = element->GetIsotopeVector(); 1275 1277 G4double* abundVector = element->GetRelativeAbundanceVector(); 1276 G4 doubleZZ;1277 G4 doubleAA;1278 G4int ZZ; 1279 G4int AA; 1278 1280 1279 1281 for (G4int i = 0; i < nIso; i++) { 1280 ZZ = G4double( (*isoVector)[i]->GetZ());1281 AA = G4double( (*isoVector)[i]->GetN());1282 ZZ = (*isoVector)[i]->GetZ(); 1283 AA = (*isoVector)[i]->GetN(); 1282 1284 CalcScatteringCrossSections(particle, ZZ, AA); 1283 1285 cross_section += sigelastic*abundVector[i]; … … 1285 1287 sigelastic = cross_section; 1286 1288 1287 } else { 1288 CalcScatteringCrossSections(particle, element->GetZ(), element->GetN()); 1289 } else { 1290 G4int ZZ = G4lrint(element->GetZ()); 1291 G4int AA = G4lrint(element->GetN()); 1292 CalcScatteringCrossSections(particle, ZZ, AA); 1289 1293 } 1290 1294 } … … 1293 1297 1294 1298 1295 G4double G4HadronCrossSections::GetElasticCrossSection(1296 1297 G4double ZZ, G4doubleAA)1299 G4double 1300 G4HadronCrossSections::GetElasticCrossSection(const G4DynamicParticle* particle, 1301 G4int ZZ, G4int AA) 1298 1302 { 1299 1303 prevElement = 0; // force new cross section calculation for next call of … … 1312 1316 G4HadronCrossSections::CalcScatteringCrossSections( 1313 1317 const G4DynamicParticle* aParticle, 1314 G4 double ZZ, G4doubleAA)1318 G4int ZZ, G4int AA) 1315 1319 { 1316 1320 G4double sigel, sigin, sigtot; … … 1583 1587 G4HadronCrossSections::GetCaptureCrossSection( 1584 1588 const G4DynamicParticle* aParticle, 1585 G4 double ZZ, G4double/*AA*/)1589 G4int ZZ, G4int /*AA*/) 1586 1590 { 1587 1591 if (GetParticleCode(aParticle) != 16) { return 0.; } … … 1596 1600 } 1597 1601 1598 G4int izno = static_cast<G4int> (ZZ + 0.01);1602 G4int izno = ZZ; 1599 1603 if (izno > 100) izno = 100; // Not in GHESIG 1600 1604 izno = izno - 1; // For array indexing … … 1609 1613 G4HadronCrossSections::GetFissionCrossSection( 1610 1614 const G4DynamicParticle* aParticle, 1611 G4 double ZZ, G4doubleAA)1615 G4int ZZ, G4int AA) 1612 1616 { 1613 if (AA < 230 .) return 0;1617 if (AA < 230) return 0; 1614 1618 1615 1619 G4double ek = aParticle->GetKineticEnergy()/GeV; 1616 1617 // G4int i = NFISS;1618 // for (G4int ii = 1; i <= NFISS; i++) {1619 // if (ek < ekfiss[ii - 1]) {1620 // i = ii;1621 // break;1622 // }1623 // }1624 // i = i - 1; // For array indexing1625 1620 1626 1621 G4int ie1 = 0; … … 1638 1633 G4int j = 4; 1639 1634 if (ek <= 0.01) { 1640 if (ZZ == 92 . && std::abs(AA - 233.) < 0.5) j = 1;1641 else if (ZZ == 92 . && std::abs(AA - 235.) < 0.5) j = 2;1642 else if (ZZ == 94 . && std::abs(AA - 239.) < 0.5) j = 3;1635 if (ZZ == 92 && AA == 233) j = 1; 1636 else if (ZZ == 92 && AA == 235) j = 2; 1637 else if (ZZ == 94 && AA == 239) j = 3; 1643 1638 } 1644 1639 G4double z43ba; 1645 1640 if (j == 4) { 1646 z43ba = std::pow( ZZ, 4./3.)/AA;1641 z43ba = std::pow(G4double(ZZ), 4./3.)/G4double(AA); 1647 1642 z43ba = std::max(-67. + 38.7*z43ba, 0.); 1648 1643 } -
trunk/source/processes/hadronic/cross_sections/src/G4HadronNucleonXsc.cc
r1228 r1340 33 33 #include "G4IonTable.hh" 34 34 #include "G4ParticleDefinition.hh" 35 36 ////////////////////////////////////////////////////////////////////////////////////// 37 // 38 // 35 #include "G4HadTmpUtil.hh" 39 36 40 37 … … 80 77 81 78 G4HadronNucleonXsc::~G4HadronNucleonXsc() 82 { 83 } 79 {} 84 80 85 81 … … 91 87 G4bool 92 88 G4HadronNucleonXsc::IsApplicable(const G4DynamicParticle* aDP, 93 const G4Element*anElement)89 const G4Element* anElement) 94 90 { 95 return IsZAApplicable(aDP, anElement->GetZ(), anElement->GetN()); 91 G4int Z = G4lrint(anElement->GetZ()); 92 G4int A = G4lrint(anElement->GetN()); 93 return IsIsoApplicable(aDP, Z, A); 96 94 } 97 95 98 96 //////////////////////////////////////////////////////////////////////////////////////// 99 97 // 100 //101 98 102 99 G4bool 103 G4HadronNucleonXsc::Is ZAApplicable(const G4DynamicParticle* aDP,104 G4double Z, G4double)100 G4HadronNucleonXsc::IsIsoApplicable(const G4DynamicParticle* aDP, 101 G4int Z, G4int) 105 102 { 106 G4bool applicable 103 G4bool applicable = false; 107 104 // G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber(); 108 105 G4double kineticEnergy = aDP->GetKineticEnergy(); … … 111 108 112 109 if ( ( kineticEnergy >= fLowerLimit && 113 Z > 1 .5&& // >= He110 Z > 1 && // >= He 114 111 ( theParticle == theAProton || 115 112 theParticle == theGamma || … … 119 116 120 117 ( kineticEnergy >= 0.1*fLowerLimit && 121 Z > 1 .5&& // >= He118 Z > 1 && // >= He 122 119 ( theParticle == theProton || 123 120 theParticle == theNeutron || … … 127 124 return applicable; 128 125 } 129 130 131 126 132 127 … … 210 205 211 206 212 213 214 215 207 ///////////////////////////////////////////////////////////////////////////////////// 216 208 // … … 242 234 G4double B = 0.308; 243 235 244 245 236 const G4ParticleDefinition* theParticle = aParticle->GetDefinition(); 246 237 … … 249 240 G4bool neutron = (nucleon == theNeutron); 250 241 251 252 242 if(theParticle == theNeutron) // proton-neutron fit 253 243 { … … 358 348 return xsection; 359 349 } 360 361 350 362 351 … … 758 747 G4bool neutron = (nucleon == theNeutron); 759 748 760 761 762 749 763 750 if( absPDGcode > 1000 && pORn ) //------Projectile is baryon - -
trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc
r1055 r1340 32 32 #include "G4ParticleTable.hh" 33 33 #include "G4IonTable.hh" 34 #include "G4HadTmpUtil.hh" 34 35 35 36 G4double G4IonsKoxCrossSection:: 36 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4doubleZZ,37 G4 doubleAA, G4double /*temperature*/)37 GetZandACrossSection(const G4DynamicParticle* aParticle, G4int ZZ, 38 G4int AA, G4double /*temperature*/) 38 39 { 39 40 G4double xsection = 0.0; 40 41 41 42 G4int Ap = aParticle->GetDefinition()->GetBaryonNumber(); 42 G4int Zp = int (aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5);43 G4int Zp = G4int(aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5); 43 44 G4double ke_per_N = aParticle->GetKineticEnergy() / Ap; 44 45 … … 46 47 // if ( ke_per_N < lowerLimit ) return xsection; 47 48 48 G4int At = int (AA + 0.5);49 G4int Zt = int (ZZ + 0.5 );49 G4int At = AA; 50 G4int Zt = ZZ; 50 51 51 52 G4double one_third = 1.0 / 3.0; … … 54 55 G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 55 56 57 // rc divide fermi 58 G4double Bc = Zt * Zp / ( (rc/fermi) * (cubicrAp+cubicrAt) ); 56 59 57 G4double Bc = Zt * Zp / ( ( rc / fermi ) * ( cubicrAp + cubicrAt ) ); // rc divide fermi58 G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At);59 G4double proj_mass = aParticle->GetMass(); 60 G4double targ_mass = 61 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Zt, At); 62 G4double proj_mass = aParticle->GetMass(); 60 63 G4double proj_momentum = aParticle->GetMomentum().mag(); 61 64 … … 69 72 70 73 G4double a = 1.85; 71 G4double Rsurf = r0 * ( a * cubicrAp * cubicrAt / ( cubicrAp + cubicrAt) - c);74 G4double Rsurf = r0 * (a*cubicrAp * cubicrAt/(cubicrAp + cubicrAt) - c); 72 75 G4double D = 5.0 * ( At - 2 * Zt ) * Zp / ( Ap * At ); 73 76 Rsurf = Rsurf + D * fermi; // multiply D by fermi 74 77 75 78 G4double Rint = Rvol + Rsurf; 76 77 79 xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) ); 78 80 79 81 return xsection; 80 82 } 83 81 84 82 85 G4double G4IonsKoxCrossSection:: … … 91 94 G4IsotopeVector* isoVector = anElement->GetIsotopeVector(); 92 95 G4double* abundVector = anElement->GetRelativeAbundanceVector(); 93 G4 doubleZZ;94 G4 doubleAA;96 G4int ZZ; 97 G4int AA; 95 98 96 99 for (G4int i = 0; i < nIso; i++) { 97 ZZ = G4double( (*isoVector)[i]->GetZ());98 AA = G4double( (*isoVector)[i]->GetN());99 sig = Get IsoZACrossSection(aParticle, ZZ, AA, temperature);100 ZZ = (*isoVector)[i]->GetZ(); 101 AA = (*isoVector)[i]->GetN(); 102 sig = GetZandACrossSection(aParticle, ZZ, AA, temperature); 100 103 xsection += sig*abundVector[i]; 101 104 } 102 105 103 106 } else { 104 xsection =105 GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),106 107 G4int ZZ = G4lrint(anElement->GetZ()); 108 G4int AA = G4lrint(anElement->GetN()); 109 xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 107 110 } 108 111 … … 111 114 112 115 113 G4double G4IonsKoxCrossSection::calEcm ( G4double mp , G4double mt , G4double Plab ) 116 G4double 117 G4IonsKoxCrossSection::calEcm(G4double mp, G4double mt, G4double Plab) 114 118 { 115 119 G4double Elab = std::sqrt ( mp * mp + Plab * Plab ); … … 121 125 122 126 123 G4double G4IonsKoxCrossSection::calCeValue( const G4double ke)127 G4double G4IonsKoxCrossSection::calCeValue(const G4double ke) 124 128 { 125 129 // Calculate c value … … 131 135 G4double Ce; 132 136 G4double log10_ke = std::log10 ( ke ); 133 if ( log10_ke > 1.5)137 if (log10_ke > 1.5) 134 138 { 135 139 Ce = - 10.0 / std::pow ( G4double(log10_ke) , G4double(5) ) + 2.0; … … 137 141 else 138 142 { 139 Ce = ( - 10.0 / std::pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / std::pow ( G4double(1.5) , G4double(3) ) * std::pow ( G4double(log10_ke) , G4double(3) ); 143 Ce = (-10.0/std::pow(G4double(1.5), G4double(5) ) + 2.0) / 144 std::pow(G4double(1.5), G4double(3)) * std::pow(G4double(log10_ke), G4double(3) ); 140 145 141 146 } -
trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc
r1055 r1340 33 33 #include "G4ParticleTable.hh" 34 34 #include "G4IonTable.hh" 35 #include "G4HadTmpUtil.hh" 35 36 36 37 37 38 G4double G4IonsShenCrossSection:: 38 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4doubleZZ,39 G4doubleAA, G4double /*temperature*/)39 GetZandACrossSection(const G4DynamicParticle* aParticle, G4int ZZ, 40 G4int AA, G4double /*temperature*/) 40 41 { 41 42 G4double xsection = 0.0; 42 43 43 44 G4int Ap = aParticle->GetDefinition()->GetBaryonNumber(); 44 G4int Zp = int ( aParticle->GetDefinition()->GetPDGCharge() /eplus + 0.5 );45 G4int Zp = G4int(aParticle->GetDefinition()->GetPDGCharge()/eplus + 0.5 ); 45 46 G4double ke_per_N = aParticle->GetKineticEnergy() / Ap; 46 47 if ( ke_per_N > 10*GeV ) ke_per_N = 10*GeV; … … 49 50 // if ( ke_per_N < lowerLimit ) return xsection; 50 51 51 G4int At = G4int(AA);52 G4int Zt = G4int(ZZ);52 G4int At = AA; 53 G4int Zt = ZZ; 53 54 54 55 G4double one_third = 1.0 / 3.0; … … 62 63 G4double r = Rt + Rp + 3.2; // in fm 63 64 G4double b = 1.0; // in MeV/fm 64 G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At ); 65 G4double targ_mass = 66 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Zt, At); 65 67 G4double proj_mass = aParticle->GetMass(); 66 68 G4double proj_momentum = aParticle->GetMomentum().mag(); 67 69 68 G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum);70 G4double Ecm = calEcmValue (proj_mass, targ_mass, proj_momentum); 69 71 70 72 G4double B = 1.44 * Zt * Zp / r - b * Rt * Rp / ( Rt + Rp ); … … 74 76 G4double c = calCeValue ( ke_per_N / MeV ); 75 77 76 G4double R1 = r0 * ( cubicrAt + cubicrAp + 1.85 * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp) - c);78 G4double R1 = r0 * (cubicrAt + cubicrAp + 1.85*cubicrAt*cubicrAp/(cubicrAt + cubicrAp) - c); 77 79 78 80 G4double R2 = 1.0 * ( At - 2 * Zt ) * Zp / ( Ap * At ); 79 81 80 82 81 G4double R3 = 0.176 / std::pow ( G4double(Ecm) , G4double(one_third) ) * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp);83 G4double R3 = 0.176 / std::pow(G4double(Ecm), G4double(one_third)) * cubicrAt * cubicrAp /(cubicrAt + cubicrAp); 82 84 83 85 G4double R = R1 + R2 + R3; 84 86 85 87 xsection = 10 * pi * R * R * ( 1 - B / Ecm ); 86 xsection = xsection * millibarn; // mulitply xsection by millibarn 87 88 xsection = xsection * millibarn; // mulitply xsection by millibarn 89 88 90 return xsection; 89 91 } … … 101 103 G4IsotopeVector* isoVector = anElement->GetIsotopeVector(); 102 104 G4double* abundVector = anElement->GetRelativeAbundanceVector(); 103 G4 doubleZZ;104 G4 doubleAA;105 G4int ZZ; 106 G4int AA; 105 107 106 108 for (G4int i = 0; i < nIso; i++) { 107 ZZ = G4double( (*isoVector)[i]->GetZ());108 AA = G4double( (*isoVector)[i]->GetN());109 ZZ = (*isoVector)[i]->GetZ(); 110 AA = (*isoVector)[i]->GetN(); 109 111 sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 110 112 xsection += sig*abundVector[i]; … … 112 114 113 115 } else { 114 xsection =115 GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),116 116 G4int ZZ = G4lrint(anElement->GetZ()); 117 G4int AA = G4lrint(anElement->GetN()); 118 xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 117 119 } 118 120 … … 121 123 122 124 123 G4double G4IonsShenCrossSection::calEcmValue( const G4double mp , const G4double mt , const G4double Plab ) 125 G4double 126 G4IonsShenCrossSection::calEcmValue(const G4double mp, const G4double mt, 127 const G4double Plab) 124 128 { 125 129 G4double Elab = std::sqrt ( mp * mp + Plab * Plab ); … … 131 135 132 136 133 G4double G4IonsShenCrossSection::calCeValue( const G4double ke)137 G4double G4IonsShenCrossSection::calCeValue(const G4double ke) 134 138 { 135 // Calculate c value 136 // This value is indepenent from projectile and target particle 137 // ke is projectile kinetic energy per nucleon in the Lab system with MeV unit 138 // fitting function is made by T. Koi 139 // There are no data below 30 MeV/n in Kox et al., 139 // Calculate c value 140 // This value is indepenent from projectile and target particle 141 // ke is projectile kinetic energy per nucleon in the Lab system 142 // with MeV unit 143 // fitting function is made by T. Koi 144 // There are no data below 30 MeV/n in Kox et al., 140 145 141 146 G4double Ce; 142 147 G4double log10_ke = std::log10 ( ke ); 143 if ( log10_ke > 1.5)148 if (log10_ke > 1.5) 144 149 { 145 Ce = - 10.0 / std::pow ( G4double(log10_ke) , G4double(5)) + 2.0;150 Ce = -10.0/std::pow(G4double(log10_ke), G4double(5)) + 2.0; 146 151 } 147 152 else 148 153 { 149 Ce = ( - 10.0 / std::pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / std::pow ( G4double(1.5) , G4double(3) ) * std::pow ( G4double(log10_ke) , G4double(3) ); 154 Ce = (-10.0/std::pow(G4double(1.5), G4double(5) ) + 2.0) / 155 std::pow(G4double(1.5) , G4double(3)) * std::pow(G4double(log10_ke), G4double(3)); 150 156 } 151 157 return Ce; -
trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc
r819 r1340 31 31 #include "G4ParticleTable.hh" 32 32 #include "G4IonTable.hh" 33 #include "G4HadTmpUtil.hh" 33 34 34 35 G4double G4IonsSihverCrossSection:: 35 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4double /*ZZ*/,36 G4doubleAA, G4double /*aTemperature*/)36 GetZandACrossSection(const G4DynamicParticle* aParticle, 37 G4int /*ZZ*/, G4int AA, G4double /*aTemperature*/) 37 38 { 38 39 G4double xsection = 0.0; 39 40 G4int At = G4int(AA); 41 //G4int Zt = G4int(ZZ); // not used 40 G4int At = AA; 42 41 43 42 G4int Ap = aParticle->GetDefinition()->GetBaryonNumber(); 44 //Zp = aParticle->GetDefinition()->GetPDGCharge(); // not used45 43 46 44 G4double one_third = 1.0 / 3.0; … … 49 47 G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 50 48 51 G4double b0 = 1.581 - 0.876 * ( 1.0 / cubicrAp + 1.0 / cubicrAt);49 G4double b0 = 1.581 - 0.876 * (1.0/cubicrAp + 1.0/cubicrAt); 52 50 53 51 xsection = pi * square_r0 54 * std::pow ( G4double(cubicrAp + cubicrAt - b0 * ( 1.0 / cubicrAp + 1.0 / cubicrAt ) ), G4double(2));52 * std::pow(G4double(cubicrAp + cubicrAt - b0 * (1.0/cubicrAp + 1.0/cubicrAt)), G4double(2)); 55 53 56 54 return xsection; … … 69 67 G4IsotopeVector* isoVector = anElement->GetIsotopeVector(); 70 68 G4double* abundVector = anElement->GetRelativeAbundanceVector(); 71 G4 doubleZZ;72 G4 doubleAA;69 G4int ZZ; 70 G4int AA; 73 71 74 72 for (G4int i = 0; i < nIso; i++) { 75 ZZ = G4double( (*isoVector)[i]->GetZ());76 AA = G4double( (*isoVector)[i]->GetN());73 ZZ = (*isoVector)[i]->GetZ(); 74 AA = (*isoVector)[i]->GetN(); 77 75 sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 78 76 xsection += sig*abundVector[i]; … … 80 78 81 79 } else { 82 xsection =83 GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),84 80 G4int ZZ = G4lrint(anElement->GetZ()); 81 G4int AA = G4lrint(anElement->GetN()); 82 xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 85 83 } 86 84 -
trunk/source/processes/hadronic/cross_sections/src/G4NeutronCaptureXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronCaptureXS.cc,v 1. 3 2010/06/03 11:50:21 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronCaptureXS.cc,v 1.5 2010/10/15 22:36:13 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 48 48 #include <fstream> 49 49 #include <sstream> 50 50 51 using namespace std; 51 52 52 53 G4NeutronCaptureXS::G4NeutronCaptureXS() 54 : emax(20*MeV),maxZ(92) 53 55 { 54 verboseLevel = 0; 55 emax = 20.*MeV; 56 G4cout << "G4NeutronCaptureXS::G4NeutronCaptureXS: Initialise " << G4endl; 57 for(G4int i=0; i<93; ++i) { 58 data[i] = 0; 56 // verboseLevel = 0; 57 if(verboseLevel > 0){ 58 G4cout << "G4NeutronCaptureXS::G4NeutronCaptureXS: Initialise for Z < " 59 << maxZ + 1 << G4endl; 59 60 } 61 data.resize(maxZ+1, 0); 60 62 isInitialized = false; 61 63 } … … 63 65 G4NeutronCaptureXS::~G4NeutronCaptureXS() 64 66 { 65 for(G4int i=0; i< 92; ++i) {67 for(G4int i=0; i<=maxZ; ++i) { 66 68 delete data[i]; 67 69 } … … 76 78 77 79 G4bool 78 G4NeutronCaptureXS::Is ZAApplicable(const G4DynamicParticle*,79 G4double /*ZZ*/, G4double/*AA*/)80 G4NeutronCaptureXS::IsIsoApplicable(const G4DynamicParticle*, 81 G4int /*ZZ*/, G4int /*AA*/) 80 82 { 81 83 return false; … … 90 92 G4double xs = 0.0; 91 93 G4double ekin = aParticle->GetKineticEnergy(); 92 if(ekin > emax) return xs;94 if(ekin > emax) { return xs; } 93 95 94 96 G4int Z = G4int(elm->GetZ()); … … 99 101 Initialise(Z); 100 102 pv = data[Z]; 101 if(!pv) return xs;103 if(!pv) { return xs; } 102 104 } 103 105 … … 118 120 G4NeutronCaptureXS::BuildPhysicsTable(const G4ParticleDefinition& p) 119 121 { 120 G4cout << "G4NeutronCaptureXS::BuildPhysicsTable: " << G4endl; 121 G4cout << p.GetParticleName() << G4endl; 122 if(p.GetParticleName() != "neutron") { 123 return; 122 if(verboseLevel > 0){ 123 G4cout << "G4NeutronCaptureXS::BuildPhysicsTable for " 124 << p.GetParticleName() << G4endl; 124 125 } 125 if(isInitialized ) return;126 if(isInitialized || p.GetParticleName() != "neutron") { return; } 126 127 isInitialized = true; 127 128 … … 140 141 for(size_t i=0; i<numOfElm; ++i) { 141 142 G4int Z = G4int(((*theElmTable)[i])->GetZ()); 142 if(Z < 1) Z = 1;143 else if(Z > 92) Z = 92;143 if(Z < 1) { Z = 1; } 144 else if(Z > maxZ) { Z = maxZ; } 144 145 //G4cout << "Z= " << Z << G4endl; 145 146 // Initialisation … … 151 152 void 152 153 G4NeutronCaptureXS::DumpPhysicsTable(const G4ParticleDefinition&) 153 { 154 } 154 {} 155 155 156 156 157 void 157 158 G4NeutronCaptureXS::Initialise(G4int Z, const char* p) 158 159 { 159 if(data[Z]) return;160 if(data[Z]) { return; } 160 161 const char* path = p; 161 162 if(!p) { -
trunk/source/processes/hadronic/cross_sections/src/G4NeutronElasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronElasticXS.cc,v 1. 4 2010/06/03 11:50:21 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronElasticXS.cc,v 1.6 2010/10/15 22:35:58 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 #include "G4PhysicsVector.hh" 48 48 #include "G4GlauberGribovCrossSection.hh" 49 #include "G4HadronNucleonXsc.hh" 49 50 #include "G4NistManager.hh" 51 #include "G4Proton.hh" 50 52 51 53 #include <iostream> 52 54 #include <fstream> 53 55 #include <sstream> 56 54 57 using namespace std; 55 58 56 59 G4NeutronElasticXS::G4NeutronElasticXS() 57 { 58 verboseLevel = 0; 59 G4cout << "G4NeutronElasticXS::G4NeutronElasticXS: Initialise " << G4endl; 60 for(G4int i=0; i<93; ++i) { 61 data[i] = 0; 62 coeff[i]= 1.0; 63 } 60 : proton(G4Proton::Proton()), maxZ(92) 61 { 62 // verboseLevel = 0; 63 if(verboseLevel > 0){ 64 G4cout << "G4NeutronElasticXS::G4NeutronElasticXS Initialise for Z < " 65 << maxZ + 1 << G4endl; 66 } 67 data.resize(maxZ+1, 0); 68 coeff.resize(maxZ+1, 1.0); 64 69 ggXsection = new G4GlauberGribovCrossSection(); 70 fNucleon = new G4HadronNucleonXsc(); 65 71 isInitialized = false; 66 72 } … … 68 74 G4NeutronElasticXS::~G4NeutronElasticXS() 69 75 { 70 for(G4int i=0; i< 92; ++i) {76 for(G4int i=0; i<=maxZ; ++i) { 71 77 delete data[i]; 72 78 } … … 75 81 G4bool 76 82 G4NeutronElasticXS::IsApplicable(const G4DynamicParticle*, 77 83 const G4Element*) 78 84 { 79 85 return true; … … 81 87 82 88 G4bool 83 G4NeutronElasticXS::Is ZAApplicable(const G4DynamicParticle*,84 G4double /*ZZ*/, G4double/*AA*/)89 G4NeutronElasticXS::IsIsoApplicable(const G4DynamicParticle*, 90 G4int /*ZZ*/, G4int /*AA*/) 85 91 { 86 92 return false; 87 93 } 88 89 94 90 95 G4double 91 96 G4NeutronElasticXS::GetCrossSection(const G4DynamicParticle* aParticle, 92 const G4Element* elm, 93 G4double) 97 const G4Element* elm, G4double) 94 98 { 95 99 G4double xs = 0.0; … … 97 101 98 102 G4int Z = G4int(elm->GetZ()); 103 if(Z < 1 || Z > maxZ) { return xs; } 99 104 G4PhysicsVector* pv = data[Z]; 100 105 // G4cout << "G4NeutronElasticXS::GetCrossSection e= " << ekin << " Z= " << Z << G4endl; … … 104 109 Initialise(Z); 105 110 pv = data[Z]; 106 if(!pv) return xs;111 if(!pv) { return xs; } 107 112 } 108 113 109 114 G4double e1 = pv->Energy(0); 110 if(ekin <= e1) return (*pv)[0];115 if(ekin <= e1) { return (*pv)[0]; } 111 116 112 117 G4int n = pv->GetVectorLength() - 1; 113 118 G4double e2 = pv->Energy(n); 119 114 120 if(ekin <= e2) { 115 121 xs = pv->Value(ekin); 122 } else if(1 == Z) { 123 fNucleon->GetHadronNucleonXscPDG(aParticle, proton); 124 xs = coeff[1]*fNucleon->GetElasticHadronNucleonXsc(); 116 125 } else { 117 126 ggXsection->GetCrossSection(aParticle, elm); … … 129 138 G4NeutronElasticXS::BuildPhysicsTable(const G4ParticleDefinition& p) 130 139 { 131 G4cout << "G4NeutronElasticXS::BuildPhysicsTable: " << G4endl; 132 G4cout << p.GetParticleName() << G4endl; 133 if(p.GetParticleName() != "neutron") { 134 return; 135 } 136 if(isInitialized) return; 140 if(verboseLevel > 0){ 141 G4cout << "G4NeutronElasticXS::BuildPhysicsTable for " 142 << p.GetParticleName() << G4endl; 143 } 144 if(isInitialized || p.GetParticleName() != "neutron") { return; } 137 145 isInitialized = true; 138 139 146 140 147 // check environment variable … … 154 161 for(size_t i=0; i<numOfElm; ++i) { 155 162 G4int Z = G4int(((*theElmTable)[i])->GetZ()); 156 if(Z < 1) Z = 1;157 else if(Z > 92) Z = 92;163 if(Z < 1) { Z = 1; } 164 else if(Z > maxZ) { Z = maxZ; } 158 165 //G4cout << "Z= " << Z << G4endl; 159 166 // Initialisation … … 173 180 const char* p) 174 181 { 175 if(data[Z]) return;182 if(data[Z]) { return; } 176 183 const char* path = p; 177 184 if(!p) { 178 // check environment variable179 // Build the complete string identifying the file with the data set185 // check environment variable 186 // Build the complete string identifying the file with the data set 180 187 path = getenv("G4NEUTRONXSDATA"); 181 188 if (!path) { … … 215 222 G4double sig1 = (*data[Z])[n]; 216 223 dynParticle->SetKineticEnergy(emax); 217 ggXsection->GetCrossSection(dynParticle, Elem); 218 G4double sig2 = ggXsection->GetElasticGlauberGribovXsc(); 224 G4double sig2 = 0.0; 225 if(1 == Z) { 226 fNucleon->GetHadronNucleonXscPDG(dynParticle, proton); 227 sig2 = fNucleon->GetElasticHadronNucleonXsc(); 228 } else { 229 ggXsection->GetCrossSection(dynParticle, Elem); 230 sig2 = ggXsection->GetElasticGlauberGribovXsc(); 231 } 219 232 if(sig2 > 0.) { coeff[Z] = sig1/sig2; } 220 233 } -
trunk/source/processes/hadronic/cross_sections/src/G4NeutronInelasticCrossSection.cc
r1228 r1340 30 30 31 31 #include "G4NeutronInelasticCrossSection.hh" 32 #include "G4HadTmpUtil.hh" 32 33 #include "globals.hh" 33 34 … … 44 45 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 45 46 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 46 G4 doubleZZ;47 G4 doubleAA;47 G4int ZZ; 48 G4int AA; 48 49 49 50 for (G4int i = 0; i < nIso; i++) { 50 ZZ = G4double( (*isoVector)[i]->GetZ());51 AA = G4double( (*isoVector)[i]->GetN());51 ZZ = (*isoVector)[i]->GetZ(); 52 AA = (*isoVector)[i]->GetN(); 52 53 psig = GetCrossSection(KE, AA, ZZ); 53 54 cross_section += psig*abundVector[i]; … … 55 56 56 57 } else { 57 cross_section = GetCrossSection(KE, anEle->GetN(), anEle->GetZ()); 58 G4int ZZ = G4lrint(anEle->GetZ()); 59 G4int AA = G4lrint(anEle->GetN()); 60 cross_section = GetCrossSection(KE, AA, ZZ); 58 61 } 59 62 … … 63 66 64 67 G4double G4NeutronInelasticCrossSection:: 65 GetCrossSection(G4double anEnergy, G4 double atomicNumber, G4double nOfProtons)68 GetCrossSection(G4double anEnergy, G4int AA, G4int ZZ) 66 69 { 70 G4double atomicNumber = G4double(AA); 71 G4double nOfProtons = G4double(ZZ); 72 67 73 if (anEnergy > 19.9*GeV ) 68 74 { // constant cross section above ~20GeV. 69 return GetCrossSection(19.8*GeV, atomicNumber,nOfProtons);75 return GetCrossSection(19.8*GeV, AA, ZZ); 70 76 } 71 77 G4double kineticEnergy = std::log10(DBL_MIN/MeV); -
trunk/source/processes/hadronic/cross_sections/src/G4NeutronInelasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronInelasticXS.cc,v 1. 4 2010/06/03 11:50:21 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4NeutronInelasticXS.cc,v 1.6 2010/10/15 22:35:32 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 47 47 #include "G4PhysicsVector.hh" 48 48 #include "G4GlauberGribovCrossSection.hh" 49 #include "G4HadronNucleonXsc.hh" 49 50 #include "G4NistManager.hh" 51 #include "G4Proton.hh" 50 52 51 53 #include <iostream> 52 54 #include <fstream> 53 55 #include <sstream> 56 54 57 using namespace std; 55 58 56 59 G4NeutronInelasticXS::G4NeutronInelasticXS() 57 { 58 verboseLevel = 0; 59 G4cout << "G4NeutronInelasticXS::G4NeutronInelasticXS: Initialise " << G4endl; 60 for(G4int i=0; i<93; ++i) { 61 data[i] = 0; 62 coeff[i]= 1.0; 63 } 60 : proton(G4Proton::Proton()), maxZ(92) 61 { 62 // verboseLevel = 0; 63 if(verboseLevel > 0){ 64 G4cout << "G4NeutronInelasticXS::G4NeutronInelasticXS Initialise for Z < " 65 << maxZ + 1 << G4endl; 66 } 67 data.resize(maxZ+1, 0); 68 coeff.resize(maxZ+1, 1.0); 64 69 ggXsection = new G4GlauberGribovCrossSection(); 70 fNucleon = new G4HadronNucleonXsc(); 65 71 isInitialized = false; 66 72 } … … 68 74 G4NeutronInelasticXS::~G4NeutronInelasticXS() 69 75 { 70 for(G4int i=0; i< 92; ++i) {76 for(G4int i=0; i<=maxZ; ++i) { 71 77 delete data[i]; 72 78 } … … 81 87 82 88 G4bool 83 G4NeutronInelasticXS::Is ZAApplicable(const G4DynamicParticle*,84 G4double /*ZZ*/, G4double/*AA*/)89 G4NeutronInelasticXS::IsIsoApplicable(const G4DynamicParticle*, 90 G4int /*ZZ*/, G4int /*AA*/) 85 91 { 86 92 return false; … … 97 103 98 104 G4int Z = G4int(elm->GetZ()); 105 if(Z < 1 || Z > maxZ) { return xs; } 99 106 G4PhysicsVector* pv = data[Z]; 100 107 // G4cout << "G4NeutronInelasticXS::GetCrossSection e= " << ekin << " Z= " << Z << G4endl; … … 104 111 Initialise(Z); 105 112 pv = data[Z]; 106 if(!pv) return xs;113 if(!pv) { return xs; } 107 114 } 108 115 109 116 G4double e1 = pv->Energy(0); 110 if(ekin <= e1) return xs;117 if(ekin <= e1) { return xs; } 111 118 112 119 G4int n = pv->GetVectorLength() - 1; … … 114 121 if(ekin <= e2) { 115 122 xs = pv->Value(ekin); 123 } else if(1 == Z) { 124 fNucleon->GetHadronNucleonXscPDG(aParticle, proton); 125 xs = coeff[1]*fNucleon->GetInelasticHadronNucleonXsc(); 116 126 } else { 117 127 ggXsection->GetCrossSection(aParticle, elm); … … 119 129 } 120 130 121 if(verboseLevel > 0) {131 if(verboseLevel > 0) { 122 132 G4cout << "ekin= " << ekin << ", XSinel= " << xs << G4endl; 123 133 } … … 129 139 G4NeutronInelasticXS::BuildPhysicsTable(const G4ParticleDefinition& p) 130 140 { 131 G4cout << "G4NeutronInelasticXS::BuildPhysicsTable: " << G4endl; 132 G4cout << p.GetParticleName() << G4endl; 133 if(p.GetParticleName() != "neutron") { 134 return; 135 } 136 if(isInitialized) return; 141 if(verboseLevel > 0){ 142 G4cout << "G4NeutronInelasticXS::BuildPhysicsTable for " 143 << p.GetParticleName() << G4endl; 144 } 145 if(isInitialized || p.GetParticleName() != "neutron") { return; } 137 146 isInitialized = true; 138 139 147 140 148 // check environment variable … … 154 162 for(size_t i=0; i<numOfElm; ++i) { 155 163 G4int Z = G4int(((*theElmTable)[i])->GetZ()); 156 if(Z < 1) Z = 1;157 else if(Z > 92) Z = 92;164 if(Z < 1) { Z = 1; } 165 else if(Z > maxZ) { Z = maxZ; } 158 166 //G4cout << "Z= " << Z << G4endl; 159 167 // Initialisation … … 173 181 const char* p) 174 182 { 175 if(data[Z]) return;183 if(data[Z]) { return; } 176 184 const char* path = p; 177 185 if(!p) { … … 215 223 G4double sig1 = (*data[Z])[n]; 216 224 dynParticle->SetKineticEnergy(emax); 217 ggXsection->GetCrossSection(dynParticle, Elem); 218 G4double sig2 = ggXsection->GetInelasticGlauberGribovXsc(); 225 G4double sig2 = 0.0; 226 if(1 == Z) { 227 fNucleon->GetHadronNucleonXscPDG(dynParticle, proton); 228 sig2 = fNucleon->GetInelasticHadronNucleonXsc(); 229 } else { 230 ggXsection->GetCrossSection(dynParticle, Elem); 231 sig2 = ggXsection->GetInelasticGlauberGribovXsc(); 232 } 219 233 if(sig2 > 0.) { coeff[Z] = sig1/sig2; } 220 234 } -
trunk/source/processes/hadronic/cross_sections/src/G4NucleonNuclearCrossSection.cc
r1196 r1340 38 38 #include "G4Neutron.hh" 39 39 #include "G4Proton.hh" 40 #include "G4HadTmpUtil.hh" 41 40 42 41 43 // Group 1: He, Be, C for 44 energies … … 43 45 const G4double G4NucleonNuclearCrossSection::e1[44] = 44 46 { 45 0.014, 0.015, 0.017, .02, 0.022, 0.025, 0.027, 0.03, 0.035, .04, 0.045, 0.05, .06, 0.07, 46 .08, 0.09, .1, .12, .14, .15, .16, .18, .20, .25, .30, .35, .4 , 0.5, 0.6, 0.7, 0.8, 47 0.9, 1, 1.5, 2, 3, 5, 7, 10, 48 20, 50, 100, 500, 1000 47 0.014, 0.015, 0.017, 0.02, 0.022, 0.025, 0.027, 0.03, 0.035, 0.04, 48 0.045, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.12, 0.14, 0.15, 49 0.16, 0.18, 0.20, 0.25, 0.30, 0.35, 0.4, 0.5, 0.6, 0.7, 50 0.8, 0.9, 1.0, 1.5, 2.0, 3.0, 5.0, 7.0, 10.0, 20.0, 51 50.0, 100.0, 500.0, 1000.0 49 52 }; 50 53 … … 391 394 const G4double G4NucleonNuclearCrossSection::e6[46] = 392 395 { 393 0.014, 0.015, 0.017, 0.019, .02, 0.022, 0.025, 0.027, 0.03, 0.035, .04, 0.045, 0.05, 394 0.055, .06, 0.07, .08, 0.09, .1, .12, .14, .15, .16, .18, .20, .25, .30, .35, .4 , 395 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.5, 2, 3, 5, 7, 10, 20, 50, 100, 500, 1000 396 0.014, 0.015, 0.017, 0.019, 0.02, 0.022, 0.025, 0.027, 0.03, 0.035, 397 0.04, 0.045, 0.05, 0.055, 0.06, 0.07, 0.08, 0.09, 0.1, 0.12, 398 0.14, 0.15, 0.16, 0.18, 0.20, 0.25, 0.30, 0.35, 0.4 , 0.5, 399 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 3.0, 5.0, 7.0, 400 10.0, 20.0, 50.0, 100.0, 500.0, 1000.0 396 401 }; 397 402 … … 443 448 using namespace std; 444 449 445 /////////////////////////////////////////////////////////////////////////////// ///450 /////////////////////////////////////////////////////////////////////////////// 446 451 // 447 452 // … … 535 540 } 536 541 537 /////////////////////////////////////////////////////////////////////////////////// 538 // 542 /////////////////////////////////////////////////////////////////////////////// 539 543 // 540 544 … … 547 551 //////////////////////////////////////////////////////////////////////////// 548 552 // 549 //550 553 551 554 G4double G4NucleonNuclearCrossSection:: 552 GetCrossSection( const G4DynamicParticle* aParticle, 553 const G4Element* anElement, 554 G4double ) 555 556 { 557 return GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(), 0.); 555 GetCrossSection(const G4DynamicParticle* aParticle, 556 const G4Element* anElement, G4double) 557 558 { 559 G4int Z = G4lrint(anElement->GetZ()); 560 G4int A = G4lrint(anElement->GetN()); 561 return GetZandACrossSection(aParticle, Z, A, 0.); 558 562 } 559 563 560 564 //////////////////////////////////////////////////////////////////////////// 561 565 // 562 // 563 564 G4 bool G4NucleonNuclearCrossSection::IsApplicable(const G4DynamicParticle* aParticle,566 567 G4bool 568 G4NucleonNuclearCrossSection::IsApplicable(const G4DynamicParticle* aParticle, 565 569 const G4Element* anElement) 566 570 { 567 return IsZAApplicable(aParticle, anElement->GetZ(), anElement->GetN()); 571 G4int Z = G4lrint(anElement->GetZ()); 572 G4int A = G4lrint(anElement->GetN()); 573 return IsIsoApplicable(aParticle, Z, A); 568 574 } 569 575 570 576 //////////////////////////////////////////////////////////////////////////// 571 577 // 572 // 573 574 G4 bool G4NucleonNuclearCrossSection::IsZAApplicable(const G4DynamicParticle* aParticle,575 G4 double Z, G4double)578 579 G4bool 580 G4NucleonNuclearCrossSection::IsIsoApplicable(const G4DynamicParticle* aParticle, 581 G4int Z, G4int) 576 582 { 577 583 G4bool result = false; 578 584 if(aParticle->GetDefinition() == theNeutron ) result = true; 579 585 if(aParticle->GetDefinition() == theProton) result = true; 580 if(Z < 1.5)result = false;586 if(Z < 2) result = false; 581 587 if(aParticle->GetKineticEnergy() > 999.9*GeV) result = false; 582 588 return result; 583 589 } 584 590 591 585 592 //////////////////////////////////////////////////////////////////////////// 586 593 // 587 //588 594 589 595 G4double G4NucleonNuclearCrossSection:: 590 Get IsoZACrossSection(const G4DynamicParticle* aParticle,591 G4double zElement, G4double, G4double )596 GetZandACrossSection(const G4DynamicParticle* aParticle, 597 G4int zElement, G4int, G4double ) 592 598 { 593 599 G4double kineticEnergy = aParticle->GetKineticEnergy(); 594 600 595 601 G4double result = 0; 596 G4int Z = G4int(zElement + 0.5);602 G4int Z = zElement; 597 603 598 604 // G4cout<<"Z = "<<Z<<G4endl; … … 675 681 676 682 ///////////////////////////////////////////////////////////////////////////// 677 //678 683 // 679 684 -
trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc
r1337 r1340 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 29 29 // 30 30 // … … 40 40 41 41 #include "G4PhotoNuclearCrossSection.hh" 42 #include "G4HadTmpUtil.hh" 42 43 43 44 // Initialization of the statics … … 59 60 // Last value of the ShadowingPomeron (A-dependent) 60 61 61 std::vector<G4double*> G4PhotoNuclearCrossSection::GDR; // Vector of pointers to the GDRPhotonuclearCrossSection 62 std::vector<G4double*> G4PhotoNuclearCrossSection::HEN; // Vector of pointers to the HighEnPhotonuclearCrossSect 62 63 // Vector of pointers to the GDRPhotonuclearCrossSection 64 std::vector<G4double*> G4PhotoNuclearCrossSection::GDR; 65 66 // Vector of pointers to the HighEnPhotonuclearCrossSect 67 std::vector<G4double*> G4PhotoNuclearCrossSection::HEN; 68 63 69 64 70 G4PhotoNuclearCrossSection::G4PhotoNuclearCrossSection() 65 { 66 } 71 {} 72 67 73 68 74 G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection() … … 92 98 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 93 99 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 94 G4 doubleZZ;95 G4 doubleAA;100 G4int ZZ; 101 G4int AA; 96 102 97 103 for (G4int i = 0; i < nIso; i++) { 98 ZZ = G4double( (*isoVector)[i]->GetZ());99 AA = G4double( (*isoVector)[i]->GetN());104 ZZ = (*isoVector)[i]->GetZ(); 105 AA = (*isoVector)[i]->GetN(); 100 106 psig = GetIsoZACrossSection(aPart, ZZ, AA, temperature); 101 107 cross_section += psig*abundVector[i]; … … 103 109 104 110 } else { 105 cross_section = 106 GetIsoZACrossSection(aPart, anEle->GetZ(), anEle->GetN(), temperature); 111 G4int ZZ = G4lrint(anEle->GetZ()); 112 G4int AA = G4lrint(anEle->GetN()); 113 cross_section = GetZandACrossSection(aPart, ZZ, AA, temperature); 107 114 } 108 115 … … 112 119 113 120 G4double 114 G4PhotoNuclearCrossSection::Get IsoZACrossSection(const G4DynamicParticle* aPart,115 G4 double ZZ, G4doubleAA,121 G4PhotoNuclearCrossSection::GetZandACrossSection(const G4DynamicParticle* aPart, 122 G4int ZZ, G4int AA, 116 123 G4double /*temperature*/) 117 124 { … … 146 153 // 147 154 const G4double Energy = aPart->GetKineticEnergy()/MeV; 148 const G4int targetAtomicNumber = static_cast<int>(AA+.499); //@@ Nat mixture (?!)149 const G4int targZ = static_cast<int>(ZZ);155 const G4int targetAtomicNumber = AA; //@@ Nat mixture (?!) 156 const G4int targZ = ZZ; 150 157 const G4int targN = targetAtomicNumber-targZ; 151 158 #ifdef debug … … 1609 1616 1610 1617 static const G4double SH10[nH]={ 1611 3.918292 e+00,3.904931e+00,3.893792e+00,3.886847e+00,3.886858e+00,3.897612e+00,3.924175e+00,1612 3.973155 e+00,4.052892e+00,4.173448e+00,4.346251e+00,4.583168e+00,4.894929e+00,5.289011e+00,1613 5.767472 e+00,6.325587e+00,6.952077e+00,7.631192e+00,8.346046e+00,9.081993e+00,9.828955e+00,1614 1.058224e+01,1.134205e+01,1.211228e+01,1.289914e+01,1.370979e+01,1.455140e+01,1.543028e+01,1615 1.635126e+01,1.731704e+01,1.832759e+01,1.937949e+01,2.046524e+01,2.157253e+01,2.268371e+01,1618 3.918292, 3.904931, 3.893792, 3.886847, 3.886858, 3.897612, 3.924175, 1619 3.973155, 4.052892, 4.173448, 4.346251, 4.583168, 4.894929, 5.289011, 1620 5.767472, 6.325587, 6.952077, 7.631192, 8.346046, 9.081993, 9.828955, 1621 10.58224, 11.34205, 12.11228, 12.89914, 13.70979, 14.55140, 15.43028, 1622 16.35126, 17.31704, 18.32759, 19.37949, 20.46524, 21.57253, 22.68371, 1616 1623 2.377554e+01,2.481942e+01,2.578236e+01,2.662884e+01,2.732355e+01,2.783477e+01,2.813791e+01, 1617 1624 2.821866e+01,2.807489e+01,2.771701e+01,2.716665e+01,2.645395e+01,2.561414e+01,2.468397e+01, -
trunk/source/processes/hadronic/cross_sections/src/G4PiNuclearCrossSection.cc
r1228 r1340 75 75 const G4double G4PiNuclearCrossSection::e2[39] = { 76 76 .02, .04, .06, .08, .10, .11, .12, .13, .14, .15, .16, .17, .18, .20, .22, 77 .24, .26, .28, .30, .35, .40, .45, .50, .55, .575, .60, .70, .80, .90, 1, 77 .24, .26, .28, .30, .35, .40, .45, .50, .55, .575, .60, .70, .80, .90, 1, 78 78 2, 3, 5, 10, 20, 50, 100, 500, 100000}; 79 79 … … 138 138 139 139 const G4double G4PiNuclearCrossSection::na_m_t[31] = { 140 450, 545, 705, 910, 1020, 1075, 1087, 1080, 1042, 987, 943, 885, 790, 700, 650,141 6 10, 585, 575, 585, 595, 600, 610, 556, 524, 494, 458, 445, 429, 427, 427,142 427 };140 450, 545, 705, 910, 1020, 1075, 1087, 1080, 1042, 987, 943, 885, 790, 700, 141 650, 610, 585, 575, 585, 595, 600, 610, 556, 524, 494, 458, 445, 429, 142 427, 427, 427}; 143 143 144 144 const G4double G4PiNuclearCrossSection::na_m_in[31] = { … … 156 156 157 157 const G4double G4PiNuclearCrossSection::e3_1[31] = { 158 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.25, 0.30, 0.35, 0.40,159 0. 45, 0.50, 0.60, 0.70, 0.80, 0.90, 1, 2, 3, 5, 10, 20, 50, 100, 500,160 100000};158 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 159 0.22, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.60, 0.70, 0.80, 160 0.90, 1.0, 2.0, 3.0, 5.0, 10.0, 20.0, 50.0, 100.0, 500.0, 100000.0}; 161 161 162 162 const G4double G4PiNuclearCrossSection::al_m_t[31] = { 163 532, 637, 832, 1057, 1207, 1230, 1210, 1174, 1133, 1095, 1038, 970, 890, 807, 750,164 710, 675, 665, 670, 673, 678, 682, 618, 574, 546, 520, 507, 495, 488, 488,165 488};163 532, 637, 832, 1057, 1207, 1230, 1210, 1174, 1133, 1095, 164 1038, 970, 890, 807, 750, 710, 675, 665, 670, 673, 165 678, 682, 618, 574, 546, 520, 507, 495, 488, 488, 488}; 166 166 167 167 const G4double G4PiNuclearCrossSection::al_m_in[31] = { … … 171 171 172 172 const G4double G4PiNuclearCrossSection::al_p_t[21] = { 173 225, 350, 616, 945, 1122, 1175, 1157, 1128, 1088, 1045, 988, 935, 870, 787, 730,174 690, 660, 652,660, 668, 678};173 225, 350, 616, 945, 1122, 1175, 1157, 1128, 1088, 1045, 174 988, 935, 870, 787, 730, 690, 660, 652, 660, 668, 678}; 175 175 176 176 const G4double G4PiNuclearCrossSection::al_p_in[21] = { … … 179 179 180 180 const G4double G4PiNuclearCrossSection::ca_m_t[31] = { 181 800, 980, 1240, 1460, 1570, 1600, 1580, 1535, 1475, 1425, 1375, 1295, 1200, 1083, 1000,182 948, 915, 895, 900, 908, 915, 922, 856, 795, 740, 705, 682, 660, 660, 660,183 660};181 800, 980, 1240, 1460, 1570, 1600, 1580, 1535, 1475, 1425, 182 1375, 1295, 1200, 1083, 1000, 948, 915, 895, 900, 908, 183 915, 922, 856, 795, 740, 705, 682, 660, 660, 660, 660}; 184 184 185 185 const G4double G4PiNuclearCrossSection::ca_m_in[31] = { … … 222 222 const G4double G4PiNuclearCrossSection::cd_m_t[34] = {3060, 3125, 3170, 3220, 3255, 3280, 3290, 3260, 3270, 3200, 3120, 3080, 3090, 2920, 2810, 2640, 2362, 2230, 2115, 2050, 2020, 2025, 2040, 2070, 2100, 1900, 1795, 1740, 1675, 1645, 1625, 1620, 1620, 1620}; 223 223 const G4double G4PiNuclearCrossSection::cd_m_in[34]= {1025, 1275, 1440, 1625, 1740, 1800, 1880, 1920, 1980, 1920, 1850, 1810, 1720, 1650, 1560, 1450, 1330, 1290, 1245, 1210, 1200, 1200, 1205, 1205, 1230, 1130, 1085, 1060, 1000, 985, 975, 970, 970, 970}; 224 const G4double G4PiNuclearCrossSection::cd_p_t[28] = {455, 780, 1170, 1700, 2120, 2400, 2600, 2720, 2820, 2840, 2800, 2760, 2720, 2640, 2560, 2450, 2252, 2130, 2035, 1985, 1970, 1975, 2005, 2035, 2070, 1880, 1795, 1740}; 225 const G4double G4PiNuclearCrossSection::cd_p_in[28] = {310, 580, 880, 1060, 1270, 1400, 1530, 1610, 1660, 1680, 1640, 1600, 1560, 1500, 1430, 1330, 1280, 1230, 1200, 1180, 1170, 1175, 1180, 1180, 1210, 1120, 1085, 1060}; 224 225 const G4double G4PiNuclearCrossSection::cd_p_t[28] = { 226 455, 780, 1170, 1700, 2120, 2400, 2600, 2720, 2820, 2840, 227 2800, 2760, 2720, 2640, 2560, 2450, 2252, 2130, 2035, 1985, 228 1970, 1975, 2005, 2035, 2070, 1880, 1795, 1740}; 229 230 const G4double G4PiNuclearCrossSection::cd_p_in[28] = { 231 310, 580, 880, 1060, 1270, 1400, 1530, 1610, 1660, 1680, 232 1640, 1600, 1560, 1500, 1430, 1330, 1280, 1230, 1200, 1180, 233 1170, 1175, 1180, 1180, 1210, 1120, 1085, 1060}; 226 234 227 235 const G4double G4PiNuclearCrossSection::e6[35] = { 228 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.25, 229 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.70, 0.80, 0.90, 1, 2, 3, 5, 10, 230 20, 50, 100, 500, 100000}; 231 232 const G4double G4PiNuclearCrossSection::sn_m_t[35] = {3000, 3180, 3250, 3300, 3300, 3410, 3470, 3450, 3410, 3350, 3280, 3200, 3120, 3050, 2900, 2630, 2500, 2325, 2190, 2100, 2060, 2055, 2055, 2055, 2067, 2085, 2000, 1900, 1835, 1770, 1720, 1700, 1695, 1695, 1695}; 233 const G4double G4PiNuclearCrossSection::sn_m_in[35] = {1050, 1350, 1520, 1650, 1800, 1980, 2070, 2120, 2090, 2050, 1980, 1920, 1830, 1770, 1670, 1500, 1435, 1350, 1300, 1230, 1220, 1235, 1235, 1235, 1237, 1240, 1160, 1120, 1090, 1065, 1040, 1020, 1015, 1015, 1015}; 236 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.14, 237 0.16, 0.18, 0.20, 0.22, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 238 0.55, 0.60, 0.70, 0.80, 0.90, 1.0, 2.0, 3.0, 5.0, 10.0, 239 20.0, 50.0, 100.0, 500.0, 100000.0}; 240 241 const G4double G4PiNuclearCrossSection::sn_m_t[35] = { 242 3000, 3180, 3250, 3300, 3300, 3410, 3470, 3450, 3410, 3350, 243 3280, 3200, 3120, 3050, 2900, 2630, 2500, 2325, 2190, 2100, 244 2060, 2055, 2055, 2055, 2067, 2085, 2000, 1900, 1835, 1770, 245 1720, 1700, 1695, 1695, 1695}; 246 247 const G4double G4PiNuclearCrossSection::sn_m_in[35] = { 248 1050, 1350, 1520, 1650, 1800, 1980, 2070, 2120, 2090, 2050, 249 1980, 1920, 1830, 1770, 1670, 1500, 1435, 1350, 1300, 1230, 250 1220, 1235, 1235, 1235, 1237, 1240, 1160, 1120, 1090, 1065, 251 1040, 1020, 1015, 1015, 1015}; 252 234 253 const G4double G4PiNuclearCrossSection::sn_p_t[29] = { 465, 800, 1200, 1760, 2170, 2480, 2730, 2885, 2970, 2980, 2970, 2890, 2840, 2790, 2620, 2450, 2335, 2205, 2080, 2020, 2010, 1990, 1990, 2015, 2030, 2045, 1980, 1890, 1835}; 235 254 const G4double G4PiNuclearCrossSection::sn_p_in[29] = { 315, 590, 880, 1220, 1460, 1580, 1700, 1770, 1810, 1810, 1800, 1730, 1680, 1630, 1530, 1400, 1335, 1270, 1210, 1180, 1190, 1190, 1190, 1205, 1210, 1210, 1150, 1115, 1090}; … … 346 365 347 366 G4double G4PiNuclearCrossSection:: 348 Get IsoZACrossSection(const G4DynamicParticle* particle, G4doubleZZ,349 G4 double/*AA*/, G4double /*temperature*/)367 GetZandACrossSection(const G4DynamicParticle* particle, G4int ZZ, 368 G4int /*AA*/, G4double /*temperature*/) 350 369 { 351 370 // precondition 352 // G4ping debug("debug_PiNuclearCrossSection");353 371 using namespace std; 354 372 G4bool ok = false; … … 367 385 368 386 G4double result = 0; 369 G4int Z =G4lrint(ZZ);387 G4int Z = ZZ; 370 388 // debug.push_back(Z); 371 389 size_t it = 0; 372 390 373 while(it <theZ.size() && Z>theZ[it]) it++;391 while(it < theZ.size() && Z > theZ[it]) it++; 374 392 375 393 // debug.push_back(theZ[it]); … … 475 493 } 476 494 477 G4double G4PiNuclearCrossSection:: 478 Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2) 479 { 495 496 G4double G4PiNuclearCrossSection:: 497 Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2) 498 { 480 499 // Nucleon numbers obtained from G4NistManager G4 8.0 481 static const G4double A[92]= 482 {1.0001, 4.0000, 6.9241, 9.0000, 10.801, 12.011, 14.004, 16.004, 19.000, 20.188, 483 23.000, 24.320, 27.000, 28.109, 31.000, 32.094, 35.484, 39.985, 39.135, 40.116, 484 45.000, 47.918, 50.998, 52.055, 55.000, 55.910, 59.000, 58.760, 63.617, 65.468, 485 69.798, 72.691, 75.000, 79.042, 79.986, 83.887, 85.557, 87.710, 89.000, 91.318, 486 93.000, 96.025, 98.000, 101.16, 103.00, 106.51, 107.96, 112.51, 114.91, 118.81, 487 121.86, 127.70, 127.00, 131.39, 133.00, 137.42, 139.00, 140.21, 141.00, 144.32, 488 145.00, 150.45, 152.04, 157.33, 159.00, 162.57, 165.00, 167.32, 169.00, 173.10, 489 175.03, 178.54, 181.00, 183.89, 186.25, 190.27, 192.25, 195.11, 197.00, 200.63, 490 204.41, 207.24, 209.00, 209.00, 210.00, 222.00, 223.00, 226.00, 227.00, 232.00, 491 231.00, 237.98}; 500 static const G4double A[92] = { 501 1.0001, 4.0000, 6.9241, 9.000, 10.801, 12.011, 14.004, 16.004, 19.000, 502 20.188, 23.000, 24.320, 27.000, 28.109, 31.000, 32.094, 35.484, 39.985, 503 39.135, 40.116, 45.000, 47.918, 50.998, 52.055, 55.000, 55.910, 59.000, 504 58.760, 63.617, 65.468, 69.798, 72.691, 75.000, 79.042, 79.986, 83.887, 505 85.557, 87.710, 89.000, 91.318, 93.000, 96.025, 98.000, 101.16, 103.00, 506 106.51, 107.96, 112.51, 114.91, 118.81, 121.86, 127.70, 127.00, 131.39, 507 133.00, 137.42, 139.00, 140.21, 141.00, 144.32, 145.00, 150.45, 152.04, 508 157.33, 159.00, 162.57, 165.00, 167.32, 169.00, 173.10, 175.03, 178.54, 509 181.00, 183.89, 186.25, 190.27, 192.25, 195.11, 197.00, 200.63, 204.41, 510 207.24, 209.00, 209.00, 210.00, 222.00, 223.00, 226.00, 227.00, 232.00, 511 231.00, 237.98}; 492 512 493 513 static G4bool NeedInit=true; … … 502 522 } 503 523 504 // 524 // for tabulated data, cross section scales with A^.75 505 525 G4double r1 = x1 / A75[Z1-1] * A75[Z-1]; 506 526 G4double r2 = x2 / A75[Z2-1] * A75[Z-1]; 507 527 G4double result=0.5*(r1+r2); 508 // 509 // 528 // G4cout << "x1/2, z1/2 z" <<x1<<" "<<x2<<" "<<Z1<<" "<<Z2<<" "<<Z<<G4endl; 529 // G4cout << "res1/2 " << r1 <<" " << r2 <<" " << result<< G4endl; 510 530 return result; 511 531 } -
trunk/source/processes/hadronic/cross_sections/src/G4ProtonInelasticCrossSection.cc
r1228 r1340 31 31 32 32 #include "G4ProtonInelasticCrossSection.hh" 33 #include "G4HadTmpUtil.hh" 33 34 #include "globals.hh" 34 35 … … 46 47 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 47 48 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 48 G4 doubleZZ;49 G4 doubleAA;49 G4int ZZ; 50 G4int AA; 50 51 51 52 for (G4int i = 0; i < nIso; i++) { 52 ZZ = G4double( (*isoVector)[i]->GetZ());53 AA = G4double( (*isoVector)[i]->GetN());53 ZZ = (*isoVector)[i]->GetZ(); 54 AA = (*isoVector)[i]->GetN(); 54 55 psig = GetCrossSection(KE, AA, ZZ); 55 56 cross_section += psig*abundVector[i]; … … 57 58 58 59 } else { 59 cross_section = GetCrossSection(KE, anEle->GetN(), anEle->GetZ()); 60 G4int ZZ = G4lrint(anEle->GetZ()); 61 G4int AA = G4lrint(anEle->GetN()); 62 cross_section = GetCrossSection(KE, AA, ZZ); 60 63 } 61 64 … … 63 66 } 64 67 65 68 66 69 G4double G4ProtonInelasticCrossSection:: 67 GetCrossSection(G4double kineticEnergy, G4 double atomicNumber, G4doublenOfProtons)70 GetCrossSection(G4double kineticEnergy, G4int atomicNumber, G4int nOfProtons) 68 71 { 69 72 if (kineticEnergy > 19.9*GeV ) … … 71 74 return GetCrossSection(19.8*GeV,atomicNumber,nOfProtons); 72 75 } 73 G4 doublenOfNeutrons = atomicNumber-nOfProtons;76 G4int nOfNeutrons = atomicNumber-nOfProtons; 74 77 kineticEnergy /=GeV; 75 78 G4double a = atomicNumber; … … 80 83 G4double fac1=b0*(1-std::pow(a,-0.3333)); 81 84 G4double fac2=1.; 82 if(nOfNeutrons >1.5) fac2=std::log((nOfNeutrons));85 if(nOfNeutrons > 1) fac2=std::log((G4double(nOfNeutrons))); 83 86 G4double crossSection = 1E31*fac*fac2*(1+std::pow(a,0.3333)-fac1); 84 87 -
trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc
r1196 r1340 43 43 44 44 G4double G4TripathiCrossSection:: 45 Get IsoZACrossSection(const G4DynamicParticle* aPart, G4double ZZ, G4doubleAA,46 G4double /*temperature*/)45 GetZandACrossSection(const G4DynamicParticle* aPart, G4int ZZ, G4int AA, 46 G4double /*temperature*/) 47 47 { 48 48 G4double result = 0.; 49 50 49 const G4double targetAtomicNumber = AA; 51 50 const G4double nTargetProtons = ZZ; … … 157 156 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 158 157 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 159 G4 doubleZZ;160 G4 doubleAA;158 G4int ZZ; 159 G4int AA; 161 160 162 161 for (G4int i = 0; i < nIso; i++) { 163 ZZ = G4double( (*isoVector)[i]->GetZ());164 AA = G4double( (*isoVector)[i]->GetN());165 sig = Get IsoZACrossSection(aPart, ZZ, AA, temperature);162 ZZ = (*isoVector)[i]->GetZ(); 163 AA = (*isoVector)[i]->GetN(); 164 sig = GetZandACrossSection(aPart, ZZ, AA, temperature); 166 165 xsection += sig*abundVector[i]; 167 166 } 168 167 169 168 } else { 170 xsection =171 GetIsoZACrossSection(aPart, anEle->GetZ(), anEle->GetN(),172 169 G4int ZZ = G4lrint(anEle->GetZ()); 170 G4int AA = G4lrint(anEle->GetN()); 171 xsection = GetIsoZACrossSection(aPart, ZZ, AA, temperature); 173 172 } 174 173 -
trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc
r1228 r1340 63 63 #include "G4ParticleTable.hh" 64 64 #include "G4IonTable.hh" 65 #include "G4HadTmpUtil.hh" 66 65 67 66 68 /////////////////////////////////////////////////////////////////////////////// … … 101 103 (const G4DynamicParticle* theProjectile, const G4Element* theTarget) 102 104 { 103 return IsZAApplicable(theProjectile, theTarget->GetZ(), theTarget->GetN()); 104 } 105 106 107 G4bool G4TripathiLightCrossSection::IsZAApplicable 108 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA) 105 G4int Z = G4lrint(theTarget->GetZ()); 106 G4int A = G4lrint(theTarget->GetN()); 107 return IsIsoApplicable(theProjectile, Z, A); 108 } 109 110 111 G4bool 112 G4TripathiLightCrossSection::IsIsoApplicable(const G4DynamicParticle* theProjectile, 113 G4int ZZ, G4int AA) 109 114 { 110 115 G4bool result = false; … … 122 127 return result; 123 128 } 124 /////////////////////////////////////////////////////////////////////////////// 125 // 126 G4double G4TripathiLightCrossSection::GetIsoZACrossSection 127 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA, 128 G4double /*theTemperature*/) 129 130 /////////////////////////////////////////////////////////////////////////////// 131 // 132 G4double 133 G4TripathiLightCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile, 134 G4int ZZ, G4int AA, G4double /*theTemperature*/) 129 135 { 130 136 // … … 301 307 SetLowEnergyCheck(true); 302 308 G4double resultp = 303 Get IsoZACrossSection(&slowerProjectile, ZZ, AA, 0.0);309 GetZandACrossSection(&slowerProjectile, ZZ, AA, 0.0); 304 310 SetLowEnergyCheck(savelowenergy); 305 311 if (resultp >result) result = 0.0; … … 322 328 G4IsotopeVector* isoVector = theTarget->GetIsotopeVector(); 323 329 G4double* abundVector = theTarget->GetRelativeAbundanceVector(); 324 G4 doubleZZ;325 G4 doubleAA;330 G4int ZZ; 331 G4int AA; 326 332 327 333 for (G4int i = 0; i < nIso; i++) { 328 ZZ = G4double( (*isoVector)[i]->GetZ());329 AA = G4double( (*isoVector)[i]->GetN());330 sig = Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);334 ZZ = (*isoVector)[i]->GetZ(); 335 AA = (*isoVector)[i]->GetN(); 336 sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 331 337 xsection += sig*abundVector[i]; 332 338 } 333 339 334 340 } else { 335 xsection =336 GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),337 341 G4int ZZ = G4lrint(theTarget->GetZ()); 342 G4int AA = G4lrint(theTarget->GetN()); 343 xsection = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature); 338 344 } 339 345 … … 348 354 lowEnergyCheck = aLowEnergyCheck; 349 355 } 350 /////////////////////////////////////////////////////////////////////////////// 351 // 356 -
trunk/source/processes/hadronic/cross_sections/src/G4UElasticCrossSection.cc
r962 r1340 80 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 81 82 G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp, 83 G4double Z, G4double A) 82 // G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp, 83 // G4double Z, G4double A) 84 G4bool G4UElasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp, 85 G4int Z, G4int A) 84 86 { 85 87 G4bool res = false; … … 94 96 } 95 97 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 97 98 G4 double G4UElasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,99 const G4Element* elm, 100 G4double temp) 101 { 102 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);103 } 104 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 106 107 G4double G4UElasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp, 108 G4double Z, 109 G4double A,110 98 99 G4double 100 G4UElasticCrossSection::GetCrossSection(const G4DynamicParticle* dp, 101 const G4Element* elm, G4double temp) 102 { 103 G4int Z = G4lrint(elm->GetZ()); 104 G4int N = G4lrint(elm->GetN()); 105 106 return GetZandACrossSection(dp, Z, N, temp); 107 } 108 109 110 G4double 111 G4UElasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 112 G4int Z, G4int A, G4double) 111 113 { 112 114 G4double cross = 0.0; 113 115 G4double ekin = dp->GetKineticEnergy(); 114 G4int iz = G4int(Z);115 if( iz > 92) iz= 92;116 // G4int iz = G4int(Z); 117 if(Z > 92) Z = 92; 116 118 117 119 // proton and neutron 118 120 if(fNucleon) { 119 if( iz== 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);121 if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A); 120 122 else if(ekin > thEnergy) { 121 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);123 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 122 124 } else { 123 125 cross = fNucleon->GetElasticCrossSection(dp, Z, A); … … 126 128 // pions 127 129 } else if(fUPi) { 128 if( iz== 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);130 if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A); 129 131 else if(ekin > thEnergy) { 130 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);132 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 131 133 } else { 132 134 cross = fUPi->GetElasticCrossSection(dp, Z, A); … … 136 138 } else { 137 139 if(hasGlauber && ekin > thEnergy) { 138 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);140 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 139 141 } else if(fGheisha->IsApplicable(dp, Z, A)) { 140 142 cross = fGheisha->GetElasticCrossSection(dp, Z, A); … … 182 184 183 185 G4NistManager* nist = G4NistManager::Instance(); 184 G4 double A = nist->GetAtomicMassAmu(2);186 G4int A = G4lrint(nist->GetAtomicMassAmu(2)); 185 187 186 188 if(fGlauber->IsZAApplicable(&dp, 2.0, A)) { … … 193 195 194 196 G4double Z = G4double(iz); 195 A = nist->GetAtomicMassAmu(iz);196 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);197 A = G4lrint(nist->GetAtomicMassAmu(iz)); 198 csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A); 197 199 // proton and neutron 198 200 if(fNucleon) { 199 csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);201 csdn = fNucleon->GetElasticCrossSection(&dp, iz, A); 200 202 201 203 // pions 202 204 } else if(fUPi) { 203 csdn = fUPi->GetElasticCrossSection(&dp, Z, A);205 csdn = fUPi->GetElasticCrossSection(&dp, iz, A); 204 206 205 207 // other 206 } else if(fGheisha->IsApplicable(&dp, Z, A)) {207 csdn = fGheisha->GetElasticCrossSection(&dp, Z, A);208 } else if(fGheisha->IsApplicable(&dp, iz, A)) { 209 csdn = fGheisha->GetElasticCrossSection(&dp, iz, A); 208 210 209 211 } else { … … 217 219 } 218 220 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 220 221 221 -
trunk/source/processes/hadronic/cross_sections/src/G4UInelasticCrossSection.cc
r962 r1340 78 78 } 79 79 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 82 G4 bool G4UInelasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp,83 G4double Z, G4doubleA)80 81 G4bool 82 G4UInelasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp, 83 G4int Z, G4int A) 84 84 { 85 85 G4bool res = false; … … 94 94 } 95 95 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 97 98 G4 double G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,99 100 101 { 102 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);103 } 104 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 106 107 G4double G4UInelasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp, 108 G4double Z, 109 G4double A,110 96 97 G4double 98 G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp, 99 const G4Element* elm, 100 G4double temp) 101 { 102 G4int Z = G4lrint(elm->GetZ()); 103 G4int N = G4lrint(elm->GetN()); 104 return GetIsoZACrossSection(dp, Z, N, temp); 105 } 106 107 108 G4double 109 G4UInelasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 110 G4int Z, G4int A, G4double) 111 111 { 112 112 G4double cross = 0.0; 113 113 G4double ekin = dp->GetKineticEnergy(); 114 G4int iz = G4int(Z);115 if( iz > 92) iz= 92;114 // G4int iz = G4int(Z); 115 if(Z > 92) Z = 92; 116 116 117 117 // proton and neutron 118 118 if(fNucleon) { 119 if( iz== 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);119 if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A); 120 120 else if(ekin > thEnergy) { 121 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);121 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 122 122 } else { 123 123 cross = fNucleon->GetIsoZACrossSection(dp, Z, A); … … 126 126 // pions 127 127 } else if(fUPi) { 128 if( iz== 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);128 if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A); 129 129 else if(ekin > thEnergy) { 130 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);130 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 131 131 } else { 132 132 cross = fUPi->GetInelasticCrossSection(dp, Z, A); … … 136 136 } else { 137 137 if(hasGlauber && ekin > thEnergy) { 138 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);138 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 139 139 } else if(fGheisha->IsApplicable(dp, Z, A)){ 140 140 cross = fGheisha->GetInelasticCrossSection(dp, Z, A); … … 153 153 } 154 154 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......156 155 157 156 void G4UInelasticCrossSection::BuildPhysicsTable(const G4ParticleDefinition& p) … … 173 172 174 173 175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......176 177 174 void G4UInelasticCrossSection::Initialise(const G4ParticleDefinition* p) 178 175 { … … 182 179 183 180 G4NistManager* nist = G4NistManager::Instance(); 184 G4 double A = nist->GetAtomicMassAmu(2);185 186 if(fGlauber->Is ZAApplicable(&dp, 2.0, A)) {181 G4int A = G4lrint(nist->GetAtomicMassAmu(2)); 182 183 if(fGlauber->IsIsoApplicable(&dp, 2, A)) { 187 184 hasGlauber = true; 188 185 … … 193 190 194 191 G4double Z = G4double(iz); 195 A = nist->GetAtomicMassAmu(iz);196 csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);192 A = G4lrint(nist->GetAtomicMassAmu(iz)); 193 csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A); 197 194 198 195 // proton and neutron 199 196 if(fNucleon) { 200 csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A);197 csdn = fNucleon->GetIsoZACrossSection(&dp, iz, A); 201 198 202 199 // pions 203 200 } else if(fUPi) { 204 csdn = fUPi->GetInelasticCrossSection(&dp, Z, A);201 csdn = fUPi->GetInelasticCrossSection(&dp, iz, A); 205 202 206 203 // other 207 } else if(fGheisha->IsApplicable(&dp, Z, A)) {208 csdn = fGheisha->GetInelasticCrossSection(&dp, Z, A);204 } else if(fGheisha->IsApplicable(&dp, iz, A)) { 205 csdn = fGheisha->GetInelasticCrossSection(&dp, iz, A); 209 206 210 207 } else { … … 218 215 } 219 216 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......221 222 -
trunk/source/processes/hadronic/cross_sections/src/G4UPiNuclearCrossSection.cc
r1337 r1340 60 60 } 61 61 62 G4double G4UPiNuclearCrossSection::GetElasticCrossSection( 63 const G4DynamicParticle* dp, G4double Z, G4double A) 62 G4double 63 G4UPiNuclearCrossSection::GetElasticCrossSection(const G4DynamicParticle* dp, 64 G4int Z, G4int A) 64 65 { 65 66 G4double cross = 0.0; … … 73 74 } 74 75 75 G4double G4UPiNuclearCrossSection::GetInelasticCrossSection( 76 const G4DynamicParticle* dp, G4double Z, G4double A) 76 G4double 77 G4UPiNuclearCrossSection::GetInelasticCrossSection(const G4DynamicParticle* dp, 78 G4int Z, G4int A) 77 79 { 78 80 G4double cross = 0.0; … … 82 84 const G4ParticleDefinition* part = dp->GetDefinition(); 83 85 84 // Coulomb bar ier86 // Coulomb barrier 85 87 if(part == piPlus) { 86 88 if(ekin > elowest) { … … 101 103 102 104 G4double G4UPiNuclearCrossSection::Interpolate( 103 G4 double Z, G4doubleA, G4double ekin, G4PhysicsTable* table)105 G4int Z, G4int A, G4double ekin, G4PhysicsTable* table) 104 106 { 105 107 G4double res = 0.0; 106 108 G4int idx; 107 G4int iz = G4int(Z + 0.5);109 G4int iz = Z; 108 110 if(iz > 92) iz = 92; 109 111 for(idx=0; idx<NZ; idx++) {if(theZ[idx] >= iz) break;} … … 123 125 G4int iz1 = theZ[idx-1]; 124 126 G4double x1 = (((*table)[idx-1])->Value(ekin))*APower[iz]/APower[iz1]; 125 G4double w1 = A- theA[idx-1];126 G4double w2 = theA[idx] - A;127 G4double w1 = G4double(A) - theA[idx-1]; 128 G4double w2 = theA[idx] - G4double(A); 127 129 res = (w1*x2 + w2*x1)/(w1 + w2); 128 130 } -
trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VCrossSectionDataSet.cc,v 1. 8 2009/01/24 11:54:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4VCrossSectionDataSet.cc,v 1.9 2010/07/05 13:39:11 vnivanch Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 42 42 #include "G4VCrossSectionDataSet.hh" 43 43 #include "G4CrossSectionDataSetRegistry.hh" 44 #include "G4Pow.hh" 44 45 45 G4VCrossSectionDataSet::G4VCrossSectionDataSet( ) :46 verboseLevel(0) 46 G4VCrossSectionDataSet::G4VCrossSectionDataSet(const G4String& nam) : 47 verboseLevel(0),minKinEnergy(0.0),maxKinEnergy(DBL_MAX),name(nam) 47 48 { 48 49 G4CrossSectionDataSetRegistry::Instance()->Register(this); … … 54 55 } 55 56 56 // Override this method to test for particle and isotope applicability 57 57 // Override thess methods to test for particle and isotope applicability 58 58 G4bool 59 59 G4VCrossSectionDataSet::IsZAApplicable(const G4DynamicParticle*, … … 63 63 } 64 64 65 G4bool 66 G4VCrossSectionDataSet::IsIsoApplicable(const G4DynamicParticle*, 67 G4int /*Z*/, G4int /*A*/) 68 { 69 return true; 70 } 65 71 66 72 G4double … … 81 87 G4double /*aTemperature*/) 82 88 { 83 return 62* std::pow(AA, 2./3.)*millibarn;89 return 62*G4Pow::GetInstance()->A23(AA)*millibarn; 84 90 } 91 92 G4double 93 G4VCrossSectionDataSet::GetZandACrossSection(const G4DynamicParticle*, 94 G4int /*Z*/, G4int N, 95 G4double /*aTemperature*/) 96 { 97 return 62*G4Pow::GetInstance()->Z23(N)*millibarn; 98 }
Note: See TracChangeset
for help on using the changeset viewer.