Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // INCL++ intra-nuclear cascade model 27 // Alain Boudard, CEA-Saclay, France 28 // Joseph Cugnon, University of Liege, Belgium 29 // Jean-Christophe David, CEA-Saclay, France 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H 31 // Sylvie Leray, CEA-Saclay, France 32 // Davide Mancusi, CEA-Saclay, France 33 // 34 #define INCLXX_IN_GEANT4_MODE 1 35 36 #include "globals.hh" 37 38 #include "G4INCLCrossSections.hh" 39 #include "G4INCLKinematicsUtils.hh" 40 #include "G4INCLParticleTable.hh" 41 #include "G4INCLLogger.hh" 42 #include "G4INCLCrossSectionsINCL46.hh" 43 #include "G4INCLCrossSectionsMultiPions.hh" 44 #include "G4INCLCrossSectionsTruncatedMultiPio 45 #include "G4INCLCrossSectionsMultiPionsAndReso 46 #include "G4INCLCrossSectionsStrangeness.hh" 47 #include "G4INCLCrossSectionsAntiparticles.hh" 48 // #include <cassert> 49 50 namespace G4INCL { 51 52 namespace { 53 G4ThreadLocal ICrossSections *theCrossSect 54 } 55 56 namespace CrossSections { 57 G4double elastic(Particle const * const p1 58 return theCrossSections->elastic(p1,p2); 59 } 60 61 G4double total(Particle const * const p1, 62 return theCrossSections->total(p1,p2); 63 } 64 65 G4double NDeltaToNN(Particle const * const 66 return theCrossSections->NDeltaToNN(p1,p 67 } 68 69 G4double NNToNDelta(Particle const * const 70 return theCrossSections->NNToNDelta(p1,p 71 } 72 73 G4double NNToxPiNN(const G4int xpi, Particle 74 return theCrossSections->NNToxPiNN(xpi,p1, 75 } 76 77 G4double piNToDelta(Particle const * const p 78 return theCrossSections->piNToDelta( 79 } 80 81 G4double piNToxPiN(const G4int xpi, Particle 82 return theCrossSections->piNToxPiN(x 83 } 84 85 G4double piNToEtaN(Particle const * const p1 86 return theCrossSections->piNToEtaN(p1,p2 87 } 88 89 G4double piNToOmegaN(Particle const * const 90 return theCrossSections->piNToOmegaN(p1, 91 } 92 93 G4double piNToEtaPrimeN(Particle const * con 94 return theCrossSections->piNToEtaPrimeN( 95 } 96 97 G4double etaNToPiN(Particle const * const p1 98 return theCrossSections->etaNToPiN(p1,p2 99 } 100 101 G4double etaNToPiPiN(Particle const * const 102 return theCrossSections->etaNToPiPiN(p1, 103 } 104 105 G4double omegaNToPiN(Particle const * const 106 return theCrossSections->omegaNToPiN(p1, 107 } 108 109 G4double omegaNToPiPiN(Particle const * cons 110 return theCrossSections->omegaNToPiPiN(p 111 } 112 113 G4double etaPrimeNToPiN(Particle const * con 114 return theCrossSections->etaPrimeNToPiN( 115 } 116 117 G4double NNToNNEta(Particle const * const p1 118 return theCrossSections->NNToNNEta(p1,p2 119 } 120 121 G4double NNToNNEtaExclu(Particle const * con 122 return theCrossSections->NNToNNEtaExclu( 123 } 124 125 G4double NNToNNEtaxPi(const G4int xpi, Parti 126 return theCrossSections->NNToNNEtaxPi( 127 } 128 129 G4double NNToNDeltaEta(Particle const * cons 130 return theCrossSections->NNToNDeltaEta(p 131 } 132 133 134 G4double NNToNNOmega(Particle const * const 135 return theCrossSections->NNToNNOmega(p1, 136 } 137 138 G4double NNToNNOmegaExclu(Particle const * 139 return theCrossSections->NNToNNOmegaExcl 140 } 141 142 G4double NNToNNOmegaxPi(const G4int xpi, Pa 143 return theCrossSections->NNToNNOmegaxP 144 } 145 146 G4double NNToNDeltaOmega(Particle const * c 147 return theCrossSections->NNToNDeltaOmega 148 } 149 150 151 G4double NYelastic(Particle const * const 152 return theCrossSections->NYelastic(p1,p2 153 } 154 155 G4double NKbelastic(Particle const * const 156 return theCrossSections->NKbelastic(p1,p 157 } 158 159 G4double NKelastic(Particle const * const 160 return theCrossSections->NKelastic(p1,p2 161 } 162 163 G4double NNToNLK(Particle const * const p1 164 return theCrossSections->NNToNLK(p1,p2); 165 } 166 167 G4double NNToNSK(Particle const * const p1 168 return theCrossSections->NNToNSK(p1,p2); 169 } 170 171 G4double NNToNLKpi(Particle const * const 172 return theCrossSections->NNToNLKpi(p1,p2 173 } 174 175 G4double NNToNSKpi(Particle const * const 176 return theCrossSections->NNToNSKpi(p1,p2 177 } 178 179 G4double NNToNLK2pi(Particle const * const 180 return theCrossSections->NNToNLK2pi(p1,p 181 } 182 183 G4double NNToNSK2pi(Particle const * const 184 return theCrossSections->NNToNSK2pi(p1,p 185 } 186 187 G4double NNToNNKKb(Particle const * const 188 return theCrossSections->NNToNNKKb(p1,p2 189 } 190 191 G4double NNToMissingStrangeness(Particle c 192 return theCrossSections->NNToMissingStra 193 } 194 195 G4double NDeltaToNLK(Particle const * cons 196 return theCrossSections->NDeltaToNLK(p 197 } 198 G4double NDeltaToNSK(Particle const * cons 199 return theCrossSections->NDeltaToNSK(p 200 } 201 G4double NDeltaToDeltaLK(Particle const * 202 return theCrossSections->NDeltaToDelta 203 } 204 G4double NDeltaToDeltaSK(Particle const * 205 return theCrossSections->NDeltaToDelta 206 } 207 208 G4double NDeltaToNNKKb(Particle const * co 209 return theCrossSections->NDeltaToNNKKb 210 } 211 212 G4double NpiToLK(Particle const * const p1 213 return theCrossSections->NpiToLK(p1,p2); 214 } 215 216 G4double NpiToSK(Particle const * const p1 217 return theCrossSections->NpiToSK(p1,p2); 218 } 219 220 G4double p_pimToSmKp(Particle const * cons 221 return theCrossSections->p_pimToSmKp(p1, 222 } 223 224 G4double p_pimToSzKz(Particle const * cons 225 return theCrossSections->p_pimToSzKz(p1, 226 } 227 228 G4double p_pizToSzKp(Particle const * const 229 return theCrossSections->p_pizToSzKp(p1, 230 } 231 232 G4double NpiToLKpi(Particle const * const 233 return theCrossSections->NpiToLKpi(p1,p2 234 } 235 236 G4double NpiToSKpi(Particle const * const 237 return theCrossSections->NpiToSKpi(p1,p2 238 } 239 240 G4double NpiToLK2pi(Particle const * const 241 return theCrossSections->NpiToLK2pi(p1,p 242 } 243 244 G4double NpiToSK2pi(Particle const * const 245 return theCrossSections->NpiToSK2pi(p1,p 246 } 247 248 G4double NpiToNKKb(Particle const * const 249 return theCrossSections->NpiToNKKb(p1,p2 250 } 251 252 G4double NpiToMissingStrangeness(Particle 253 return theCrossSections->NpiToMissingStr 254 } 255 256 G4double NLToNS(Particle const * const p1, 257 return theCrossSections->NLToNS(p1,p2); 258 } 259 260 G4double NSToNL(Particle const * const p1, 261 return theCrossSections->NSToNL(p1,p2); 262 } 263 264 G4double NSToNS(Particle const * const p1, 265 return theCrossSections->NSToNS(p1,p2); 266 } 267 268 G4double NKToNK(Particle const * const p1, 269 return theCrossSections->NKToNK(p1,p2); 270 } 271 272 G4double NKToNKpi(Particle const * const p 273 return theCrossSections->NKToNKpi(p1,p2) 274 } 275 276 G4double NKToNK2pi(Particle const * const 277 return theCrossSections->NKToNK2pi(p1,p2 278 } 279 280 G4double NKbToNKb(Particle const * const p 281 return theCrossSections->NKbToNKb(p1,p2) 282 } 283 284 G4double NKbToSpi(Particle const * const p 285 return theCrossSections->NKbToSpi(p1,p2) 286 } 287 288 G4double NKbToLpi(Particle const * const p 289 return theCrossSections->NKbToLpi(p1,p2) 290 } 291 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 317 return theCrossSections->NKbToS2pi(p1,p2 318 } 319 320 G4double NKbToL2pi(Particle const * const 321 return theCrossSections->NKbToL2pi(p1,p2 322 } 323 324 G4double NKbToNKbpi(Particle const * const 325 return theCrossSections->NKbToNKbpi(p1,p 326 } 327 328 G4double NKbToNKb2pi(Particle const * cons 329 return theCrossSections->NKbToNKb2pi(p1, 330 } 331 332 333 G4double calculateNNAngularSlope(G4double 334 return theCrossSections->calculateNNAngu 335 } 336 337 G4double interactionDistancePiN(const G4do 338 ThreeVector nullVector; 339 ThreeVector unitVector(0., 0., 1.); 340 341 Particle piPlusProjectile(PiPlus, unitVe 342 piPlusProjectile.setEnergy(piPlusProject 343 piPlusProjectile.adjustMomentumFromEnerg 344 Particle piZeroProjectile(PiZero, unitVe 345 piZeroProjectile.setEnergy(piZeroProject 346 piZeroProjectile.adjustMomentumFromEnerg 347 Particle piMinusProjectile(PiMinus, unit 348 piMinusProjectile.setEnergy(piMinusProje 349 piMinusProjectile.adjustMomentumFromEner 350 351 Particle protonTarget(Proton, nullVector 352 Particle neutronTarget(Neutron, nullVect 353 const G4double sigmapipp = total(&piPlus 354 const G4double sigmapipn = total(&piPlus 355 const G4double sigmapi0p = total(&piZero 356 const G4double sigmapi0n = total(&piZero 357 const G4double sigmapimp = total(&piMinu 358 const G4double sigmapimn = total(&piMinu 359 /* We compute the interaction distance f 360 * sections. Note that this is different 361 * average of the six, and will in gener 362 * cross section. 363 */ 364 const G4double largestSigma = std::max(s 365 const G4double interactionDistance = std 366 367 return interactionDistance; 368 } 369 370 G4double interactionDistanceNN(const Parti 371 // assert(aSpecies.theType==Proton || aSpecies 372 // assert(aSpecies.theA>0); 373 ThreeVector nullVector; 374 ThreeVector unitVector(0.,0.,1.); 375 376 const G4double kineticEnergyPerNucleon = 377 378 Particle protonProjectile(Proton, unitVe 379 protonProjectile.setEnergy(protonProject 380 protonProjectile.adjustMomentumFromEnerg 381 Particle neutronProjectile(Neutron, unit 382 neutronProjectile.setEnergy(neutronProje 383 neutronProjectile.adjustMomentumFromEner 384 385 Particle protonTarget(Proton, nullVector 386 Particle neutronTarget(Neutron, nullVect 387 const G4double sigmapp = total(&protonPr 388 const G4double sigmapn = total(&protonPr 389 const G4double sigmann = total(&neutronP 390 /* We compute the interaction distance f 391 * sections. Note that this is different 392 * average of the four, and will in gene 393 * cross section. 394 */ 395 const G4double largestSigma = std::max(s 396 const G4double interactionDistance = std 397 398 return interactionDistance; 399 } 400 401 G4double interactionDistanceKN(const G4dou 402 ThreeVector nullVector; 403 ThreeVector unitVector(0.,0.,1.); 404 405 Particle kpProjectile(KPlus, unitVector, 406 kpProjectile.setEnergy(kpProjectile.getM 407 kpProjectile.adjustMomentumFromEnergy(); 408 Particle kzProjectile(KZero, unitVector, 409 kzProjectile.setEnergy(kzProjectile.getM 410 kzProjectile.adjustMomentumFromEnergy(); 411 412 Particle protonTarget(Proton, nullVector 413 Particle neutronTarget(Neutron, nullVect 414 const G4double sigmakpp = total(&kpProje 415 const G4double sigmakpn = total(&kpProje 416 const G4double sigmakzp = total(&kzProje 417 const G4double sigmakzn = total(&kzProje 418 419 const G4double largestSigma = std::max(s 420 const G4double interactionDistance = std 421 422 return interactionDistance; 423 } 424 425 G4double interactionDistanceKbarN(const G4 426 ThreeVector nullVector; 427 ThreeVector unitVector(0.,0.,1.); 428 429 Particle kmProjectile(KMinus, unitVector 430 kmProjectile.setEnergy(kmProjectile.getM 431 kmProjectile.adjustMomentumFromEnergy(); 432 Particle kzProjectile(KZeroBar, unitVect 433 kzProjectile.setEnergy(kzProjectile.getM 434 kzProjectile.adjustMomentumFromEnergy(); 435 436 Particle protonTarget(Proton, nullVector 437 Particle neutronTarget(Neutron, nullVect 438 const G4double sigmakmp = total(&kmProje 439 const G4double sigmakmn = total(&kmProje 440 const G4double sigmakzp = total(&kzProje 441 const G4double sigmakzn = total(&kzProje 442 443 const G4double largestSigma = std::max(s 444 const G4double interactionDistance = std 445 446 return interactionDistance; 447 } 448 449 G4double interactionDistanceYN(const G4dou 450 ThreeVector nullVector; 451 ThreeVector unitVector(0.,0.,1.); 452 453 Particle lProjectile(Lambda, unitVector, 454 lProjectile.setEnergy(lProjectile.getMas 455 lProjectile.adjustMomentumFromEnergy(); 456 Particle spProjectile(SigmaPlus, unitVec 457 spProjectile.setEnergy(spProjectile.getM 458 spProjectile.adjustMomentumFromEnergy(); 459 Particle szProjectile(SigmaZero, unitVec 460 szProjectile.setEnergy(szProjectile.getM 461 szProjectile.adjustMomentumFromEnergy(); 462 Particle smProjectile(SigmaMinus, unitVe 463 smProjectile.setEnergy(smProjectile.getM 464 smProjectile.adjustMomentumFromEnergy(); 465 466 Particle protonTarget(Proton, nullVector 467 Particle neutronTarget(Neutron, nullVect 468 const G4double sigmalp = total(&lProject 469 const G4double sigmaln = total(&lProject 470 const G4double sigmaspp = total(&spProje 471 const G4double sigmaspn = total(&spProje 472 const G4double sigmaszp = total(&szProje 473 const G4double sigmaszn = total(&szProje 474 const G4double sigmasmp = total(&smProje 475 const G4double sigmasmn = total(&smProje 476 477 const G4double largestSigma = std::max(s 478 const G4double interactionDistance = std 479 480 return interactionDistance; 481 } 482 483 void setCrossSections(ICrossSections *c) { 484 theCrossSections = c; 485 } 486 487 void deleteCrossSections() { 488 delete theCrossSections; 489 theCrossSections = NULL; 490 } 491 492 void initialize(Config const * const theCo 493 CrossSectionsType crossSections = theCon 494 if(crossSections == INCL46CrossSections) 495 setCrossSections(new CrossSectionsINCL 496 else if(crossSections == MultiPionsCross 497 setCrossSections(new CrossSectionsMult 498 else if(crossSections == TruncatedMultiP 499 const G4int nMaxPi = theConfig->getMax 500 if(nMaxPi>0) 501 setCrossSections(new CrossSectionsTr 502 else { 503 INCL_WARN("Truncated multipion cross 504 << "number of pions is <=0. Fall 505 setCrossSections(new CrossSectionsMu 506 } 507 } else if(crossSections == MultiPionsAnd 508 setCrossSections(new CrossSectionsMult 509 else if(crossSections == StrangenessCros 510 setCrossSections(new CrossSectionsStra 511 else if(crossSections == AntiparticlesCr 512 setCrossSections(new CrossSectionsAnti 513 } 514 } 515 } 516