Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/binary_cascade/src/G4RKFieldIntegrator.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/binary_cascade/src/G4RKFieldIntegrator.cc (Version 11.3.0) and /processes/hadronic/models/binary_cascade/src/G4RKFieldIntegrator.cc (Version 9.0.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4RKFieldIntegrator                             26 // G4RKFieldIntegrator
 27 #include "G4RKFieldIntegrator.hh"                  27 #include "G4RKFieldIntegrator.hh"
 28 #include "G4PhysicalConstants.hh"              << 
 29 #include "G4SystemOfUnits.hh"                  << 
 30 #include "G4NucleiProperties.hh"                   28 #include "G4NucleiProperties.hh"
 31 #include "G4FermiMomentum.hh"                      29 #include "G4FermiMomentum.hh"
 32 #include "G4NuclearFermiDensity.hh"                30 #include "G4NuclearFermiDensity.hh"
 33 #include "G4NuclearShellModelDensity.hh"           31 #include "G4NuclearShellModelDensity.hh"
 34 #include "G4Nucleon.hh"                            32 #include "G4Nucleon.hh"
 35 #include "G4Exp.hh"                            << 
 36 #include "G4Log.hh"                            << 
 37 #include "G4Pow.hh"                            << 
 38                                                    33 
 39 // Class G4RKFieldIntegrator                   <<  34 // Class G4RKFieldIntegrator 
 40 //********************************************     35 //*************************************************************************************************************************************
 41                                                    36 
 42 // only theActive are propagated, nothing else     37 // only theActive are propagated, nothing else
 43 // only theSpectators define the field, nothin     38 // only theSpectators define the field, nothing else
 44                                                    39 
 45 void G4RKFieldIntegrator::Transport(G4KineticT     40 void G4RKFieldIntegrator::Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep)
 46 {                                                  41 {
 47    (void)theActive;                                42    (void)theActive;
 48    (void)theSpectators;                            43    (void)theSpectators;
 49    (void)theTimeStep;                              44    (void)theTimeStep;
 50 }                                                  45 }
 51                                                    46 
 52                                                    47 
 53 G4double G4RKFieldIntegrator::CalculateTotalEn     48 G4double G4RKFieldIntegrator::CalculateTotalEnergy(const G4KineticTrackVector& Barions)
 54 {                                                  49 {
 55    const G4double Alpha  =  0.25/fermi/fermi;      50    const G4double Alpha  =  0.25/fermi/fermi;
 56    const G4double t1     = -7264.04*fermi*ferm     51    const G4double t1     = -7264.04*fermi*fermi*fermi;
 57    const G4double tGamma =  87.65*fermi*fermi*     52    const G4double tGamma =  87.65*fermi*fermi*fermi*fermi*fermi*fermi;
 58 //   const G4double Gamma  =  1.676;               53 //   const G4double Gamma  =  1.676;
 59    const G4double Vo     = -0.498*fermi;           54    const G4double Vo     = -0.498*fermi;
 60    const G4double GammaY =  1.4*fermi;             55    const G4double GammaY =  1.4*fermi;
 61                                                    56 
 62    G4double Etot = 0;                              57    G4double Etot = 0;
 63    G4int nBarion = (G4int)Barions.size();      <<  58    G4int nBarion = Barions.size();
 64    for(G4int c1 = 0; c1 < nBarion; ++c1)       <<  59    for(G4int c1 = 0; c1 < nBarion; c1++)
 65       {                                            60       {
 66       G4KineticTrack* p1 = Barions.operator[](     61       G4KineticTrack* p1 = Barions.operator[](c1);
 67    // Ekin                                         62    // Ekin
 68       Etot += p1->Get4Momentum().e();              63       Etot += p1->Get4Momentum().e();
 69       for(G4int c2 = c1 + 1; c2 < nBarion; ++c <<  64       for(G4int c2 = c1 + 1; c2 < nBarion; c2++)
 70          {                                         65          {
 71          G4KineticTrack* p2 = Barions.operator     66          G4KineticTrack* p2 = Barions.operator[](c2);
 72          G4double r12 = (p1->GetPosition() - p <<  67          G4ThreeVector   rv = p1->GetPosition() - p2->GetPosition();
                                                   >>  68          G4double r12 = std::sqrt(rv*rv)*fermi;
 73                                                    69 
 74          //  Esk2                                  70          //  Esk2
 75          Etot += t1*G4Pow::GetInstance()->A23( <<  71          Etot += t1*std::pow(Alpha/pi, 3/2)*std::exp(-Alpha*r12*r12); 
 76                                                    72 
 77          // Eyuk                                   73          // Eyuk
 78          Etot += Vo*0.5/r12*G4Exp(1/(4*Alpha*G <<  74          Etot += Vo*0.5/r12*std::exp(1/(4*Alpha*GammaY*GammaY))*
 79             (G4Exp(-r12/GammaY)*(1 - Erf(0.5/G <<  75             (std::exp(-r12/GammaY)*(1 - Erf(0.5/GammaY/std::sqrt(Alpha) - std::sqrt(Alpha)*r12)) - 
 80              G4Exp( r12/GammaY)*(1 - Erf(0.5/G <<  76              std::exp( r12/GammaY)*(1 - Erf(0.5/GammaY/std::sqrt(Alpha) + std::sqrt(Alpha)*r12)));
 81                                                    77 
 82          // Ecoul                              <<  78          // Ecoul        
 83          Etot += 1.44*p1->GetDefinition()->Get     79          Etot += 1.44*p1->GetDefinition()->GetPDGCharge()*p2->GetDefinition()->GetPDGCharge()/r12*Erf(std::sqrt(Alpha)*r12);
 84                                                    80 
 85          // Epaul                                  81          // Epaul
 86          Etot = 0;                                 82          Etot = 0;
 87                                                    83 
 88          for(G4int c3 = c2 + 1; c3 < nBarion;      84          for(G4int c3 = c2 + 1; c3 < nBarion; c3++)
 89             {                                      85             {
 90             G4KineticTrack* p3 = Barions.opera     86             G4KineticTrack* p3 = Barions.operator[](c3);
 91             G4double r13 = (p1->GetPosition()  <<  87             G4ThreeVector rv = p1->GetPosition() - p3->GetPosition();
                                                   >>  88             G4double r13 = std::sqrt(rv*rv)*fermi;
 92                                                    89 
 93             // Esk3                                90             // Esk3
 94             Etot  = tGamma*G4Pow::GetInstance( <<  91             Etot  = tGamma*std::pow(4*Alpha*Alpha/3/pi/pi, 1.5)*std::exp(-Alpha*(r12*r12 + r13*r13));
 95             }                                      92             }
 96          }                                         93          }
 97       }                                        <<  94       }      
 98    return Etot;                                    95    return Etot;
 99 }                                              <<  96 }  
100                                                    97 
101 //******************************************** <<  98 //************************************************************************************************       
102 // originated from the Numerical recipes error     99 // originated from the Numerical recipes error function
103 G4double G4RKFieldIntegrator::Erf(G4double X)     100 G4double G4RKFieldIntegrator::Erf(G4double X)
104 {                                                 101 {
105    const G4double Z1 = 1;                         102    const G4double Z1 = 1;
106    const G4double HF = Z1/2;                      103    const G4double HF = Z1/2;
107    const G4double C1 = 0.56418958;                104    const G4double C1 = 0.56418958;
108                                                   105 
109    const G4double P10 = +3.6767877;               106    const G4double P10 = +3.6767877;
110    const G4double Q10 = +3.2584593;               107    const G4double Q10 = +3.2584593;
111    const G4double P11 = -9.7970465E-2;            108    const G4double P11 = -9.7970465E-2;
112                                                   109 
113 //   static G4ThreadLocal G4double P2[5] = { 7 << 110    static G4double P2[5] = { 7.3738883, 6.8650185,  3.0317993, 0.56316962, 4.3187787e-5 };
114 //   static G4ThreadLocal G4double Q2[5] = { 7 << 111    static G4double Q2[5] = { 7.3739609, 15.184908, 12.79553,   5.3542168,  1. };
115    const G4double P2[5] = { 7.3738883, 6.86501 << 112    
116    const G4double Q2[5] = { 7.3739609, 15.1849 << 
117                                                << 
118    const G4double P30 = -1.2436854E-1;            113    const G4double P30 = -1.2436854E-1;
119    const G4double Q30 = +4.4091706E-1;            114    const G4double Q30 = +4.4091706E-1;
120    const G4double P31 = -9.6821036E-2;            115    const G4double P31 = -9.6821036E-2;
121                                                   116 
122    G4double V = std::abs(X);                      117    G4double V = std::abs(X);
123    G4double H;                                 << 118    G4double H;   
124    G4double Y;                                    119    G4double Y;
125    G4int c1;                                      120    G4int c1;
126                                                << 121       
127    if(V < HF)                                     122    if(V < HF)
128       {                                           123       {
129       Y = V*V;                                    124       Y = V*V;
130       H = X*(P10 + P11*Y)/(Q10+Y);                125       H = X*(P10 + P11*Y)/(Q10+Y);
131       }                                           126       }
132    else                                           127    else
133       {                                           128       {
134       if(V < 4)                                << 129       if(V < 4) 
135          {                                        130          {
136    G4double AP = P2[4];                           131    G4double AP = P2[4];
137    G4double AQ = Q2[4];                           132    G4double AQ = Q2[4];
138    for(c1 = 3; c1 >= 0; c1--)                     133    for(c1 = 3; c1 >= 0; c1--)
139             {                                     134             {
140             AP = P2[c1] + V*AP;                   135             AP = P2[c1] + V*AP;
141             AQ = Q2[c1] + V*AQ;                   136             AQ = Q2[c1] + V*AQ;
142             }                                     137             }
143    H = 1 - G4Exp(-V*V)*AP/AQ;                  << 138    H = 1 - std::exp(-V*V)*AP/AQ;
144    }                                              139    }
145       else                                        140       else
146         {                                         141         {
147         Y = 1./V*V;                               142         Y = 1./V*V;
148         H = 1 - G4Exp(-V*V)*(C1+Y*(P30 + P31*Y << 143         H = 1 - std::exp(-V*V)*(C1+Y*(P30 + P31*Y)/(Q30 + Y))/V;
149         }                                         144         }
150      if (X < 0)                                << 145      if (X < 0) 
151         H = -H;                                << 146         H =- H;
152      }                                            147      }
153    return H;                                      148    return H;
154 }                                                 149 }
155                                                << 150    
156 //******************************************** << 151 //************************************************************************************************       
157 //This is a QMD version to calculate excitatio    152 //This is a QMD version to calculate excitation energy of a fragment,
158 //which consists from G4KTV &the Particles        153 //which consists from G4KTV &the Particles
159 /*                                                154 /*
160 G4double G4RKFieldIntegrator::GetExcitationEne    155 G4double G4RKFieldIntegrator::GetExcitationEnergy(const G4KineticTrackVector &theParticles)
161 {                                                 156 {
162    // Excitation energy of a fragment consisti    157    // Excitation energy of a fragment consisting from A nucleons and Z protons
163    // is Etot - Z*Mp - (A - Z)*Mn - B(A, Z), w << 158    // is Etot - Z*Mp - (A - Z)*Mn - B(A, Z), where B(A,Z) is the binding energy of fragment 
164    //  and Mp, Mn are proton and neutron mass, << 159    //  and Mp, Mn are proton and neutron mass, respectively. 
165    G4int NZ = 0;                                  160    G4int NZ = 0;
166    G4int NA = 0;                                  161    G4int NA = 0;
167    G4double Etot = CalculateTotalEnergy(thePar    162    G4double Etot = CalculateTotalEnergy(theParticles);
168    for(G4int cParticle = 0; cParticle < thePar    163    for(G4int cParticle = 0; cParticle < theParticles.length(); cParticle++)
169       {                                           164       {
170       G4KineticTrack* pKineticTrack = theParti    165       G4KineticTrack* pKineticTrack = theParticles.at(cParticle);
171       G4int Encoding =  std::abs(pKineticTrack    166       G4int Encoding =  std::abs(pKineticTrack->GetDefinition()->GetPDGEncoding());
172       if (Encoding == 2212)                       167       if (Encoding == 2212)
173           NZ++, NA++;                             168           NZ++, NA++;
174       if (Encoding == 2112)                       169       if (Encoding == 2112)
175           NA++;                                   170           NA++;
176       Etot -= pKineticTrack->GetDefinition()->    171       Etot -= pKineticTrack->GetDefinition()->GetPDGMass();
177       }                                           172       }
178    return Etot - G4NucleiProperties::GetBindin    173    return Etot - G4NucleiProperties::GetBindingEnergy(NZ, NA);
179 }                                                 174 }
180 */                                                175 */
181                                                   176 
182 //********************************************    177 //*************************************************************************************************************************************
183 //This is a simplified method to get excitatio << 178 //This is a simplified method to get excitation energy of a residual 
184 // nucleus with nHitNucleons.                     179 // nucleus with nHitNucleons.
185 G4double G4RKFieldIntegrator::GetExcitationEne    180 G4double G4RKFieldIntegrator::GetExcitationEnergy(G4int nHitNucleons, const G4KineticTrackVector &)
186 {                                                 181 {
187    const G4double MeanE = 50;                     182    const G4double MeanE = 50;
188    G4double Sum = 0;                              183    G4double Sum = 0;
189    for(G4int c1 = 0; c1 < nHitNucleons; ++c1)  << 184    for(G4int c1 = 0; c1 < nHitNucleons; c1++)
190        {                                          185        {
191        Sum += -MeanE*G4Log(G4UniformRand());   << 186        Sum += -MeanE*std::log(G4UniformRand());
192        }                                          187        }
193    return Sum;                                    188    return Sum;
194 }                                                 189 }
195 //********************************************    190 //*************************************************************************************************************************************
196                                                   191 
197 /*                                                192 /*
198 //This is free propagation of particles for CA    193 //This is free propagation of particles for CASCADE mode. Target nucleons should be frozen
199 void G4RKFieldIntegrator::Integrate(G4KineticT    194 void G4RKFieldIntegrator::Integrate(G4KineticTrackVector& theParticles)
200    {                                              195    {
201    for(G4int cParticle = 0; cParticle < thePar << 196    for(G4int cParticle = 0; cParticle < theParticles.length(); cParticle++)
202       {                                           197       {
203       G4KineticTrack* pKineticTrack = theParti    198       G4KineticTrack* pKineticTrack = theParticles.at(cParticle);
204       pKineticTrack->SetPosition(pKineticTrack    199       pKineticTrack->SetPosition(pKineticTrack->GetPosition() + theTimeStep*pKineticTrack->Get4Momentum().boostVector());
205       }                                           200       }
206    }                                              201    }
207 */                                             << 202 */   
208 //********************************************    203 //*************************************************************************************************************************************
209                                                   204 
210 void G4RKFieldIntegrator::Integrate(const G4Ki    205 void G4RKFieldIntegrator::Integrate(const G4KineticTrackVector& theBarions, G4double theTimeStep)
211 {                                                 206 {
212    for(std::size_t cParticle = 0; cParticle <  << 207    for(size_t cParticle = 0; cParticle < theBarions.size(); cParticle++)
213       {                                           208       {
214       G4KineticTrack* pKineticTrack = theBario    209       G4KineticTrack* pKineticTrack = theBarions[cParticle];
215       pKineticTrack->SetPosition(pKineticTrack    210       pKineticTrack->SetPosition(pKineticTrack->GetPosition() + theTimeStep*pKineticTrack->Get4Momentum().boostVector());
216       }                                        << 211       } 
217 }                                                 212 }
218                                                << 213    
219 //********************************************    214 //*************************************************************************************************************************************
220                                                   215 
221 // constant to calculate theCoulomb barrier       216 // constant to calculate theCoulomb barrier
222 const G4double G4RKFieldIntegrator::coulomb =     217 const G4double G4RKFieldIntegrator::coulomb = 1.44 / 1.14 * MeV;
223                                                   218 
224 // kaon's potential constant (real part only)     219 // kaon's potential constant (real part only)
225 // 0.35 + i0.82 or 0.63 + i0.89 fermi             220 // 0.35 + i0.82 or 0.63 + i0.89 fermi
226 const G4double G4RKFieldIntegrator::a_kaon = 0    221 const G4double G4RKFieldIntegrator::a_kaon = 0.35;
227                                                   222 
228 // pion's potential constant (real part only)     223 // pion's potential constant (real part only)
229 //!! for pions it has todiffer from kaons         224 //!! for pions it has todiffer from kaons
230 // 0.35 + i0.82 or 0.63 + i0.89 fermi             225 // 0.35 + i0.82 or 0.63 + i0.89 fermi
231 const G4double G4RKFieldIntegrator::a_pion = 0    226 const G4double G4RKFieldIntegrator::a_pion = 0.35;
232                                                   227 
233 // antiproton's potential constant (real part     228 // antiproton's potential constant (real part only)
234 // 1.53 + i2.50 fermi                             229 // 1.53 + i2.50 fermi
235 const G4double G4RKFieldIntegrator::a_antiprot    230 const G4double G4RKFieldIntegrator::a_antiproton = 1.53;
236                                                   231 
237 // methods for calculating potentials for diff    232 // methods for calculating potentials for different types of particles
238 // aPosition is relative to the nucleus center    233 // aPosition is relative to the nucleus center
239 G4double G4RKFieldIntegrator::GetNeutronPotent    234 G4double G4RKFieldIntegrator::GetNeutronPotential(G4double )
240 {                                                 235 {
241    /*                                             236    /*
242    const G4double Mn  = 939.56563 * MeV; // ma    237    const G4double Mn  = 939.56563 * MeV; // mass of nuetron
243                                                   238 
244    G4VNuclearDensity *theDencity;                 239    G4VNuclearDensity *theDencity;
245    if(theA < 17) theDencity = new G4NuclearShe    240    if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
246    else          theDencity = new G4NuclearFer    241    else          theDencity = new G4NuclearFermiDensity(theA, theZ);
247                                                << 242    
248    // GetDencity() accepts only G4ThreeVector  << 243    // GetDencity() accepts only G4ThreeVector so build it:   
249    G4ThreeVector aPosition(0.0, 0.0, radius);     244    G4ThreeVector aPosition(0.0, 0.0, radius);
250    G4double density = theDencity->GetDensity(a    245    G4double density = theDencity->GetDensity(aPosition);
251    delete theDencity;                             246    delete theDencity;
252                                                << 247    
253    G4FermiMomentum *fm = new G4FermiMomentum()    248    G4FermiMomentum *fm = new G4FermiMomentum();
254    fm->Init(theA, theZ);                          249    fm->Init(theA, theZ);
255    G4double fermiMomentum = fm->GetFermiMoment    250    G4double fermiMomentum = fm->GetFermiMomentum(density);
256    delete fm;                                     251    delete fm;
257                                                << 252    
258    return sqr(fermiMomentum)/(2 * Mn)          << 253    return sqr(fermiMomentum)/(2 * Mn) 
259       + G4CreateNucleus::GetBindingEnergy(theZ    254       + G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
260       //+ G4NucleiProperties::GetBindingEnergy    255       //+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA;
261    */                                             256    */
262                                                << 257    
263    return 0.0;                                    258    return 0.0;
264 }                                                 259 }
265                                                   260 
266 G4double G4RKFieldIntegrator::GetProtonPotenti    261 G4double G4RKFieldIntegrator::GetProtonPotential(G4double )
267 {                                                 262 {
268    /*                                             263    /*
269    // calculate Coulomb barrier value             264    // calculate Coulomb barrier value
270    G4double theCoulombBarrier = coulomb * theZ << 265    G4double theCoulombBarrier = coulomb * theZ/(1. + std::pow(theA, 1./3.));
271    const G4double Mp  = 938.27231 * MeV; // ma    266    const G4double Mp  = 938.27231 * MeV; // mass of proton
272                                                   267 
273    G4VNuclearDensity *theDencity;                 268    G4VNuclearDensity *theDencity;
274    if(theA < 17) theDencity = new G4NuclearShe    269    if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
275    else          theDencity = new G4NuclearFer    270    else          theDencity = new G4NuclearFermiDensity(theA, theZ);
276                                                << 271    
277    // GetDencity() accepts only G4ThreeVector  << 272    // GetDencity() accepts only G4ThreeVector so build it:   
278    G4ThreeVector aPosition(0.0, 0.0, radius);     273    G4ThreeVector aPosition(0.0, 0.0, radius);
279    G4double density = theDencity->GetDensity(a    274    G4double density = theDencity->GetDensity(aPosition);
280    delete theDencity;                             275    delete theDencity;
281                                                << 276    
282    G4FermiMomentum *fm = new G4FermiMomentum()    277    G4FermiMomentum *fm = new G4FermiMomentum();
283    fm->Init(theA, theZ);                          278    fm->Init(theA, theZ);
284    G4double fermiMomentum = fm->GetFermiMoment    279    G4double fermiMomentum = fm->GetFermiMomentum(density);
285    delete fm;                                     280    delete fm;
286                                                   281 
287    return sqr(fermiMomentum)/ (2 * Mp)         << 282    return sqr(fermiMomentum)/ (2 * Mp) 
288       + G4CreateNucleus::GetBindingEnergy(theZ    283       + G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
289       //+ G4NucleiProperties::GetBindingEnergy << 284       //+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA 
290       + theCoulombBarrier;                        285       + theCoulombBarrier;
291    */                                             286    */
292                                                   287 
293    return 0.0;                                    288    return 0.0;
294 }                                                 289 }
295                                                   290 
296 G4double G4RKFieldIntegrator::GetAntiprotonPot    291 G4double G4RKFieldIntegrator::GetAntiprotonPotential(G4double )
297 {                                                 292 {
298    /*                                             293    /*
299    //G4double theM = G4NucleiProperties::GetAt    294    //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
300    G4double theM = theZ * G4Proton::Proton()-> << 295    G4double theM = theZ * G4Proton::Proton()->GetPDGMass() 
301       + (theA - theZ) * G4Neutron::Neutron()->    296       + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
302       + G4CreateNucleus::GetBindingEnergy(theZ    297       + G4CreateNucleus::GetBindingEnergy(theZ, theA);
303                                                << 298       
304    const G4double Mp  = 938.27231 * MeV; // ma    299    const G4double Mp  = 938.27231 * MeV; // mass of proton
305    G4double mu = (theM * Mp)/(theM + Mp);         300    G4double mu = (theM * Mp)/(theM + Mp);
306                                                << 301    
307    // antiproton's potential coefficient          302    // antiproton's potential coefficient
308    //   V = coeff_antiproton * nucleus_density    303    //   V = coeff_antiproton * nucleus_density
309    G4double coeff_antiproton = -2.*pi/mu * (1.    304    G4double coeff_antiproton = -2.*pi/mu * (1. + Mp) * a_antiproton;
310                                                << 305    
311    G4VNuclearDensity *theDencity;                 306    G4VNuclearDensity *theDencity;
312    if(theA < 17) theDencity = new G4NuclearShe    307    if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
313    else          theDencity = new G4NuclearFer    308    else          theDencity = new G4NuclearFermiDensity(theA, theZ);
314                                                << 309    
315    // GetDencity() accepts only G4ThreeVector  << 310    // GetDencity() accepts only G4ThreeVector so build it:   
316    G4ThreeVector aPosition(0.0, 0.0, radius);     311    G4ThreeVector aPosition(0.0, 0.0, radius);
317    G4double density = theDencity->GetDensity(a    312    G4double density = theDencity->GetDensity(aPosition);
318    delete theDencity;                             313    delete theDencity;
319                                                << 314    
320    return coeff_antiproton * density;             315    return coeff_antiproton * density;
321    */                                             316    */
322                                                   317 
323    return 0.0;                                    318    return 0.0;
324 }                                                 319 }
325                                                   320 
326 G4double G4RKFieldIntegrator::GetKaonPotential    321 G4double G4RKFieldIntegrator::GetKaonPotential(G4double )
327 {                                                 322 {
328    /*                                             323    /*
329    //G4double theM = G4NucleiProperties::GetAt    324    //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
330    G4double theM = theZ * G4Proton::Proton()-> << 325    G4double theM = theZ * G4Proton::Proton()->GetPDGMass() 
331       + (theA - theZ) * G4Neutron::Neutron()->    326       + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
332       + G4CreateNucleus::GetBindingEnergy(theZ    327       + G4CreateNucleus::GetBindingEnergy(theZ, theA);
333                                                << 328       
334    const G4double Mk  = 496. * MeV;      // ma    329    const G4double Mk  = 496. * MeV;      // mass of "kaon"
335    G4double mu = (theM * Mk)/(theM + Mk);         330    G4double mu = (theM * Mk)/(theM + Mk);
336                                                << 331    
337    // kaon's potential coefficient                332    // kaon's potential coefficient
338    //   V = coeff_kaon * nucleus_density          333    //   V = coeff_kaon * nucleus_density
339    G4double coeff_kaon = -2.*pi/mu * (1. + Mk/    334    G4double coeff_kaon = -2.*pi/mu * (1. + Mk/theM) * a_kaon;
340                                                << 335    
341    G4VNuclearDensity *theDencity;                 336    G4VNuclearDensity *theDencity;
342    if(theA < 17) theDencity = new G4NuclearShe    337    if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
343    else          theDencity = new G4NuclearFer    338    else          theDencity = new G4NuclearFermiDensity(theA, theZ);
344                                                << 339    
345    // GetDencity() accepts only G4ThreeVector  << 340    // GetDencity() accepts only G4ThreeVector so build it:   
346    G4ThreeVector aPosition(0.0, 0.0, radius);     341    G4ThreeVector aPosition(0.0, 0.0, radius);
347    G4double density = theDencity->GetDensity(a    342    G4double density = theDencity->GetDensity(aPosition);
348    delete theDencity;                             343    delete theDencity;
349                                                << 344    
350    return coeff_kaon * density;                   345    return coeff_kaon * density;
351    */                                             346    */
352                                                   347 
353    return 0.0;                                    348    return 0.0;
354 }                                                 349 }
355                                                   350 
356 G4double G4RKFieldIntegrator::GetPionPotential    351 G4double G4RKFieldIntegrator::GetPionPotential(G4double )
357 {                                                 352 {
358    /*                                             353    /*
359    //G4double theM = G4NucleiProperties::GetAt    354    //G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
360    G4double theM = theZ * G4Proton::Proton()-> << 355    G4double theM = theZ * G4Proton::Proton()->GetPDGMass() 
361       + (theA - theZ) * G4Neutron::Neutron()->    356       + (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
362       + G4CreateNucleus::GetBindingEnergy(theZ    357       + G4CreateNucleus::GetBindingEnergy(theZ, theA);
363                                                << 358       
364    const G4double Mpi = 139. * MeV;      // ma    359    const G4double Mpi = 139. * MeV;      // mass of "pion"
365    G4double mu = (theM * Mpi)/(theM + Mpi);       360    G4double mu = (theM * Mpi)/(theM + Mpi);
366                                                   361 
367    // pion's potential coefficient                362    // pion's potential coefficient
368    //   V = coeff_pion * nucleus_density          363    //   V = coeff_pion * nucleus_density
369    G4double coeff_pion = -2.*pi/mu * (1. + Mpi    364    G4double coeff_pion = -2.*pi/mu * (1. + Mpi) * a_pion;
370                                                << 365    
371    G4VNuclearDensity *theDencity;                 366    G4VNuclearDensity *theDencity;
372    if(theA < 17) theDencity = new G4NuclearShe    367    if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
373    else          theDencity = new G4NuclearFer    368    else          theDencity = new G4NuclearFermiDensity(theA, theZ);
374                                                << 369    
375    // GetDencity() accepts only G4ThreeVector  << 370    // GetDencity() accepts only G4ThreeVector so build it:   
376    G4ThreeVector aPosition(0.0, 0.0, radius);     371    G4ThreeVector aPosition(0.0, 0.0, radius);
377    G4double density = theDencity->GetDensity(a    372    G4double density = theDencity->GetDensity(aPosition);
378    delete theDencity;                             373    delete theDencity;
379                                                << 374    
380    return coeff_pion * density;                   375    return coeff_pion * density;
381    */                                             376    */
382                                                   377 
383    return 0.0;                                    378    return 0.0;
384 }                                                 379 }
385                                                   380