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