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 "G4INCLPiNToEtaChannel.hh" 39 #include "G4INCLKinematicsUtils.hh" 40 #include "G4INCLBinaryCollisionAvatar.hh" 41 #include "G4INCLRandom.hh" 42 #include "G4INCLGlobals.hh" 43 #include "G4INCLLogger.hh" 44 45 namespace G4INCL { 46 47 PiNToEtaChannel::PiNToEtaChannel(Particle 48 : particle1(p1), particle2(p2) 49 { 50 51 } 52 53 PiNToEtaChannel::~PiNToEtaChannel(){ 54 55 } 56 57 void PiNToEtaChannel::fillFinalState(Final 58 Particle * nucleon; 59 Particle * pion; 60 if(particle1->isNucleon()) { 61 nucleon = particle1; 62 pion = particle2; 63 } else { 64 nucleon = particle2; 65 pion = particle1; 66 } 67 68 G4int iso=ParticleTable::getIsospin(nucleo 69 // assert(iso == 1 || iso == -1); 70 if (iso == 1) { 71 nucleon->setType(Proton); 72 } 73 else if (iso == -1) { 74 nucleon->setType(Neutron); 75 } 76 pion->setType(Eta); 77 #ifdef INCLXX_IN_GEANT4_MODE 78 // Erase the parent resonance information 79 nucleon->setParentResonancePDGCode(0); 80 nucleon->setParentResonanceID(0); 81 pion->setParentResonancePDGCode(0); 82 pion->setParentResonanceID(0); 83 #endif 84 G4double sh=nucleon->getEnergy()+pion->get 85 G4double mn=nucleon->getMass(); 86 G4double me=pion->getMass(); 87 G4double en=(sh*sh+mn*mn-me*me)/(2*sh); 88 nucleon->setEnergy(en); 89 G4double ee=std::sqrt(en*en-mn*mn+me*me); 90 pion->setEnergy(ee); 91 G4double pn=std::sqrt(en*en-mn*mn); 92 93 // real distribution (from PRC 78, 025204 (200 94 95 G4double ECM=G4INCL::KinematicsUtils::tota 96 97 const G4double pi=std::acos(-1.0); 98 G4double x1; 99 G4double u1; 100 G4double fteta; 101 G4double teta; 102 G4double fi; 103 104 if (ECM < 1650.) { 105 // below 1650 MeV - angular distribution (x=co 106 107 G4double f1= -0.0000288627*ECM*ECM+0.09155 108 G4double b1=(f1-(f1/(1.5-0.5*std::pow((ECM 109 G4double a1=2.5*b1; // minimum at cos(thet 110 G4double c1=f1-3.5*b1; 111 112 G4double interg1=2.*a1/3. +2.*c1; // (inte 113 114 G4int passe1=0; 115 while (passe1==0) { 116 // Sample x from -1 to 1 117 x1=Random::shoot(); 118 if (Random::shoot() > 0.5) x1=-x1; 119 120 // Sample u from 0 to 1 121 u1=Random::shoot(); 122 fteta=(a1*x1*x1+b1*x1+c1)/interg1; 123 // The condition 124 if (u1*f1/interg1 < fteta) { 125 teta=std::acos(x1); 126 passe1=1; 127 } 128 } 129 } 130 else { 131 // above 1650 MeV - angular distribution (x=co 132 133 G4double a2=-0.29; 134 G4double b2=0.348; // ax^2+bx+c: around 135 G4double c2=0.0546; 136 G4double dev=-0.2; // tail close to zero 137 G4double vert=0.04; // to avoid negative d 138 139 G4double interg2=0.1716182902205207; // wi 140 const G4double f2=1.09118088; // maximum ( 141 142 G4int passe2=0; 143 while (passe2==0) { 144 // Sample x from -1 to 1 145 x1=Random::shoot(); 146 if (Random::shoot() > 0.5) x1=-x1; 147 148 // Sample u from 0 to 1 149 u1=Random::shoot(); 150 fteta=((a2*x1*x1+b2*x1+c2)*(0.5+(std::at 151 // The condition 152 if (u1*f2 < fteta) { 153 teta=std::acos(x1); 154 passe2=1; 155 } 156 } 157 } 158 159 fi=(2.0*pi)*Random::shoot(); 160 161 ThreeVector mom_nucleon( 162 pn*std::sin(te 163 pn*std::sin(te 164 pn*std::cos(te 165 ); 166 // end real distribution 167 168 nucleon->setMomentum(-mom_nucleon); 169 pion->setMomentum(mom_nucleon); 170 171 fs->addModifiedParticle(nucleon); 172 fs->addModifiedParticle(pion); 173 } 174 175 } 176