Geant4 Cross Reference |
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 /** \file G4INCLCrossSectionsTruncatedMultiPio 38 /** \file G4INCLCrossSectionsTruncatedMultiPions.cc 39 * \brief Truncated multipion cross sections 39 * \brief Truncated multipion cross sections 40 * 40 * 41 * \date 10th December 2014 41 * \date 10th December 2014 42 * \author Davide Mancusi 42 * \author Davide Mancusi 43 */ 43 */ 44 44 45 #include "G4INCLCrossSectionsTruncatedMultiPio 45 #include "G4INCLCrossSectionsTruncatedMultiPions.hh" 46 // #include <cassert> 46 // #include <cassert> 47 47 48 namespace G4INCL { 48 namespace G4INCL { 49 49 50 CrossSectionsTruncatedMultiPions::CrossSecti 50 CrossSectionsTruncatedMultiPions::CrossSectionsTruncatedMultiPions(const G4int nPi) : 51 nMaxPi(nPi) 51 nMaxPi(nPi) 52 {} 52 {} 53 53 54 G4double CrossSectionsTruncatedMultiPions::e 54 G4double CrossSectionsTruncatedMultiPions::elastic(Particle const * const p1, Particle const * const p2) { 55 // if(!p1->isPion() && !p2->isPion()) { 55 // if(!p1->isPion() && !p2->isPion()) { 56 if((p1->isNucleon()||p1->isDelta()) && (p 56 if((p1->isNucleon()||p1->isDelta()) && (p2->isNucleon()||p2->isDelta())){ 57 return NNElastic(p1, p2); 57 return NNElastic(p1, p2); 58 } 58 } 59 // else if (p1->isNucleon() || p2->isNucleon( 59 // else if (p1->isNucleon() || p2->isNucleon()) { 60 else if ((p1->isNucleon() && p2->isPion() 60 else if ((p1->isNucleon() && p2->isPion()) || (p2->isNucleon() && p1->isPion())){ 61 G4double pielas = piNTot(p1,p2) - piNIne 61 G4double pielas = piNTot(p1,p2) - piNIne(p1,p2) - CrossSectionsMultiPions::piNToDelta(p1,p2); 62 if (pielas < 0.) 62 if (pielas < 0.) 63 pielas = 0.; 63 pielas = 0.; 64 return pielas; 64 return pielas; 65 } else 65 } else 66 return 0.0; 66 return 0.0; 67 } 67 } 68 68 69 G4double CrossSectionsTruncatedMultiPions::p 69 G4double CrossSectionsTruncatedMultiPions::piNToDelta(Particle const * const particle1, Particle const * const particle2) { 70 G4double sum = CrossSectionsMultiPions::pi 70 G4double sum = CrossSectionsMultiPions::piNToDelta(particle1, particle2); 71 if(nMaxPi<=1) { 71 if(nMaxPi<=1) { 72 for(G4int i=nMaxPi+1; i<=nMaxPiPiN; ++i) 72 for(G4int i=nMaxPi+1; i<=nMaxPiPiN; ++i) 73 sum += CrossSectionsMultiPions::piNTox 73 sum += CrossSectionsMultiPions::piNToxPiN(i, particle1, particle2); 74 } 74 } 75 return sum; 75 return sum; 76 } 76 } 77 77 78 G4double CrossSectionsTruncatedMultiPions::N 78 G4double CrossSectionsTruncatedMultiPions::NNToxPiNN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) { 79 if(xpi<nMaxPi) 79 if(xpi<nMaxPi) 80 return CrossSectionsMultiPions::NNToxPiN 80 return CrossSectionsMultiPions::NNToxPiNN(xpi, particle1, particle2); 81 else if(xpi==nMaxPi) { 81 else if(xpi==nMaxPi) { 82 G4double sum = 0.; 82 G4double sum = 0.; 83 for(G4int i=xpi; i<=nMaxPiNN; ++i) 83 for(G4int i=xpi; i<=nMaxPiNN; ++i) 84 sum += CrossSectionsMultiPions::NNToxP 84 sum += CrossSectionsMultiPions::NNToxPiNN(i, particle1, particle2); 85 return sum; 85 return sum; 86 } else 86 } else 87 return 0.; 87 return 0.; 88 } 88 } 89 89 90 G4double CrossSectionsTruncatedMultiPions::p 90 G4double CrossSectionsTruncatedMultiPions::piNToxPiN(const G4int xpi, Particle const * const particle1, Particle const * const particle2) { 91 if(xpi<nMaxPi) 91 if(xpi<nMaxPi) 92 return CrossSectionsMultiPions::piNToxPi 92 return CrossSectionsMultiPions::piNToxPiN(xpi, particle1, particle2); 93 else if(xpi==nMaxPi) { 93 else if(xpi==nMaxPi) { 94 G4double sum = 0.; 94 G4double sum = 0.; 95 for(G4int i=xpi; i<=nMaxPiPiN; ++i) 95 for(G4int i=xpi; i<=nMaxPiPiN; ++i) 96 sum += CrossSectionsMultiPions::piNTox 96 sum += CrossSectionsMultiPions::piNToxPiN(i, particle1, particle2); 97 return sum; 97 return sum; 98 } else 98 } else 99 return 0.; 99 return 0.; 100 } 100 } 101 101 102 } // namespace G4INCL 102 } // namespace G4INCL 103 103 104 104