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 "G4INCLNNToNSK2piChannel.hh" 39 #include "G4INCLKinematicsUtils.hh" 40 #include "G4INCLBinaryCollisionAvatar.hh" 41 #include "G4INCLRandom.hh" 42 #include "G4INCLGlobals.hh" 43 #include "G4INCLLogger.hh" 44 #include <algorithm> 45 #include "G4INCLPhaseSpaceGenerator.hh" 46 47 namespace G4INCL { 48 49 const G4double NNToNSK2piChannel::angularSlo 50 51 NNToNSK2piChannel::NNToNSK2piChannel(Particl 52 : particle1(p1), particle2(p2) 53 {} 54 55 NNToNSK2piChannel::~NNToNSK2piChannel(){} 56 57 void NNToNSK2piChannel::fillFinalState(Final 58 59 /* Equipartition in all channel with facto 60 */ 61 62 const G4double sqrtS = KinematicsUtils::to 63 64 const G4int iso = ParticleTable::getIsospi 65 66 ParticleType KaonType; 67 ParticleType Pion1Type; 68 ParticleType Pion2Type; 69 70 G4double rdm = Random::shoot(); 71 72 if(iso == 2){ 73 if(rdm*20. < 1.){ 74 particle1->setType(Neutron); 75 particle2->setType(SigmaPlus); 76 KaonType = KZero; 77 Pion1Type = PiZero; 78 Pion2Type = PiPlus; 79 } 80 else if(rdm*20. < 3.){ 81 particle1->setType(Neutron); 82 particle2->setType(SigmaZero); 83 KaonType = KZero; 84 Pion1Type = PiPlus; 85 Pion2Type = PiPlus; 86 } 87 else if(rdm*20. < 4.){ 88 particle1->setType(Neutron); 89 particle2->setType(SigmaPlus); 90 KaonType = KPlus; 91 Pion1Type = PiMinus; 92 Pion2Type = PiPlus; 93 } 94 else if(rdm*20. < 6.){ 95 particle1->setType(Neutron); 96 particle2->setType(SigmaPlus); 97 KaonType = KPlus; 98 Pion1Type = PiZero; 99 Pion2Type = PiZero; 100 } 101 else if(rdm*20. < 7.){ 102 particle1->setType(Neutron); 103 particle2->setType(SigmaZero); 104 KaonType = KPlus; 105 Pion1Type = PiZero; 106 Pion2Type = PiPlus; 107 } 108 else if(rdm*20. < 9.){ 109 particle1->setType(Neutron); 110 particle2->setType(SigmaMinus); 111 KaonType = KPlus; 112 Pion1Type = PiPlus; 113 Pion2Type = PiPlus; 114 } 115 else if(rdm*20. < 10.){ 116 particle1->setType(Proton); 117 particle2->setType(SigmaPlus); 118 KaonType = KZero; 119 Pion1Type = PiMinus; 120 Pion2Type = PiPlus; 121 } 122 else if(rdm*20. < 12.){ 123 particle1->setType(Proton); 124 particle2->setType(SigmaPlus); 125 KaonType = KZero; 126 Pion1Type = PiZero; 127 Pion2Type = PiZero; 128 } 129 else if(rdm*20. < 13.){ 130 particle1->setType(Proton); 131 particle2->setType(SigmaZero); 132 KaonType = KZero; 133 Pion1Type = PiZero; 134 Pion2Type = PiPlus; 135 } 136 else if(rdm*20. < 15.){ 137 particle1->setType(Proton); 138 particle2->setType(SigmaMinus); 139 KaonType = KZero; 140 Pion1Type = PiPlus; 141 Pion2Type = PiPlus; 142 } 143 else if(rdm*20. < 16.){ 144 particle1->setType(Proton); 145 particle2->setType(SigmaPlus); 146 KaonType = KPlus; 147 Pion1Type = PiMinus; 148 Pion2Type = PiZero; 149 } 150 else if(rdm*20. < 17.){ 151 particle1->setType(Proton); 152 particle2->setType(SigmaZero); 153 KaonType = KPlus; 154 Pion1Type = PiMinus; 155 Pion2Type = PiPlus; 156 } 157 else if(rdm*20. < 19.){ 158 particle1->setType(Proton); 159 particle2->setType(SigmaZero); 160 KaonType = KPlus; 161 Pion1Type = PiZero; 162 Pion2Type = PiZero; 163 } 164 else{ 165 particle1->setType(Proton); 166 particle2->setType(SigmaMinus); 167 KaonType = KPlus; 168 Pion1Type = PiZero; 169 Pion2Type = PiPlus; 170 } 171 172 173 }if(iso == -2){ 174 if(rdm*20. < 1.){ 175 particle1->setType(Neutron); 176 particle2->setType(SigmaPlus); 177 KaonType = KZero; 178 Pion1Type = PiMinus; 179 Pion2Type = PiZero; 180 } 181 else if(rdm*20. < 2.){ 182 particle1->setType(Neutron); 183 particle2->setType(SigmaZero); 184 KaonType = KZero; 185 Pion1Type = PiMinus; 186 Pion2Type = PiPlus; 187 } 188 else if(rdm*20. < 4.){ 189 particle1->setType(Neutron); 190 particle2->setType(SigmaZero); 191 KaonType = KZero; 192 Pion1Type = PiZero; 193 Pion2Type = PiZero; 194 } 195 else if(rdm*20. < 5.){ 196 particle1->setType(Neutron); 197 particle2->setType(SigmaMinus); 198 KaonType = KZero; 199 Pion1Type = PiZero; 200 Pion2Type = PiPlus; 201 } 202 else if(rdm*20. < 7.){ 203 particle1->setType(Neutron); 204 particle2->setType(SigmaPlus); 205 KaonType = KPlus; 206 Pion1Type = PiMinus; 207 Pion2Type = PiMinus; 208 } 209 else if(rdm*20. < 8.){ 210 particle1->setType(Neutron); 211 particle2->setType(SigmaZero); 212 KaonType = KPlus; 213 Pion1Type = PiMinus; 214 Pion2Type = PiZero; 215 } 216 else if(rdm*20. < 9.){ 217 particle1->setType(Neutron); 218 particle2->setType(SigmaMinus); 219 KaonType = KPlus; 220 Pion1Type = PiMinus; 221 Pion2Type = PiPlus; 222 } 223 else if(rdm*20. < 11.){ 224 particle1->setType(Neutron); 225 particle2->setType(SigmaMinus); 226 KaonType = KPlus; 227 Pion1Type = PiZero; 228 Pion2Type = PiZero; 229 } 230 else if(rdm*20. < 13.){ 231 particle1->setType(Proton); 232 particle2->setType(SigmaPlus); 233 KaonType = KZero; 234 Pion1Type = PiMinus; 235 Pion2Type = PiMinus; 236 } 237 else if(rdm*20. < 14.){ 238 particle1->setType(Proton); 239 particle2->setType(SigmaZero); 240 KaonType = KZero; 241 Pion1Type = PiMinus; 242 Pion2Type = PiZero; 243 } 244 else if(rdm*20. < 15.){ 245 particle1->setType(Proton); 246 particle2->setType(SigmaMinus); 247 KaonType = KZero; 248 Pion1Type = PiMinus; 249 Pion2Type = PiPlus; 250 } 251 else if(rdm*20. < 17.){ 252 particle1->setType(Proton); 253 particle2->setType(SigmaMinus); 254 KaonType = KZero; 255 Pion1Type = PiZero; 256 Pion2Type = PiZero; 257 } 258 else if(rdm*20. < 19.){ 259 particle1->setType(Proton); 260 particle2->setType(SigmaZero); 261 KaonType = KPlus; 262 Pion1Type = PiMinus; 263 Pion2Type = PiMinus; 264 } 265 else{ 266 particle1->setType(Proton); 267 particle2->setType(SigmaMinus); 268 KaonType = KPlus; 269 Pion1Type = PiMinus; 270 Pion2Type = PiZero; 271 } 272 273 } 274 else{ 275 if(rdm*22. < 1.){ 276 particle1->setType(Neutron); 277 particle2->setType(SigmaPlus); 278 KaonType = KZero; 279 Pion1Type = PiMinus; 280 Pion2Type = PiPlus; 281 } 282 else if(rdm*22. < 3.){ 283 particle1->setType(Neutron); 284 particle2->setType(SigmaPlus); 285 KaonType = KZero; 286 Pion1Type = PiZero; 287 Pion2Type = PiZero; 288 } 289 else if(rdm*22. < 4.){ 290 particle1->setType(Neutron); 291 particle2->setType(SigmaZero); 292 KaonType = KZero; 293 Pion1Type = PiZero; 294 Pion2Type = PiPlus; 295 } 296 else if(rdm*22. < 6.){ 297 particle1->setType(Neutron); 298 particle2->setType(SigmaMinus); 299 KaonType = KZero; 300 Pion1Type = PiPlus; 301 Pion2Type = PiPlus; 302 } 303 else if(rdm*22. < 7.){ 304 particle1->setType(Neutron); 305 particle2->setType(SigmaPlus); 306 KaonType = KPlus; 307 Pion1Type = PiMinus; 308 Pion2Type = PiZero; 309 } 310 else if(rdm*22. < 8.){ 311 particle1->setType(Neutron); 312 particle2->setType(SigmaZero); 313 KaonType = KPlus; 314 Pion1Type = PiMinus; 315 Pion2Type = PiPlus; 316 } 317 else if(rdm*22. < 10.){ 318 particle1->setType(Neutron); 319 particle2->setType(SigmaZero); 320 KaonType = KPlus; 321 Pion1Type = PiZero; 322 Pion2Type = PiZero; 323 } 324 else if(rdm*22. < 11.){ 325 particle1->setType(Neutron); 326 particle2->setType(SigmaMinus); 327 KaonType = KPlus; 328 Pion1Type = PiZero; 329 Pion2Type = PiPlus; 330 } 331 else if(rdm*22. < 12.){ 332 particle1->setType(Proton); 333 particle2->setType(SigmaPlus); 334 KaonType = KZero; 335 Pion1Type = PiMinus; 336 Pion2Type = PiZero; 337 } 338 else if(rdm*22. < 13.){ 339 particle1->setType(Proton); 340 particle2->setType(SigmaZero); 341 KaonType = KZero; 342 Pion1Type = PiMinus; 343 Pion2Type = PiPlus; 344 } 345 else if(rdm*22. < 15.){ 346 particle1->setType(Proton); 347 particle2->setType(SigmaZero); 348 KaonType = KZero; 349 Pion1Type = PiZero; 350 Pion2Type = PiZero; 351 } 352 else if(rdm*22. < 16.){ 353 particle1->setType(Proton); 354 particle2->setType(SigmaMinus); 355 KaonType = KZero; 356 Pion1Type = PiZero; 357 Pion2Type = PiPlus; 358 } 359 else if(rdm*22. < 18.){ 360 particle1->setType(Proton); 361 particle2->setType(SigmaPlus); 362 KaonType = KPlus; 363 Pion1Type = PiMinus; 364 Pion2Type = PiMinus; 365 } 366 else if(rdm*22. < 19.){ 367 particle1->setType(Proton); 368 particle2->setType(SigmaZero); 369 KaonType = KPlus; 370 Pion1Type = PiMinus; 371 Pion2Type = PiZero; 372 } 373 else if(rdm*22. < 20.){ 374 particle1->setType(Proton); 375 particle2->setType(SigmaMinus); 376 KaonType = KPlus; 377 Pion1Type = PiMinus; 378 Pion2Type = PiPlus; 379 } 380 else{ 381 particle1->setType(Proton); 382 particle2->setType(SigmaMinus); 383 KaonType = KPlus; 384 Pion1Type = PiZero; 385 Pion2Type = PiZero; 386 } 387 388 } 389 390 391 ParticleList list; 392 list.push_back(particle1); 393 list.push_back(particle2); 394 const ThreeVector &rcol1 = particle1->getP 395 const ThreeVector &rcol2 = particle2->getP 396 const ThreeVector zero; 397 Particle *pion1 = new Particle(Pion1Type,z 398 Particle *pion2 = new Particle(Pion2Type,z 399 Particle *kaon = new Particle(KaonType,zer 400 list.push_back(kaon); 401 list.push_back(pion1); 402 list.push_back(pion2); 403 404 if(Random::shoot()<0.5) PhaseSpaceGenerato 405 else PhaseSpaceGenerator::generateBiased(s 406 407 fs->addModifiedParticle(particle1); 408 fs->addModifiedParticle(particle2); 409 fs->addCreatedParticle(kaon); 410 fs->addCreatedParticle(pion1); 411 fs->addCreatedParticle(pion2); 412 413 } 414 } 415