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 "G4INCLNpiToSK2piChannel.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 NpiToSK2piChannel::angularSlo 50 51 NpiToSK2piChannel::NpiToSK2piChannel(Particl 52 : particle1(p1), particle2(p2) 53 {} 54 55 NpiToSK2piChannel::~NpiToSK2piChannel(){} 56 57 void NpiToSK2piChannel::fillFinalState(Final 58 59 60 // p pi+ -> S+ K+ pi+ pi- (1) 61 // p pi+ -> S+ K+ pi0 pi0 (1/4) 62 // p pi+ -> S0 K+ pi+ pi0 (1/2) 63 // p pi+ -> S- K+ pi+ pi+ (1/4) 64 // p pi+ -> S+ K0 pi+ pi0 (1) 65 // p pi+ -> S0 K0 pi+ pi+ (1/4) 66 // 67 // p pi0 -> S+ K+ pi0 pi- (1/2) 68 // p pi0 -> S0 K+ pi+ pi- (1/2) 69 // p pi0 -> S0 K+ pi0 pi0 (1/4) 70 // p pi0 -> S- K+ pi+ pi0 (1/4) 71 // p pi0 -> S+ K0 pi+ pi- (1) 72 // p pi0 -> S+ K0 pi0 pi0 (1/4) 73 // p pi0 -> S0 K0 pi+ pi0 (1/4) 74 // p pi0 -> S- K0 pi+ pi+ (1/2) 75 // 76 // p pi- -> S+ K+ pi- pi- (1/4) 77 // p pi- -> S0 K+ pi0 pi- (1/2) 78 // p pi- -> S- K+ pi+ pi- (1/4) 79 // p pi- -> S- K+ pi0 pi0 (1/4) 80 // p pi- -> S+ K0 pi0 pi- (1/2) 81 // p pi- -> S0 K0 pi+ pi- (1) 82 // p pi- -> S0 K0 pi0 pi0 (1/2) 83 // p pi- -> S- K0 pi+ pi0 (1/2) 84 85 Particle *nucleon; 86 Particle *pion; 87 88 89 if(particle1->isNucleon()){ 90 nucleon = particle1; 91 pion = particle2; 92 } 93 else{ 94 nucleon = particle2; 95 pion = particle1; 96 } 97 98 const G4double sqrtS = KinematicsUtils::to 99 100 const G4int iso = ParticleTable::getIsospi 101 G4double rdm = Random::shoot(); 102 103 ParticleType KaonType; 104 ParticleType PionType; 105 106 if(iso == 3 || iso == -3){ 107 if(rdm*13. < 4.){ 108 KaonType = ParticleTable::getKaonType( 109 PionType = ParticleTable::getPionType( 110 nucleon->setType(ParticleTable::getSig 111 } 112 else if(rdm*13. < 5.){ 113 KaonType = ParticleTable::getKaonType( 114 PionType = PiZero; 115 pion->setType(PiZero); 116 nucleon->setType(ParticleTable::getSig 117 } 118 else if(rdm*13. < 7.){ 119 KaonType = ParticleTable::getKaonType( 120 PionType = PiZero; 121 nucleon->setType(SigmaZero); 122 } 123 else if(rdm*13. < 8.){ 124 KaonType = ParticleTable::getKaonType( 125 PionType = ParticleTable::getPionType( 126 nucleon->setType(ParticleTable::getSig 127 } 128 else if(rdm*13. < 12.){ 129 KaonType = ParticleTable::getKaonType( 130 PionType = PiZero; 131 nucleon->setType(ParticleTable::getSig 132 } 133 else{ 134 KaonType = ParticleTable::getKaonType( 135 PionType = ParticleTable::getPionType( 136 nucleon->setType(SigmaZero); 137 } 138 } 139 else if(pion->getType() == PiZero){ 140 if(rdm*14. < 2.){ 141 KaonType = ParticleTable::getKaonType( 142 PionType = ParticleTable::getPionType( 143 nucleon->setType(ParticleTable::getSig 144 } 145 else if(rdm*14. < 4.){ 146 KaonType = ParticleTable::getKaonType( 147 PionType = ParticleTable::getPionType( 148 nucleon->setType(SigmaZero); 149 pion->setType(ParticleTable::getPionTy 150 } 151 else if(rdm*14. < 5.){ 152 KaonType = ParticleTable::getKaonType( 153 PionType = PiZero; 154 nucleon->setType(SigmaZero); 155 } 156 else if(rdm*14. < 6.){ 157 KaonType = ParticleTable::getKaonType( 158 PionType = ParticleTable::getPionType( 159 nucleon->setType(ParticleTable::getSig 160 } 161 else if(rdm*14. < 10.){ 162 KaonType = ParticleTable::getKaonType( 163 PionType = ParticleTable::getPionType( 164 nucleon->setType(ParticleTable::getSig 165 pion->setType(ParticleTable::getPionTy 166 } 167 else if(rdm*14. < 11.){ 168 KaonType = ParticleTable::getKaonType( 169 PionType = PiZero; 170 nucleon->setType(ParticleTable::getSig 171 } 172 else if(rdm*14. < 12.){ 173 KaonType = ParticleTable::getKaonType( 174 PionType = ParticleTable::getPionType( 175 nucleon->setType(SigmaZero); 176 } 177 else{ 178 KaonType = ParticleTable::getKaonType( 179 PionType = ParticleTable::getPionType( 180 nucleon->setType(ParticleTable::getSig 181 pion->setType(ParticleTable::getPionTy 182 } 183 } 184 else{ 185 if(rdm*15. < 1.){ 186 KaonType = ParticleTable::getKaonType( 187 PionType = ParticleTable::getPionType( 188 nucleon->setType(ParticleTable::getSig 189 } 190 else if(rdm*15. < 3.){ 191 KaonType = ParticleTable::getKaonType( 192 PionType = PiZero; 193 nucleon->setType(SigmaZero); 194 } 195 else if(rdm*15. < 4.){ 196 KaonType = ParticleTable::getKaonType( 197 PionType = ParticleTable::getPionType( 198 nucleon->setType(ParticleTable::getSig 199 } 200 else if(rdm*15. < 5.){ 201 KaonType = ParticleTable::getKaonType( 202 PionType = PiZero; 203 nucleon->setType(ParticleTable::getSig 204 pion->setType(PiZero); 205 } 206 else if(rdm*15. < 7.){ 207 KaonType = ParticleTable::getKaonType( 208 PionType = PiZero; 209 nucleon->setType(ParticleTable::getSig 210 } 211 else if(rdm*15. < 11.){ 212 KaonType = ParticleTable::getKaonType( 213 PionType = ParticleTable::getPionType( 214 nucleon->setType(SigmaZero); 215 } 216 else if(rdm*15. < 13.){ 217 KaonType = ParticleTable::getKaonType( 218 PionType = PiZero; 219 nucleon->setType(SigmaZero); 220 pion->setType(PiZero); 221 } 222 else{ 223 KaonType = ParticleTable::getKaonType( 224 PionType = ParticleTable::getPionType( 225 nucleon->setType(ParticleTable::getSig 226 pion->setType(PiZero); 227 } 228 } 229 230 #ifdef INCLXX_IN_GEANT4_MODE 231 // Erase the parent resonance information 232 nucleon->setParentResonancePDGCode(0); 233 nucleon->setParentResonanceID(0); 234 pion->setParentResonancePDGCode(0); 235 pion->setParentResonanceID(0); 236 #endif 237 238 ParticleList list; 239 list.push_back(nucleon); 240 list.push_back(pion); 241 const ThreeVector &rcol1 = nucleon->getPos 242 const ThreeVector &rcol2 = pion->getPositi 243 const ThreeVector zero; 244 Particle *kaon = new Particle(KaonType,zer 245 Particle *pion2 = new Particle(PionType,ze 246 list.push_back(kaon); 247 list.push_back(pion2); 248 249 PhaseSpaceGenerator::generateBiased(sqrtS, 250 251 INCL_DEBUG("NpiToSK2pi " << (kaon->getMome 252 253 fs->addModifiedParticle(nucleon); 254 fs->addModifiedParticle(pion); 255 fs->addCreatedParticle(kaon); 256 fs->addCreatedParticle(pion2); 257 258 } 259 } 260