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