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 ////////////////////////////////////////////// 27 // 28 // File: G4BetaPlusDecay.cc 29 // Author: D.H. Wright (SLAC) 30 // Date: 14 November 2014 31 // Modifications: 32 // 23.08.2023 V.Ivanchenko 33 // 34 ////////////////////////////////////////////// 35 36 #include "G4BetaPlusDecay.hh" 37 #include "G4BetaDecayCorrections.hh" 38 #include "G4IonTable.hh" 39 #include "G4ThreeVector.hh" 40 #include "G4LorentzVector.hh" 41 #include "G4DynamicParticle.hh" 42 #include "G4DecayProducts.hh" 43 #include "G4PhysicalConstants.hh" 44 #include "G4SystemOfUnits.hh" 45 #include "G4Positron.hh" 46 #include "G4NeutrinoE.hh" 47 #include "G4RandomDirection.hh" 48 #include "G4BetaSpectrumSampler.hh" 49 #include <iostream> 50 #include <iomanip> 51 52 namespace { 53 const G4double eMass = CLHEP::electron_mass_ 54 } 55 56 G4BetaPlusDecay::G4BetaPlusDecay(const G4Parti 57 const G4doubl 58 const G4doubl 59 const G4Ions: 60 const G4BetaD 61 : G4NuclearDecay("beta+ decay", BetaPlus, exc 62 maxEnergy(e0/eMass - 2.0), 63 estep(maxEnergy/(G4double)(npti - 1)) 64 { 65 SetParent(theParentNucleus); // Store name 66 SetBR(branch); 67 SetNumberOfDaughters(3); 68 69 fPrimaryIon = theParentNucleus; 70 fLepton = G4Positron::Positron(); 71 fNeutrino = G4NeutrinoE::NeutrinoE(); 72 73 G4IonTable* theIonTable = G4ParticleTable::G 74 G4int daughterZ = theParentNucleus->GetAtomi 75 G4int daughterA = theParentNucleus->GetAtomi 76 fResIon = const_cast<const G4ParticleDefinit 77 78 79 parentMass = theParentNucleus->GetPDGMass(); 80 resMass = fResIon->GetPDGMass(); 81 82 SetUpBetaSpectrumSampler(daughterZ, daughter 83 84 SetDaughter(0, fResIon); 85 SetDaughter(1, fLepton); 86 SetDaughter(2, fNeutrino); 87 88 // Fill G4MT_parent with theParentNucleus (s 89 CheckAndFillParent(); 90 91 // Fill G4MT_daughters with e+, nu and resid 92 CheckAndFillDaughters(); 93 } 94 95 G4DecayProducts* G4BetaPlusDecay::DecayIt(G4do 96 { 97 // Set up final state 98 // parentParticle is set at rest here becaus 99 // is done later 100 G4DynamicParticle prim(fPrimaryIon, G4ThreeV 101 G4DecayProducts* products = new G4DecayProdu 102 103 // Generate positron isotropic in angle, wit 104 const G4double eKE = eMass*G4BetaSpectrumSam 105 106 G4double eMomentum = std::sqrt(eKE*(eKE + 2. 107 G4ThreeVector dir = G4RandomDirection(); 108 G4DynamicParticle* dp = new G4DynamicParticl 109 products->PushProducts(dp); 110 /* 111 G4cout << "G4BetaPlusDecay::DecayIt: " << fP 112 << " -> " << fResIon->GetParticleName() << 113 << " + " << fNeutrino->GetParticleName() << 114 << G4endl; 115 */ 116 // 4-momentum of residual ion and neutrino 117 G4LorentzVector lv(-eMomentum*dir.x(), -eMom 118 parentMass - eKE - eMass) 119 120 const G4double elim = CLHEP::eV; 121 // centrum of mass system 122 G4double M = lv.mag(); 123 G4double edel = M - resMass; 124 // Free energy should be above limit 125 if (edel >= elim) { 126 // neutrino 127 G4double eNu = 0.5*(M - resMass*resMass/M) 128 G4LorentzVector lvnu(eNu*G4RandomDirection 129 lvnu.boost(lv.boostVector()); 130 dir = lvnu.vect().unit(); 131 dp = new G4DynamicParticle(fNeutrino, dir, 132 products->PushProducts(dp); 133 134 // residual 135 lv -= lvnu; 136 dir = lv.vect().unit(); 137 G4double ekin = std::max(lv.e() - resMass, 138 dp = new G4DynamicParticle(fResIon, dir, e 139 products->PushProducts(dp); 140 141 } else { 142 // neglecting relativistic kinematic and g 143 dp = new G4DynamicParticle(fNeutrino, G4Ra 144 products->PushProducts(dp); 145 dp = new G4DynamicParticle(fResIon, G4Thre 146 products->PushProducts(dp); 147 } 148 149 return products; 150 } 151 152 153 void 154 G4BetaPlusDecay::SetUpBetaSpectrumSampler(cons 155 cons 156 cons 157 { 158 cdf[0] = 0.0; 159 160 // Check for cases in which Q < 2Me (e.g. z6 161 if (maxEnergy > 0.) { 162 G4BetaDecayCorrections corrections(-daught 163 164 // Fill array to store cumulative spectrum 165 G4double ex; // Positron kinetic energy 166 G4double p; // Positron momentum in unit 167 G4double f; // Spectral shape function 168 G4double f0 = 0.0; 169 G4double sum = 0.0; 170 for (G4int i = 1; i < npti-1; ++i) { 171 ex = estep*i; 172 p = std::sqrt(ex*(ex + 2.)); 173 f = p*(1. + ex)*(maxEnergy - ex)*(maxEne 174 175 // Apply Fermi factor to get allowed sha 176 f *= corrections.FermiFunction(1. + ex); 177 178 // Apply shape factor for forbidden tran 179 f *= corrections.ShapeFactor(betaType, p 180 sum += f + f0; 181 cdf[i] = sum; 182 f0 = f; 183 } 184 cdf[npti-1] = sum + f0; 185 } else { 186 for (G4int i = 0; i < npti; ++i) { cdf[i] 187 } 188 } 189 190 void G4BetaPlusDecay::DumpNuclearInfo() 191 { 192 G4cout << " G4BetaPlusDecay " << fPrimaryIo 193 << " -> " << fResIon->GetParticleName() << 194 << " + " << fNeutrino->GetParticleName() << 195 << maxEnergy*eMass << " BR=" << GetBR() << 196 } 197