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 "G4INCLNDeltaToDeltaLKChannel.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 NDeltaToDeltaLKChannel::angul 50 51 NDeltaToDeltaLKChannel::NDeltaToDeltaLKChann 52 : particle1(p1), particle2(p2) 53 {} 54 55 NDeltaToDeltaLKChannel::~NDeltaToDeltaLKChan 56 57 G4double NDeltaToDeltaLKChannel::sampleDelta 58 const G4double maxDeltaMass = ecm - Partic 59 const G4double maxDeltaMassRndm = std::ata 60 const G4double deltaMassRndmRange = maxDel 61 // assert(deltaMassRndmRange>0.); 62 63 G4double y=ecm*ecm; 64 G4double q2=(y-1.157776E6)*(y-6.4E5)/y/4.0 65 G4double q3=std::pow(std::sqrt(q2), 3.); 66 const G4double f3max=q3/(q3+5.832E6); // 5 67 G4double x; 68 69 G4int nTries = 0; 70 G4bool success = false; 71 while(!success) { /* Loop checking, 10.07. 72 if(++nTries >= 100000) { 73 INCL_WARN("NDeltaToDeltaLKChannel::sam 74 << ParticleTable::minDeltaMass < 75 return ParticleTable::minDeltaMass; 76 } 77 78 G4double rndm = ParticleTable::minDeltaM 79 y = std::tan(rndm); 80 x = ParticleTable::effectiveDeltaMass + 81 // assert(x>=ParticleTable::minDeltaMass && ec 82 83 // generation of the delta mass with the 84 // (see prc56(1997)2431) 85 y=x*x; 86 q2=(y-1.157776E6)*(y-6.4E5)/y/4.0; // 1. 87 q3=std::pow(std::sqrt(q2), 3.); 88 const G4double f3=q3/(q3+5.832E6); // 5. 89 rndm = Random::shoot(); 90 if (rndm*f3max < f3) 91 success = true; 92 } 93 return x; 94 } 95 96 void NDeltaToDeltaLKChannel::fillFinalState( 97 // D++ p -> L K+ D++ (4) 98 // 99 // D++ n -> L K+ D+ (3) 100 // D++ n -> L K0 D++ (4) 101 // 102 // D+ p -> L K0 D++ (3) 103 // D+ p -> L K+ D+ (2) 104 // 105 // D+ n -> L K+ D0 (4) 106 // D+ n -> L K0 D+ (2) 107 108 Particle *delta; 109 Particle *nucleon; 110 111 if (particle1->isResonance()) { 112 delta = particle1; 113 nucleon = particle2; 114 } 115 else { 116 delta = particle2; 117 nucleon = particle1; 118 } 119 120 121 const G4double sqrtS = KinematicsUtils::to 122 123 const G4int iso = ParticleTable::getIsospi 124 const G4int iso_d = ParticleTable::getIsos 125 const G4double rdm = Random::shoot(); 126 127 /* const G4double m1 = particle1->getMass() 128 const G4double m2 = particle2->getMass(); 129 const G4double pLab = KinematicsUtils::mom 130 131 ParticleType KaonType; 132 ParticleType DeltaType; 133 nucleon->setType(Lambda); 134 135 if(std::abs(iso) == 4){// D++ p 136 KaonType = ParticleTable::getKaonType(is 137 DeltaType = ParticleTable::getDeltaType( 138 } 139 else if(iso == 0){// D+ n 140 if(rdm*3 < 2){ 141 KaonType = ParticleTable::getKaonType( 142 DeltaType = ParticleTable::getDeltaTyp 143 } 144 else{ 145 KaonType = ParticleTable::getKaonType( 146 DeltaType = ParticleTable::getDeltaTyp 147 } 148 } 149 else if(ParticleTable::getIsospin(particle 150 if(rdm*5 < 3){ 151 KaonType = ParticleTable::getKaonType( 152 DeltaType = ParticleTable::getDeltaTyp 153 } 154 else{ 155 KaonType = ParticleTable::getKaonType( 156 DeltaType = ParticleTable::getDeltaTyp 157 } 158 } 159 else{// D++ n 160 if(rdm*7 < 3){ 161 KaonType = ParticleTable::getKaonType( 162 DeltaType = ParticleTable::getDeltaTyp 163 } 164 else{ 165 KaonType = ParticleTable::getKaonType( 166 DeltaType = ParticleTable::getDeltaTyp 167 } 168 } 169 170 delta->setType(DeltaType); 171 delta->setMass(sampleDeltaMass(sqrtS)); 172 173 ParticleList list; 174 list.push_back(delta); 175 list.push_back(nucleon); 176 const ThreeVector &rcol = nucleon->getPosi 177 const ThreeVector zero; 178 Particle *kaon = new Particle(KaonType,zer 179 list.push_back(kaon); 180 181 if(Random::shoot()<0.5) PhaseSpaceGenerato 182 else PhaseSpaceGenerator::generateBiased(s 183 184 185 fs->addModifiedParticle(delta); 186 fs->addModifiedParticle(nucleon); 187 fs->addCreatedParticle(kaon); 188 189 } 190 } 191