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: G4SFDecay.cc 29 // Author: D.H. Wright (SLAC) 30 // Date: 27 March 2019 31 // 32 ////////////////////////////////////////////// 33 34 #include "G4SFDecay.hh" 35 #include "G4fissionEvent.hh" 36 #include "G4IonTable.hh" 37 #include "G4ThreeVector.hh" 38 #include "G4LorentzVector.hh" 39 #include "G4DynamicParticle.hh" 40 #include "G4DecayProducts.hh" 41 #include "G4Neutron.hh" 42 #include "G4Gamma.hh" 43 #include "G4SystemOfUnits.hh" 44 #include "G4PhysicalConstants.hh" 45 46 47 G4SFDecay::G4SFDecay(const G4ParticleDefinitio 48 const G4double& branch, c 49 const G4double& excitatio 50 const G4Ions::G4FloatLeve 51 : G4NuclearDecay("SF decay", SpFission, excit 52 { 53 SetParent(theParentNucleus); // Store name 54 SetBR(branch); 55 56 parentZ = theParentNucleus->GetAtomicNumber( 57 parentA = theParentNucleus->GetAtomicMass(); 58 59 // SetNumberOfDaughters(0); doesn't seem to 60 // Set to 1 for now 61 // When we later install proper fragment gene 62 // and modify Z and A in DecayIt() 63 SetNumberOfDaughters(1); 64 G4IonTable* theIonTable = 65 (G4IonTable*)(G4ParticleTable::GetParticle 66 SetDaughter(0, theIonTable->GetIon(parentZ, 67 } 68 69 70 G4SFDecay::~G4SFDecay() 71 {} 72 73 74 G4DecayProducts* G4SFDecay::DecayIt(G4double) 75 { 76 // Fill G4MT_parent with theParentNucleus (s 77 CheckAndFillParent(); 78 79 // Set up final state 80 // parentParticle is set at rest here becaus 81 // is done later 82 G4LorentzVector atRest(G4MT_parent->GetPDGMa 83 G4ThreeVector(0.,0.,0 84 G4DynamicParticle parentParticle(G4MT_parent 85 G4DecayProducts* products = new G4DecayProdu 86 87 // Generate LLNL code for parent nucleus 88 G4int code = 1000*G4MT_parent->GetAtomicNumb 89 G4MT_parent->GetAtomicMass 90 91 // Let G4fissionEvent do the decay 92 // Argument 2 : time, passed through to set 93 // Argument 3 : nubar, when set to -1, selec 94 // Argument 4 : energy used in Watt spectrum 95 G4fissionEvent aFission(code, 10.0, -1, 0.); 96 G4int nNeut = aFission.getNeutronNu(); 97 G4int nGam = aFission.getPhotonNu(); 98 99 G4DynamicParticle* dynPart = 0; 100 G4ThreeVector direction(0.,0.,0.); 101 G4double KE = 0.; // energy from generator 102 103 if (nNeut > 0) { 104 // Put neutrons on the stack 105 for (G4int i = 0; i < nNeut; i++) { 106 KE = aFission.getNeutronEnergy(i); 107 direction.setX(aFission.getNeutronDircos 108 direction.setY(aFission.getNeutronDircos 109 direction.setZ(aFission.getNeutronDircos 110 111 dynPart = new G4DynamicParticle(G4Neutro 112 113 // Not needed - time comes from parent t 114 // dynPart->SetProperTime(aFission.getNe 115 116 products->PushProducts(dynPart); 117 } 118 119 // Put gammas on the stack 120 for (G4int i = 0; i < nGam; i++) { 121 KE = aFission.getPhotonEnergy(i); 122 direction.setX(aFission.getPhotonDircosu 123 direction.setY(aFission.getPhotonDircosv 124 direction.setZ(aFission.getPhotonDircosw 125 126 dynPart = new G4DynamicParticle(G4Gamma: 127 128 // Not needed - time comes from parent t 129 // dynPart->SetProperTime(aFission.getPh 130 131 products->PushProducts(dynPart); 132 // No residual nucleus in this model 133 } 134 135 } else { 136 // No data for this isotope, return parent 137 // G4cout << " No fission data for this iso 138 G4DynamicParticle* parent = 139 new G4DynamicParticle(G4MT_parent, G4Thr 140 products->PushProducts(parent); 141 } 142 143 // Energy conservation check not valid in th 144 145 return products; 146 } 147 148 149 void G4SFDecay::DumpNuclearInfo() 150 { 151 G4cout << " G4SFDecay for parent nucleus " < 152 G4cout << " decays to neutrons and gammas, w 153 << "% and Q value " << transitionQ << 154 } 155 156