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 #include "G4INCLCrossSections.hh" 38 #include "G4INCLCrossSections.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 "G4INCLCrossSectionsINCL46.hh" 42 #include "G4INCLCrossSectionsINCL46.hh" 43 #include "G4INCLCrossSectionsMultiPions.hh" 43 #include "G4INCLCrossSectionsMultiPions.hh" 44 #include "G4INCLCrossSectionsTruncatedMultiPio 44 #include "G4INCLCrossSectionsTruncatedMultiPions.hh" 45 #include "G4INCLCrossSectionsMultiPionsAndReso 45 #include "G4INCLCrossSectionsMultiPionsAndResonances.hh" 46 #include "G4INCLCrossSectionsStrangeness.hh" 46 #include "G4INCLCrossSectionsStrangeness.hh" 47 #include "G4INCLCrossSectionsAntiparticles.hh" << 48 // #include <cassert> 47 // #include <cassert> 49 48 50 namespace G4INCL { 49 namespace G4INCL { 51 50 52 namespace { 51 namespace { 53 G4ThreadLocal ICrossSections *theCrossSect 52 G4ThreadLocal ICrossSections *theCrossSections; 54 } 53 } 55 54 56 namespace CrossSections { 55 namespace CrossSections { 57 G4double elastic(Particle const * const p1 56 G4double elastic(Particle const * const p1, Particle const * const p2) { 58 return theCrossSections->elastic(p1,p2); 57 return theCrossSections->elastic(p1,p2); 59 } 58 } 60 59 61 G4double total(Particle const * const p1, 60 G4double total(Particle const * const p1, Particle const * const p2) { 62 return theCrossSections->total(p1,p2); 61 return theCrossSections->total(p1,p2); 63 } 62 } 64 63 65 G4double NDeltaToNN(Particle const * const 64 G4double NDeltaToNN(Particle const * const p1, Particle const * const p2) { 66 return theCrossSections->NDeltaToNN(p1,p 65 return theCrossSections->NDeltaToNN(p1,p2); 67 } 66 } 68 67 69 G4double NNToNDelta(Particle const * const 68 G4double NNToNDelta(Particle const * const p1, Particle const * const p2) { 70 return theCrossSections->NNToNDelta(p1,p 69 return theCrossSections->NNToNDelta(p1,p2); 71 } 70 } 72 71 73 G4double NNToxPiNN(const G4int xpi, Particle 72 G4double NNToxPiNN(const G4int xpi, Particle const * const p1, Particle const * const p2) { 74 return theCrossSections->NNToxPiNN(xpi,p1, 73 return theCrossSections->NNToxPiNN(xpi,p1,p2); 75 } 74 } 76 75 77 G4double piNToDelta(Particle const * const p 76 G4double piNToDelta(Particle const * const p1, Particle const * const p2) { 78 return theCrossSections->piNToDelta( 77 return theCrossSections->piNToDelta(p1,p2); 79 } 78 } 80 79 81 G4double piNToxPiN(const G4int xpi, Particle 80 G4double piNToxPiN(const G4int xpi, Particle const * const p1, Particle const * const p2) { 82 return theCrossSections->piNToxPiN(x 81 return theCrossSections->piNToxPiN(xpi,p1,p2); 83 } 82 } 84 83 85 G4double piNToEtaN(Particle const * const p1 84 G4double piNToEtaN(Particle const * const p1, Particle const * const p2) { 86 return theCrossSections->piNToEtaN(p1,p2 85 return theCrossSections->piNToEtaN(p1,p2); 87 } 86 } 88 87 89 G4double piNToOmegaN(Particle const * const 88 G4double piNToOmegaN(Particle const * const p1, Particle const * const p2) { 90 return theCrossSections->piNToOmegaN(p1, 89 return theCrossSections->piNToOmegaN(p1,p2); 91 } 90 } 92 91 93 G4double piNToEtaPrimeN(Particle const * con 92 G4double piNToEtaPrimeN(Particle const * const p1, Particle const * const p2) { 94 return theCrossSections->piNToEtaPrimeN( 93 return theCrossSections->piNToEtaPrimeN(p1,p2); 95 } 94 } 96 95 97 G4double etaNToPiN(Particle const * const p1 96 G4double etaNToPiN(Particle const * const p1, Particle const * const p2) { 98 return theCrossSections->etaNToPiN(p1,p2 97 return theCrossSections->etaNToPiN(p1,p2); 99 } 98 } 100 99 101 G4double etaNToPiPiN(Particle const * const 100 G4double etaNToPiPiN(Particle const * const p1, Particle const * const p2) { 102 return theCrossSections->etaNToPiPiN(p1, 101 return theCrossSections->etaNToPiPiN(p1,p2); 103 } 102 } 104 103 105 G4double omegaNToPiN(Particle const * const 104 G4double omegaNToPiN(Particle const * const p1, Particle const * const p2) { 106 return theCrossSections->omegaNToPiN(p1, 105 return theCrossSections->omegaNToPiN(p1,p2); 107 } 106 } 108 107 109 G4double omegaNToPiPiN(Particle const * cons 108 G4double omegaNToPiPiN(Particle const * const p1, Particle const * const p2) { 110 return theCrossSections->omegaNToPiPiN(p 109 return theCrossSections->omegaNToPiPiN(p1,p2); 111 } 110 } 112 111 113 G4double etaPrimeNToPiN(Particle const * con 112 G4double etaPrimeNToPiN(Particle const * const p1, Particle const * const p2) { 114 return theCrossSections->etaPrimeNToPiN( 113 return theCrossSections->etaPrimeNToPiN(p1,p2); 115 } 114 } 116 115 117 G4double NNToNNEta(Particle const * const p1 116 G4double NNToNNEta(Particle const * const p1, Particle const * const p2) { 118 return theCrossSections->NNToNNEta(p1,p2 117 return theCrossSections->NNToNNEta(p1,p2); 119 } 118 } 120 119 121 G4double NNToNNEtaExclu(Particle const * con 120 G4double NNToNNEtaExclu(Particle const * const p1, Particle const * const p2) { 122 return theCrossSections->NNToNNEtaExclu( 121 return theCrossSections->NNToNNEtaExclu(p1,p2); 123 } 122 } 124 123 125 G4double NNToNNEtaxPi(const G4int xpi, Parti 124 G4double NNToNNEtaxPi(const G4int xpi, Particle const * const p1, Particle const * const p2) { 126 return theCrossSections->NNToNNEtaxPi( 125 return theCrossSections->NNToNNEtaxPi(xpi,p1,p2); 127 } 126 } 128 127 129 G4double NNToNDeltaEta(Particle const * cons 128 G4double NNToNDeltaEta(Particle const * const p1, Particle const * const p2) { 130 return theCrossSections->NNToNDeltaEta(p 129 return theCrossSections->NNToNDeltaEta(p1,p2); 131 } 130 } 132 131 133 132 134 G4double NNToNNOmega(Particle const * const 133 G4double NNToNNOmega(Particle const * const p1, Particle const * const p2) { 135 return theCrossSections->NNToNNOmega(p1, 134 return theCrossSections->NNToNNOmega(p1,p2); 136 } 135 } 137 136 138 G4double NNToNNOmegaExclu(Particle const * 137 G4double NNToNNOmegaExclu(Particle const * const p1, Particle const * const p2) { 139 return theCrossSections->NNToNNOmegaExcl 138 return theCrossSections->NNToNNOmegaExclu(p1,p2); 140 } 139 } 141 140 142 G4double NNToNNOmegaxPi(const G4int xpi, Pa 141 G4double NNToNNOmegaxPi(const G4int xpi, Particle const * const p1, Particle const * const p2) { 143 return theCrossSections->NNToNNOmegaxP 142 return theCrossSections->NNToNNOmegaxPi(xpi,p1,p2); 144 } 143 } 145 144 146 G4double NNToNDeltaOmega(Particle const * c 145 G4double NNToNDeltaOmega(Particle const * const p1, Particle const * const p2) { 147 return theCrossSections->NNToNDeltaOmega 146 return theCrossSections->NNToNDeltaOmega(p1,p2); 148 } 147 } 149 148 150 149 151 G4double NYelastic(Particle const * const 150 G4double NYelastic(Particle const * const p1, Particle const * const p2) { 152 return theCrossSections->NYelastic(p1,p2 151 return theCrossSections->NYelastic(p1,p2); 153 } 152 } 154 153 155 G4double NKbelastic(Particle const * const 154 G4double NKbelastic(Particle const * const p1, Particle const * const p2) { 156 return theCrossSections->NKbelastic(p1,p 155 return theCrossSections->NKbelastic(p1,p2); 157 } 156 } 158 157 159 G4double NKelastic(Particle const * const 158 G4double NKelastic(Particle const * const p1, Particle const * const p2) { 160 return theCrossSections->NKelastic(p1,p2 159 return theCrossSections->NKelastic(p1,p2); 161 } 160 } 162 161 163 G4double NNToNLK(Particle const * const p1 162 G4double NNToNLK(Particle const * const p1, Particle const * const p2) { 164 return theCrossSections->NNToNLK(p1,p2); 163 return theCrossSections->NNToNLK(p1,p2); 165 } 164 } 166 165 167 G4double NNToNSK(Particle const * const p1 166 G4double NNToNSK(Particle const * const p1, Particle const * const p2) { 168 return theCrossSections->NNToNSK(p1,p2); 167 return theCrossSections->NNToNSK(p1,p2); 169 } 168 } 170 169 171 G4double NNToNLKpi(Particle const * const 170 G4double NNToNLKpi(Particle const * const p1, Particle const * const p2) { 172 return theCrossSections->NNToNLKpi(p1,p2 171 return theCrossSections->NNToNLKpi(p1,p2); 173 } 172 } 174 173 175 G4double NNToNSKpi(Particle const * const 174 G4double NNToNSKpi(Particle const * const p1, Particle const * const p2) { 176 return theCrossSections->NNToNSKpi(p1,p2 175 return theCrossSections->NNToNSKpi(p1,p2); 177 } 176 } 178 177 179 G4double NNToNLK2pi(Particle const * const 178 G4double NNToNLK2pi(Particle const * const p1, Particle const * const p2) { 180 return theCrossSections->NNToNLK2pi(p1,p 179 return theCrossSections->NNToNLK2pi(p1,p2); 181 } 180 } 182 181 183 G4double NNToNSK2pi(Particle const * const 182 G4double NNToNSK2pi(Particle const * const p1, Particle const * const p2) { 184 return theCrossSections->NNToNSK2pi(p1,p 183 return theCrossSections->NNToNSK2pi(p1,p2); 185 } 184 } 186 185 187 G4double NNToNNKKb(Particle const * const 186 G4double NNToNNKKb(Particle const * const p1, Particle const * const p2) { 188 return theCrossSections->NNToNNKKb(p1,p2 187 return theCrossSections->NNToNNKKb(p1,p2); 189 } 188 } 190 189 191 G4double NNToMissingStrangeness(Particle c 190 G4double NNToMissingStrangeness(Particle const * const p1, Particle const * const p2) { 192 return theCrossSections->NNToMissingStra 191 return theCrossSections->NNToMissingStrangeness(p1,p2); 193 } 192 } 194 193 195 G4double NDeltaToNLK(Particle const * cons 194 G4double NDeltaToNLK(Particle const * const p1, Particle const * const p2) { 196 return theCrossSections->NDeltaToNLK(p 195 return theCrossSections->NDeltaToNLK(p1,p2); 197 } 196 } 198 G4double NDeltaToNSK(Particle const * cons 197 G4double NDeltaToNSK(Particle const * const p1, Particle const * const p2) { 199 return theCrossSections->NDeltaToNSK(p 198 return theCrossSections->NDeltaToNSK(p1,p2); 200 } 199 } 201 G4double NDeltaToDeltaLK(Particle const * 200 G4double NDeltaToDeltaLK(Particle const * const p1, Particle const * const p2) { 202 return theCrossSections->NDeltaToDelta 201 return theCrossSections->NDeltaToDeltaLK(p1,p2); 203 } 202 } 204 G4double NDeltaToDeltaSK(Particle const * 203 G4double NDeltaToDeltaSK(Particle const * const p1, Particle const * const p2) { 205 return theCrossSections->NDeltaToDelta 204 return theCrossSections->NDeltaToDeltaSK(p1,p2); 206 } 205 } 207 206 208 G4double NDeltaToNNKKb(Particle const * co 207 G4double NDeltaToNNKKb(Particle const * const p1, Particle const * const p2) { 209 return theCrossSections->NDeltaToNNKKb 208 return theCrossSections->NDeltaToNNKKb(p1,p2); 210 } 209 } 211 210 212 G4double NpiToLK(Particle const * const p1 211 G4double NpiToLK(Particle const * const p1, Particle const * const p2) { 213 return theCrossSections->NpiToLK(p1,p2); 212 return theCrossSections->NpiToLK(p1,p2); 214 } 213 } 215 214 216 G4double NpiToSK(Particle const * const p1 215 G4double NpiToSK(Particle const * const p1, Particle const * const p2) { 217 return theCrossSections->NpiToSK(p1,p2); 216 return theCrossSections->NpiToSK(p1,p2); 218 } 217 } 219 218 220 G4double p_pimToSmKp(Particle const * cons 219 G4double p_pimToSmKp(Particle const * const p1, Particle const * const p2) { 221 return theCrossSections->p_pimToSmKp(p1, 220 return theCrossSections->p_pimToSmKp(p1,p2); 222 } 221 } 223 222 224 G4double p_pimToSzKz(Particle const * cons 223 G4double p_pimToSzKz(Particle const * const p1, Particle const * const p2) { 225 return theCrossSections->p_pimToSzKz(p1, 224 return theCrossSections->p_pimToSzKz(p1,p2); 226 } 225 } 227 226 228 G4double p_pizToSzKp(Particle const * const 227 G4double p_pizToSzKp(Particle const * const p1, Particle const * const p2) { 229 return theCrossSections->p_pizToSzKp(p1, 228 return theCrossSections->p_pizToSzKp(p1,p2); 230 } 229 } 231 230 232 G4double NpiToLKpi(Particle const * const 231 G4double NpiToLKpi(Particle const * const p1, Particle const * const p2) { 233 return theCrossSections->NpiToLKpi(p1,p2 232 return theCrossSections->NpiToLKpi(p1,p2); 234 } 233 } 235 234 236 G4double NpiToSKpi(Particle const * const 235 G4double NpiToSKpi(Particle const * const p1, Particle const * const p2) { 237 return theCrossSections->NpiToSKpi(p1,p2 236 return theCrossSections->NpiToSKpi(p1,p2); 238 } 237 } 239 238 240 G4double NpiToLK2pi(Particle const * const 239 G4double NpiToLK2pi(Particle const * const p1, Particle const * const p2) { 241 return theCrossSections->NpiToLK2pi(p1,p 240 return theCrossSections->NpiToLK2pi(p1,p2); 242 } 241 } 243 242 244 G4double NpiToSK2pi(Particle const * const 243 G4double NpiToSK2pi(Particle const * const p1, Particle const * const p2) { 245 return theCrossSections->NpiToSK2pi(p1,p 244 return theCrossSections->NpiToSK2pi(p1,p2); 246 } 245 } 247 246 248 G4double NpiToNKKb(Particle const * const 247 G4double NpiToNKKb(Particle const * const p1, Particle const * const p2) { 249 return theCrossSections->NpiToNKKb(p1,p2 248 return theCrossSections->NpiToNKKb(p1,p2); 250 } 249 } 251 250 252 G4double NpiToMissingStrangeness(Particle 251 G4double NpiToMissingStrangeness(Particle const * const p1, Particle const * const p2) { 253 return theCrossSections->NpiToMissingStr 252 return theCrossSections->NpiToMissingStrangeness(p1,p2); 254 } 253 } 255 254 256 G4double NLToNS(Particle const * const p1, 255 G4double NLToNS(Particle const * const p1, Particle const * const p2) { 257 return theCrossSections->NLToNS(p1,p2); 256 return theCrossSections->NLToNS(p1,p2); 258 } 257 } 259 258 260 G4double NSToNL(Particle const * const p1, 259 G4double NSToNL(Particle const * const p1, Particle const * const p2) { 261 return theCrossSections->NSToNL(p1,p2); 260 return theCrossSections->NSToNL(p1,p2); 262 } 261 } 263 262 264 G4double NSToNS(Particle const * const p1, 263 G4double NSToNS(Particle const * const p1, Particle const * const p2) { 265 return theCrossSections->NSToNS(p1,p2); 264 return theCrossSections->NSToNS(p1,p2); 266 } 265 } 267 266 268 G4double NKToNK(Particle const * const p1, 267 G4double NKToNK(Particle const * const p1, Particle const * const p2) { 269 return theCrossSections->NKToNK(p1,p2); 268 return theCrossSections->NKToNK(p1,p2); 270 } 269 } 271 270 272 G4double NKToNKpi(Particle const * const p 271 G4double NKToNKpi(Particle const * const p1, Particle const * const p2) { 273 return theCrossSections->NKToNKpi(p1,p2) 272 return theCrossSections->NKToNKpi(p1,p2); 274 } 273 } 275 274 276 G4double NKToNK2pi(Particle const * const 275 G4double NKToNK2pi(Particle const * const p1, Particle const * const p2) { 277 return theCrossSections->NKToNK2pi(p1,p2 276 return theCrossSections->NKToNK2pi(p1,p2); 278 } 277 } 279 278 280 G4double NKbToNKb(Particle const * const p 279 G4double NKbToNKb(Particle const * const p1, Particle const * const p2) { 281 return theCrossSections->NKbToNKb(p1,p2) 280 return theCrossSections->NKbToNKb(p1,p2); 282 } 281 } 283 282 284 G4double NKbToSpi(Particle const * const p 283 G4double NKbToSpi(Particle const * const p1, Particle const * const p2) { 285 return theCrossSections->NKbToSpi(p1,p2) 284 return theCrossSections->NKbToSpi(p1,p2); 286 } 285 } 287 286 288 G4double NKbToLpi(Particle const * const p 287 G4double NKbToLpi(Particle const * const p1, Particle const * const p2) { 289 return theCrossSections->NKbToLpi(p1,p2) 288 return theCrossSections->NKbToLpi(p1,p2); 290 } 289 } 291 << 290 292 G4double NNbarElastic(Particle const* cons << 293 return theCrossSections->NNbarElastic(p1 << 294 } << 295 G4double NNbarCEX(Particle const* const p1 << 296 return theCrossSections->NNbarCEX(p1,p2) << 297 } << 298 G4double NNbarToLLbar(Particle const* cons << 299 return theCrossSections->NNbarToLLbar(p1 << 300 } << 301 << 302 G4double NNbarToNNbarpi(Particle const* co << 303 return theCrossSections->NNbarToNNbarpi( << 304 } << 305 G4double NNbarToNNbar2pi(Particle const* c << 306 return theCrossSections->NNbarToNNbar2pi << 307 } << 308 G4double NNbarToNNbar3pi(Particle const* c << 309 return theCrossSections->NNbarToNNbar3pi << 310 } << 311 << 312 G4double NNbarToAnnihilation(Particle cons << 313 return theCrossSections->NNbarToAnnihila << 314 } << 315 << 316 G4double NKbToS2pi(Particle const * const 291 G4double NKbToS2pi(Particle const * const p1, Particle const * const p2) { 317 return theCrossSections->NKbToS2pi(p1,p2 292 return theCrossSections->NKbToS2pi(p1,p2); 318 } 293 } 319 294 320 G4double NKbToL2pi(Particle const * const 295 G4double NKbToL2pi(Particle const * const p1, Particle const * const p2) { 321 return theCrossSections->NKbToL2pi(p1,p2 296 return theCrossSections->NKbToL2pi(p1,p2); 322 } 297 } 323 298 324 G4double NKbToNKbpi(Particle const * const 299 G4double NKbToNKbpi(Particle const * const p1, Particle const * const p2) { 325 return theCrossSections->NKbToNKbpi(p1,p 300 return theCrossSections->NKbToNKbpi(p1,p2); 326 } 301 } 327 302 328 G4double NKbToNKb2pi(Particle const * cons 303 G4double NKbToNKb2pi(Particle const * const p1, Particle const * const p2) { 329 return theCrossSections->NKbToNKb2pi(p1, 304 return theCrossSections->NKbToNKb2pi(p1,p2); 330 } 305 } 331 306 332 307 333 G4double calculateNNAngularSlope(G4double 308 G4double calculateNNAngularSlope(G4double energyCM, G4int iso) { 334 return theCrossSections->calculateNNAngu 309 return theCrossSections->calculateNNAngularSlope(energyCM, iso); 335 } 310 } 336 311 337 G4double interactionDistancePiN(const G4do 312 G4double interactionDistancePiN(const G4double projectileKineticEnergy) { 338 ThreeVector nullVector; 313 ThreeVector nullVector; 339 ThreeVector unitVector(0., 0., 1.); 314 ThreeVector unitVector(0., 0., 1.); 340 315 341 Particle piPlusProjectile(PiPlus, unitVe 316 Particle piPlusProjectile(PiPlus, unitVector, nullVector); 342 piPlusProjectile.setEnergy(piPlusProject 317 piPlusProjectile.setEnergy(piPlusProjectile.getMass()+projectileKineticEnergy); 343 piPlusProjectile.adjustMomentumFromEnerg 318 piPlusProjectile.adjustMomentumFromEnergy(); 344 Particle piZeroProjectile(PiZero, unitVe 319 Particle piZeroProjectile(PiZero, unitVector, nullVector); 345 piZeroProjectile.setEnergy(piZeroProject 320 piZeroProjectile.setEnergy(piZeroProjectile.getMass()+projectileKineticEnergy); 346 piZeroProjectile.adjustMomentumFromEnerg 321 piZeroProjectile.adjustMomentumFromEnergy(); 347 Particle piMinusProjectile(PiMinus, unit 322 Particle piMinusProjectile(PiMinus, unitVector, nullVector); 348 piMinusProjectile.setEnergy(piMinusProje 323 piMinusProjectile.setEnergy(piMinusProjectile.getMass()+projectileKineticEnergy); 349 piMinusProjectile.adjustMomentumFromEner 324 piMinusProjectile.adjustMomentumFromEnergy(); 350 325 351 Particle protonTarget(Proton, nullVector 326 Particle protonTarget(Proton, nullVector, nullVector); 352 Particle neutronTarget(Neutron, nullVect 327 Particle neutronTarget(Neutron, nullVector, nullVector); 353 const G4double sigmapipp = total(&piPlus 328 const G4double sigmapipp = total(&piPlusProjectile, &protonTarget); 354 const G4double sigmapipn = total(&piPlus 329 const G4double sigmapipn = total(&piPlusProjectile, &neutronTarget); 355 const G4double sigmapi0p = total(&piZero 330 const G4double sigmapi0p = total(&piZeroProjectile, &protonTarget); 356 const G4double sigmapi0n = total(&piZero 331 const G4double sigmapi0n = total(&piZeroProjectile, &neutronTarget); 357 const G4double sigmapimp = total(&piMinu 332 const G4double sigmapimp = total(&piMinusProjectile, &protonTarget); 358 const G4double sigmapimn = total(&piMinu 333 const G4double sigmapimn = total(&piMinusProjectile, &neutronTarget); 359 /* We compute the interaction distance f 334 /* We compute the interaction distance from the largest of the pi-N cross 360 * sections. Note that this is different 335 * sections. Note that this is different from INCL4.6, which just takes the 361 * average of the six, and will in gener 336 * average of the six, and will in general lead to a different geometrical 362 * cross section. 337 * cross section. 363 */ 338 */ 364 const G4double largestSigma = std::max(s 339 const G4double largestSigma = std::max(sigmapipp, std::max(sigmapipn, std::max(sigmapi0p, std::max(sigmapi0n, std::max(sigmapimp,sigmapimn))))); 365 const G4double interactionDistance = std 340 const G4double interactionDistance = std::sqrt(largestSigma/Math::tenPi); 366 341 367 return interactionDistance; 342 return interactionDistance; 368 } 343 } 369 344 370 G4double interactionDistanceNN(const Parti 345 G4double interactionDistanceNN(const ParticleSpecies &aSpecies, const G4double kineticEnergy) { 371 // assert(aSpecies.theType==Proton || aSpecies 346 // assert(aSpecies.theType==Proton || aSpecies.theType==Neutron || aSpecies.theType==Composite); 372 // assert(aSpecies.theA>0); 347 // assert(aSpecies.theA>0); 373 ThreeVector nullVector; 348 ThreeVector nullVector; 374 ThreeVector unitVector(0.,0.,1.); 349 ThreeVector unitVector(0.,0.,1.); 375 350 376 const G4double kineticEnergyPerNucleon = 351 const G4double kineticEnergyPerNucleon = kineticEnergy / aSpecies.theA; 377 352 378 Particle protonProjectile(Proton, unitVe 353 Particle protonProjectile(Proton, unitVector, nullVector); 379 protonProjectile.setEnergy(protonProject 354 protonProjectile.setEnergy(protonProjectile.getMass()+kineticEnergyPerNucleon); 380 protonProjectile.adjustMomentumFromEnerg 355 protonProjectile.adjustMomentumFromEnergy(); 381 Particle neutronProjectile(Neutron, unit 356 Particle neutronProjectile(Neutron, unitVector, nullVector); 382 neutronProjectile.setEnergy(neutronProje 357 neutronProjectile.setEnergy(neutronProjectile.getMass()+kineticEnergyPerNucleon); 383 neutronProjectile.adjustMomentumFromEner 358 neutronProjectile.adjustMomentumFromEnergy(); 384 359 385 Particle protonTarget(Proton, nullVector 360 Particle protonTarget(Proton, nullVector, nullVector); 386 Particle neutronTarget(Neutron, nullVect 361 Particle neutronTarget(Neutron, nullVector, nullVector); 387 const G4double sigmapp = total(&protonPr 362 const G4double sigmapp = total(&protonProjectile, &protonTarget); 388 const G4double sigmapn = total(&protonPr 363 const G4double sigmapn = total(&protonProjectile, &neutronTarget); 389 const G4double sigmann = total(&neutronP 364 const G4double sigmann = total(&neutronProjectile, &neutronTarget); 390 /* We compute the interaction distance f 365 /* We compute the interaction distance from the largest of the NN cross 391 * sections. Note that this is different 366 * sections. Note that this is different from INCL4.6, which just takes the 392 * average of the four, and will in gene 367 * average of the four, and will in general lead to a different geometrical 393 * cross section. 368 * cross section. 394 */ 369 */ 395 const G4double largestSigma = std::max(s 370 const G4double largestSigma = std::max(sigmapp, std::max(sigmapn, sigmann)); 396 const G4double interactionDistance = std 371 const G4double interactionDistance = std::sqrt(largestSigma/Math::tenPi); 397 372 398 return interactionDistance; 373 return interactionDistance; 399 } 374 } 400 375 401 G4double interactionDistanceKN(const G4dou 376 G4double interactionDistanceKN(const G4double kineticEnergy) { 402 ThreeVector nullVector; 377 ThreeVector nullVector; 403 ThreeVector unitVector(0.,0.,1.); 378 ThreeVector unitVector(0.,0.,1.); 404 379 405 Particle kpProjectile(KPlus, unitVector, 380 Particle kpProjectile(KPlus, unitVector, nullVector); 406 kpProjectile.setEnergy(kpProjectile.getM 381 kpProjectile.setEnergy(kpProjectile.getMass()+kineticEnergy); 407 kpProjectile.adjustMomentumFromEnergy(); 382 kpProjectile.adjustMomentumFromEnergy(); 408 Particle kzProjectile(KZero, unitVector, 383 Particle kzProjectile(KZero, unitVector, nullVector); 409 kzProjectile.setEnergy(kzProjectile.getM 384 kzProjectile.setEnergy(kzProjectile.getMass()+kineticEnergy); 410 kzProjectile.adjustMomentumFromEnergy(); 385 kzProjectile.adjustMomentumFromEnergy(); 411 386 412 Particle protonTarget(Proton, nullVector 387 Particle protonTarget(Proton, nullVector, nullVector); 413 Particle neutronTarget(Neutron, nullVect 388 Particle neutronTarget(Neutron, nullVector, nullVector); 414 const G4double sigmakpp = total(&kpProje 389 const G4double sigmakpp = total(&kpProjectile, &protonTarget); 415 const G4double sigmakpn = total(&kpProje 390 const G4double sigmakpn = total(&kpProjectile, &neutronTarget); 416 const G4double sigmakzp = total(&kzProje 391 const G4double sigmakzp = total(&kzProjectile, &protonTarget); 417 const G4double sigmakzn = total(&kzProje 392 const G4double sigmakzn = total(&kzProjectile, &neutronTarget); 418 393 419 const G4double largestSigma = std::max(s 394 const G4double largestSigma = std::max(sigmakpp, std::max(sigmakpn, std::max(sigmakzp, sigmakzn))); 420 const G4double interactionDistance = std 395 const G4double interactionDistance = std::sqrt(largestSigma/Math::tenPi); 421 396 422 return interactionDistance; 397 return interactionDistance; 423 } 398 } 424 399 425 G4double interactionDistanceKbarN(const G4 400 G4double interactionDistanceKbarN(const G4double kineticEnergy) { 426 ThreeVector nullVector; 401 ThreeVector nullVector; 427 ThreeVector unitVector(0.,0.,1.); 402 ThreeVector unitVector(0.,0.,1.); 428 403 429 Particle kmProjectile(KMinus, unitVector 404 Particle kmProjectile(KMinus, unitVector, nullVector); 430 kmProjectile.setEnergy(kmProjectile.getM 405 kmProjectile.setEnergy(kmProjectile.getMass()+kineticEnergy); 431 kmProjectile.adjustMomentumFromEnergy(); 406 kmProjectile.adjustMomentumFromEnergy(); 432 Particle kzProjectile(KZeroBar, unitVect 407 Particle kzProjectile(KZeroBar, unitVector, nullVector); 433 kzProjectile.setEnergy(kzProjectile.getM 408 kzProjectile.setEnergy(kzProjectile.getMass()+kineticEnergy); 434 kzProjectile.adjustMomentumFromEnergy(); 409 kzProjectile.adjustMomentumFromEnergy(); 435 410 436 Particle protonTarget(Proton, nullVector 411 Particle protonTarget(Proton, nullVector, nullVector); 437 Particle neutronTarget(Neutron, nullVect 412 Particle neutronTarget(Neutron, nullVector, nullVector); 438 const G4double sigmakmp = total(&kmProje 413 const G4double sigmakmp = total(&kmProjectile, &protonTarget); 439 const G4double sigmakmn = total(&kmProje 414 const G4double sigmakmn = total(&kmProjectile, &neutronTarget); 440 const G4double sigmakzp = total(&kzProje 415 const G4double sigmakzp = total(&kzProjectile, &protonTarget); 441 const G4double sigmakzn = total(&kzProje 416 const G4double sigmakzn = total(&kzProjectile, &neutronTarget); 442 417 443 const G4double largestSigma = std::max(s 418 const G4double largestSigma = std::max(sigmakmp, std::max(sigmakmn, std::max(sigmakzp, sigmakzn))); 444 const G4double interactionDistance = std 419 const G4double interactionDistance = std::sqrt(largestSigma/Math::tenPi); 445 420 446 return interactionDistance; 421 return interactionDistance; 447 } 422 } 448 423 449 G4double interactionDistanceYN(const G4dou 424 G4double interactionDistanceYN(const G4double kineticEnergy) { 450 ThreeVector nullVector; 425 ThreeVector nullVector; 451 ThreeVector unitVector(0.,0.,1.); 426 ThreeVector unitVector(0.,0.,1.); 452 427 453 Particle lProjectile(Lambda, unitVector, 428 Particle lProjectile(Lambda, unitVector, nullVector); 454 lProjectile.setEnergy(lProjectile.getMas 429 lProjectile.setEnergy(lProjectile.getMass()+kineticEnergy); 455 lProjectile.adjustMomentumFromEnergy(); 430 lProjectile.adjustMomentumFromEnergy(); 456 Particle spProjectile(SigmaPlus, unitVec 431 Particle spProjectile(SigmaPlus, unitVector, nullVector); 457 spProjectile.setEnergy(spProjectile.getM 432 spProjectile.setEnergy(spProjectile.getMass()+kineticEnergy); 458 spProjectile.adjustMomentumFromEnergy(); 433 spProjectile.adjustMomentumFromEnergy(); 459 Particle szProjectile(SigmaZero, unitVec 434 Particle szProjectile(SigmaZero, unitVector, nullVector); 460 szProjectile.setEnergy(szProjectile.getM 435 szProjectile.setEnergy(szProjectile.getMass()+kineticEnergy); 461 szProjectile.adjustMomentumFromEnergy(); 436 szProjectile.adjustMomentumFromEnergy(); 462 Particle smProjectile(SigmaMinus, unitVe 437 Particle smProjectile(SigmaMinus, unitVector, nullVector); 463 smProjectile.setEnergy(smProjectile.getM 438 smProjectile.setEnergy(smProjectile.getMass()+kineticEnergy); 464 smProjectile.adjustMomentumFromEnergy(); 439 smProjectile.adjustMomentumFromEnergy(); 465 440 466 Particle protonTarget(Proton, nullVector 441 Particle protonTarget(Proton, nullVector, nullVector); 467 Particle neutronTarget(Neutron, nullVect 442 Particle neutronTarget(Neutron, nullVector, nullVector); 468 const G4double sigmalp = total(&lProject 443 const G4double sigmalp = total(&lProjectile, &protonTarget); 469 const G4double sigmaln = total(&lProject 444 const G4double sigmaln = total(&lProjectile, &neutronTarget); 470 const G4double sigmaspp = total(&spProje 445 const G4double sigmaspp = total(&spProjectile, &protonTarget); 471 const G4double sigmaspn = total(&spProje 446 const G4double sigmaspn = total(&spProjectile, &neutronTarget); 472 const G4double sigmaszp = total(&szProje 447 const G4double sigmaszp = total(&szProjectile, &protonTarget); 473 const G4double sigmaszn = total(&szProje 448 const G4double sigmaszn = total(&szProjectile, &neutronTarget); 474 const G4double sigmasmp = total(&smProje 449 const G4double sigmasmp = total(&smProjectile, &protonTarget); 475 const G4double sigmasmn = total(&smProje 450 const G4double sigmasmn = total(&smProjectile, &neutronTarget); 476 451 477 const G4double largestSigma = std::max(s 452 const G4double largestSigma = std::max(sigmalp, std::max(sigmaln, std::max(sigmaspp, std::max(sigmaspn, std::max(sigmaszp, std::max(sigmaszn, std::max(sigmasmp, sigmasmn))))))); 478 const G4double interactionDistance = std 453 const G4double interactionDistance = std::sqrt(largestSigma/Math::tenPi); 479 454 480 return interactionDistance; 455 return interactionDistance; 481 } 456 } 482 457 483 void setCrossSections(ICrossSections *c) { 458 void setCrossSections(ICrossSections *c) { 484 theCrossSections = c; 459 theCrossSections = c; 485 } 460 } 486 461 487 void deleteCrossSections() { 462 void deleteCrossSections() { 488 delete theCrossSections; 463 delete theCrossSections; 489 theCrossSections = NULL; 464 theCrossSections = NULL; 490 } 465 } 491 466 492 void initialize(Config const * const theCo 467 void initialize(Config const * const theConfig) { 493 CrossSectionsType crossSections = theCon 468 CrossSectionsType crossSections = theConfig->getCrossSectionsType(); 494 if(crossSections == INCL46CrossSections) 469 if(crossSections == INCL46CrossSections) 495 setCrossSections(new CrossSectionsINCL 470 setCrossSections(new CrossSectionsINCL46); 496 else if(crossSections == MultiPionsCross 471 else if(crossSections == MultiPionsCrossSections) 497 setCrossSections(new CrossSectionsMult 472 setCrossSections(new CrossSectionsMultiPions); 498 else if(crossSections == TruncatedMultiP 473 else if(crossSections == TruncatedMultiPionsCrossSections) { 499 const G4int nMaxPi = theConfig->getMax 474 const G4int nMaxPi = theConfig->getMaxNumberMultipions(); 500 if(nMaxPi>0) 475 if(nMaxPi>0) 501 setCrossSections(new CrossSectionsTr 476 setCrossSections(new CrossSectionsTruncatedMultiPions(nMaxPi)); 502 else { 477 else { 503 INCL_WARN("Truncated multipion cross 478 INCL_WARN("Truncated multipion cross sections were requested, but the specified maximum\n" 504 << "number of pions is <=0. Fall 479 << "number of pions is <=0. Falling back to standard multipion cross-sections.\n"); 505 setCrossSections(new CrossSectionsMu 480 setCrossSections(new CrossSectionsMultiPions); 506 } 481 } 507 } else if(crossSections == MultiPionsAnd 482 } else if(crossSections == MultiPionsAndResonancesCrossSections) 508 setCrossSections(new CrossSectionsMult 483 setCrossSections(new CrossSectionsMultiPionsAndResonances); 509 else if(crossSections == StrangenessCros 484 else if(crossSections == StrangenessCrossSections) 510 setCrossSections(new CrossSectionsStra 485 setCrossSections(new CrossSectionsStrangeness); 511 else if(crossSections == AntiparticlesCr << 512 setCrossSections(new CrossSectionsAnti << 513 } 486 } 514 } 487 } 515 } 488 } 516 489