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 // ClassName: G4HadProcesses 29 // 30 // Author: 8 July 2020 V.Ivanchenko 31 // 32 // Modified: 33 // 34 //-------------------------------------------- 35 // 36 37 #include "G4HadProcesses.hh" 38 #include "G4SystemOfUnits.hh" 39 #include "G4PhysListUtil.hh" 40 #include "G4ParticleTable.hh" 41 #include "G4Neutron.hh" 42 #include "G4CrossSectionDataSetRegistry.hh" 43 #include "G4VCrossSectionDataSet.hh" 44 #include "G4ComponentGGHadronNucleusXsc.hh" 45 #include "G4ComponentGGNuclNuclXsc.hh" 46 #include "G4ComponentAntiNuclNuclearXS.hh" 47 #include "G4HadronicParameters.hh" 48 #include "G4PhysicsListHelper.hh" 49 #include "G4NeutronCaptureProcess.hh" 50 #include "G4NeutronRadCapture.hh" 51 #include "G4NeutronInelasticXS.hh" 52 #include "G4NeutronElasticXS.hh" 53 #include "G4NeutronCaptureXS.hh" 54 55 const G4ParticleDefinition* G4HadProcesses::Fi 56 { 57 return G4ParticleTable::GetParticleTable()-> 58 } 59 60 G4HadronicProcess* G4HadProcesses::FindInelast 61 { 62 return G4PhysListUtil::FindInelasticProcess( 63 } 64 65 G4HadronicProcess* G4HadProcesses::FindInelast 66 { 67 return FindInelasticProcess( FindParticle(pn 68 } 69 70 G4HadronicProcess* G4HadProcesses::FindElastic 71 { 72 return G4PhysListUtil::FindElasticProcess(pt 73 } 74 75 G4HadronicProcess* G4HadProcesses::FindElastic 76 { 77 return FindElasticProcess( FindParticle(pnam 78 } 79 80 G4HadronicProcess* G4HadProcesses::FindCapture 81 { 82 return G4PhysListUtil::FindCaptureProcess(G4 83 } 84 85 G4HadronicProcess* G4HadProcesses::FindFission 86 { 87 return G4PhysListUtil::FindFissionProcess(G4 88 } 89 90 G4CrossSectionInelastic* G4HadProcesses::Inela 91 { 92 G4CrossSectionInelastic* xs = nullptr; 93 auto comp = G4CrossSectionDataSetRegistry::I 94 if( comp != nullptr ) { 95 xs = new G4CrossSectionInelastic(comp); 96 } else if( "Glauber-Gribov" == compName ) { 97 xs = new G4CrossSectionInelastic(new G4Com 98 } else if( "Glauber-Gribov Nucl-nucl" == com 99 xs = new G4CrossSectionInelastic(new G4Com 100 } else if( "AntiAGlauber" == compName ) { 101 xs = new G4CrossSectionInelastic(new G4Com 102 } 103 return xs; 104 } 105 106 G4CrossSectionElastic* G4HadProcesses::Elastic 107 { 108 G4CrossSectionElastic* xs = nullptr; 109 auto comp = G4CrossSectionDataSetRegistry::I 110 if( comp != nullptr ) { 111 xs = new G4CrossSectionElastic(comp); 112 } else if( "Glauber-Gribov" == compName ) { 113 xs = new G4CrossSectionElastic(new G4Compo 114 } else if( "Glauber-Gribov Nucl-nucl" == com 115 xs = new G4CrossSectionElastic(new G4Compo 116 } else if( "AntiAGlauber" == compName ) { 117 xs = new G4CrossSectionElastic(new G4Compo 118 } 119 return xs; 120 } 121 122 G4bool G4HadProcesses::AddInelasticCrossSectio 123 124 { 125 G4bool isOK(false); 126 if( ptr != nullptr ) { 127 G4HadronicProcess* had = FindInelasticProc 128 if( had != nullptr ) { 129 isOK = true; 130 had->AddDataSet( xs ); 131 } 132 } 133 return isOK; 134 } 135 136 G4bool G4HadProcesses::AddInelasticCrossSectio 137 { 138 return AddInelasticCrossSection( FindParticl 139 } 140 141 G4bool G4HadProcesses::AddElasticCrossSection( 142 { 143 G4bool isOK(false); 144 if( ptr != nullptr ) { 145 G4HadronicProcess* had = FindElasticProces 146 if( had != nullptr ) { 147 isOK = true; 148 had->AddDataSet( xs ); 149 } 150 } 151 return isOK; 152 } 153 154 G4bool G4HadProcesses::AddElasticCrossSection( 155 { 156 return AddElasticCrossSection( FindParticle( 157 } 158 159 G4bool G4HadProcesses::AddCaptureCrossSection( 160 { 161 G4bool isOK(false); 162 G4HadronicProcess* had = FindCaptureProcess( 163 if( had != nullptr ) { 164 isOK = true; 165 had->AddDataSet( xs ); 166 } 167 return isOK; 168 } 169 170 G4bool G4HadProcesses::AddFissionCrossSection( 171 { 172 G4bool isOK(false); 173 G4HadronicProcess* had = FindFissionProcess( 174 if( had != nullptr ) { 175 isOK = true; 176 had->AddDataSet( xs ); 177 } 178 return isOK; 179 } 180 181 void G4HadProcesses::BuildNeutronInelasticAndC 182 { 183 G4HadronicParameters* param = G4HadronicPara 184 G4bool useNeutronGeneral = param->EnableNeut 185 186 G4HadronicProcess* nCap = new G4NeutronCaptu 187 nCap->RegisterMe(new G4NeutronRadCapture()); 188 189 if ( useNeutronGeneral ) { 190 auto nGen = G4PhysListUtil::FindNeutronGen 191 nGen->SetInelasticProcess(nInel); 192 nGen->SetCaptureProcess(nCap); 193 } else { 194 auto neutron = G4Neutron::Neutron(); 195 G4PhysicsListHelper* ph = G4PhysicsListHel 196 nInel->AddDataSet(new G4NeutronInelasticXS 197 ph->RegisterProcess(nInel, neutron); 198 ph->RegisterProcess(nCap, neutron); 199 } 200 if ( param->ApplyFactorXS() ) { 201 nInel->MultiplyCrossSectionBy( param->XSFa 202 } 203 } 204 205 void G4HadProcesses::BuildNeutronElastic(G4Had 206 { 207 G4HadronicParameters* param = G4HadronicPara 208 G4bool useNeutronGeneral = param->EnableNeut 209 210 if ( useNeutronGeneral ) { 211 auto nGen = G4PhysListUtil::FindNeutronGen 212 nGen->SetElasticProcess(nEl); 213 } else { 214 auto neutron = G4Neutron::Neutron(); 215 nEl->AddDataSet(new G4NeutronElasticXS()); 216 G4PhysicsListHelper* ph = G4PhysicsListHel 217 ph->RegisterProcess(nEl, neutron); 218 } 219 if ( param->ApplyFactorXS() ) { 220 nEl->MultiplyCrossSectionBy( param->XSFact 221 } 222 } 223