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: G4ITDecay.cc 29 // Author: D.H. Wright (SLAC) 30 // Date: 14 November 2014 31 // 32 ////////////////////////////////////////////// 33 34 #include "G4ITDecay.hh" 35 #include "G4IonTable.hh" 36 #include "G4ThreeVector.hh" 37 #include "G4LorentzVector.hh" 38 #include "G4DynamicParticle.hh" 39 #include "G4DecayProducts.hh" 40 #include "G4PhotonEvaporation.hh" 41 #include "G4VAtomDeexcitation.hh" 42 #include "G4AtomicShells.hh" 43 #include "G4Electron.hh" 44 #include "G4LossTableManager.hh" 45 #include "G4Fragment.hh" 46 #include "G4SystemOfUnits.hh" 47 #include "G4PhysicalConstants.hh" 48 49 50 G4ITDecay::G4ITDecay(G4PhotonEvaporation* ptr) 51 : G4NuclearDecay("IT decay", IT, 0.0, noFloa 52 {} 53 54 G4ITDecay::G4ITDecay(const G4ParticleDefinitio 55 const G4double& branch, c 56 const G4double& excitatio 57 : G4NuclearDecay("IT decay", IT, excitationE 58 { 59 SetParent(theParentNucleus); // Store name 60 SetBR(branch); 61 SetNumberOfDaughters(1); 62 SetDaughter(0, theParentNucleus); 63 64 SetupDecay(theParentNucleus); 65 } 66 67 void G4ITDecay::SetupDecay(const G4ParticleDef 68 { 69 theParent = theParentNucleus; 70 parentZ = theParentNucleus->GetAtomicNumber( 71 parentA = theParentNucleus->GetAtomicMass(); 72 } 73 74 G4DecayProducts* G4ITDecay::DecayIt(G4double) 75 { 76 // Set up final state 77 // parentParticle is set at rest here becaus 78 // is done later 79 G4LorentzVector atRest(theParent->GetPDGMass 80 G4DynamicParticle parentParticle(theParent, 81 G4DecayProducts* products = new G4DecayProdu 82 83 // Let G4PhotonEvaporation do the decay 84 G4Fragment parentNucleus(parentA, parentZ, a 85 86 // one emission, parent nucleaus become less 87 G4Fragment* eOrGamma = photonEvaporation->Em 88 89 // Modified nuclide is returned as dynDaught 90 auto theIonTable = G4ParticleTable::GetParti 91 G4ParticleDefinition* daughterIon = 92 theIonTable->GetIon(parentZ, parentA, pare 93 G4Ions::FloatLevelBase 94 G4DynamicParticle* dynDaughter = new G4Dynam 95 96 97 if (nullptr != eOrGamma) { 98 G4DynamicParticle* eOrGammaDyn = 99 new G4DynamicParticle(eOrGamma->GetParti 100 eOrGamma->GetMomen 101 eOrGammaDyn->SetProperTime(eOrGamma->GetCr 102 products->PushProducts(eOrGammaDyn); 103 delete eOrGamma; 104 105 // Now do atomic relaxation if e- is emitt 106 if (applyARM) { 107 G4int shellIndex = photonEvaporation->Ge 108 if (shellIndex > -1) { 109 G4VAtomDeexcitation* atomDeex = 110 G4LossTableManager::Instance()->Atom 111 if (atomDeex->IsFluoActive() && parent 112 G4int nShells = G4AtomicShells::GetN 113 if (shellIndex >= nShells) shellInde 114 G4AtomicShellEnumerator as = G4Atomi 115 const G4AtomicShell* shell = atomDee 116 std::vector<G4DynamicParticle*> armP 117 118 // VI, SI 119 // Allows fixing of Bugzilla 1727 120 G4double deexLimit = 0.1*keV; 121 if (G4EmParameters::Instance()->Deex 122 // 123 124 atomDeex->GenerateParticles(&armProd 125 126 G4double productEnergy = 0.; 127 for (G4int i = 0; i < G4int(armProdu 128 productEnergy += armProducts[i]->G 129 130 G4double deficit = shell->BindingEne 131 if (deficit > 0.0) { 132 // Add a dummy electron to make up 133 G4double cosTh = 1.-2.*G4UniformRa 134 G4double sinTh = std::sqrt(1.- cos 135 G4double phi = twopi*G4UniformRand 136 137 G4ThreeVector electronDirection(si 138 si 139 G4DynamicParticle* extra = 140 new G4DynamicParticle(G4Electron 141 deficit); 142 armProducts.push_back(extra); 143 } 144 145 std::size_t nArm = armProducts.size( 146 if (nArm > 0) { 147 G4ThreeVector bst = dynDaughter->G 148 for (std::size_t i = 0; i < nArm; 149 G4DynamicParticle* dp = armProdu 150 G4LorentzVector lv = dp->Get4Mom 151 dp->Set4Momentum(lv); 152 products->PushProducts(dp); 153 } 154 } 155 } 156 } 157 } // if ARM on 158 } // eOrGamma 159 160 products->PushProducts(dynDaughter); 161 162 // Energy conservation check 163 /* 164 G4int newSize = products->entries(); 165 G4DynamicParticle* temp = 0; 166 G4double KEsum = 0.0; 167 for (G4int i = 0; i < newSize; i++) { 168 temp = products->operator[](i); 169 KEsum += temp->GetKineticEnergy(); 170 } 171 G4double eCons = G4MT_parent->GetPDGMass() - 172 G4cout << " IT check: Ediff (keV) = " << eCo 173 */ 174 return products; 175 } 176 177 178 void G4ITDecay::DumpNuclearInfo() 179 { 180 if (theParent != nullptr) { 181 G4cout << " G4ITDecay for parent nucleus " 182 } 183 } 184 185