Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/inclxx/incl_physics/src/G4INCLCrossSectionsMultiPions.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/inclxx/incl_physics/src/G4INCLCrossSectionsMultiPions.cc (Version 11.3.0) and /processes/hadronic/models/inclxx/incl_physics/src/G4INCLCrossSectionsMultiPions.cc (Version 10.3.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 // INCL++ intra-nuclear cascade model              26 // INCL++ intra-nuclear cascade model
 27 // Alain Boudard, CEA-Saclay, France               27 // Alain Boudard, CEA-Saclay, France
 28 // Joseph Cugnon, University of Liege, Belgium     28 // Joseph Cugnon, University of Liege, Belgium
 29 // Jean-Christophe David, CEA-Saclay, France       29 // Jean-Christophe David, CEA-Saclay, France
 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H     30 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
 31 // Sylvie Leray, CEA-Saclay, France                31 // Sylvie Leray, CEA-Saclay, France
 32 // Davide Mancusi, CEA-Saclay, France              32 // Davide Mancusi, CEA-Saclay, France
 33 //                                                 33 //
 34 #define INCLXX_IN_GEANT4_MODE 1                    34 #define INCLXX_IN_GEANT4_MODE 1
 35                                                    35 
 36 #include "globals.hh"                              36 #include "globals.hh"
 37                                                    37 
 38 #include "G4INCLCrossSectionsMultiPions.hh"        38 #include "G4INCLCrossSectionsMultiPions.hh"
 39 #include "G4INCLKinematicsUtils.hh"                39 #include "G4INCLKinematicsUtils.hh"
 40 #include "G4INCLParticleTable.hh"                  40 #include "G4INCLParticleTable.hh"
 41 #include "G4INCLLogger.hh"                         41 #include "G4INCLLogger.hh"
 42 // #include <cassert>                              42 // #include <cassert>
 43                                                    43 
 44 namespace G4INCL {                                 44 namespace G4INCL {
 45                                                    45 
 46   template<G4int N>                                46   template<G4int N>
 47     struct BystrickyEvaluator {                    47     struct BystrickyEvaluator {
 48       static G4double eval(const G4double pLab     48       static G4double eval(const G4double pLab, const G4double oneOverThreshold, HornerCoefficients<N> const &coeffs) {
 49         const G4double pMeV = pLab*1E3;            49         const G4double pMeV = pLab*1E3;
 50         const G4double ekin=std::sqrt(Particle     50         const G4double ekin=std::sqrt(ParticleTable::effectiveNucleonMass2+pMeV*pMeV)-ParticleTable::effectiveNucleonMass;
 51         const G4double xrat=ekin*oneOverThresh     51         const G4double xrat=ekin*oneOverThreshold;
 52         const G4double x=std::log(xrat);           52         const G4double x=std::log(xrat);
 53         return HornerEvaluator<N>::eval(x, coe     53         return HornerEvaluator<N>::eval(x, coeffs) * x * std::exp(-0.5*x);
 54       }                                            54       }
 55     };                                             55     };
 56                                                    56 
 57   const G4int CrossSectionsMultiPions::nMaxPiN     57   const G4int CrossSectionsMultiPions::nMaxPiNN = 4;
 58   const G4int CrossSectionsMultiPions::nMaxPiP     58   const G4int CrossSectionsMultiPions::nMaxPiPiN = 4;
 59                                                    59 
 60   const G4double CrossSectionsMultiPions::s11p     60   const G4double CrossSectionsMultiPions::s11pzOOT = 0.0035761542037692665889;
 61   const G4double CrossSectionsMultiPions::s01p     61   const G4double CrossSectionsMultiPions::s01ppOOT = 0.003421025623481919853;
 62   const G4double CrossSectionsMultiPions::s01p     62   const G4double CrossSectionsMultiPions::s01pzOOT = 0.0035739814152966403123;
 63   const G4double CrossSectionsMultiPions::s11p     63   const G4double CrossSectionsMultiPions::s11pmOOT = 0.0034855350296270480281;
 64   const G4double CrossSectionsMultiPions::s12p     64   const G4double CrossSectionsMultiPions::s12pmOOT = 0.0016672224074691565119;
 65   const G4double CrossSectionsMultiPions::s12p     65   const G4double CrossSectionsMultiPions::s12ppOOT = 0.0016507643038726931312;
 66   const G4double CrossSectionsMultiPions::s12z     66   const G4double CrossSectionsMultiPions::s12zzOOT = 0.0011111111111111111111;
 67   const G4double CrossSectionsMultiPions::s02p     67   const G4double CrossSectionsMultiPions::s02pzOOT = 0.00125;
 68   const G4double CrossSectionsMultiPions::s02p     68   const G4double CrossSectionsMultiPions::s02pmOOT = 0.0016661112962345883443;
 69   const G4double CrossSectionsMultiPions::s12m     69   const G4double CrossSectionsMultiPions::s12mzOOT = 0.0017047391749062392793;
 70                                                    70 
 71   CrossSectionsMultiPions::CrossSectionsMultiP     71   CrossSectionsMultiPions::CrossSectionsMultiPions() :
 72     s11pzHC(-2.228000000000294018,8.7560000000     72     s11pzHC(-2.228000000000294018,8.7560000000005723725,-0.61000000000023239325,-5.4139999999999780324,3.3338333333333348023,-0.75835000000000022049,0.060623611111111114688),
 73     s01ppHC(2.0570000000126518344,-6.029000000     73     s01ppHC(2.0570000000126518344,-6.029000000012135826,36.768500000002462784,-45.275666666666553533,25.112666666666611953,-7.2174166666666639187,1.0478875000000000275,-0.060804365079365080846),
 74     s01pzHC(0.18030000000000441851,7.870099999     74     s01pzHC(0.18030000000000441851,7.8700999999999953598,-4.0548999999999990425,0.555199999999999959),
 75     s11pmHC(0.20590000000000031866,3.345099999     75     s11pmHC(0.20590000000000031866,3.3450999999999993936,-1.4401999999999997825,0.17076666666666664973),
 76     s12pmHC(-0.77235999999999901328,4.26265999     76     s12pmHC(-0.77235999999999901328,4.2626599999999991117,-1.9008899999999997323,0.30192266666666663379,-0.012270833333333331986),
 77     s12ppHC(-0.75724999999999975664,2.09343999     77     s12ppHC(-0.75724999999999975664,2.0934399999999998565,-0.3803099999999999814),
 78     s12zzHC(-0.89599999999996965072,7.88299999     78     s12zzHC(-0.89599999999996965072,7.882999999999978632,-7.1049999999999961928,1.884333333333333089),
 79     s02pzHC(-1.0579999999999967036,11.11399999     79     s02pzHC(-1.0579999999999967036,11.113999999999994089,-8.5259999999999990196,2.0051666666666666525),
 80     s02pmHC(2.4009000000012553286,-7.768000000     80     s02pmHC(2.4009000000012553286,-7.7680000000013376183,20.619000000000433505,-16.429666666666723928,5.2525708333333363472,-0.58969166666666670206),
 81     s12mzHC(-0.21858699999999976269,1.91489999     81     s12mzHC(-0.21858699999999976269,1.9148999999999999722,-0.31727500000000001065,-0.027695000000000000486)
 82   {                                            <<  82   {
 83   }                                            <<  83   }
 84                                                    84 
 85   G4double CrossSectionsMultiPions::NNElastic(     85   G4double CrossSectionsMultiPions::NNElastic(Particle const * const part1, Particle const * const part2) {
 86                                                    86 
 87     /* The NN cross section is parametrised as     87     /* The NN cross section is parametrised as a function of the lab momentum
 88      * of one of the nucleons. For NDelta or D     88      * of one of the nucleons. For NDelta or DeltaDelta, the physical
 89      * assumption is that the cross section is     89      * assumption is that the cross section is the same as NN *for the same
 90      * total CM energy*. Thus, we calculate s      90      * total CM energy*. Thus, we calculate s from the particles involved, and
 91      * we convert this value to the lab moment     91      * we convert this value to the lab momentum of a nucleon *as if this were
 92      * an NN collision*.                           92      * an NN collision*.
 93      */                                            93      */
 94     const G4double s = KinematicsUtils::square     94     const G4double s = KinematicsUtils::squareTotalEnergyInCM(part1, part2);
 95                                                    95 
 96     if(part1->isNucleon() && part2->isNucleon(     96     if(part1->isNucleon() && part2->isNucleon()) {  // NN
 97       const G4int i = ParticleTable::getIsospi     97       const G4int i = ParticleTable::getIsospin(part1->getType())
 98         + ParticleTable::getIsospin(part2->get     98         + ParticleTable::getIsospin(part2->getType());
 99       return NNElasticFixed(s, i);                 99       return NNElasticFixed(s, i);
100     }                                             100     }
101     else {  // Nucleon-Delta and Delta-Delta      101     else {  // Nucleon-Delta and Delta-Delta
102       const G4double plab = 0.001*KinematicsUt    102       const G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
103       if (plab < 0.440) {                         103       if (plab < 0.440) {
104         return 34.*std::pow(plab/0.4, (-2.104)    104         return 34.*std::pow(plab/0.4, (-2.104));
105       }                                           105       }
106       else if (plab < 0.800) {                    106       else if (plab < 0.800) {
107         return 23.5+1000.*std::pow(plab-0.7, 4    107         return 23.5+1000.*std::pow(plab-0.7, 4);
108       }                                           108       }
109       else if (plab <= 2.0) {                     109       else if (plab <= 2.0) {
110         return 1250./(50.+plab)-4.*std::pow(pl    110         return 1250./(50.+plab)-4.*std::pow(plab-1.3, 2);
111       }                                           111       }
112       else {                                      112       else {
113         return 77./(plab+1.5);                    113         return 77./(plab+1.5);
114       }                                           114       }
115     }                                             115     }
116   }                                               116   }
117                                                   117 
118     G4double CrossSectionsMultiPions::NNElasti    118     G4double CrossSectionsMultiPions::NNElasticFixed(const G4double s, const G4int i) {
119                                                   119 
120       /* From NNElastic, with isospin fixed an    120       /* From NNElastic, with isospin fixed and for NN only.
121       */                                          121       */
122                                                   122 
123       G4double plab = 0.001*KinematicsUtils::m    123       G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
124       G4double sigma = 0.;                     << 
125                                                   124 
126       if (i == 0) {  // pn                        125       if (i == 0) {  // pn
127         if (plab < 0.446) {                       126         if (plab < 0.446) {
128           G4double alp=std::log(plab);            127           G4double alp=std::log(plab);
129           sigma = 6.3555*std::exp(-3.2481*alp- << 128           return 6.3555*std::exp(-3.2481*alp-0.377*alp*alp);
130         }                                         129         }
131         else if (plab < 0.851) {                  130         else if (plab < 0.851) {
132           sigma = 33.+196.*std::pow(std::fabs( << 131           return 33.+196.*std::pow(std::fabs(plab-0.95),2.5);
133         }                                         132         }
134         else if (plab <= 2.0) {                   133         else if (plab <= 2.0) {
135           sigma = 31./std::sqrt(plab);         << 134           return 31./std::sqrt(plab);
136         }                                         135         }
137         else {                                    136         else {
138           sigma = 77./(plab+1.5);              << 137           return 77./(plab+1.5);
139         }                                         138         }
140         //if(plab < 0.9 && plab > 0.802) sigma << 
141         //if(plab < 1.4 && plab > 1.31) sigma  << 
142         return sigma;                          << 
143       }                                           139       }
144       else {  // pp and nn                        140       else {  // pp and nn
145         if (plab < 0.440) {                       141         if (plab < 0.440) {
146           return 34.*std::pow(plab/0.4, (-2.10    142           return 34.*std::pow(plab/0.4, (-2.104));
147         }                                         143         }
148         else if (plab < 0.8067) {                 144         else if (plab < 0.8067) {
149           return 23.5+1000.*std::pow(plab-0.7,    145           return 23.5+1000.*std::pow(plab-0.7, 4);
150         }                                         146         }
151         else if (plab <= 2.0) {                   147         else if (plab <= 2.0) {
152           return 1250./(50.+plab)-4.*std::pow(    148           return 1250./(50.+plab)-4.*std::pow(plab-1.3, 2);
153         }                                         149         }
154         else if (plab <= 3.0956) {                150         else if (plab <= 3.0956) {
155           return 77./(plab+1.5);                  151           return 77./(plab+1.5);
156         }                                         152         }
157         else {                                    153         else {
158           G4double alp=std::log(plab);            154           G4double alp=std::log(plab);
159           return 11.2+25.5*std::pow(plab, -1.1    155           return 11.2+25.5*std::pow(plab, -1.12)+0.151*std::pow(alp, 2)-1.62*alp;
160         }                                         156         }
161       }                                           157       }
162     }                                             158     }
163                                                   159 
164     G4double CrossSectionsMultiPions::NNTot(Pa    160     G4double CrossSectionsMultiPions::NNTot(Particle const * const part1, Particle const * const part2) {
165                                                   161 
166         G4int i = ParticleTable::getIsospin(pa    162         G4int i = ParticleTable::getIsospin(part1->getType())
167         + ParticleTable::getIsospin(part2->get    163         + ParticleTable::getIsospin(part2->getType());
168                                                   164 
169         if(part1->isNucleon() && part2->isNucl    165         if(part1->isNucleon() && part2->isNucleon()) {  // NN
170           const G4double s = KinematicsUtils::    166           const G4double s = KinematicsUtils::squareTotalEnergyInCM(part1, part2);
171           return NNTotFixed(s, i);                167           return NNTotFixed(s, i);
172         }                                         168         }
173         else if (part1->isDelta() && part2->is    169         else if (part1->isDelta() && part2->isDelta()) {  // Delta-Delta
174             return elastic(part1, part2);         170             return elastic(part1, part2);
175         }                                         171         }
176         else {  // Nucleon-Delta                  172         else {  // Nucleon-Delta
177             return NDeltaToNN(part1, part2) +     173             return NDeltaToNN(part1, part2) + elastic(part1, part2);
178         }                                         174         }
179     }                                             175     }
180                                                   176 
181     G4double CrossSectionsMultiPions::NNTotFix    177     G4double CrossSectionsMultiPions::NNTotFixed(const G4double s, const G4int i) {
182                                                   178 
183       /* From NNTot, with isospin fixed and fo    179       /* From NNTot, with isospin fixed and for NN only.
184       */                                          180       */
185                                                   181 
186       G4double plab = 0.001*KinematicsUtils::m    182       G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
187                                                   183 
188       if (i == 0) {  // pn                        184       if (i == 0) {  // pn
189         if (plab < 0.446) {                       185         if (plab < 0.446) {
190           G4double alp=std::log(plab);            186           G4double alp=std::log(plab);
191           return 6.3555*std::exp(-3.2481*alp-0    187           return 6.3555*std::exp(-3.2481*alp-0.377*std::pow(alp, 2));
192         }                                         188         }
193         else if (plab < 1.0) {                    189         else if (plab < 1.0) {
194           return 33.+196.*std::sqrt(std::pow(s    190           return 33.+196.*std::sqrt(std::pow(std::fabs(plab-0.95),5));
195         }                                         191         }
196         else if (plab < 1.924) {                  192         else if (plab < 1.924) {
197           return 24.2+8.9*plab;                   193           return 24.2+8.9*plab;
198         }                                         194         }
199         else {                                    195         else {
200           G4double alp=std::log(plab);            196           G4double alp=std::log(plab);
201           return 48.9-33.7*std::pow(plab, -3.0    197           return 48.9-33.7*std::pow(plab, -3.08)+0.619*std::pow(alp, 2)-5.12*alp;
202         }                                         198         }
203       }                                           199       }
204       else {  // pp and nn                        200       else {  // pp and nn
205         if (plab < 0.440) {                       201         if (plab < 0.440) {
206           return 34.*std::pow(plab/0.4, (-2.10    202           return 34.*std::pow(plab/0.4, (-2.104));
207         }                                         203         }
208         else if (plab < 0.8734) {                 204         else if (plab < 0.8734) {
209           return 23.5+1000.*std::pow(plab-0.7,    205           return 23.5+1000.*std::pow(plab-0.7, 4);
210         }                                         206         }
211         else if (plab < 1.5) {                    207         else if (plab < 1.5) {
212           return 23.5+24.6/(1.+std::exp(-10.*(    208           return 23.5+24.6/(1.+std::exp(-10.*(plab-1.2)));
213         }                                         209         }
214         else if (plab < 3.0044) {                 210         else if (plab < 3.0044) {
215           return 41.+60.*(plab-0.9)*std::exp(-    211           return 41.+60.*(plab-0.9)*std::exp(-1.2*plab);
216         }                                         212         }
217         else {                                    213         else {
218           G4double alp=std::log(plab);            214           G4double alp=std::log(plab);
219           return 45.6+219.*std::pow(plab, -4.2    215           return 45.6+219.*std::pow(plab, -4.23)+0.41*std::pow(alp, 2)-3.41*alp;
220         }                                         216         }
221       }                                           217       }
222     }                                             218     }
223                                                   219 
224     G4double CrossSectionsMultiPions::NNInelas    220     G4double CrossSectionsMultiPions::NNInelasticIso(const G4double ener, const G4int iso) {
225                                                   221 
226       const G4double s = ener*ener;               222       const G4double s = ener*ener;
227       G4double sincl;                             223       G4double sincl;
228                                                   224 
229       if (iso != 0) {                             225       if (iso != 0) {
230         if(s>=4074595.287720512986) { // plab>    226         if(s>=4074595.287720512986) { // plab>800 MeV/c
231           sincl = NNTotFixed(s, 2)-NNElasticFi    227           sincl = NNTotFixed(s, 2)-NNElasticFixed(s, 2);
232         }                                         228         }
233         else {                                    229         else {
234           sincl =  0. ;                           230           sincl =  0. ;
235         }                                         231         }
236       } else {                                    232       } else {
237         if(s>=4074595.287720512986) { // plab>    233         if(s>=4074595.287720512986) { // plab>800 MeV/c
238           sincl = 2*(NNTotFixed(s, 0)-NNElasti    234           sincl = 2*(NNTotFixed(s, 0)-NNElasticFixed(s, 0))-(NNTotFixed(s, 2)-NNElasticFixed(s, 2));
239         }                                         235         }
240         else {                                    236         else {
241           return 0. ;                             237           return 0. ;
242         }                                         238         }
243       }                                           239       }
244       if (sincl < 0.) sincl = 0.;                 240       if (sincl < 0.) sincl = 0.;
245       return sincl;                               241       return sincl;
246     }                                             242     }
247                                                   243 
248     G4double CrossSectionsMultiPions::NNOnePiO    244     G4double CrossSectionsMultiPions::NNOnePiOrDelta(const G4double ener, const G4int iso, const G4double xsiso) {
249                                                   245 
250         /* Article J. Physique 48 (1987)1901-1    246         /* Article J. Physique 48 (1987)1901-1924 "Energy dependence of
251          nucleon-cucleon inelastic total cross    247          nucleon-cucleon inelastic total cross-sections."
252          J. Bystricky, P. La France, F. Lehar,    248          J. Bystricky, P. La France, F. Lehar, F. Perrot, T. Siemiarczuk & P. Winternitz
253          S11PZ= section pp->pp pi0                249          S11PZ= section pp->pp pi0
254          S01PP= section pp->pn pi+                250          S01PP= section pp->pn pi+
255          S01PZ= section pn->pn pi0                251          S01PZ= section pn->pn pi0
256          S11PM= section pn->pp pi-                252          S11PM= section pn->pp pi-
257          S= X-Section, 1st number : 1 if pp an    253          S= X-Section, 1st number : 1 if pp and 0 if pn
258          2nd number = number of pions, PP= pi+    254          2nd number = number of pions, PP= pi+; PZ= pi0 ; PM= pi-
259          */                                       255          */
260                                                   256 
261         const G4double s = ener*ener;             257         const G4double s = ener*ener;
262         G4double plab = 0.001*KinematicsUtils:    258         G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
263                                                   259 
264         G4double snnpit1=0.;                      260         G4double snnpit1=0.;
265         G4double snnpit=0.;                       261         G4double snnpit=0.;
266         G4double s11pz=0.;                        262         G4double s11pz=0.;
267         G4double s01pp=0.;                        263         G4double s01pp=0.;
268         G4double s01pz=0.;                        264         G4double s01pz=0.;
269         G4double s11pm=0.;                        265         G4double s11pm=0.;
270                                                   266 
271         if ((iso != 0) && (plab < 2.1989)) {      267         if ((iso != 0) && (plab < 2.1989)) {
272             snnpit = xsiso - NNTwoPi(ener, iso    268             snnpit = xsiso - NNTwoPi(ener, iso, xsiso);
273             if (snnpit < 1.e-8) snnpit=0.;        269             if (snnpit < 1.e-8) snnpit=0.;
274             return snnpit;                        270             return snnpit;
275         }                                         271         }
276         else if ((iso == 0) && (plab < 1.7369)    272         else if ((iso == 0) && (plab < 1.7369)) {
277             snnpit = xsiso;                       273             snnpit = xsiso;
278             if (snnpit < 1.e-8) snnpit=0.;        274             if (snnpit < 1.e-8) snnpit=0.;
279             return snnpit;                        275             return snnpit;
280         }                                         276         }
281                                                   277 
282 //s11pz                                           278 //s11pz
283         if (plab > 18.) {                         279         if (plab > 18.) {
284             s11pz=55.185/std::pow((0.1412*plab    280             s11pz=55.185/std::pow((0.1412*plab+5),2);
285         }                                         281         }
286         else if (plab > 13.9) {                   282         else if (plab > 13.9) {
287             G4double alp=std::log(plab);          283             G4double alp=std::log(plab);
288             s11pz=6.67-13.3*std::pow(plab, -6.    284             s11pz=6.67-13.3*std::pow(plab, -6.18)+0.456*alp*alp-3.29*alp;
289         }                                         285         }
290         else if (plab >= 0.7765) {                286         else if (plab >= 0.7765) {
291             const G4double b=BystrickyEvaluato    287             const G4double b=BystrickyEvaluator<7>::eval(plab,s11pzOOT,s11pzHC);
292             s11pz=b*b;                            288             s11pz=b*b;
293         }                                         289         }
294 //s01pp                                           290 //s01pp
295         if (plab >= 0.79624) {                    291         if (plab >= 0.79624) {
296             const G4double b=BystrickyEvaluato    292             const G4double b=BystrickyEvaluator<8>::eval(plab,s01ppOOT,s01ppHC);
297             s01pp=b*b;                            293             s01pp=b*b;
298         }                                         294         }
299                                                   295 
300 // channel T=1                                    296 // channel T=1
301         snnpit1=s11pz+s01pp;                      297         snnpit1=s11pz+s01pp;
302         if (snnpit1 < 1.e-8) snnpit1=0.;          298         if (snnpit1 < 1.e-8) snnpit1=0.;
303         if (iso != 0) {                           299         if (iso != 0) {
304             return snnpit1;                       300             return snnpit1;
305         }                                         301         }
306                                                   302 
307 //s01pz                                           303 //s01pz
308         if (plab > 4.5) {                         304         if (plab > 4.5) {
309             s01pz=15289.4/std::pow((11.573*pla    305             s01pz=15289.4/std::pow((11.573*plab+5),2);
310         }                                         306         }
311         else if (plab >= 0.777) {                 307         else if (plab >= 0.777) {
312             const G4double b=BystrickyEvaluato    308             const G4double b=BystrickyEvaluator<4>::eval(plab,s01pzOOT,s01pzHC);
313             s01pz=b*b;                            309             s01pz=b*b;
314         }                                         310         }
315 //s11pm                                           311 //s11pm
316         if (plab > 14.) {                         312         if (plab > 14.) {
317             s11pm=46.68/std::pow((0.2231*plab+    313             s11pm=46.68/std::pow((0.2231*plab+5),2);
318         }                                         314         }
319         else if (plab >= 0.788) {                 315         else if (plab >= 0.788) {
320             const G4double b=BystrickyEvaluato    316             const G4double b=BystrickyEvaluator<4>::eval(plab,s11pmOOT,s11pmHC);
321             s11pm=b*b;                            317             s11pm=b*b;
322         }                                         318         }
323                                                   319 
324 // channel T=0                                    320 // channel T=0
325 //        snnpit=s01pz+2*s11pm-snnpit1; //modi << 321         snnpit=2*(s01pz+2*s11pm)-snnpit1;
326         snnpit = 2*(s01pz+2*s11pm)-snnpit1;    << 
327         if (snnpit < 1.e-8) snnpit=0.;            322         if (snnpit < 1.e-8) snnpit=0.;
328         return snnpit;                            323         return snnpit;
329     }                                             324     }
330                                                   325 
331     G4double CrossSectionsMultiPions::NNTwoPi(    326     G4double CrossSectionsMultiPions::NNTwoPi(const G4double ener, const G4int iso, const G4double xsiso) {
332                                                   327 
333         /* Article J. Physique 48 (1987)1901-1    328         /* Article J. Physique 48 (1987)1901-1924 "Energy dependence of nucleon-cucleon inelastic total cross-sections."
334            J. Bystricky, P. La France, F. Leha    329            J. Bystricky, P. La France, F. Lehar, F. Perrot, T. Siemiarczuk & P. Winternitz
335            S12PM : pp -> pp Pi+ Pi-               330            S12PM : pp -> pp Pi+ Pi-
336            S12ZZ : pp -> pp Pi0 Pi0               331            S12ZZ : pp -> pp Pi0 Pi0
337            S12PP : pp -> nn Pi+ Pi+               332            S12PP : pp -> nn Pi+ Pi+
338            S02PZ : pp -> pn Pi+ Pi0               333            S02PZ : pp -> pn Pi+ Pi0
339            S02PM : pn -> pn Pi+ Pi-               334            S02PM : pn -> pn Pi+ Pi-
340            S12MZ : pn -> pp Pi- Pi0               335            S12MZ : pn -> pp Pi- Pi0
341         */                                        336         */
342                                                   337 
343         const G4double s = ener*ener;             338         const G4double s = ener*ener;
344         G4double plab = 0.001*KinematicsUtils:    339         G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
345                                                   340 
346         G4double snn2pit=0.;                      341         G4double snn2pit=0.;
347         G4double s12pm=0.;                        342         G4double s12pm=0.;
348         G4double s12pp=0.;                        343         G4double s12pp=0.;
349         G4double s12zz=0.;                        344         G4double s12zz=0.;
350         G4double s02pz=0.;                        345         G4double s02pz=0.;
351         G4double s02pm=0.;                        346         G4double s02pm=0.;
352         G4double s12mz=0.;                        347         G4double s12mz=0.;
353                                                   348 
354         if (iso==0 && plab<3.33) {             << 349         if (iso==0 && plab<3.3) {
355             snn2pit = xsiso - NNOnePiOrDelta(e    350             snn2pit = xsiso - NNOnePiOrDelta(ener, iso, xsiso);
356             if (snn2pit < 1.e-8) snn2pit=0.;      351             if (snn2pit < 1.e-8) snn2pit=0.;
357             return snn2pit;                       352             return snn2pit;
358         }                                         353         }
359                                                   354 
360         if (iso != 0) {                           355         if (iso != 0) {
361 //s12pm                                           356 //s12pm
362          if (plab > 15.) {                        357          if (plab > 15.) {
363             s12pm=25.977/plab;                    358             s12pm=25.977/plab;
364          }                                        359          }
365          else if (plab >= 1.3817) {               360          else if (plab >= 1.3817) {
366             const G4double b=BystrickyEvaluato    361             const G4double b=BystrickyEvaluator<5>::eval(plab,s12pmOOT,s12pmHC);
367             s12pm=b*b;                            362             s12pm=b*b;
368          }                                        363          }
369 //s12pp                                           364 //s12pp
370          if (plab > 10.) {                        365          if (plab > 10.) {
371             s12pp=141.505/std::pow((-0.1016*pl    366             s12pp=141.505/std::pow((-0.1016*plab-7),2);
372          }                                        367          }
373          else if (plab >= 1.5739) {               368          else if (plab >= 1.5739) {
374             const G4double b=BystrickyEvaluato    369             const G4double b=BystrickyEvaluator<3>::eval(plab,s12ppOOT,s12ppHC);
375             s12pp=b*b;                            370             s12pp=b*b;
376          }                                        371          }
377         }                                         372         }
378 //s12zz                                           373 //s12zz
379         if (plab > 4.) {                          374         if (plab > 4.) {
380             s12zz=97.355/std::pow((1.1579*plab    375             s12zz=97.355/std::pow((1.1579*plab+5),2);
381         }                                         376         }
382         else if (plab >= 1.72207) {               377         else if (plab >= 1.72207) {
383             const G4double b=BystrickyEvaluato    378             const G4double b=BystrickyEvaluator<4>::eval(plab,s12zzOOT,s12zzHC);
384             s12zz=b*b;                            379             s12zz=b*b;
385         }                                         380         }
386 //s02pz                                           381 //s02pz
387         if (plab > 4.5) {                         382         if (plab > 4.5) {
388             s02pz=178.082/std::pow((0.2014*pla    383             s02pz=178.082/std::pow((0.2014*plab+5),2);
389         }                                         384         }
390         else if (plab >= 1.5656) {                385         else if (plab >= 1.5656) {
391             const G4double b=BystrickyEvaluato    386             const G4double b=BystrickyEvaluator<4>::eval(plab,s02pzOOT,s02pzHC);
392             s02pz=b*b;                            387             s02pz=b*b;
393         }                                         388         }
394                                                   389 
395 // channel T=1                                    390 // channel T=1
396         if (iso != 0) {                           391         if (iso != 0) {
397             snn2pit=s12pm+s12pp+s12zz+s02pz;      392             snn2pit=s12pm+s12pp+s12zz+s02pz;
398             if (snn2pit < 1.e-8) snn2pit=0.;      393             if (snn2pit < 1.e-8) snn2pit=0.;
399             return snn2pit;                       394             return snn2pit;
400         }                                         395         }
401                                                   396 
402 //s02pm                                           397 //s02pm
403         if (plab > 5.) {                          398         if (plab > 5.) {
404             s02pm=135.826/std::pow(plab,2);       399             s02pm=135.826/std::pow(plab,2);
405         }                                         400         }
406         else if (plab >= 1.21925) {               401         else if (plab >= 1.21925) {
407             const G4double b=BystrickyEvaluato    402             const G4double b=BystrickyEvaluator<6>::eval(plab,s02pmOOT,s02pmHC);
408             s02pm=b*b;                            403             s02pm=b*b;
409         }                                         404         }
410 //s12mz                                           405 //s12mz
411         if (plab >= 1.29269) {                    406         if (plab >= 1.29269) {
412             const G4double b=BystrickyEvaluato    407             const G4double b=BystrickyEvaluator<4>::eval(plab,s12mzOOT,s12mzHC);
413             s12mz=b*b;                            408             s12mz=b*b;
414         }                                         409         }
415                                                   410 
416 // channel T=0                                    411 // channel T=0
417 //        snn2pit=3*(0.5*s02pm+0.5*s12mz-0.5*s << 
418         snn2pit=3*(s02pm+0.5*s12mz-0.5*s02pz-s    412         snn2pit=3*(s02pm+0.5*s12mz-0.5*s02pz-s12zz);
419         if (snn2pit < 1.e-8) snn2pit=0.;          413         if (snn2pit < 1.e-8) snn2pit=0.;
420         return snn2pit;                           414         return snn2pit;
421     }                                             415     }
422                                                   416 
423     G4double CrossSectionsMultiPions::NNThreeP    417     G4double CrossSectionsMultiPions::NNThreePi(const G4double ener, const G4int iso, const G4double xsiso, const G4double xs1pi, const G4double xs2pi) {
424                                                   418 
425         const G4double s = ener*ener;             419         const G4double s = ener*ener;
426         G4double plab = 0.001*KinematicsUtils:    420         G4double plab = 0.001*KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
427                                                   421 
428         G4double snn3pit=0.;                      422         G4double snn3pit=0.;
429                                                   423 
430         if (iso == 0) {                           424         if (iso == 0) {
431 // channel T=0                                    425 // channel T=0
432             if (plab > 7.2355) {                  426             if (plab > 7.2355) {
433                 return 46.72/std::pow((plab -     427                 return 46.72/std::pow((plab - 5.8821),2);
434             }                                     428             }
435             else {                                429             else {
436                 snn3pit=xsiso-xs1pi-xs2pi;        430                 snn3pit=xsiso-xs1pi-xs2pi;
437                 if (snn3pit < 1.e-8) snn3pit=0    431                 if (snn3pit < 1.e-8) snn3pit=0.;
438                 return snn3pit;                   432                 return snn3pit;
439             }                                     433             }
440         }                                         434         }
441         else {                                    435         else {
442 // channel T=1                                    436 // channel T=1
443             if (plab > 7.206) {                   437             if (plab > 7.206) {
444                 return 5592.92/std::pow((plab+    438                 return 5592.92/std::pow((plab+14.9764),2);
445             }                                     439             }
446             else if (plab > 2.1989){              440             else if (plab > 2.1989){
447                 snn3pit=xsiso-xs1pi-xs2pi;        441                 snn3pit=xsiso-xs1pi-xs2pi;
448                 if (snn3pit < 1.e-8) snn3pit=0    442                 if (snn3pit < 1.e-8) snn3pit=0.;
449                 return snn3pit;                   443                 return snn3pit;
450             }                                     444             }
451             else return snn3pit;                  445             else return snn3pit;
452         }                                         446         }
453     }                                             447     }
454                                                   448 
455     G4double CrossSectionsMultiPions::NNOnePi(    449     G4double CrossSectionsMultiPions::NNOnePi(Particle const * const particle1, Particle const * const particle2) {
456         // Cross section for nucleon-nucleon d    450         // Cross section for nucleon-nucleon directly producing one pion
457                                                   451 
458         const G4int iso=ParticleTable::getIsos    452         const G4int iso=ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
459         if (iso!=0) // If pp or nn we choose t << 453         if (iso!=0)
460           return 0.;                              454           return 0.;
461                                                   455 
462         const G4double ener=KinematicsUtils::t    456         const G4double ener=KinematicsUtils::totalEnergyInCM(particle1, particle2);
463                                                   457 
464         const G4double xsiso2=NNInelasticIso(e    458         const G4double xsiso2=NNInelasticIso(ener, 2);
465         const G4double xsiso0=NNInelasticIso(e    459         const G4double xsiso0=NNInelasticIso(ener, 0);
466         return 0.25*(NNOnePiOrDelta(ener, 0, x    460         return 0.25*(NNOnePiOrDelta(ener, 0, xsiso0)+ NNOnePiOrDelta(ener, 2, xsiso2));
467     }                                             461     }
468                                                   462 
469     G4double CrossSectionsMultiPions::NNOnePiO    463     G4double CrossSectionsMultiPions::NNOnePiOrDelta(Particle const * const particle1, Particle const * const particle2) {
470         // Cross section for nucleon-nucleon d    464         // Cross section for nucleon-nucleon directly producing one pion or producing a nucleon-delta pair
471         const G4double ener=KinematicsUtils::t    465         const G4double ener=KinematicsUtils::totalEnergyInCM(particle1, particle2);
472         const G4int iso=ParticleTable::getIsos    466         const G4int iso=ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
473                                                   467 
474         const G4double xsiso2=NNInelasticIso(e    468         const G4double xsiso2=NNInelasticIso(ener, 2);
475         if (iso != 0)                             469         if (iso != 0)
476           return NNOnePiOrDelta(ener, iso, xsi    470           return NNOnePiOrDelta(ener, iso, xsiso2);
477         else {                                    471         else {
478           const G4double xsiso0=NNInelasticIso    472           const G4double xsiso0=NNInelasticIso(ener, 0);
479           return 0.5*(NNOnePiOrDelta(ener, 0,     473           return 0.5*(NNOnePiOrDelta(ener, 0, xsiso0)+ NNOnePiOrDelta(ener, 2, xsiso2));
480         }                                         474         }
481     }                                             475     }
482                                                   476 
483     G4double CrossSectionsMultiPions::NNTwoPi(    477     G4double CrossSectionsMultiPions::NNTwoPi(Particle const * const particle1, Particle const * const particle2) {
484         //                                        478         //
485         //     Nucleon-Nucleon producing one p    479         //     Nucleon-Nucleon producing one pion cross sections
486         //                                        480         //
487         const G4double ener=KinematicsUtils::t    481         const G4double ener=KinematicsUtils::totalEnergyInCM(particle1, particle2);
488         const G4int iso=ParticleTable::getIsos    482         const G4int iso=ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
489                                                   483 
490                                                   484 
491         const G4double xsiso2=NNInelasticIso(e    485         const G4double xsiso2=NNInelasticIso(ener, 2);
492         if (iso != 0) {                           486         if (iso != 0) {
493             return NNTwoPi(ener, 2, xsiso2);      487             return NNTwoPi(ener, 2, xsiso2);
494         }                                         488         }
495         else {                                    489         else {
496             const G4double xsiso0=NNInelasticI    490             const G4double xsiso0=NNInelasticIso(ener, 0);
497             return 0.5*(NNTwoPi(ener, 0, xsiso    491             return 0.5*(NNTwoPi(ener, 0, xsiso0)+ NNTwoPi(ener, 2, xsiso2));
498         }                                         492         }
499         return 0.0; // Should never reach this    493         return 0.0; // Should never reach this point
500     }                                             494     }
501                                                   495 
502     G4double CrossSectionsMultiPions::NNThreeP    496     G4double CrossSectionsMultiPions::NNThreePi(Particle const * const particle1, Particle const * const particle2) {
503         //                                        497         //
504         //     Nucleon-Nucleon producing one p    498         //     Nucleon-Nucleon producing one pion cross sections
505         //                                        499         //
506                                                   500 
507         const G4double ener=KinematicsUtils::t    501         const G4double ener=KinematicsUtils::totalEnergyInCM(particle1, particle2);
508         const G4int iso=ParticleTable::getIsos    502         const G4int iso=ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
509                                                   503 
510                                                   504 
511         const G4double xsiso2=NNInelasticIso(e    505         const G4double xsiso2=NNInelasticIso(ener, 2);
512         const G4double xs1pi2=NNOnePiOrDelta(e    506         const G4double xs1pi2=NNOnePiOrDelta(ener, 2, xsiso2);
513         const G4double xs2pi2=NNTwoPi(ener, 2,    507         const G4double xs2pi2=NNTwoPi(ener, 2, xsiso2);
514         if (iso != 0)                             508         if (iso != 0)
515           return NNThreePi(ener, 2, xsiso2, xs    509           return NNThreePi(ener, 2, xsiso2, xs1pi2, xs2pi2);
516         else {                                    510         else {
517           const G4double xsiso0=NNInelasticIso    511           const G4double xsiso0=NNInelasticIso(ener, 0);
518           const G4double xs1pi0=NNOnePiOrDelta    512           const G4double xs1pi0=NNOnePiOrDelta(ener, 0, xsiso0);
519           const G4double xs2pi0=NNTwoPi(ener,     513           const G4double xs2pi0=NNTwoPi(ener, 0, xsiso0);
520           return 0.5*(NNThreePi(ener, 0, xsiso    514           return 0.5*(NNThreePi(ener, 0, xsiso0, xs1pi0, xs2pi0)+ NNThreePi(ener, 2, xsiso2, xs1pi2, xs2pi2));
521         }                                         515         }
522     }                                             516     }
523                                                   517 
524     G4double CrossSectionsMultiPions::NNFourPi    518     G4double CrossSectionsMultiPions::NNFourPi(Particle const * const particle1, Particle const * const particle2) {
525       const G4double s = KinematicsUtils::squa    519       const G4double s = KinematicsUtils::squareTotalEnergyInCM(particle1, particle2);
526       if(s<6.25E6)                                520       if(s<6.25E6)
527         return 0.;                                521         return 0.;
528       const G4double sigma = NNTot(particle1,     522       const G4double sigma = NNTot(particle1, particle2) - NNElastic(particle1, particle2) - NNOnePiOrDelta(particle1, particle2) - NNTwoPi(particle1, particle2) - NNThreePi(particle1, particle2);
529       return ((sigma>1.e-9) ? sigma : 0.);        523       return ((sigma>1.e-9) ? sigma : 0.);
530     }                                             524     }
531                                                   525 
532     G4double CrossSectionsMultiPions::NNToxPiN    526     G4double CrossSectionsMultiPions::NNToxPiNN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) {
533       //                                          527       //
534       //     Nucleon-Nucleon producing xpi pio    528       //     Nucleon-Nucleon producing xpi pions cross sections
535       //                                          529       //
536 // assert(xpi>0 && xpi<=nMaxPiNN);                530 // assert(xpi>0 && xpi<=nMaxPiNN);
537 // assert(particle1->isNucleon() && particle2-    531 // assert(particle1->isNucleon() && particle2->isNucleon());
538                                                   532 
539       if (xpi == 1)                               533       if (xpi == 1)
540         return NNOnePi(particle1, particle2);     534         return NNOnePi(particle1, particle2);
541       else if (xpi == 2)                          535       else if (xpi == 2)
542         return NNTwoPi(particle1, particle2);     536         return NNTwoPi(particle1, particle2);
543       else if (xpi == 3)                          537       else if (xpi == 3)
544         return NNThreePi(particle1, particle2)    538         return NNThreePi(particle1, particle2);
545       else if (xpi == 4)                          539       else if (xpi == 4)
546         return NNFourPi(particle1, particle2);    540         return NNFourPi(particle1, particle2);
547       else // should never reach this point       541       else // should never reach this point
548         return 0.;                                542         return 0.;
549     }                                             543     }
550                                                   544 
551                                                   545 
552   G4double CrossSectionsMultiPions::spnPiPlusP    546   G4double CrossSectionsMultiPions::spnPiPlusPHE(const G4double x) {
553     // HE and LE pi- p and pi+ n                  547     // HE and LE pi- p and pi+ n
554     G4double ramass = 0.0;                        548     G4double ramass = 0.0;
555                                                   549 
556     if(x <= 1306.78) {                         << 550     if(x <= 1306.0) {
557        G4double y = x*x;                          551        G4double y = x*x;
558        G4double q2;                               552        G4double q2;
559        q2=(y-std::pow(1076.0, 2))*(y-std::pow(    553        q2=(y-std::pow(1076.0, 2))*(y-std::pow(800.0, 2))/(4.0*y);
560        if (q2 > 0.) {                             554        if (q2 > 0.) {
561           G4double q3=std::pow(q2, 3./2.);        555           G4double q3=std::pow(q2, 3./2.);
562           G4double f3=q3/(q3+std::pow(180.0, 3    556           G4double f3=q3/(q3+std::pow(180.0, 3));
563     G4double sdel;                                557     G4double sdel;
564     sdel=326.5/(std::pow((x-1215.0-ramass)*2.0    558     sdel=326.5/(std::pow((x-1215.0-ramass)*2.0/110.0,2)+1.0);
565     return sdel*f3*(1.0-5.0*ramass/1215.0);       559     return sdel*f3*(1.0-5.0*ramass/1215.0);
566        }                                          560        }
567        else {                                     561        else {
568           return 0;                               562           return 0;
569        }                                          563        }
570     }                                             564     }
571     if(x <= 1754.0) {                             565     if(x <= 1754.0) {
572       return -2.33730e-06*std::pow(x, 3)+1.138    566       return -2.33730e-06*std::pow(x, 3)+1.13819e-02*std::pow(x,2)
573         -1.83993e+01*x+9893.4;                    567         -1.83993e+01*x+9893.4;
574     } else if (x <= 2150.0) {                     568     } else if (x <= 2150.0) {
575       return 1.13531e-06*std::pow(x, 3)-6.9169    569       return 1.13531e-06*std::pow(x, 3)-6.91694e-03*std::pow(x, 2)
576         +1.39907e+01*x-9360.76;                   570         +1.39907e+01*x-9360.76;
577     } else {                                      571     } else {
578       return -3.18087*std::log(x)+52.9784;        572       return -3.18087*std::log(x)+52.9784;
579     }                                             573     }
580   }                                               574   }
581                                                   575 
582   G4double CrossSectionsMultiPions::spnPiMinus    576   G4double CrossSectionsMultiPions::spnPiMinusPHE(const G4double x) {
583     // HE pi- p and pi+ n                         577     // HE pi- p and pi+ n
584     G4double ramass = 0.0;                        578     G4double ramass = 0.0;
585                                                   579 
586     if(x <= 1275.8) {                             580     if(x <= 1275.8) {
587        G4double y = x*x;                          581        G4double y = x*x;
588        G4double q2;                               582        G4double q2;
589        q2=(y-std::pow(1076.0, 2))*(y-std::pow(    583        q2=(y-std::pow(1076.0, 2))*(y-std::pow(800.0, 2))/(4.0*y);
590        if (q2 > 0.) {                             584        if (q2 > 0.) {
591           G4double q3=std::pow(q2, 3./2.);        585           G4double q3=std::pow(q2, 3./2.);
592           G4double f3=q3/(q3+std::pow(180.0, 3    586           G4double f3=q3/(q3+std::pow(180.0, 3));
593     G4double sdel;                                587     G4double sdel;
594     sdel=326.5/(std::pow((x-1215.0-ramass)*2.0    588     sdel=326.5/(std::pow((x-1215.0-ramass)*2.0/110.0,2)+1.0);
595     return sdel*f3*(1.0-5.0*ramass/1215.0)/3.;    589     return sdel*f3*(1.0-5.0*ramass/1215.0)/3.;
596        }                                          590        }
597        else {                                     591        else {
598           return 0;                               592           return 0;
599        }                                          593        }
600     }                                             594     }
601     if(x <= 1495.0) {                             595     if(x <= 1495.0) {
602       return 0.00120683*(x-1372.52)*(x-1372.52    596       return 0.00120683*(x-1372.52)*(x-1372.52)+26.2058;
603     } else if(x <= 1578.0) {                      597     } else if(x <= 1578.0) {
604       return 1.15873e-05*x*x+49965.6/((x-1519.    598       return 1.15873e-05*x*x+49965.6/((x-1519.59)*(x-1519.59)+2372.55);
605     } else if(x <= 2028.4) {                      599     } else if(x <= 2028.4) {
606       return 34.0248+43262.2/((x-1681.65)*(x-1    600       return 34.0248+43262.2/((x-1681.65)*(x-1681.65)+1689.35);
607     } else if(x <= 7500.0) {                      601     } else if(x <= 7500.0) {
608       return 3.3e-7*(x-7500.0)*(x-7500.0)+24.5    602       return 3.3e-7*(x-7500.0)*(x-7500.0)+24.5;
609     } else {                                      603     } else {
610       return 24.5;                                604       return 24.5;
611     }                                             605     }
612   }                                               606   }
613                                                   607 
614   G4double CrossSectionsMultiPions::total(Part    608   G4double CrossSectionsMultiPions::total(Particle const * const p1, Particle const * const p2) {
615     G4double inelastic;                           609     G4double inelastic;
616     if(p1->isNucleon() && p2->isNucleon()) {      610     if(p1->isNucleon() && p2->isNucleon()) {
617       return NNTot(p1, p2);                       611       return NNTot(p1, p2);
618     } else if((p1->isNucleon() && p2->isDelta(    612     } else if((p1->isNucleon() && p2->isDelta()) ||
619               (p1->isDelta() && p2->isNucleon(    613               (p1->isDelta() && p2->isNucleon())) {
620       inelastic = NDeltaToNN(p1, p2);             614       inelastic = NDeltaToNN(p1, p2);
621     } else if((p1->isNucleon() && p2->isPion()    615     } else if((p1->isNucleon() && p2->isPion()) ||
622               (p1->isPion() && p2->isNucleon()    616               (p1->isPion() && p2->isNucleon())) {
623       return piNTot(p1,p2);                       617       return piNTot(p1,p2);
624     } else {                                      618     } else {
625       inelastic = 0.;                             619       inelastic = 0.;
626     }                                             620     }
627                                                   621 
628     return inelastic + elastic(p1, p2);           622     return inelastic + elastic(p1, p2);
629   }                                               623   }
630                                                   624 
631                                                   625 
632   G4double CrossSectionsMultiPions::piNIne(Par    626   G4double CrossSectionsMultiPions::piNIne(Particle const * const particle1, Particle const * const particle2) {
633     //      piN inelastic cross section (Delta    627     //      piN inelastic cross section (Delta excluded)
634                                                   628     
635     const Particle *pion;                         629     const Particle *pion;
636     const Particle *nucleon;                      630     const Particle *nucleon;
637     if(particle1->isNucleon()) {                  631     if(particle1->isNucleon()) {
638       nucleon = particle1;                        632       nucleon = particle1;
639       pion = particle2;                           633       pion = particle2;
640     } else {                                      634     } else {
641       pion = particle1;                           635       pion = particle1;
642       nucleon = particle2;                        636       nucleon = particle2;
643     }                                             637     }
644 // assert(pion->isPion());                        638 // assert(pion->isPion());
645                                                   639     
646     const G4double pLab = KinematicsUtils::mom    640     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
647                                                   641     
648     // these limits correspond to sqrt(s)=1230    642     // these limits correspond to sqrt(s)=1230 and 20000 MeV
649     if(pLab>212677. || pLab<296.367)              643     if(pLab>212677. || pLab<296.367)
650       return 0.0;                                 644       return 0.0;
651                                                   645     
652     const G4int ipit3 = ParticleTable::getIsos    646     const G4int ipit3 = ParticleTable::getIsospin(pion->getType());
653     const G4int ind2t3 = ParticleTable::getIso    647     const G4int ind2t3 = ParticleTable::getIsospin(nucleon->getType());
654     const G4int cg = 4 + ind2t3*ipit3;            648     const G4int cg = 4 + ind2t3*ipit3;
655 // assert(cg==2 || cg==4 || cg==6);               649 // assert(cg==2 || cg==4 || cg==6);
656                                                   650     
657 //    const G4double p1=1e-3*pLab;                651 //    const G4double p1=1e-3*pLab;
658 //    const G4double p2=std::log(p1);             652 //    const G4double p2=std::log(p1);
659     G4double xpipp = 0.0;                         653     G4double xpipp = 0.0;
660     G4double xpimp = 0.0;                         654     G4double xpimp = 0.0;
661                                                   655     
662     if(cg!=2) {                                   656     if(cg!=2) {
663       // x-section pi+ p inelastique :            657       // x-section pi+ p inelastique :
664       xpipp=piPluspIne(pion,nucleon);             658       xpipp=piPluspIne(pion,nucleon);
665                                                   659       
666       if(cg==6) // cas pi+ p et pi- n             660       if(cg==6) // cas pi+ p et pi- n
667         return xpipp;                             661         return xpipp;
668     }                                             662     }
669                                                   663     
670     // x-section pi- p inelastique :              664     // x-section pi- p inelastique :
671     xpimp=piMinuspIne(pion,nucleon);              665     xpimp=piMinuspIne(pion,nucleon);
672                                                   666     
673     if(cg==2) // cas pi- p et pi+ n               667     if(cg==2) // cas pi- p et pi+ n
674       return xpimp;                               668       return xpimp;
675     else      // cas pi0 p et pi0 n               669     else      // cas pi0 p et pi0 n
676       return 0.5*(xpipp+xpimp);                   670       return 0.5*(xpipp+xpimp);
677   }                                               671   }
678                                                   672   
679   G4double CrossSectionsMultiPions::piNToDelta    673   G4double CrossSectionsMultiPions::piNToDelta(Particle const * const particle1, Particle const * const particle2) {
680     //      piN Delta production                  674     //      piN Delta production
681                                                   675 
682     G4double x = KinematicsUtils::totalEnergyI    676     G4double x = KinematicsUtils::totalEnergyInCM(particle1, particle2);
683     if(x>20000.) return 0.0; // no cross secti    677     if(x>20000.) return 0.0; // no cross section above this value
684                                                   678 
685     G4int ipit3 = 0;                              679     G4int ipit3 = 0;
686     G4int ind2t3 = 0;                             680     G4int ind2t3 = 0;
687     const G4double ramass = 0.0;                  681     const G4double ramass = 0.0;
688                                                   682 
689     if(particle1->isPion()) {                     683     if(particle1->isPion()) {
690       ipit3 = ParticleTable::getIsospin(partic    684       ipit3 = ParticleTable::getIsospin(particle1->getType());
691       ind2t3 = ParticleTable::getIsospin(parti    685       ind2t3 = ParticleTable::getIsospin(particle2->getType());
692     } else if(particle2->isPion()) {              686     } else if(particle2->isPion()) {
693       ipit3 = ParticleTable::getIsospin(partic    687       ipit3 = ParticleTable::getIsospin(particle2->getType());
694       ind2t3 = ParticleTable::getIsospin(parti    688       ind2t3 = ParticleTable::getIsospin(particle1->getType());
695     }                                             689     }
696                                                   690 
697     const G4double y=x*x;                         691     const G4double y=x*x;
698     const G4double q2=(y-1076.0*1076.0)*(y-800    692     const G4double q2=(y-1076.0*1076.0)*(y-800.0*800.0)/y/4.0;
699     if (q2 <= 0.) {                               693     if (q2 <= 0.) {
700       return 0.0;                                 694       return 0.0;
701     }                                             695     }
702     const G4double q3 = std::pow(std::sqrt(q2)    696     const G4double q3 = std::pow(std::sqrt(q2),3);
703     const G4double f3 = q3/(q3 + 5832000.); //    697     const G4double f3 = q3/(q3 + 5832000.); // 5832000 = 180^3
704     G4double sdelResult = 326.5/(std::pow((x-1    698     G4double sdelResult = 326.5/(std::pow((x-1215.0-ramass)*2.0/(110.0-ramass), 2)+1.0);
705     sdelResult = sdelResult*(1.0-5.0*ramass/12    699     sdelResult = sdelResult*(1.0-5.0*ramass/1215.0);
706     const G4int cg = 4 + ind2t3*ipit3;            700     const G4int cg = 4 + ind2t3*ipit3;
707     sdelResult = sdelResult*f3*cg/6.0;            701     sdelResult = sdelResult*f3*cg/6.0;
708                                                   702 
709     return sdelResult;                            703     return sdelResult;
710   }                                               704   }
711                                                   705 
712   G4double CrossSectionsMultiPions::piNTot(Par    706   G4double CrossSectionsMultiPions::piNTot(Particle const * const particle1, Particle const * const particle2) {
713     //      FUNCTION SPN(X,IND2T3,IPIT3,f17)      707     //      FUNCTION SPN(X,IND2T3,IPIT3,f17)
714     // SIGMA(PI+ + P) IN THE (3,3) REGION         708     // SIGMA(PI+ + P) IN THE (3,3) REGION
715     // NEW FIT BY J.VANDERMEULEN  + FIT BY Th     709     // NEW FIT BY J.VANDERMEULEN  + FIT BY Th AOUST ABOVE (3,3) RES
716     //                              CONST AT L    710     //                              CONST AT LOW AND VERY HIGH ENERGY
717     //      COMMON/BL8/RATHR,RAMASS               711     //      COMMON/BL8/RATHR,RAMASS                                           REL21800
718     //      integer f17                           712     //      integer f17
719     // RATHR and RAMASS are always 0.0!!!         713     // RATHR and RAMASS are always 0.0!!!
720                                                   714 
721     G4double x = KinematicsUtils::totalEnergyI    715     G4double x = KinematicsUtils::totalEnergyInCM(particle1, particle2);
722                                                   716 
723     G4int ipit3 = 0;                              717     G4int ipit3 = 0;
724     G4int ind2t3 = 0;                             718     G4int ind2t3 = 0;
725                                                   719 
726     if(particle1->isPion()) {                     720     if(particle1->isPion()) {
727       ipit3 = ParticleTable::getIsospin(partic    721       ipit3 = ParticleTable::getIsospin(particle1->getType());
728       ind2t3 = ParticleTable::getIsospin(parti    722       ind2t3 = ParticleTable::getIsospin(particle2->getType());
729     } else if(particle2->isPion()) {              723     } else if(particle2->isPion()) {
730       ipit3 = ParticleTable::getIsospin(partic    724       ipit3 = ParticleTable::getIsospin(particle2->getType());
731       ind2t3 = ParticleTable::getIsospin(parti    725       ind2t3 = ParticleTable::getIsospin(particle1->getType());
732     }                                             726     }
733                                                   727 
734     G4double spnResult=0.0;                       728     G4double spnResult=0.0;
735                                                   729 
736     // HE pi+ p and pi- n                         730     // HE pi+ p and pi- n
737       if((ind2t3 == 1 && ipit3 == 2) || (ind2t    731       if((ind2t3 == 1 && ipit3 == 2) || (ind2t3 == -1 && ipit3 == -2))
738         spnResult=spnPiPlusPHE(x);                732         spnResult=spnPiPlusPHE(x);
739       else if((ind2t3 == 1 && ipit3 == -2) ||     733       else if((ind2t3 == 1 && ipit3 == -2) || (ind2t3 == -1 && ipit3 == 2))
740         spnResult=spnPiMinusPHE(x);               734         spnResult=spnPiMinusPHE(x);
741       else if(ipit3 == 0) spnResult = (spnPiPl    735       else if(ipit3 == 0) spnResult = (spnPiPlusPHE(x) + spnPiMinusPHE(x))/2.0; // (spnpipphe(x)+spnpimphe(x))/2.0
742       else {                                      736       else {
743         INCL_ERROR("Unknown configuration!\n"     737         INCL_ERROR("Unknown configuration!\n" << particle1->print() << particle2->print() << '\n');
744       }                                           738       }
745                                                   739 
746     return spnResult;                             740     return spnResult;
747   }                                               741   }
748                                                   742 
749   G4double CrossSectionsMultiPions::NDeltaToNN    743   G4double CrossSectionsMultiPions::NDeltaToNN(Particle const * const p1, Particle const * const p2) {
750     const G4int isospin = ParticleTable::getIs    744     const G4int isospin = ParticleTable::getIsospin(p1->getType()) + ParticleTable::getIsospin(p2->getType());
751     if(isospin==4 || isospin==-4) return 0.0;     745     if(isospin==4 || isospin==-4) return 0.0;
752                                                   746 
753     G4double s = KinematicsUtils::squareTotalE    747     G4double s = KinematicsUtils::squareTotalEnergyInCM(p1, p2);
754     G4double Ecm = std::sqrt(s);                  748     G4double Ecm = std::sqrt(s);
755     G4int deltaIsospin;                           749     G4int deltaIsospin;
756     G4double deltaMass;                           750     G4double deltaMass;
757     if(p1->isDelta()) {                           751     if(p1->isDelta()) {
758       deltaIsospin = ParticleTable::getIsospin    752       deltaIsospin = ParticleTable::getIsospin(p1->getType());
759       deltaMass = p1->getMass();                  753       deltaMass = p1->getMass();
760     } else {                                      754     } else {
761       deltaIsospin = ParticleTable::getIsospin    755       deltaIsospin = ParticleTable::getIsospin(p2->getType());
762       deltaMass = p2->getMass();                  756       deltaMass = p2->getMass();
763     }                                             757     }
764                                                   758 
765     if(Ecm <= 938.3 + deltaMass) {                759     if(Ecm <= 938.3 + deltaMass) {
766       return 0.0;                                 760       return 0.0;
767     }                                             761     }
768                                                   762 
769     if(Ecm < 938.3 + deltaMass + 2.0) {           763     if(Ecm < 938.3 + deltaMass + 2.0) {
770       Ecm = 938.3 + deltaMass + 2.0;              764       Ecm = 938.3 + deltaMass + 2.0;
771       s = Ecm*Ecm;                                765       s = Ecm*Ecm;
772     }                                             766     }
773                                                   767 
774     const G4double x = (s - 4.*ParticleTable::    768     const G4double x = (s - 4.*ParticleTable::effectiveNucleonMass2) /
775       (s - std::pow(ParticleTable::effectiveNu    769       (s - std::pow(ParticleTable::effectiveNucleonMass + deltaMass, 2));
776     const G4double y = s/(s - std::pow(deltaMa    770     const G4double y = s/(s - std::pow(deltaMass - ParticleTable::effectiveNucleonMass, 2));
777     /* Concerning the way we calculate the lab    771     /* Concerning the way we calculate the lab momentum, see the considerations
778      * in CrossSections::elasticNNLegacy().       772      * in CrossSections::elasticNNLegacy().
779      */                                           773      */
780     G4double sDelta;                              774     G4double sDelta;
781     const G4double xsiso2=NNInelasticIso(Ecm,     775     const G4double xsiso2=NNInelasticIso(Ecm, 2);
782     if (isospin != 0)                             776     if (isospin != 0)
783       sDelta = NNOnePiOrDelta(Ecm, isospin, xs    777       sDelta = NNOnePiOrDelta(Ecm, isospin, xsiso2);
784     else {                                        778     else {
785       const G4double xsiso0=NNInelasticIso(Ecm    779       const G4double xsiso0=NNInelasticIso(Ecm, 0);
786       sDelta = 0.25*(NNOnePiOrDelta(Ecm, 0, xs    780       sDelta = 0.25*(NNOnePiOrDelta(Ecm, 0, xsiso0)+ NNOnePiOrDelta(Ecm, 2, xsiso2));
787     }                                             781     }
788     G4double result = 0.5 * x * y * sDelta;       782     G4double result = 0.5 * x * y * sDelta;
789     /* modification for pion-induced cascade (    783     /* modification for pion-induced cascade (see JC and MC LEMAIRE,NPA489(88)781
790      * result=3.*result                           784      * result=3.*result
791      * pi absorption increased also for intern    785      * pi absorption increased also for internal pions (7/3/01)
792      */                                           786      */
793     result *= 3.*(32.0 + isospin * isospin * (    787     result *= 3.*(32.0 + isospin * isospin * (deltaIsospin * deltaIsospin - 5))/64.0;
794     result /= 1.0 + 0.25 * (isospin * isospin)    788     result /= 1.0 + 0.25 * (isospin * isospin);
795     return result;                                789     return result;
796   }                                               790   }
797                                                   791 
798   G4double CrossSectionsMultiPions::NNToNDelta    792   G4double CrossSectionsMultiPions::NNToNDelta(Particle const * const p1, Particle const * const p2) {
799 // assert(p1->isNucleon() && p2->isNucleon());    793 // assert(p1->isNucleon() && p2->isNucleon());
800     const G4int isospin = ParticleTable::getIs    794     const G4int isospin = ParticleTable::getIsospin(p1->getType()) + ParticleTable::getIsospin(p2->getType());
801     G4double sigma = NNOnePiOrDelta(p1, p2);      795     G4double sigma = NNOnePiOrDelta(p1, p2);
802     if(isospin==0)                                796     if(isospin==0)
803       sigma *= 0.5;                               797       sigma *= 0.5;
804     return sigma;                                 798     return sigma;
805   }                                               799   }
806                                                   800 
807   G4double CrossSectionsMultiPions::elastic(Pa    801   G4double CrossSectionsMultiPions::elastic(Particle const * const p1, Particle const * const p2) {
808 //    if(!p1->isPion() && !p2->isPion()){         802 //    if(!p1->isPion() && !p2->isPion()){
809     if((p1->isNucleon()||p1->isDelta()) && (p2    803     if((p1->isNucleon()||p1->isDelta()) && (p2->isNucleon()||p2->isDelta())){
810       return NNElastic(p1, p2);                   804       return NNElastic(p1, p2);
811       }                                           805       }
812 //    else if (p1->isNucleon() || p2->isNucleo    806 //    else if (p1->isNucleon() || p2->isNucleon()){
813   else if ((p1->isNucleon() && p2->isPion()) |    807   else if ((p1->isNucleon() && p2->isPion()) || (p2->isNucleon() && p1->isPion())){
814       G4double pielas = piNTot(p1,p2) - piNIne    808       G4double pielas = piNTot(p1,p2) - piNIne(p1,p2) - piNToDelta(p1,p2);
815         if (pielas < 0.){                         809         if (pielas < 0.){
816             pielas = 0.;                          810             pielas = 0.;
817         }                                         811         }
818 //        return piNTot(p1,p2) - piNIne(p1,p2)    812 //        return piNTot(p1,p2) - piNIne(p1,p2) - piNToDelta(p1,p2);
819         return pielas;                            813         return pielas;
820       }                                           814       }
821     else {                                        815     else {
822        return 0.0;                                816        return 0.0;
823       }                                           817       }
824   }                                               818   }
825                                                   819 
826   G4double CrossSectionsMultiPions::calculateN    820   G4double CrossSectionsMultiPions::calculateNNAngularSlope(G4double pl, G4int iso) {
827     G4double x = 0.001 * pl; // Change to GeV     821     G4double x = 0.001 * pl; // Change to GeV
828     if(iso != 0) {                                822     if(iso != 0) {
829       if(pl <= 2000.0) {                          823       if(pl <= 2000.0) {
830         x = std::pow(x, 8);                       824         x = std::pow(x, 8);
831         return 5.5e-6 * x/(7.7 + x);              825         return 5.5e-6 * x/(7.7 + x);
832       } else {                                    826       } else {
833         return (5.34 + 0.67*(x - 2.0)) * 1.0e-    827         return (5.34 + 0.67*(x - 2.0)) * 1.0e-6;
834       }                                           828       }
835     } else {                                      829     } else {
836       if(pl < 800.0) {                            830       if(pl < 800.0) {
837         G4double b = (7.16 - 1.63*x) * 1.0e-6;    831         G4double b = (7.16 - 1.63*x) * 1.0e-6;
838         return b/(1.0 + std::exp(-(x - 0.45)/0    832         return b/(1.0 + std::exp(-(x - 0.45)/0.05));
839       } else if(pl < 1100.0) {                    833       } else if(pl < 1100.0) {
840         return (9.87 - 4.88 * x) * 1.0e-6;        834         return (9.87 - 4.88 * x) * 1.0e-6;
841       } else {                                    835       } else {
842         return (3.68 + 0.76*x) * 1.0e-6;          836         return (3.68 + 0.76*x) * 1.0e-6;
843       }                                           837       }
844     }                                             838     }
845     return 0.0; // Should never reach this poi    839     return 0.0; // Should never reach this point
846   }                                               840   }
847                                                   841 
848                                                   842 
849     G4double CrossSectionsMultiPions::piNToxPi    843     G4double CrossSectionsMultiPions::piNToxPiN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) {
850         //                                        844         //
851         //     pion-Nucleon producing xpi pion    845         //     pion-Nucleon producing xpi pions cross sections
852         //                                        846         //
853     const Particle *pion;                      << 
854     const Particle *nucleon;                   << 
855     if(particle1->isNucleon()) {               << 
856       nucleon = particle1;                     << 
857       pion = particle2;                        << 
858     } else {                                   << 
859       pion = particle1;                        << 
860       nucleon = particle2;                     << 
861     }                                          << 
862 // assert(xpi>1 && xpi<=nMaxPiPiN);               847 // assert(xpi>1 && xpi<=nMaxPiPiN);
863 // assert((particle1->isNucleon() && particle2    848 // assert((particle1->isNucleon() && particle2->isPion()) || (particle1->isPion() && particle2->isNucleon()));
864         const G4double plab = KinematicsUtils: << 849              if (xpi == 2) {
865     if (xpi == 2) {                            << 850                         G4double OnePi=piNOnePi(particle1,particle2);
866       G4double OnePi=piNOnePi(particle1,partic << 851                         if (OnePi < 1.e-09) OnePi = 0.;
867       if (OnePi < 1.e-09) OnePi = 0.;          << 
868             return OnePi;                         852             return OnePi;
869         }                                      << 853                 }
870         else if (xpi == 3){                       854         else if (xpi == 3){
871       G4double TwoPi=piNTwoPi(particle1,partic << 855                      G4double TwoPi=piNTwoPi(particle1,particle2);
872       if (TwoPi < 1.e-09) TwoPi = 0.;          << 856                     if (TwoPi < 1.e-09) TwoPi = 0.;                 
873             return TwoPi;                         857             return TwoPi;
874         }                                      << 858                 }
875         else if (xpi == 4) {                      859         else if (xpi == 4) {
876             G4double piNThreePi = piNIne(parti    860             G4double piNThreePi = piNIne(particle1,particle2) - piNOnePi(particle1,particle2) - piNTwoPi(particle1,particle2);
877             if (piNThreePi < 1.e-09 || plab <  << 861                      if (piNThreePi < 1.e-09) piNThreePi = 0.;                  
878             return piNThreePi;                    862             return piNThreePi;
879         } else // should never reach this poin    863         } else // should never reach this point
880           return 0.0;                             864           return 0.0;
881     }                                             865     }
882                                                   866 
883   G4double CrossSectionsMultiPions::piNOnePi(P    867   G4double CrossSectionsMultiPions::piNOnePi(Particle const * const particle1, Particle const * const particle2) {
884     const Particle *pion;                         868     const Particle *pion;
885     const Particle *nucleon;                      869     const Particle *nucleon;
886     if(particle1->isNucleon()) {                  870     if(particle1->isNucleon()) {
887       nucleon = particle1;                        871       nucleon = particle1;
888       pion = particle2;                           872       pion = particle2;
889     } else {                                      873     } else {
890       pion = particle1;                           874       pion = particle1;
891       nucleon = particle2;                        875       nucleon = particle2;
892     }                                             876     }
893 // assert(pion->isPion());                        877 // assert(pion->isPion());
894                                                   878     
895     const G4double pLab = KinematicsUtils::mom    879     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
896                                                   880     
897     // this limit corresponds to sqrt(s)=1230     881     // this limit corresponds to sqrt(s)=1230 MeV
898     if(pLab<296.367)                              882     if(pLab<296.367)
899       return 0.0;                                 883       return 0.0;
900                                                   884     
901     const G4int ipi = ParticleTable::getIsospi    885     const G4int ipi = ParticleTable::getIsospin(pion->getType());
902     const G4int ind2 = ParticleTable::getIsosp    886     const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
903     const G4int cg = 4 + ind2*ipi;                887     const G4int cg = 4 + ind2*ipi;
904 // assert(cg==2 || cg==4 || cg==6);               888 // assert(cg==2 || cg==4 || cg==6);
905                                                   889     
906     //  const G4double p1=1e-3*pLab;              890     //  const G4double p1=1e-3*pLab;
907     G4double tamp6=0.;                            891     G4double tamp6=0.;
908     G4double tamp2=0.;                            892     G4double tamp2=0.;
909     const G4double elas = elastic(particle1, p << 
910                                                   893     
911     //   X-SECTION PI+ P INELASTIQUE :            894     //   X-SECTION PI+ P INELASTIQUE :
912     if(cg != 2) {                                 895     if(cg != 2) {
913       tamp6=piPluspOnePi(particle1,particle2);    896       tamp6=piPluspOnePi(particle1,particle2);
914       if (cg == 6){ //   CAS PI+ P ET PI- N    << 897       if (cg == 6) //   CAS PI+ P ET PI- N
915         if(tamp6 >= elas && pLab < 410.) tamp6 << 
916         return tamp6;                             898         return tamp6;
917       }                                        << 
918     }                                             899     }
919                                                   900     
920     //   X-SECTION PI- P INELASTIQUE :            901     //   X-SECTION PI- P INELASTIQUE :
921     tamp2=piMinuspOnePi(particle1,particle2);     902     tamp2=piMinuspOnePi(particle1,particle2);
922     if (tamp2 < 0.0) tamp2=0;                     903     if (tamp2 < 0.0) tamp2=0;
923                                                   904     
924     if (cg == 2) //   CAS PI- P ET PI+ N          905     if (cg == 2) //   CAS PI- P ET PI+ N
925       return tamp2;                               906       return tamp2;
926     else {       //   CAS PI0 P ET PI0 N          907     else {       //   CAS PI0 P ET PI0 N
927       G4double s1pin = 0.5*(tamp6+tamp2);         908       G4double s1pin = 0.5*(tamp6+tamp2);
928       const G4double inelastic = piNIne(partic    909       const G4double inelastic = piNIne(particle1, particle2);
929       if(s1pin >= elas && pLab < 410.) s1pin = << 
930       if (s1pin > inelastic)                      910       if (s1pin > inelastic)
931         s1pin = inelastic;                        911         s1pin = inelastic;
932       return s1pin;                               912       return s1pin;
933     }                                             913     }
934   }                                               914   }
935                                                   915   
936   G4double CrossSectionsMultiPions::piNTwoPi(P    916   G4double CrossSectionsMultiPions::piNTwoPi(Particle const * const particle1, Particle const * const particle2) {
937     //                                            917     //
938     //     pion-nucleon interaction, producing    918     //     pion-nucleon interaction, producing 2 pions
939     //     fit from Landolt-Bornstein multipli    919     //     fit from Landolt-Bornstein multiplied by factor determined with evaluation of total xs
940     //                                            920     //
941                                                   921     
942     const Particle *pion;                         922     const Particle *pion;
943     const Particle *nucleon;                      923     const Particle *nucleon;
944     if(particle1->isNucleon()) {                  924     if(particle1->isNucleon()) {
945       nucleon = particle1;                        925       nucleon = particle1;
946       pion = particle2;                           926       pion = particle2;
947     } else {                                      927     } else {
948       pion = particle1;                           928       pion = particle1;
949       nucleon = particle2;                        929       nucleon = particle2;
950     }                                             930     }
951 // assert(pion->isPion());                        931 // assert(pion->isPion());
952                                                   932     
953     const G4double pLab = KinematicsUtils::mom    933     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
954     const G4double elas = elastic(pion, nucleo << 
955                                                   934     
956     // this limit corresponds to sqrt(s)=1230     935     // this limit corresponds to sqrt(s)=1230 MeV
957     if(pLab<296.367)                              936     if(pLab<296.367)
958       return 0.0;                                 937       return 0.0;
959                                                   938     
960     const G4int ipi = ParticleTable::getIsospi    939     const G4int ipi = ParticleTable::getIsospin(pion->getType());
961     const G4int ind2 = ParticleTable::getIsosp    940     const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
962     const G4int cg = 4 + ind2*ipi;                941     const G4int cg = 4 + ind2*ipi;
963 // assert(cg==2 || cg==4 || cg==6);               942 // assert(cg==2 || cg==4 || cg==6);
964                                                   943     
965     G4double tamp6=0.;                            944     G4double tamp6=0.;
966     G4double tamp2=0.;                            945     G4double tamp2=0.;
967                                                   946     
968     //   X-SECTION PI+ P INELASTIQUE :            947     //   X-SECTION PI+ P INELASTIQUE :
969     if(cg!=2) {                                   948     if(cg!=2) {
970       tamp6=piPluspTwoPi(particle1,particle2);    949       tamp6=piPluspTwoPi(particle1,particle2);
971       if(cg==6){ //   CAS PI+ P ET PI- N       << 950       
972         if(tamp6 >= elas && pLab < 410.) tamp6 << 951       if(cg==6) //   CAS PI+ P ET PI- N
973         return tamp6;}                         << 952         return tamp6;
974     }                                             953     }
975                                                   954     
976     //   X-SECTION PI- P INELASTIQUE :            955     //   X-SECTION PI- P INELASTIQUE :
977     tamp2=piMinuspTwoPi(particle1,particle2);     956     tamp2=piMinuspTwoPi(particle1,particle2);
978                                                   957     
979     if(cg==2) //   CAS PI- P ET PI+ N             958     if(cg==2) //   CAS PI- P ET PI+ N
980       return tamp2;                               959       return tamp2;
981     else {    //   CAS PI0 P ET PI0 N             960     else {    //   CAS PI0 P ET PI0 N
982       const G4double s2pin=0.5*(tamp6+tamp2);     961       const G4double s2pin=0.5*(tamp6+tamp2);
983       return s2pin;                               962       return s2pin;
984     }                                             963     }
985   }                                               964   }
986                                                   965   
987   G4double CrossSectionsMultiPions::piPluspIne    966   G4double CrossSectionsMultiPions::piPluspIne(Particle const * const particle1, Particle const * const particle2) {
988     //      piPlusP inelastic cross section (D    967     //      piPlusP inelastic cross section (Delta excluded)
989                                                   968     
990     const Particle *pion;                         969     const Particle *pion;
991     const Particle *nucleon;                      970     const Particle *nucleon;
992     if(particle1->isNucleon()) {                  971     if(particle1->isNucleon()) {
993       nucleon = particle1;                        972       nucleon = particle1;
994       pion = particle2;                           973       pion = particle2;
995     } else {                                      974     } else {
996       pion = particle1;                           975       pion = particle1;
997       nucleon = particle2;                        976       nucleon = particle2;
998     }                                             977     }
999 // assert(pion->isPion());                        978 // assert(pion->isPion());
1000                                                  979     
1001     const G4double pLab = KinematicsUtils::mo    980     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1002                                                  981     
1003     // these limits correspond to sqrt(s)=123    982     // these limits correspond to sqrt(s)=1230 and 20000 MeV
1004     if(pLab>212677. || pLab<296.367)             983     if(pLab>212677. || pLab<296.367)
1005       return 0.0;                                984       return 0.0;
1006                                                  985     
1007 //    const G4int ipit3 = ParticleTable::getI    986 //    const G4int ipit3 = ParticleTable::getIsospin(pion->getType());
1008 //    const G4int ind2t3 = ParticleTable::get    987 //    const G4int ind2t3 = ParticleTable::getIsospin(nucleon->getType());
1009 //    const G4int cg = 4 + ind2t3*ipit3;         988 //    const G4int cg = 4 + ind2t3*ipit3;
1010 //    assert(cg==2 || cg==4 || cg==6);           989 //    assert(cg==2 || cg==4 || cg==6);
1011                                                  990     
1012     const G4double p1=1e-3*pLab;                 991     const G4double p1=1e-3*pLab;
1013     const G4double p2=std::log(p1);              992     const G4double p2=std::log(p1);
1014     G4double xpipp = 0.0;                        993     G4double xpipp = 0.0;
1015                                                  994     
1016     // x-section pi+ p inelastique :             995     // x-section pi+ p inelastique :
1017     if(p1<=0.75)                                 996     if(p1<=0.75)
1018       xpipp=17.965*std::pow(p1, 5.4606);         997       xpipp=17.965*std::pow(p1, 5.4606);
1019     else                                         998     else
1020       xpipp=24.3-12.3*std::pow(p1, -1.91)+0.3    999       xpipp=24.3-12.3*std::pow(p1, -1.91)+0.324*p2*p2-2.44*p2;
1021     // cas pi+ p et pi- n                        1000     // cas pi+ p et pi- n
1022     return xpipp;                                1001     return xpipp;
1023                                                  1002     
1024   }                                              1003   }
1025                                                  1004 
1026   G4double CrossSectionsMultiPions::piMinuspI    1005   G4double CrossSectionsMultiPions::piMinuspIne(Particle const * const particle1, Particle const * const particle2) {
1027     //      piMinusp inelastic cross section     1006     //      piMinusp inelastic cross section (Delta excluded)
1028                                                  1007     
1029     const Particle *pion;                        1008     const Particle *pion;
1030     const Particle *nucleon;                     1009     const Particle *nucleon;
1031     if(particle1->isNucleon()) {                 1010     if(particle1->isNucleon()) {
1032       nucleon = particle1;                       1011       nucleon = particle1;
1033       pion = particle2;                          1012       pion = particle2;
1034     } else {                                     1013     } else {
1035       pion = particle1;                          1014       pion = particle1;
1036       nucleon = particle2;                       1015       nucleon = particle2;
1037     }                                            1016     }
1038 // assert(pion->isPion());                       1017 // assert(pion->isPion());
1039                                                  1018     
1040     const G4double pLab = KinematicsUtils::mo    1019     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1041                                                  1020     
1042     // these limits correspond to sqrt(s)=123    1021     // these limits correspond to sqrt(s)=1230 and 20000 MeV
1043     if(pLab>212677. || pLab<296.367)             1022     if(pLab>212677. || pLab<296.367)
1044       return 0.0;                                1023       return 0.0;
1045                                                  1024     
1046 //    const G4int ipit3 = ParticleTable::getI    1025 //    const G4int ipit3 = ParticleTable::getIsospin(pion->getType());
1047 //    const G4int ind2t3 = ParticleTable::get    1026 //    const G4int ind2t3 = ParticleTable::getIsospin(nucleon->getType());
1048 //    const G4int cg = 4 + ind2t3*ipit3;         1027 //    const G4int cg = 4 + ind2t3*ipit3;
1049 //    assert(cg==2 || cg==4 || cg==6);           1028 //    assert(cg==2 || cg==4 || cg==6);
1050                                                  1029     
1051     const G4double p1=1e-3*pLab;                 1030     const G4double p1=1e-3*pLab;
1052     const G4double p2=std::log(p1);              1031     const G4double p2=std::log(p1);
1053     G4double xpimp = 0.0;                        1032     G4double xpimp = 0.0;
1054                                                  1033     
1055     // x-section pi- p inelastique :             1034     // x-section pi- p inelastique :
1056     if(p1 <= 0.4731)                             1035     if(p1 <= 0.4731)
1057       xpimp=0;                                   1036       xpimp=0;
1058     else                                         1037     else
1059       xpimp=26.6-7.18*std::pow(p1, -1.86)+0.3    1038       xpimp=26.6-7.18*std::pow(p1, -1.86)+0.327*p2*p2-2.81*p2;
1060     if(xpimp<0.)                                 1039     if(xpimp<0.)
1061       xpimp=0;                                   1040       xpimp=0;
1062                                                  1041     
1063     // cas pi- p et pi+ n                        1042     // cas pi- p et pi+ n
1064     return xpimp;                                1043     return xpimp;
1065                                                  1044     
1066   }                                              1045   }
1067                                                  1046 
1068   G4double CrossSectionsMultiPions::piPluspOn    1047   G4double CrossSectionsMultiPions::piPluspOnePi(Particle const * const particle1, Particle const * const particle2) {
1069     const Particle *pion;                        1048     const Particle *pion;
1070     const Particle *nucleon;                     1049     const Particle *nucleon;
1071     if(particle1->isNucleon()) {                 1050     if(particle1->isNucleon()) {
1072       nucleon = particle1;                       1051       nucleon = particle1;
1073       pion = particle2;                          1052       pion = particle2;
1074     } else {                                     1053     } else {
1075       pion = particle1;                          1054       pion = particle1;
1076       nucleon = particle2;                       1055       nucleon = particle2;
1077     }                                            1056     }
1078 // assert(pion->isPion());                       1057 // assert(pion->isPion());
1079                                                  1058     
1080     const G4double pLab = KinematicsUtils::mo    1059     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1081                                                  1060     
1082     // this limit corresponds to sqrt(s)=1230    1061     // this limit corresponds to sqrt(s)=1230 MeV
1083     if(pLab<296.367)                             1062     if(pLab<296.367)
1084       return 0.0;                                1063       return 0.0;
1085                                                  1064     
1086     //  const G4int ipi = ParticleTable::getI    1065     //  const G4int ipi = ParticleTable::getIsospin(pion->getType());
1087     //  const G4int ind2 = ParticleTable::get    1066     //  const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
1088     //  const G4int cg = 4 + ind2*ipi;           1067     //  const G4int cg = 4 + ind2*ipi;
1089     //  assert(cg==2 || cg==4 || cg==6);         1068     //  assert(cg==2 || cg==4 || cg==6);
1090                                                  1069     
1091     const G4double p1=1e-3*pLab;                 1070     const G4double p1=1e-3*pLab;
1092     G4double tamp6=0.;                           1071     G4double tamp6=0.;
1093                                                  1072     
1094     //   X-SECTION PI+ P INELASTIQUE :           1073     //   X-SECTION PI+ P INELASTIQUE :
1095     if(pLab < 1532.52) // corresponds to sqrt    1074     if(pLab < 1532.52) // corresponds to sqrt(s)=1946 MeV
1096       tamp6=piPluspIne(particle1, particle2);    1075       tamp6=piPluspIne(particle1, particle2);
1097     else                                         1076     else
1098       tamp6=0.204+18.2*std::pow(p1, -1.72)+6.    1077       tamp6=0.204+18.2*std::pow(p1, -1.72)+6.33*std::pow(p1, -1.13);
1099                                                  1078     
1100     //   CAS PI+ P ET PI- N                      1079     //   CAS PI+ P ET PI- N
1101     return tamp6;                                1080     return tamp6;
1102                                                  1081     
1103   }                                              1082   }
1104                                                  1083 
1105   G4double CrossSectionsMultiPions::piMinuspO    1084   G4double CrossSectionsMultiPions::piMinuspOnePi(Particle const * const particle1, Particle const * const particle2) {
1106     const Particle *pion;                        1085     const Particle *pion;
1107     const Particle *nucleon;                     1086     const Particle *nucleon;
1108     if(particle1->isNucleon()) {                 1087     if(particle1->isNucleon()) {
1109       nucleon = particle1;                       1088       nucleon = particle1;
1110       pion = particle2;                          1089       pion = particle2;
1111     } else {                                     1090     } else {
1112       pion = particle1;                          1091       pion = particle1;
1113       nucleon = particle2;                       1092       nucleon = particle2;
1114     }                                            1093     }
1115 // assert(pion->isPion());                       1094 // assert(pion->isPion());
1116                                                  1095     
1117     const G4double pLab = KinematicsUtils::mo    1096     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1118                                                  1097     
1119     // this limit corresponds to sqrt(s)=1230    1098     // this limit corresponds to sqrt(s)=1230 MeV
1120     if(pLab<296.367)                             1099     if(pLab<296.367)
1121       return 0.0;                                1100       return 0.0;
1122                                                  1101     
1123     //  const G4int ipi = ParticleTable::getI    1102     //  const G4int ipi = ParticleTable::getIsospin(pion->getType());
1124     //  const G4int ind2 = ParticleTable::get    1103     //  const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
1125     //  const G4int cg = 4 + ind2*ipi;           1104     //  const G4int cg = 4 + ind2*ipi;
1126     //  assert(cg==2 || cg==4 || cg==6);         1105     //  assert(cg==2 || cg==4 || cg==6);
1127                                                  1106     
1128     const G4double p1=1e-3*pLab;                 1107     const G4double p1=1e-3*pLab;
1129     G4double tamp2=0.;                           1108     G4double tamp2=0.;
1130                                                  1109     
1131     //   X-SECTION PI- P INELASTIQUE :           1110     //   X-SECTION PI- P INELASTIQUE :
1132     if (pLab < 1228.06) // corresponds to sqr    1111     if (pLab < 1228.06) // corresponds to sqrt(s)=1794 MeV
1133       tamp2=piMinuspIne(particle1, particle2)    1112       tamp2=piMinuspIne(particle1, particle2);
1134     else                                         1113     else
1135       tamp2=9.04*std::pow(p1, -1.17)+18.*std:    1114       tamp2=9.04*std::pow(p1, -1.17)+18.*std::pow(p1, -1.21); // tamp2=9.04*std::pow(p1, -1.17)+(13.5*std::pow(p1, -1.21))*4./3.;
1136     if (tamp2 < 0.0) tamp2=0;                    1115     if (tamp2 < 0.0) tamp2=0;
1137                                                  1116     
1138     //   CAS PI- P ET PI+ N                      1117     //   CAS PI- P ET PI+ N
1139     return tamp2;                                1118     return tamp2;
1140   }                                              1119   }
1141                                                  1120 
1142   G4double CrossSectionsMultiPions::piPluspTw    1121   G4double CrossSectionsMultiPions::piPluspTwoPi(Particle const * const particle1, Particle const * const particle2) {
1143     //                                           1122     //
1144     //     pion-nucleon interaction, producin    1123     //     pion-nucleon interaction, producing 2 pions
1145     //     fit from Landolt-Bornstein multipl    1124     //     fit from Landolt-Bornstein multiplied by factor determined with evaluation of total xs
1146     //                                           1125     //
1147                                                  1126     
1148     const Particle *pion;                        1127     const Particle *pion;
1149     const Particle *nucleon;                     1128     const Particle *nucleon;
1150     if(particle1->isNucleon()) {                 1129     if(particle1->isNucleon()) {
1151       nucleon = particle1;                       1130       nucleon = particle1;
1152       pion = particle2;                          1131       pion = particle2;
1153     } else {                                     1132     } else {
1154       pion = particle1;                          1133       pion = particle1;
1155       nucleon = particle2;                       1134       nucleon = particle2;
1156     }                                            1135     }
1157 // assert(pion->isPion());                       1136 // assert(pion->isPion());
1158                                                  1137     
1159     const G4double pLab = KinematicsUtils::mo    1138     const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1160                                                  1139     
1161     // this limit corresponds to sqrt(s)=1230    1140     // this limit corresponds to sqrt(s)=1230 MeV
1162     if(pLab<296.367)                             1141     if(pLab<296.367)
1163       return 0.0;                                1142       return 0.0;
1164                                                  1143     
1165     //  const G4int ipi = ParticleTable::getI    1144     //  const G4int ipi = ParticleTable::getIsospin(pion->getType());
1166     //  const G4int ind2 = ParticleTable::get    1145     //  const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
1167     //  const G4int cg = 4 + ind2*ipi;           1146     //  const G4int cg = 4 + ind2*ipi;
1168     //  assert(cg==2 || cg==4 || cg==6);         1147     //  assert(cg==2 || cg==4 || cg==6);
1169                                                  1148     
1170     const G4double p1=1e-3*pLab;                 1149     const G4double p1=1e-3*pLab;
1171     G4double tamp6=0.;                           1150     G4double tamp6=0.;
1172                                                  1151     
1173     //   X-SECTION PI+ P INELASTIQUE :           1152     //   X-SECTION PI+ P INELASTIQUE :
1174     if(pLab < 2444.7) // corresponds to sqrt(    1153     if(pLab < 2444.7) // corresponds to sqrt(s)=2344 MeV
1175       tamp6=piPluspIne(particle1, particle2)-    1154       tamp6=piPluspIne(particle1, particle2)-piPluspOnePi(particle1, particle2);
1176     else                                         1155     else
1177       tamp6=1.59+25.5*std::pow(p1, -1.04); //    1156       tamp6=1.59+25.5*std::pow(p1, -1.04); // tamp6=(0.636+10.2*std::pow(p1, -1.04))*15./6.;
1178                                                  1157     
1179     //   CAS PI+ P ET PI- N                      1158     //   CAS PI+ P ET PI- N
1180     return tamp6;                                1159     return tamp6;
1181   }                                              1160   }
1182                                                  1161   
                                                   >> 1162 
1183     G4double CrossSectionsMultiPions::piMinus    1163     G4double CrossSectionsMultiPions::piMinuspTwoPi(Particle const * const particle1, Particle const * const particle2) {
1184   //                                             1164   //
1185   //     pion-nucleon interaction, producing     1165   //     pion-nucleon interaction, producing 2 pions
1186   //     fit from Landolt-Bornstein multiplie    1166   //     fit from Landolt-Bornstein multiplied by factor determined with evaluation of total xs
1187   //                                             1167   //
1188                                                  1168   
1189   const Particle *pion;                          1169   const Particle *pion;
1190   const Particle *nucleon;                       1170   const Particle *nucleon;
1191   if(particle1->isNucleon()) {                   1171   if(particle1->isNucleon()) {
1192     nucleon = particle1;                         1172     nucleon = particle1;
1193     pion = particle2;                            1173     pion = particle2;
1194   } else {                                       1174   } else {
1195     pion = particle1;                            1175     pion = particle1;
1196     nucleon = particle2;                         1176     nucleon = particle2;
1197   }                                              1177   }
1198 // assert(pion->isPion());                       1178 // assert(pion->isPion());
1199                                                  1179   
1200   const G4double pLab = KinematicsUtils::mome    1180   const G4double pLab = KinematicsUtils::momentumInLab(pion, nucleon);
1201                                                  1181   
1202   // this limit corresponds to sqrt(s)=1230 M    1182   // this limit corresponds to sqrt(s)=1230 MeV
1203   if(pLab<296.367)                               1183   if(pLab<296.367)
1204     return 0.0;                                  1184     return 0.0;
1205                                                  1185   
1206   //  const G4int ipi = ParticleTable::getIso    1186   //  const G4int ipi = ParticleTable::getIsospin(pion->getType());
1207   //  const G4int ind2 = ParticleTable::getIs    1187   //  const G4int ind2 = ParticleTable::getIsospin(nucleon->getType());
1208   //  const G4int cg = 4 + ind2*ipi;             1188   //  const G4int cg = 4 + ind2*ipi;
1209   //  assert(cg==2 || cg==4 || cg==6);           1189   //  assert(cg==2 || cg==4 || cg==6);
1210                                                  1190   
1211   const G4double p1=1e-3*pLab;                   1191   const G4double p1=1e-3*pLab;
1212   G4double tamp2=0.;                             1192   G4double tamp2=0.;
1213                                                  1193   
1214   //   X-SECTION PI- P INELASTIQUE :             1194   //   X-SECTION PI- P INELASTIQUE :
1215   if(pLab<2083.63) // corresponds to sqrt(s)=    1195   if(pLab<2083.63) // corresponds to sqrt(s)=2195 MeV
1216     tamp2=piMinuspIne(particle1, particle2)-p    1196     tamp2=piMinuspIne(particle1, particle2)-piMinuspOnePi(particle1, particle2);
1217   else                                           1197   else
1218     tamp2=2.457794117647+18.066176470588*std:    1198     tamp2=2.457794117647+18.066176470588*std::pow(p1, -0.92); // tamp2=(0.619+4.55*std::pow(p1, -0.92))*135./34.;
1219                                                  1199   
1220   //   CAS PI- P ET PI+ N                        1200   //   CAS PI- P ET PI+ N
1221   return tamp2;                                  1201   return tamp2;
1222 }                                                1202 }
1223                                                  1203 
1224                                               << 
1225                                               << 
1226                                                  1204   
1227     G4double CrossSectionsMultiPions::piNToEt    1205     G4double CrossSectionsMultiPions::piNToEtaN(Particle const * const, Particle const * const) {
1228     //                                           1206     //
1229     //     Pion-Nucleon producing Eta cross s    1207     //     Pion-Nucleon producing Eta cross sections
1230     //                                           1208     //
1231         return 0.;                               1209         return 0.;
1232     }                                            1210     }
1233                                                  1211   
1234     G4double CrossSectionsMultiPions::piNToOm    1212     G4double CrossSectionsMultiPions::piNToOmegaN(Particle const * const, Particle const * const) {
1235     //                                           1213     //
1236     //     Pion-Nucleon producing Omega cross    1214     //     Pion-Nucleon producing Omega cross sections
1237     //                                           1215     //
1238         return 0.;                               1216         return 0.;
1239     }                                            1217     }
1240                                                  1218   
1241     G4double CrossSectionsMultiPions::piNToEt    1219     G4double CrossSectionsMultiPions::piNToEtaPrimeN(Particle const * const, Particle const * const) {
1242     //                                           1220     //
1243     //     Pion-Nucleon producing EtaPrime cr    1221     //     Pion-Nucleon producing EtaPrime cross sections
1244     //                                           1222     //
1245         return 0.;                               1223         return 0.;
1246     }                                            1224     }
1247                                                  1225   
1248     G4double CrossSectionsMultiPions::etaNToP    1226     G4double CrossSectionsMultiPions::etaNToPiN(Particle const * const, Particle const * const) {
1249     //                                           1227     //
1250     //     Eta-Nucleon producing Pion cross s    1228     //     Eta-Nucleon producing Pion cross sections
1251     //                                           1229     //
1252           return 0.;                             1230           return 0.;
1253     }                                            1231     }
1254                                                  1232 
1255                                                  1233   
1256      G4double CrossSectionsMultiPions::etaNTo    1234      G4double CrossSectionsMultiPions::etaNToPiPiN(Particle const * const, Particle const * const) {
1257     //                                           1235     //
1258     //     Eta-Nucleon producing Two Pions cr    1236     //     Eta-Nucleon producing Two Pions cross sections
1259     //                                           1237     //
1260           return 0.;                             1238           return 0.;
1261      }                                           1239      }
1262                                                  1240   
1263                                                  1241   
1264     G4double CrossSectionsMultiPions::omegaNT    1242     G4double CrossSectionsMultiPions::omegaNToPiN(Particle const * const, Particle const * const) {
1265     //                                           1243     //
1266     //     Omega-Nucleon producing Pion cross    1244     //     Omega-Nucleon producing Pion cross sections
1267     //                                           1245     //
1268         return 0.;                               1246         return 0.;
1269     }                                            1247     }
1270                                                  1248   
1271     G4double CrossSectionsMultiPions::omegaNT    1249     G4double CrossSectionsMultiPions::omegaNToPiPiN(Particle const * const, Particle const * const) {
1272     //                                           1250     //
1273     //     Omega-Nucleon producing Two Pions     1251     //     Omega-Nucleon producing Two Pions cross sections
1274     //                                           1252     //
1275         return 0.;                               1253         return 0.;
1276     }                                            1254     }
1277                                                  1255   
1278     G4double CrossSectionsMultiPions::etaPrim    1256     G4double CrossSectionsMultiPions::etaPrimeNToPiN(Particle const * const, Particle const * const) {
1279     //                                           1257     //
1280     //     EtaPrime-Nucleon producing Pion cr    1258     //     EtaPrime-Nucleon producing Pion cross sections
1281     //                                           1259     //
1282         return 0.;                               1260         return 0.;
1283     }                                            1261     }
1284                                                  1262   
1285     G4double CrossSectionsMultiPions::NNToNNE    1263     G4double CrossSectionsMultiPions::NNToNNEta(Particle const * const, Particle const * const) {
1286     //                                           1264     //
1287     //     Nucleon-Nucleon producing Eta cros    1265     //     Nucleon-Nucleon producing Eta cross sections
1288     //                                           1266     //
1289         return 0.;                               1267         return 0.;
1290     }                                            1268     }
1291                                                  1269   
1292   G4double CrossSectionsMultiPions::NNToNNEta << 1270      G4double CrossSectionsMultiPions::NNToNNEtaExclu(Particle const * const, Particle const * const) {
1293     //                                           1271     //
1294     //     Nucleon-Nucleon producing Eta cros    1272     //     Nucleon-Nucleon producing Eta cross sections
1295     //                                           1273     //
1296       return 0.;                              << 1274           return 0.;
1297      }                                           1275      }
1298                                                  1276   
1299   G4double CrossSectionsMultiPions::NNToNNEta << 1277      G4double CrossSectionsMultiPions::NNToNNEtaxPi(const G4int, Particle const * const, Particle const * const) {
1300       return 0.;                              << 1278           return 0.;
1301      }                                           1279      }
1302                                                  1280 
1303     G4double CrossSectionsMultiPions::NNToNDe    1281     G4double CrossSectionsMultiPions::NNToNDeltaEta(Particle const * const, Particle const * const) {
1304     //                                        << 1282           //
1305     //     Nucleon-Nucleon producing N-Delta- << 1283           //     Nucleon-Nucleon producing N-Delta-Eta cross sections
1306     //                                        << 1284           //
1307     return 0.;                                << 1285           return 0.;
1308     }                                         << 1286         }
1309                                               << 1287   
1310     G4double CrossSectionsMultiPions::NNToNNO    1288     G4double CrossSectionsMultiPions::NNToNNOmega(Particle const * const, Particle const * const) {
1311     //                                           1289     //
1312     //     Nucleon-Nucleon producing Omega cr    1290     //     Nucleon-Nucleon producing Omega cross sections
1313     //                                           1291     //
1314      return 0.;                                  1292      return 0.;
1315     }                                            1293     }
1316                                                  1294   
1317     G4double CrossSectionsMultiPions::NNToNNO    1295     G4double CrossSectionsMultiPions::NNToNNOmegaExclu(Particle const * const, Particle const * const) {
1318     //                                           1296     //
1319     //     Nucleon-Nucleon producing Omega cr    1297     //     Nucleon-Nucleon producing Omega cross sections
1320     //                                           1298     //
1321      return 0.;                                  1299      return 0.;
1322     }                                            1300     }
1323                                                  1301   
1324     G4double CrossSectionsMultiPions::NNToNNO    1302     G4double CrossSectionsMultiPions::NNToNNOmegaxPi(const G4int, Particle const * const, Particle const * const) {
1325      return 0.;                                  1303      return 0.;
1326     }                                            1304     }
1327                                                  1305  
1328     G4double CrossSectionsMultiPions::NNToNDe    1306     G4double CrossSectionsMultiPions::NNToNDeltaOmega(Particle const * const, Particle const * const) {
1329   //                                             1307   //
1330   //     Nucleon-Nucleon producing N-Delta-Om    1308   //     Nucleon-Nucleon producing N-Delta-Omega cross sections
1331   //                                             1309   //
1332      return 0.;                                  1310      return 0.;
1333     }                                            1311     }
1334                                               << 1312   
1335                                               << 1313   
1336                                               << 
1337                                               << 
1338     G4double CrossSectionsMultiPions::NYelast << 
1339         //                                    << 
1340         //      Hyperon-Nucleon elastic cross << 
1341         //                                    << 
1342     return 0.;                                << 
1343     }                                         << 
1344                                               << 
1345     G4double CrossSectionsMultiPions::NKelast << 
1346         //                                    << 
1347         //      Kaon-Nucleon elastic cross se << 
1348         //                                    << 
1349     return 0.;                                << 
1350   }                                           << 
1351                                               << 
1352     G4double CrossSectionsMultiPions::NKbelas << 
1353         //                                    << 
1354         //      antiKaon-Nucleon elastic cros << 
1355         //                                    << 
1356     return 0.;                                << 
1357   }                                           << 
1358                                               << 
1359                                               << 
1360   G4double CrossSectionsMultiPions::NNToNLK(P << 
1361         //                                    << 
1362         //      Nucleon-Nucleon producing N-L << 
1363         //                                    << 
1364         return 0.;                            << 
1365     }                                         << 
1366                                               << 
1367     G4double CrossSectionsMultiPions::NNToNSK << 
1368         //                                    << 
1369         //      Nucleon-Nucleon producing N-S << 
1370         //                                    << 
1371         return 0.;                            << 
1372     }                                         << 
1373                                               << 
1374     G4double CrossSectionsMultiPions::NNToNLK << 
1375         //                                    << 
1376         //      Nucleon-Nucleon producing N-L << 
1377         //                                    << 
1378         return 0.;                            << 
1379     }                                         << 
1380                                               << 
1381     G4double CrossSectionsMultiPions::NNToNSK << 
1382         //                                    << 
1383         //      Nucleon-Nucleon producing N-S << 
1384         //                                    << 
1385         return 0.;                            << 
1386     }                                         << 
1387                                               << 
1388     G4double CrossSectionsMultiPions::NNToNLK << 
1389         //                                    << 
1390         //     Nucleon-Nucleon producing N-La << 
1391         //                                    << 
1392         return 0.;                            << 
1393     }                                         << 
1394                                               << 
1395     G4double CrossSectionsMultiPions::NNToNSK << 
1396         //                                    << 
1397         //      Nucleon-Nucleon producing N-S << 
1398         //                                    << 
1399         return 0.;                            << 
1400     }                                         << 
1401                                               << 
1402     G4double CrossSectionsMultiPions::NNToNNK << 
1403         //                                    << 
1404         //      Nucleon-Nucleon producing Nuc << 
1405         //                                    << 
1406         return 0.;                            << 
1407     }                                         << 
1408                                               << 
1409     G4double CrossSectionsMultiPions::NNToMis << 
1410         //                                    << 
1411         //      Nucleon-Nucleon missing stran << 
1412         //                                    << 
1413         return 0.;                            << 
1414     }                                         << 
1415                                               << 
1416     G4double CrossSectionsMultiPions::NDeltaT << 
1417         // Nucleon-Delta producing Nucleon La << 
1418         return 0;                             << 
1419     }                                         << 
1420     G4double CrossSectionsMultiPions::NDeltaT << 
1421         // Nucleon-Delta producing Nucleon Si << 
1422         return 0;                             << 
1423     }                                         << 
1424     G4double CrossSectionsMultiPions::NDeltaT << 
1425         // Nucleon-Delta producing Delta Lamb << 
1426         return 0;                             << 
1427     }                                         << 
1428     G4double CrossSectionsMultiPions::NDeltaT << 
1429         // Nucleon-Delta producing Delta Sigm << 
1430         return 0;                             << 
1431     }                                         << 
1432                                               << 
1433     G4double CrossSectionsMultiPions::NDeltaT << 
1434         // Nucleon-Delta producing Nucleon-Nu << 
1435         return 0;                             << 
1436     }                                         << 
1437                                               << 
1438                                               << 
1439     G4double CrossSectionsMultiPions::NpiToLK << 
1440         //                                    << 
1441         //      Pion-Nucleon producing Lambda << 
1442         //                                    << 
1443         return 0.;                            << 
1444     }                                         << 
1445                                               << 
1446     G4double CrossSectionsMultiPions::NpiToSK << 
1447         //                                    << 
1448         //      Pion-Nucleon producing Sigma- << 
1449         //                                    << 
1450         return 0.;                            << 
1451     }                                         << 
1452     G4double CrossSectionsMultiPions::p_pimTo << 
1453         return 0.;                            << 
1454     }                                         << 
1455     G4double CrossSectionsMultiPions::p_pimTo << 
1456         return 0.;                            << 
1457     }                                         << 
1458     G4double CrossSectionsMultiPions::p_pizTo << 
1459         return 0.;                            << 
1460     }                                         << 
1461                                               << 
1462     G4double CrossSectionsMultiPions::NpiToLK << 
1463         //                                    << 
1464         //      Pion-Nucleon producing Lambda << 
1465         //                                    << 
1466         return 0.;                            << 
1467     }                                         << 
1468                                               << 
1469     G4double CrossSectionsMultiPions::NpiToSK << 
1470         //                                    << 
1471         //      Pion-Nucleon producing Sigma- << 
1472         //                                    << 
1473         return 0.;                            << 
1474     }                                         << 
1475                                               << 
1476     G4double CrossSectionsMultiPions::NpiToLK << 
1477         //                                    << 
1478         //      Pion-Nucleon producing Lambda << 
1479         //                                    << 
1480         return 0.;                            << 
1481     }                                         << 
1482                                               << 
1483     G4double CrossSectionsMultiPions::NpiToSK << 
1484         //                                    << 
1485         //      Pion-Nucleon producing Lambda << 
1486         //                                    << 
1487         return 0.;                            << 
1488     }                                         << 
1489                                               << 
1490     G4double CrossSectionsMultiPions::NpiToNK << 
1491         //                                    << 
1492         //      Pion-Nucleon producing Nucleo << 
1493         //                                    << 
1494         return 0.;                            << 
1495     }                                         << 
1496                                               << 
1497     G4double CrossSectionsMultiPions::NpiToMi << 
1498         //                                    << 
1499         //      Pion-Nucleon missing strangen << 
1500         //                                    << 
1501         return 0.;                            << 
1502     }                                         << 
1503                                               << 
1504     G4double CrossSectionsMultiPions::NLToNS( << 
1505         //                                    << 
1506         //      Nucleon-Hyperon multiplet cha << 
1507         //                                    << 
1508         return 0.;                            << 
1509     }                                         << 
1510                                               << 
1511     G4double CrossSectionsMultiPions::NSToNL( << 
1512         //                                    << 
1513         //      Nucleon-Sigma quasi-elastic c << 
1514         //                                    << 
1515         return 0.;                            << 
1516     }                                         << 
1517                                               << 
1518     G4double CrossSectionsMultiPions::NSToNS( << 
1519         //                                    << 
1520         //      Nucleon-Sigma quasi-elastic c << 
1521         //                                    << 
1522         return 0.;                            << 
1523     }                                         << 
1524                                               << 
1525     G4double CrossSectionsMultiPions::NKToNK( << 
1526         //                                    << 
1527         //      Nucleon-Kaon quasi-elastic cr << 
1528         //                                    << 
1529         return 0.;                            << 
1530     }                                         << 
1531                                               << 
1532     G4double CrossSectionsMultiPions::NKToNKp << 
1533         //                                    << 
1534         //      Nucleon-Kaon producing Nucleo << 
1535         //                                    << 
1536         return 0.;                            << 
1537     }                                         << 
1538                                               << 
1539     G4double CrossSectionsMultiPions::NKToNK2 << 
1540         //                                    << 
1541         //      Nucleon-Kaon producing Nucleo << 
1542         //                                    << 
1543         return 0.;                            << 
1544     }                                         << 
1545                                               << 
1546     G4double CrossSectionsMultiPions::NKbToNK << 
1547         //                                    << 
1548         //      Nucleon-antiKaon quasi-elasti << 
1549         //                                    << 
1550         return 0.;                            << 
1551     }                                         << 
1552                                               << 
1553     G4double CrossSectionsMultiPions::NKbToSp << 
1554         //                                    << 
1555         //      Nucleon-antiKaon producing Si << 
1556         //                                    << 
1557         return 0.;                            << 
1558     }                                         << 
1559                                               << 
1560     G4double CrossSectionsMultiPions::NKbToLp << 
1561         //                                    << 
1562         //      Nucleon-antiKaon producing La << 
1563         //                                    << 
1564         return 0.;                            << 
1565     }                                         << 
1566                                               << 
1567     G4double CrossSectionsMultiPions::NKbToS2 << 
1568         //                                    << 
1569         //      Nucleon-antiKaon producing Si << 
1570         //                                    << 
1571         return 0.;                            << 
1572     }                                         << 
1573                                               << 
1574     G4double CrossSectionsMultiPions::NKbToL2 << 
1575         //                                    << 
1576         //      Nucleon-antiKaon producing La << 
1577         //                                    << 
1578         return 0.;                            << 
1579     }                                         << 
1580                                               << 
1581     G4double CrossSectionsMultiPions::NKbToNK << 
1582         //                                    << 
1583         //      Nucleon-antiKaon producing Nu << 
1584         //                                    << 
1585         return 0.;                            << 
1586     }                                         << 
1587                                               << 
1588     G4double CrossSectionsMultiPions::NKbToNK << 
1589         //                                    << 
1590         //      Nucleon-antiKaon producing Nu << 
1591         //                                    << 
1592         return 0.;                            << 
1593     }                                         << 
1594                                               << 
1595     G4double CrossSectionsMultiPions::NNbarEl << 
1596         //                                    << 
1597         //     Nucleon-AntiNucleon to Nucleon << 
1598         //                                    << 
1599       return 0.;                              << 
1600     }                                         << 
1601                                               << 
1602     G4double CrossSectionsMultiPions::NNbarCE << 
1603         //                                    << 
1604         //     Nucleon-AntiNucleon charge exc << 
1605         //                                    << 
1606       return 0.;                              << 
1607     }                                         << 
1608                                               << 
1609     G4double CrossSectionsMultiPions::NNbarTo << 
1610         //                                    << 
1611         //     Nucleon-AntiNucleon to Lambda- << 
1612         //                                    << 
1613       return 0.;                              << 
1614     }                                         << 
1615                                               << 
1616     G4double CrossSectionsMultiPions::NNbarTo << 
1617         //                                    << 
1618         //     Nucleon-AntiNucleon to Nucleon << 
1619         //                                    << 
1620       return 0.;                              << 
1621     }                                         << 
1622                                               << 
1623     G4double CrossSectionsMultiPions::NNbarTo << 
1624         //                                    << 
1625         //     Nucleon-AntiNucleon to Nucleon << 
1626         //                                    << 
1627       return 0.;                              << 
1628     }                                         << 
1629                                               << 
1630     G4double CrossSectionsMultiPions::NNbarTo << 
1631         //                                    << 
1632         //     Nucleon-AntiNucleon to Nucleon << 
1633         //                                    << 
1634       return 0.;                              << 
1635     }                                         << 
1636                                               << 
1637     G4double CrossSectionsMultiPions::NNbarTo << 
1638         //                                    << 
1639         //     Nucleon-AntiNucleon total anni << 
1640         //                                    << 
1641       return 0.;                              << 
1642     }                                         << 
1643 } // namespace G4INCL                            1314 } // namespace G4INCL
1644                                                  1315 
1645                                                  1316