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 // Geant4 class G4HadronicBuilder 27 // Geant4 class G4HadronicBuilder 28 // 28 // 29 // Author V.Ivanchenko 14.05.2020 29 // Author V.Ivanchenko 14.05.2020 30 // 30 // 31 31 32 #include "G4HadronicBuilder.hh" 32 #include "G4HadronicBuilder.hh" 33 #include "G4HadParticles.hh" 33 #include "G4HadParticles.hh" 34 #include "G4HadProcesses.hh" 34 #include "G4HadProcesses.hh" 35 35 36 #include "G4ParticleDefinition.hh" 36 #include "G4ParticleDefinition.hh" 37 #include "G4ParticleTable.hh" 37 #include "G4ParticleTable.hh" 38 #include "G4PhysicsListHelper.hh" 38 #include "G4PhysicsListHelper.hh" 39 #include "G4SystemOfUnits.hh" << 40 39 41 #include "G4HadronicParameters.hh" 40 #include "G4HadronicParameters.hh" 42 41 43 #include "G4TheoFSGenerator.hh" 42 #include "G4TheoFSGenerator.hh" 44 #include "G4FTFModel.hh" 43 #include "G4FTFModel.hh" 45 #include "G4ExcitedStringDecay.hh" 44 #include "G4ExcitedStringDecay.hh" 46 #include "G4GeneratorPrecompoundInterface.hh" 45 #include "G4GeneratorPrecompoundInterface.hh" 47 46 48 #include "G4QGSModel.hh" 47 #include "G4QGSModel.hh" 49 #include "G4QGSParticipants.hh" 48 #include "G4QGSParticipants.hh" 50 #include "G4QGSMFragmentation.hh" 49 #include "G4QGSMFragmentation.hh" 51 #include "G4QuasiElasticChannel.hh" 50 #include "G4QuasiElasticChannel.hh" 52 51 53 #include "G4CascadeInterface.hh" 52 #include "G4CascadeInterface.hh" 54 #include "G4CrossSectionDataSetRegistry.hh" 53 #include "G4CrossSectionDataSetRegistry.hh" 55 #include "G4CrossSectionInelastic.hh" 54 #include "G4CrossSectionInelastic.hh" 56 #include "G4CrossSectionElastic.hh" 55 #include "G4CrossSectionElastic.hh" 57 #include "G4HadronElastic.hh" 56 #include "G4HadronElastic.hh" 58 #include "G4CrossSectionDataSetRegistry.hh" 57 #include "G4CrossSectionDataSetRegistry.hh" 59 58 60 #include "G4HadronElasticProcess.hh" 59 #include "G4HadronElasticProcess.hh" 61 #include "G4HadronInelasticProcess.hh" 60 #include "G4HadronInelasticProcess.hh" 62 61 63 #include "G4DecayTable.hh" 62 #include "G4DecayTable.hh" 64 #include "G4VDecayChannel.hh" 63 #include "G4VDecayChannel.hh" 65 #include "G4PhaseSpaceDecayChannel.hh" 64 #include "G4PhaseSpaceDecayChannel.hh" 66 65 67 #include "G4PreCompoundModel.hh" 66 #include "G4PreCompoundModel.hh" 68 #include "G4INCLXXInterface.hh" 67 #include "G4INCLXXInterface.hh" 69 #include "G4ComponentAntiNuclNuclearXS.hh" << 70 << 71 68 72 69 73 void G4HadronicBuilder::BuildFTFP_BERT(const s 70 void G4HadronicBuilder::BuildFTFP_BERT(const std::vector<G4int>& partList, 74 G4bool 71 G4bool bert, const G4String& xsName) { 75 72 76 G4HadronicParameters* param = G4HadronicPara 73 G4HadronicParameters* param = G4HadronicParameters::Instance(); 77 G4PhysicsListHelper* ph = G4PhysicsListHelpe 74 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 78 75 79 auto theModel = new G4TheoFSGenerator("FTFP" 76 auto theModel = new G4TheoFSGenerator("FTFP"); 80 auto theStringModel = new G4FTFModel(); 77 auto theStringModel = new G4FTFModel(); 81 theStringModel->SetFragmentationModel(new G4 78 theStringModel->SetFragmentationModel(new G4ExcitedStringDecay()); 82 theModel->SetHighEnergyGenerator( theStringM 79 theModel->SetHighEnergyGenerator( theStringModel ); 83 theModel->SetTransport( new G4GeneratorPreco 80 theModel->SetTransport( new G4GeneratorPrecompoundInterface() ); 84 theModel->SetMaxEnergy( param->GetMaxEnergy( 81 theModel->SetMaxEnergy( param->GetMaxEnergy() ); 85 82 86 G4CascadeInterface* theCascade = nullptr; 83 G4CascadeInterface* theCascade = nullptr; 87 if(bert) { 84 if(bert) { 88 theCascade = new G4CascadeInterface(); 85 theCascade = new G4CascadeInterface(); 89 theCascade->SetMaxEnergy( param->GetMaxEne 86 theCascade->SetMaxEnergy( param->GetMaxEnergyTransitionFTF_Cascade() ); 90 theModel->SetMinEnergy( param->GetMinEnerg 87 theModel->SetMinEnergy( param->GetMinEnergyTransitionFTF_Cascade() ); 91 } 88 } 92 89 93 auto xsinel = G4HadProcesses::InelasticXS( x 90 auto xsinel = G4HadProcesses::InelasticXS( xsName ); 94 91 95 G4ParticleTable* table = G4ParticleTable::Ge 92 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 96 for( auto & pdg : partList ) { 93 for( auto & pdg : partList ) { 97 94 98 auto part = table->FindParticle( pdg ); 95 auto part = table->FindParticle( pdg ); 99 if ( part == nullptr ) { continue; } 96 if ( part == nullptr ) { continue; } 100 97 101 auto hadi = new G4HadronInelasticProcess( 98 auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part ); 102 hadi->AddDataSet( xsinel ); 99 hadi->AddDataSet( xsinel ); 103 hadi->RegisterMe( theModel ); 100 hadi->RegisterMe( theModel ); 104 if( theCascade != nullptr ) hadi->Register 101 if( theCascade != nullptr ) hadi->RegisterMe( theCascade ); 105 if( param->ApplyFactorXS() ) hadi->Multipl 102 if( param->ApplyFactorXS() ) hadi->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() ); 106 ph->RegisterProcess(hadi, part); 103 ph->RegisterProcess(hadi, part); 107 } 104 } 108 } 105 } 109 106 110 void G4HadronicBuilder::BuildFTFQGSP_BERT(cons 107 void G4HadronicBuilder::BuildFTFQGSP_BERT(const std::vector<G4int>& partList, 111 G4bo 108 G4bool bert, const G4String& xsName) { 112 109 113 G4HadronicParameters* param = G4HadronicPara 110 G4HadronicParameters* param = G4HadronicParameters::Instance(); 114 G4PhysicsListHelper* ph = G4PhysicsListHelpe 111 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 115 112 116 auto theModel = new G4TheoFSGenerator("FTFQG 113 auto theModel = new G4TheoFSGenerator("FTFQGSP"); 117 auto theStringModel = new G4FTFModel(); 114 auto theStringModel = new G4FTFModel(); 118 theStringModel->SetFragmentationModel(new G4 115 theStringModel->SetFragmentationModel(new G4ExcitedStringDecay( new G4QGSMFragmentation() ) ); 119 theModel->SetHighEnergyGenerator( theStringM 116 theModel->SetHighEnergyGenerator( theStringModel ); 120 theModel->SetTransport( new G4GeneratorPreco 117 theModel->SetTransport( new G4GeneratorPrecompoundInterface() ); 121 theModel->SetMaxEnergy( param->GetMaxEnergy( 118 theModel->SetMaxEnergy( param->GetMaxEnergy() ); 122 119 123 G4CascadeInterface* theCascade = nullptr; 120 G4CascadeInterface* theCascade = nullptr; 124 if(bert) { 121 if(bert) { 125 theCascade = new G4CascadeInterface(); 122 theCascade = new G4CascadeInterface(); 126 theCascade->SetMaxEnergy( param->GetMaxEne 123 theCascade->SetMaxEnergy( param->GetMaxEnergyTransitionFTF_Cascade() ); 127 theModel->SetMinEnergy( param->GetMinEnerg 124 theModel->SetMinEnergy( param->GetMinEnergyTransitionFTF_Cascade() ); 128 } 125 } 129 126 130 auto xsinel = G4HadProcesses::InelasticXS( x 127 auto xsinel = G4HadProcesses::InelasticXS( xsName ); 131 128 132 G4ParticleTable* table = G4ParticleTable::Ge 129 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 133 for( auto & pdg : partList ) { 130 for( auto & pdg : partList ) { 134 131 135 auto part = table->FindParticle( pdg ); 132 auto part = table->FindParticle( pdg ); 136 if ( part == nullptr ) { continue; } 133 if ( part == nullptr ) { continue; } 137 134 138 auto hadi = new G4HadronInelasticProcess( 135 auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part ); 139 hadi->AddDataSet( xsinel ); 136 hadi->AddDataSet( xsinel ); 140 hadi->RegisterMe( theModel ); 137 hadi->RegisterMe( theModel ); 141 if( theCascade != nullptr ) hadi->Register 138 if( theCascade != nullptr ) hadi->RegisterMe( theCascade ); 142 if( param->ApplyFactorXS() ) hadi->Multipl 139 if( param->ApplyFactorXS() ) hadi->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() ); 143 ph->RegisterProcess(hadi, part); 140 ph->RegisterProcess(hadi, part); 144 } 141 } 145 } 142 } 146 143 147 void G4HadronicBuilder::BuildQGSP_FTFP_BERT(co 144 void G4HadronicBuilder::BuildQGSP_FTFP_BERT(const std::vector<G4int>& partList, 148 G4 145 G4bool bert, G4bool quasiElastic, 149 co 146 const G4String& xsName) { 150 147 151 G4HadronicParameters* param = G4HadronicPara 148 G4HadronicParameters* param = G4HadronicParameters::Instance(); 152 G4PhysicsListHelper* ph = G4PhysicsListHelpe 149 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 153 150 154 auto theTransport = new G4GeneratorPrecompou 151 auto theTransport = new G4GeneratorPrecompoundInterface(); 155 152 156 auto theHEModel = new G4TheoFSGenerator("QGS 153 auto theHEModel = new G4TheoFSGenerator("QGSP"); 157 G4QGSModel< G4QGSParticipants >* theQGSModel 154 G4QGSModel< G4QGSParticipants >* theQGSModel = new G4QGSModel< G4QGSParticipants >; 158 theQGSModel->SetFragmentationModel( new G4Ex 155 theQGSModel->SetFragmentationModel( new G4ExcitedStringDecay( new G4QGSMFragmentation() ) ); 159 theHEModel->SetTransport( theTransport ); 156 theHEModel->SetTransport( theTransport ); 160 theHEModel->SetHighEnergyGenerator( theQGSMo 157 theHEModel->SetHighEnergyGenerator( theQGSModel ); 161 if (quasiElastic) { 158 if (quasiElastic) { 162 theHEModel->SetQuasiElasticChannel(new G4Q 159 theHEModel->SetQuasiElasticChannel(new G4QuasiElasticChannel()); 163 } 160 } 164 theHEModel->SetMinEnergy( param->GetMinEnerg 161 theHEModel->SetMinEnergy( param->GetMinEnergyTransitionQGS_FTF() ); 165 theHEModel->SetMaxEnergy( param->GetMaxEnerg 162 theHEModel->SetMaxEnergy( param->GetMaxEnergy() ); 166 163 167 auto theLEModel = new G4TheoFSGenerator("FTF 164 auto theLEModel = new G4TheoFSGenerator("FTFP"); 168 auto theFTFModel = new G4FTFModel(); 165 auto theFTFModel = new G4FTFModel(); 169 theFTFModel->SetFragmentationModel(new G4Exc 166 theFTFModel->SetFragmentationModel(new G4ExcitedStringDecay()); 170 theLEModel->SetHighEnergyGenerator( theFTFMo 167 theLEModel->SetHighEnergyGenerator( theFTFModel ); 171 theLEModel->SetTransport( theTransport ); 168 theLEModel->SetTransport( theTransport ); 172 theLEModel->SetMaxEnergy( param->GetMaxEnerg 169 theLEModel->SetMaxEnergy( param->GetMaxEnergyTransitionQGS_FTF() ); 173 170 174 G4CascadeInterface* theCascade = nullptr; 171 G4CascadeInterface* theCascade = nullptr; 175 if(bert) { 172 if(bert) { 176 theCascade = new G4CascadeInterface(); 173 theCascade = new G4CascadeInterface(); 177 theCascade->SetMaxEnergy( param->GetMaxEne 174 theCascade->SetMaxEnergy( param->GetMaxEnergyTransitionFTF_Cascade() ); 178 theLEModel->SetMinEnergy( param->GetMinEne 175 theLEModel->SetMinEnergy( param->GetMinEnergyTransitionFTF_Cascade() ); 179 } 176 } 180 177 181 auto xsinel = G4HadProcesses::InelasticXS( x 178 auto xsinel = G4HadProcesses::InelasticXS( xsName ); 182 179 183 G4ParticleTable* table = G4ParticleTable::Ge 180 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 184 for( auto & pdg : partList ) { 181 for( auto & pdg : partList ) { 185 182 186 auto part = table->FindParticle( pdg ); 183 auto part = table->FindParticle( pdg ); 187 if ( part == nullptr ) { continue; } 184 if ( part == nullptr ) { continue; } 188 185 189 auto hadi = new G4HadronInelasticProcess( 186 auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part ); 190 hadi->AddDataSet( xsinel ); 187 hadi->AddDataSet( xsinel ); 191 hadi->RegisterMe( theHEModel ); 188 hadi->RegisterMe( theHEModel ); 192 hadi->RegisterMe( theLEModel ); 189 hadi->RegisterMe( theLEModel ); 193 if(theCascade != nullptr) hadi->RegisterMe 190 if(theCascade != nullptr) hadi->RegisterMe( theCascade ); 194 if( param->ApplyFactorXS() ) hadi->Multipl 191 if( param->ApplyFactorXS() ) hadi->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() ); 195 ph->RegisterProcess(hadi, part); 192 ph->RegisterProcess(hadi, part); 196 } 193 } 197 } 194 } 198 195 199 void G4HadronicBuilder::BuildINCLXX(const std: << 200 G4bool << 201 << 202 // FTF << 203 G4HadronicParameters* param = G4HadronicPara << 204 G4PhysicsListHelper* ph = G4PhysicsListHelpe << 205 << 206 auto theModel = new G4TheoFSGenerator("FTFP" << 207 auto theStringModel = new G4FTFModel(); << 208 theStringModel->SetFragmentationModel(new G4 << 209 theModel->SetHighEnergyGenerator( theStringM << 210 theModel->SetTransport( new G4GeneratorPreco << 211 theModel->SetMaxEnergy( param->GetMaxEnergy( << 212 << 213 G4CascadeInterface* theCascade = nullptr; << 214 if(bert) { << 215 theCascade = new G4CascadeInterface(); << 216 theCascade->SetMaxEnergy( param->GetMaxEne << 217 theModel->SetMinEnergy( param->GetMinEnerg << 218 } << 219 << 220 // INCLXX << 221 auto theModelINCLXX = new G4INCLXXInterface( << 222 theModelINCLXX->SetMinEnergy( param->GetMinE << 223 theModelINCLXX->SetMaxEnergy( param->GetMaxE << 224 << 225 // << 226 auto xsinel = G4HadProcesses::InelasticXS( x << 227 << 228 G4ParticleTable* table = G4ParticleTable::Ge << 229 for( auto & pdg : partList ) { << 230 << 231 auto part = table->FindParticle( pdg ); << 232 if ( part == nullptr ) { continue; } << 233 << 234 auto hadi = new G4HadronInelasticProcess( << 235 if( pdg == -2212 ) { // pbar use INCLXX << 236 hadi->AddDataSet( xsinel ); << 237 hadi->RegisterMe( theModelINCLXX ); << 238 if( param->ApplyFactorXS() ) hadi->Multi << 239 ph->RegisterProcess(hadi, part); << 240 } else { // other anti-X use FTF << 241 hadi->AddDataSet( xsinel ); << 242 hadi->RegisterMe( theModel ); << 243 if( theCascade != nullptr ) hadi->Register << 244 if( param->ApplyFactorXS() ) hadi->Multipl << 245 ph->RegisterProcess(hadi, part); << 246 } << 247 } << 248 } << 249 << 250 void G4HadronicBuilder::BuildElastic(const std 196 void G4HadronicBuilder::BuildElastic(const std::vector<G4int>& partList) { 251 197 252 G4HadronicParameters* param = G4HadronicPara 198 G4HadronicParameters* param = G4HadronicParameters::Instance(); 253 G4PhysicsListHelper* ph = G4PhysicsListHelpe 199 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 254 200 255 auto xsel = G4HadProcesses::ElasticXS("Glaub 201 auto xsel = G4HadProcesses::ElasticXS("Glauber-Gribov"); 256 202 257 auto elModel = new G4HadronElastic(); 203 auto elModel = new G4HadronElastic(); 258 elModel->SetMaxEnergy( param->GetMaxEnergy() 204 elModel->SetMaxEnergy( param->GetMaxEnergy() ); 259 205 260 G4ParticleTable* table = G4ParticleTable::Ge 206 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 261 for( auto & pdg : partList ) { 207 for( auto & pdg : partList ) { 262 208 263 auto part = table->FindParticle( pdg ); 209 auto part = table->FindParticle( pdg ); 264 if ( part == nullptr ) { continue; } 210 if ( part == nullptr ) { continue; } 265 211 266 auto hade = new G4HadronElasticProcess(); 212 auto hade = new G4HadronElasticProcess(); 267 hade->AddDataSet( xsel ); 213 hade->AddDataSet( xsel ); 268 hade->RegisterMe( elModel ); 214 hade->RegisterMe( elModel ); 269 if( param->ApplyFactorXS() ) hade->Multipl 215 if( param->ApplyFactorXS() ) hade->MultiplyCrossSectionBy( param->XSFactorHadronElastic() ); 270 ph->RegisterProcess(hade, part); 216 ph->RegisterProcess(hade, part); 271 } 217 } 272 } 218 } 273 219 274 void G4HadronicBuilder::BuildHyperonsFTFP_BERT 220 void G4HadronicBuilder::BuildHyperonsFTFP_BERT() { 275 // For hyperons, Bertini is used at low ener 221 // For hyperons, Bertini is used at low energies; 276 // for anti-hyperons, FTFP can be used down 222 // for anti-hyperons, FTFP can be used down to zero kinetic energy. 277 BuildFTFP_BERT(G4HadParticles::GetHyperons() 223 BuildFTFP_BERT(G4HadParticles::GetHyperons(), true, "Glauber-Gribov"); 278 BuildFTFP_BERT(G4HadParticles::GetAntiHypero 224 BuildFTFP_BERT(G4HadParticles::GetAntiHyperons(), false, "Glauber-Gribov"); 279 } 225 } 280 226 281 void G4HadronicBuilder::BuildHyperonsFTFQGSP_B 227 void G4HadronicBuilder::BuildHyperonsFTFQGSP_BERT() { 282 // For hyperons, Bertini is used at low ener 228 // For hyperons, Bertini is used at low energies; 283 // for anti-hyperons, FTFP can be used down 229 // for anti-hyperons, FTFP can be used down to zero kinetic energy. 284 BuildFTFQGSP_BERT(G4HadParticles::GetHyperon 230 BuildFTFQGSP_BERT(G4HadParticles::GetHyperons(), true, "Glauber-Gribov"); 285 BuildFTFQGSP_BERT(G4HadParticles::GetAntiHyp 231 BuildFTFQGSP_BERT(G4HadParticles::GetAntiHyperons(), false, "Glauber-Gribov"); 286 } 232 } 287 233 288 void G4HadronicBuilder::BuildHyperonsQGSP_FTFP 234 void G4HadronicBuilder::BuildHyperonsQGSP_FTFP_BERT(G4bool qElastic) { 289 // For hyperons, Bertini is used at low ener 235 // For hyperons, Bertini is used at low energies; 290 // for anti-hyperons, FTFP can be used down 236 // for anti-hyperons, FTFP can be used down to zero kinetic energy. 291 // QGSP is used at high energies in all case 237 // QGSP is used at high energies in all cases. 292 BuildQGSP_FTFP_BERT(G4HadParticles::GetHyper 238 BuildQGSP_FTFP_BERT(G4HadParticles::GetHyperons(), true, qElastic, "Glauber-Gribov"); 293 BuildQGSP_FTFP_BERT(G4HadParticles::GetAntiH 239 BuildQGSP_FTFP_BERT(G4HadParticles::GetAntiHyperons(), false, qElastic, "Glauber-Gribov"); 294 } 240 } 295 241 296 void G4HadronicBuilder::BuildKaonsFTFP_BERT() 242 void G4HadronicBuilder::BuildKaonsFTFP_BERT() { 297 BuildFTFP_BERT(G4HadParticles::GetKaons(), t 243 BuildFTFP_BERT(G4HadParticles::GetKaons(), true, "Glauber-Gribov"); 298 } 244 } 299 245 300 void G4HadronicBuilder::BuildKaonsFTFQGSP_BERT 246 void G4HadronicBuilder::BuildKaonsFTFQGSP_BERT() { 301 BuildFTFQGSP_BERT(G4HadParticles::GetKaons() 247 BuildFTFQGSP_BERT(G4HadParticles::GetKaons(), true, "Glauber-Gribov"); 302 } 248 } 303 249 304 void G4HadronicBuilder::BuildKaonsQGSP_FTFP_BE 250 void G4HadronicBuilder::BuildKaonsQGSP_FTFP_BERT(G4bool qElastic) { 305 BuildQGSP_FTFP_BERT(G4HadParticles::GetKaons 251 BuildQGSP_FTFP_BERT(G4HadParticles::GetKaons(), true, qElastic, "Glauber-Gribov"); 306 } 252 } 307 253 308 void G4HadronicBuilder::BuildAntiLightIonsFTFP 254 void G4HadronicBuilder::BuildAntiLightIonsFTFP() { 309 BuildFTFP_BERT(G4HadParticles::GetLightAntiI 255 BuildFTFP_BERT(G4HadParticles::GetLightAntiIons(), false, "AntiAGlauber"); 310 } 256 } 311 257 312 //void G4HadronicBuilder::BuildAntiLightIonsQG 258 //void G4HadronicBuilder::BuildAntiLightIonsQGSP_FTFP(G4bool qElastic) { 313 // Note: currently QGSP cannot be applied for 259 // Note: currently QGSP cannot be applied for any ion or anti-ion! 314 // BuildQGSP_FTFP_BERT(G4HadParticles::GetLig 260 // BuildQGSP_FTFP_BERT(G4HadParticles::GetLightAntiIons(), false, qElastic, "AntiAGlauber"); 315 //} 261 //} 316 << 317 void G4HadronicBuilder::BuildAntiLightIonsINCL << 318 BuildINCLXX(G4HadParticles::GetLightAntiIons << 319 } << 320 262 321 void G4HadronicBuilder::BuildBCHadronsFTFP_BER 263 void G4HadronicBuilder::BuildBCHadronsFTFP_BERT() { 322 if( G4HadronicParameters::Instance()->Enable 264 if( G4HadronicParameters::Instance()->EnableBCParticles() ) { 323 // Bertini is not applicable for charm and 265 // Bertini is not applicable for charm and bottom hadrons, therefore FTFP is used 324 // down to zero kinetic energy (but at ver 266 // down to zero kinetic energy (but at very low energies, a dummy model is used 325 // that returns the projectile heavy hadro 267 // that returns the projectile heavy hadron in the final state). 326 BuildFTFP_BERT(G4HadParticles::GetBCHadron 268 BuildFTFP_BERT(G4HadParticles::GetBCHadrons(), false, "Glauber-Gribov"); 327 BuildDecayTableForBCHadrons(); 269 BuildDecayTableForBCHadrons(); 328 } 270 } 329 } 271 } 330 272 331 void G4HadronicBuilder::BuildBCHadronsFTFQGSP_ 273 void G4HadronicBuilder::BuildBCHadronsFTFQGSP_BERT() { 332 if( G4HadronicParameters::Instance()->Enable 274 if( G4HadronicParameters::Instance()->EnableBCParticles() ) { 333 // Bertini is not applicable for charm and 275 // Bertini is not applicable for charm and bottom hadrons, therefore FTFP is used 334 // down to zero kinetic energy (but at ver 276 // down to zero kinetic energy (but at very low energies, a dummy model is used 335 // that returns the projectile heavy hadro 277 // that returns the projectile heavy hadron in the final state). 336 BuildFTFQGSP_BERT(G4HadParticles::GetBCHad 278 BuildFTFQGSP_BERT(G4HadParticles::GetBCHadrons(), false, "Glauber-Gribov"); 337 BuildDecayTableForBCHadrons(); 279 BuildDecayTableForBCHadrons(); 338 } 280 } 339 } 281 } 340 282 341 void G4HadronicBuilder::BuildBCHadronsQGSP_FTF 283 void G4HadronicBuilder::BuildBCHadronsQGSP_FTFP_BERT(G4bool qElastic) { 342 if( G4HadronicParameters::Instance()->Enable 284 if( G4HadronicParameters::Instance()->EnableBCParticles() ) { 343 // Bertini is not applicable for charm and 285 // Bertini is not applicable for charm and bottom hadrons, therefore FTFP is used 344 // down to zero kinetic energy (but at ver 286 // down to zero kinetic energy (but at very low energies, a dummy model is used 345 // that returns the projectile heavy hadro 287 // that returns the projectile heavy hadron in the final state). 346 // QGSP is used at high energies in all ca 288 // QGSP is used at high energies in all cases. 347 BuildQGSP_FTFP_BERT(G4HadParticles::GetBCH 289 BuildQGSP_FTFP_BERT(G4HadParticles::GetBCHadrons(), false, qElastic, "Glauber-Gribov"); 348 BuildDecayTableForBCHadrons(); 290 BuildDecayTableForBCHadrons(); 349 } 291 } 350 } 292 } 351 293 352 void G4HadronicBuilder::BuildDecayTableForBCHa 294 void G4HadronicBuilder::BuildDecayTableForBCHadrons() { 353 // Geant4 does not define the decay of most 295 // Geant4 does not define the decay of most of charmed and bottom hadrons. 354 // The reason is that most of these heavy ha 296 // The reason is that most of these heavy hadrons have many different 355 // decay channels, with a complex dynamics, 297 // decay channels, with a complex dynamics, quite different from the flat 356 // phase space kinematical treatment used in 298 // phase space kinematical treatment used in Geant4 for most of hadronic decays. 357 // High-energy experiments usually use dedic 299 // High-energy experiments usually use dedicated Monte Carlo Event Generators 358 // for the decays of charmed and bottom hadr 300 // for the decays of charmed and bottom hadrons; therefore, these heavy 359 // hadrons, which are passed to Geant4 as pr 301 // hadrons, which are passed to Geant4 as primary tracks, have pre-assigned 360 // decays. Moreover, no charmed or bottom se 302 // decays. Moreover, no charmed or bottom secondary hadrons were created 361 // in Geant4 hadronic interactions before Ge 303 // in Geant4 hadronic interactions before Geant4 10.7. 362 // With the extension of Geant4 hadronic int 304 // With the extension of Geant4 hadronic interactions to charmed and bottom 363 // hadrons, in version Geant4 10.7, we do ne 305 // hadrons, in version Geant4 10.7, we do need to define decays in Geant4 364 // for these heavy hadrons, for two reasons: 306 // for these heavy hadrons, for two reasons: 365 // 1. For testing purposes, unless we pre-as 307 // 1. For testing purposes, unless we pre-assign decays of heavy hadrons 366 // (as the HEP experiments normally do by 308 // (as the HEP experiments normally do by using MC Event Generators); 367 // 2. To avoid crashes (due to missing decay 309 // 2. To avoid crashes (due to missing decay channels) whenever charmed or 368 // bottom secondary hadrons are produced 310 // bottom secondary hadrons are produced by Geant4 hadronic interactions, 369 // even with ordinary (i.e. not heavy) ha 311 // even with ordinary (i.e. not heavy) hadron projectiles, because in 370 // this case we cannot (easily!) pre-assi 312 // this case we cannot (easily!) pre-assign decays to them. 371 // Given that 1. is just a convenience for t 313 // Given that 1. is just a convenience for testing, and 2. happens rather 372 // rarely in practice - because very few pri 314 // rarely in practice - because very few primary energetic (i.e. boosted) 373 // heavy hadrons fly enough to reach the bea 315 // heavy hadrons fly enough to reach the beam pipe or the tracker and 374 // having an inelastic interaction there, an 316 // having an inelastic interaction there, and the very low probability 375 // to create a heavy hadrons from the string 317 // to create a heavy hadrons from the string fragmentation in ordinary 376 // (i.e. not heavy) hadronic interactions - 318 // (i.e. not heavy) hadronic interactions - there is no need in practice 377 // to define accurately the decays of heavy 319 // to define accurately the decays of heavy hadrons in Geant4. 378 // So, for our practical purposes, it is eno 320 // So, for our practical purposes, it is enough to define very simple, 379 // "dummy" decays of charmed and bottom hadr 321 // "dummy" decays of charmed and bottom hadrons. 380 // Here we use a single, fully hadronic chan 322 // Here we use a single, fully hadronic channel, with 2 or 3 or 4 381 // daughters, for each of these heavy hadron 323 // daughters, for each of these heavy hadrons, assigning to this single 382 // decay channel a 100% branching ratio, alt 324 // decay channel a 100% branching ratio, although in reality such a 383 // channel is one between hundreds of possib 325 // channel is one between hundreds of possible ones (and therefore its 384 // real branching ratio is typical of a few 326 // real branching ratio is typical of a few per-cent); moreover, we treat 385 // the decay without any dynamics, i.e. with 327 // the decay without any dynamics, i.e. with a flat phase space kinematical 386 // treatment. 328 // treatment. 387 // Note that some of the charmed and bottom 329 // Note that some of the charmed and bottom hadrons such as SigmaC++, 388 // SigmaC+, SigmaC0, SigmaB+, SigmaB0 and Si 330 // SigmaC+, SigmaC0, SigmaB+, SigmaB0 and SigmaB- have one dominant 389 // decay channel (to LambdaC/B + Pion) which 331 // decay channel (to LambdaC/B + Pion) which is already defined in Geant4. 390 // This is not the case for EtaC, JPsi and U 332 // This is not the case for EtaC, JPsi and Upsilon, whose decays need to 391 // be defined here (although they decay so q 333 // be defined here (although they decay so quickly that their hadronic 392 // interactions can be neglected, as we do f 334 // interactions can be neglected, as we do for Pi0 and Sigma0). 393 // Note that our definition of the decay tab 335 // Note that our definition of the decay tables for these heavy hadrons 394 // do not interfere with the pre-assign deca 336 // do not interfere with the pre-assign decays of primary charmed and 395 // bottom tracks made by the HEP experiments 337 // bottom tracks made by the HEP experiments. In fact, pre-assign decays 396 // have priority over (i.e. override) decay 338 // have priority over (i.e. override) decay tables. 397 static G4bool isFirstCall = true; 339 static G4bool isFirstCall = true; 398 if ( ! isFirstCall ) return; 340 if ( ! isFirstCall ) return; 399 isFirstCall = false; 341 isFirstCall = false; 400 G4ParticleTable* particleTable = G4ParticleT 342 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); 401 for ( auto & pdg : G4HadParticles::GetBCHadr 343 for ( auto & pdg : G4HadParticles::GetBCHadrons() ) { 402 auto part = particleTable->FindParticle( p 344 auto part = particleTable->FindParticle( pdg ); 403 if ( part == nullptr ) { 345 if ( part == nullptr ) { 404 G4cout << "G4HadronicBuilder::BuildDecay 346 G4cout << "G4HadronicBuilder::BuildDecayTableForBCHadrons : ERROR ! particlePDG=" 405 << pdg << " is not defined !" << 347 << pdg << " is not defined !" << G4endl; 406 continue; 348 continue; 407 } 349 } 408 if ( part->GetDecayTable() ) { 350 if ( part->GetDecayTable() ) { 409 G4cout << "G4HadronicBuilder::BuildDecay 351 G4cout << "G4HadronicBuilder::BuildDecayTableForBCHadrons : WARNING ! particlePDG=" 410 << pdg << " has already a decay t 352 << pdg << " has already a decay table defined !" << G4endl; 411 continue; 353 continue; 412 } 354 } 413 G4DecayTable* decayTable = new G4DecayTabl 355 G4DecayTable* decayTable = new G4DecayTable; 414 const G4int numberDecayChannels = 1; 356 const G4int numberDecayChannels = 1; 415 G4VDecayChannel** mode = new G4VDecayChann 357 G4VDecayChannel** mode = new G4VDecayChannel*[ numberDecayChannels ]; 416 for ( G4int i = 0; i < numberDecayChannels 358 for ( G4int i = 0; i < numberDecayChannels; ++i ) mode[i] = nullptr; 417 switch ( pdg ) { 359 switch ( pdg ) { 418 // Charmed mesons 360 // Charmed mesons 419 case 411 : // D+ 361 case 411 : // D+ 420 mode[0] = new G4PhaseSpaceDecayChannel 362 mode[0] = new G4PhaseSpaceDecayChannel( "D+", 1.0, 3, "kaon-", "pi+", "pi+" ); 421 break; 363 break; 422 case -411 : // D- 364 case -411 : // D- 423 mode[0] = new G4PhaseSpaceDecayChannel 365 mode[0] = new G4PhaseSpaceDecayChannel( "D-", 1.0, 3, "kaon+", "pi-", "pi-" ); 424 break; 366 break; 425 case 421 : // D0 367 case 421 : // D0 426 mode[0] = new G4PhaseSpaceDecayChannel 368 mode[0] = new G4PhaseSpaceDecayChannel( "D0", 1.0, 3, "kaon-", "pi+", "pi0" ); 427 break; 369 break; 428 case -421 : // anti_D0 370 case -421 : // anti_D0 429 mode[0] = new G4PhaseSpaceDecayChannel 371 mode[0] = new G4PhaseSpaceDecayChannel( "anti_D0", 1.0, 3, "kaon+", "pi-", "pi0" ); 430 break; 372 break; 431 case 431 : // Ds+ 373 case 431 : // Ds+ 432 mode[0] = new G4PhaseSpaceDecayChannel 374 mode[0] = new G4PhaseSpaceDecayChannel( "Ds+", 1.0, 3, "kaon+", "kaon-", "pi+" ); 433 break; 375 break; 434 case -431 : // Ds- 376 case -431 : // Ds- 435 mode[0] = new G4PhaseSpaceDecayChannel 377 mode[0] = new G4PhaseSpaceDecayChannel( "Ds-", 1.0, 3, "kaon-", "kaon+", "pi-" ); 436 break; 378 break; 437 // Bottom mesons 379 // Bottom mesons 438 case 521 : // B+ 380 case 521 : // B+ 439 mode[0] = new G4PhaseSpaceDecayChannel 381 mode[0] = new G4PhaseSpaceDecayChannel( "B+", 1.0, 3, "anti_D0", "pi+", "pi0" ); 440 break; 382 break; 441 case -521 : // B- 383 case -521 : // B- 442 mode[0] = new G4PhaseSpaceDecayChannel 384 mode[0] = new G4PhaseSpaceDecayChannel( "B-", 1.0, 3, "D0", "pi-", "pi0" ); 443 break; 385 break; 444 case 511 : // B0 386 case 511 : // B0 445 mode[0] = new G4PhaseSpaceDecayChannel 387 mode[0] = new G4PhaseSpaceDecayChannel( "B0", 1.0, 3, "D-", "pi+", "pi0" ); 446 break; 388 break; 447 case -511 : // anti_B0 389 case -511 : // anti_B0 448 mode[0] = new G4PhaseSpaceDecayChannel 390 mode[0] = new G4PhaseSpaceDecayChannel( "anti_B0", 1.0, 3, "D+", "pi-", "pi0" ); 449 break; 391 break; 450 case 531 : // Bs0 392 case 531 : // Bs0 451 mode[0] = new G4PhaseSpaceDecayChannel 393 mode[0] = new G4PhaseSpaceDecayChannel( "Bs0", 1.0, 3, "Ds-", "pi+", "pi0" ); 452 break; 394 break; 453 case -531 : // anti_Bs0 395 case -531 : // anti_Bs0 454 mode[0] = new G4PhaseSpaceDecayChannel 396 mode[0] = new G4PhaseSpaceDecayChannel( "anti_Bs0", 1.0, 3, "Ds+", "pi-", "pi0" ); 455 break; 397 break; 456 case 541 : // Bc+ 398 case 541 : // Bc+ 457 mode[0] = new G4PhaseSpaceDecayChannel 399 mode[0] = new G4PhaseSpaceDecayChannel( "Bc+", 1.0, 2, "J/psi", "pi+" ); 458 break; 400 break; 459 case -541 : // Bc- 401 case -541 : // Bc- 460 mode[0] = new G4PhaseSpaceDecayChannel 402 mode[0] = new G4PhaseSpaceDecayChannel( "Bc-", 1.0, 2, "J/psi", "pi-" ); 461 break; 403 break; 462 // Charmed baryons (and anti-baryons) 404 // Charmed baryons (and anti-baryons) 463 case 4122 : // lambda_c+ 405 case 4122 : // lambda_c+ 464 mode[0] = new G4PhaseSpaceDecayChannel 406 mode[0] = new G4PhaseSpaceDecayChannel( "lambda_c+", 1.0, 3, "proton", "kaon-", "pi+" ); 465 break; 407 break; 466 case -4122 : // anti_lambda_c+ 408 case -4122 : // anti_lambda_c+ 467 mode[0] = new G4PhaseSpaceDecayChannel 409 mode[0] = new G4PhaseSpaceDecayChannel( "anti_lambda_c+", 1.0, 3, "anti_proton", "kaon+", "pi-" ); 468 break; 410 break; 469 case 4232 : // xi_c+ 411 case 4232 : // xi_c+ 470 mode[0] = new G4PhaseSpaceDecayChannel 412 mode[0] = new G4PhaseSpaceDecayChannel( "xi_c+", 1.0, 3, "sigma+", "kaon-", "pi+" ); 471 break; 413 break; 472 case -4232 : // anti_xi_c+ 414 case -4232 : // anti_xi_c+ 473 mode[0] = new G4PhaseSpaceDecayChannel 415 mode[0] = new G4PhaseSpaceDecayChannel( "anti_xi_c+", 1.0, 3, "anti_sigma+", "kaon+", "pi-" ); 474 break; 416 break; 475 case 4132 : // xi_c0 417 case 4132 : // xi_c0 476 mode[0] = new G4PhaseSpaceDecayChannel 418 mode[0] = new G4PhaseSpaceDecayChannel( "xi_c0", 1.0, 3, "lambda", "kaon-", "pi+" ); 477 break; 419 break; 478 case -4132 : // anti_xi_c0 420 case -4132 : // anti_xi_c0 479 mode[0] = new G4PhaseSpaceDecayChannel 421 mode[0] = new G4PhaseSpaceDecayChannel( "anti_xi_c0", 1.0, 3, "anti_lambda", "kaon+", "pi-" ); 480 break; 422 break; 481 case 4332 : // omega_c0 423 case 4332 : // omega_c0 482 mode[0] = new G4PhaseSpaceDecayChannel 424 mode[0] = new G4PhaseSpaceDecayChannel( "omega_c0", 1.0, 3, "xi0", "kaon-", "pi+" ); 483 break; 425 break; 484 case -4332 : // anti_omega_c0 426 case -4332 : // anti_omega_c0 485 mode[0] = new G4PhaseSpaceDecayChannel 427 mode[0] = new G4PhaseSpaceDecayChannel( "anti_omega_c0", 1.0, 3, "anti_xi0", "kaon+", "pi-" ); 486 break; 428 break; 487 // Bottom baryons (and anti-baryons) 429 // Bottom baryons (and anti-baryons) 488 case 5122 : // lambda_b 430 case 5122 : // lambda_b 489 mode[0] = new G4PhaseSpaceDecayChannel 431 mode[0] = new G4PhaseSpaceDecayChannel( "lambda_b", 1.0, 4, "lambda_c+", "pi+", "pi-", "pi-" ); 490 break; 432 break; 491 case -5122 : // anti_lambda_b 433 case -5122 : // anti_lambda_b 492 mode[0] = new G4PhaseSpaceDecayChannel 434 mode[0] = new G4PhaseSpaceDecayChannel( "anti_lambda_b", 1.0, 4, "anti_lambda_c+", "pi-", "pi+", "pi+" ); 493 break; 435 break; 494 case 5232 : // xi_b0 436 case 5232 : // xi_b0 495 mode[0] = new G4PhaseSpaceDecayChannel 437 mode[0] = new G4PhaseSpaceDecayChannel( "xi_b0", 1.0, 3, "lambda_c+", "kaon-", "pi0" ); 496 break; 438 break; 497 case -5232 : // anti_xi_b0 439 case -5232 : // anti_xi_b0 498 mode[0] = new G4PhaseSpaceDecayChannel 440 mode[0] = new G4PhaseSpaceDecayChannel( "anti_xi_b0", 1.0, 3, "anti_lambda_c+", "kaon+", "pi0" ); 499 break; 441 break; 500 case 5132 : // xi_b- 442 case 5132 : // xi_b- 501 mode[0] = new G4PhaseSpaceDecayChannel 443 mode[0] = new G4PhaseSpaceDecayChannel( "xi_b-", 1.0, 3, "lambda_c+", "kaon-", "pi-" ); 502 break; 444 break; 503 case -5132 : // anti_xi_b- 445 case -5132 : // anti_xi_b- 504 mode[0] = new G4PhaseSpaceDecayChannel 446 mode[0] = new G4PhaseSpaceDecayChannel( "anti_xi_b-", 1.0, 3, "anti_lambda_c+", "kaon+", "pi+" ); 505 break; 447 break; 506 case 5332 : // omega_b- 448 case 5332 : // omega_b- 507 mode[0] = new G4PhaseSpaceDecayChannel 449 mode[0] = new G4PhaseSpaceDecayChannel( "omega_b-", 1.0, 3, "xi_c+", "kaon-", "pi-" ); 508 break; 450 break; 509 case -5332 : // anti_omega_b- 451 case -5332 : // anti_omega_b- 510 mode[0] = new G4PhaseSpaceDecayChannel 452 mode[0] = new G4PhaseSpaceDecayChannel( "anti_omega_b-", 1.0, 3, "anti_xi_c+", "kaon+", "pi+" ); 511 break; 453 break; 512 default : 454 default : 513 G4cout << "G4HadronicBuilder::BuildDec 455 G4cout << "G4HadronicBuilder::BuildDecayTableForBCHadrons : UNKNOWN particlePDG=" << pdg << G4endl; 514 } // End of the switch 456 } // End of the switch 515 457 516 for ( G4int index = 0; index < numberDecay 458 for ( G4int index = 0; index < numberDecayChannels; ++index ) decayTable->Insert( mode[index] ); 517 delete [] mode; 459 delete [] mode; 518 part->SetDecayTable( decayTable ); 460 part->SetDecayTable( decayTable ); 519 } // End of the for loop over heavy hadrons 461 } // End of the for loop over heavy hadrons 520 // Add now the decay for etac, JPsi and Upsi 462 // Add now the decay for etac, JPsi and Upsilon because these can be produced as 521 // secondaries in hadronic interactions, whi 463 // secondaries in hadronic interactions, while they are not part of the heavy 522 // hadrons included in G4HadParticles::GetBC 464 // hadrons included in G4HadParticles::GetBCHadrons() because they live too shortly 523 // and therefore their hadronic interactions 465 // and therefore their hadronic interactions can be neglected (as we do for pi0 and sigma0). 524 if ( ! G4Etac::Definition()->GetDecayTable() 466 if ( ! G4Etac::Definition()->GetDecayTable() ) { 525 G4DecayTable* decayTable = new G4DecayTabl 467 G4DecayTable* decayTable = new G4DecayTable; 526 const G4int numberDecayChannels = 1; 468 const G4int numberDecayChannels = 1; 527 G4VDecayChannel** mode = new G4VDecayChann 469 G4VDecayChannel** mode = new G4VDecayChannel*[ numberDecayChannels ]; 528 for ( G4int i = 0; i < numberDecayChannels 470 for ( G4int i = 0; i < numberDecayChannels; ++i ) mode[i] = nullptr; 529 mode[0] = new G4PhaseSpaceDecayChannel( "e 471 mode[0] = new G4PhaseSpaceDecayChannel( "etac", 1.0, 3, "eta", "pi+", "pi-" ); 530 for ( G4int index = 0; index < numberDecay 472 for ( G4int index = 0; index < numberDecayChannels; ++index ) decayTable->Insert( mode[index] ); 531 delete [] mode; 473 delete [] mode; 532 G4Etac::Definition()->SetDecayTable( decay 474 G4Etac::Definition()->SetDecayTable( decayTable ); 533 } 475 } 534 if ( ! G4JPsi::Definition()->GetDecayTable() 476 if ( ! G4JPsi::Definition()->GetDecayTable() ) { 535 G4DecayTable* decayTable = new G4DecayTabl 477 G4DecayTable* decayTable = new G4DecayTable; 536 const G4int numberDecayChannels = 1; 478 const G4int numberDecayChannels = 1; 537 G4VDecayChannel** mode = new G4VDecayChann 479 G4VDecayChannel** mode = new G4VDecayChannel*[ numberDecayChannels ]; 538 for ( G4int i = 0; i < numberDecayChannels 480 for ( G4int i = 0; i < numberDecayChannels; ++i ) mode[i] = nullptr; 539 mode[0] = new G4PhaseSpaceDecayChannel( "J 481 mode[0] = new G4PhaseSpaceDecayChannel( "J/psi", 1.0, 3, "pi0", "pi+", "pi-" ); 540 for ( G4int index = 0; index < numberDecay 482 for ( G4int index = 0; index < numberDecayChannels; ++index ) decayTable->Insert( mode[index] ); 541 delete [] mode; 483 delete [] mode; 542 G4JPsi::Definition()->SetDecayTable( decay 484 G4JPsi::Definition()->SetDecayTable( decayTable ); 543 } 485 } 544 if ( ! G4Upsilon::Definition()->GetDecayTabl 486 if ( ! G4Upsilon::Definition()->GetDecayTable() ) { 545 G4DecayTable* decayTable = new G4DecayTabl 487 G4DecayTable* decayTable = new G4DecayTable; 546 const G4int numberDecayChannels = 1; 488 const G4int numberDecayChannels = 1; 547 G4VDecayChannel** mode = new G4VDecayChann 489 G4VDecayChannel** mode = new G4VDecayChannel*[ numberDecayChannels ]; 548 for ( G4int i = 0; i < numberDecayChannels 490 for ( G4int i = 0; i < numberDecayChannels; ++i ) mode[i] = nullptr; 549 mode[0] = new G4PhaseSpaceDecayChannel( "U 491 mode[0] = new G4PhaseSpaceDecayChannel( "Upsilon", 1.0, 3, "eta_prime", "pi+", "pi-" ); 550 for ( G4int index = 0; index < numberDecay 492 for ( G4int index = 0; index < numberDecayChannels; ++index ) decayTable->Insert( mode[index] ); 551 delete [] mode; 493 delete [] mode; 552 G4Upsilon::Definition()->SetDecayTable( de 494 G4Upsilon::Definition()->SetDecayTable( decayTable ); 553 } 495 } 554 } 496 } 555 497 556 498 557 void G4HadronicBuilder::BuildHyperNucleiFTFP_B 499 void G4HadronicBuilder::BuildHyperNucleiFTFP_BERT() { 558 if ( G4HadronicParameters::Instance()->Enabl 500 if ( G4HadronicParameters::Instance()->EnableHyperNuclei() ) { 559 // Bertini intra-nuclear cascade model is 501 // Bertini intra-nuclear cascade model is currently not applicable for light 560 // hypernuclei, therefore FTFP is used dow 502 // hypernuclei, therefore FTFP is used down to zero kinetic energy (but at 561 // very low energies, a dummy model is use 503 // very low energies, a dummy model is used that simply returns the projectile 562 // hypernucleus in the final state). 504 // hypernucleus in the final state). 563 BuildFTFP_BERT( G4HadParticles::GetHyperNu 505 BuildFTFP_BERT( G4HadParticles::GetHyperNuclei(), false, "Glauber-Gribov" ); 564 } 506 } 565 } 507 } 566 508 567 509 568 void G4HadronicBuilder::BuildHyperAntiNucleiFT 510 void G4HadronicBuilder::BuildHyperAntiNucleiFTFP_BERT() { 569 if ( G4HadronicParameters::Instance()->Enabl 511 if ( G4HadronicParameters::Instance()->EnableHyperNuclei() ) { 570 // FTFP can be used down to zero kinetic e 512 // FTFP can be used down to zero kinetic energy. 571 BuildFTFP_BERT( G4HadParticles::GetHyperAn 513 BuildFTFP_BERT( G4HadParticles::GetHyperAntiNuclei(), false, "AntiAGlauber" ); 572 } 514 } 573 } 515 } 574 516 575 517 576 void G4HadronicBuilder::BuildHyperNucleiFTFP_I 518 void G4HadronicBuilder::BuildHyperNucleiFTFP_INCLXX() { 577 if ( G4HadronicParameters::Instance()->Enabl 519 if ( G4HadronicParameters::Instance()->EnableHyperNuclei() ) { 578 BuildFTFP_INCLXX( G4HadParticles::GetHyper 520 BuildFTFP_INCLXX( G4HadParticles::GetHyperNuclei(), "Glauber-Gribov" ); 579 } 521 } 580 } 522 } 581 523 582 524 583 void G4HadronicBuilder::BuildFTFP_INCLXX( cons 525 void G4HadronicBuilder::BuildFTFP_INCLXX( const std::vector< G4int >& partList, const G4String& xsName ) { 584 G4HadronicParameters* param = G4HadronicPara 526 G4HadronicParameters* param = G4HadronicParameters::Instance(); 585 G4PhysicsListHelper* ph = G4PhysicsListHelpe 527 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 586 auto theTheoFSModel = new G4TheoFSGenerator( 528 auto theTheoFSModel = new G4TheoFSGenerator( "FTFP" ); 587 auto theStringModel = new G4FTFModel; 529 auto theStringModel = new G4FTFModel; 588 theStringModel->SetFragmentationModel( new G 530 theStringModel->SetFragmentationModel( new G4ExcitedStringDecay ); 589 theTheoFSModel->SetHighEnergyGenerator( theS 531 theTheoFSModel->SetHighEnergyGenerator( theStringModel ); 590 theTheoFSModel->SetTransport( new G4Generato 532 theTheoFSModel->SetTransport( new G4GeneratorPrecompoundInterface ); 591 theTheoFSModel->SetMaxEnergy( param->GetMaxE 533 theTheoFSModel->SetMaxEnergy( param->GetMaxEnergy() ); 592 theTheoFSModel->SetMinEnergy( 15.0*CLHEP::Ge 534 theTheoFSModel->SetMinEnergy( 15.0*CLHEP::GeV ); 593 G4VPreCompoundModel* thePrecoModel = new G4P 535 G4VPreCompoundModel* thePrecoModel = new G4PreCompoundModel; 594 thePrecoModel->SetMinEnergy( 0.0 ); 536 thePrecoModel->SetMinEnergy( 0.0 ); 595 thePrecoModel->SetMaxEnergy( 2.0*CLHEP::MeV 537 thePrecoModel->SetMaxEnergy( 2.0*CLHEP::MeV ); 596 G4INCLXXInterface* theINCLXXModel = new G4IN 538 G4INCLXXInterface* theINCLXXModel = new G4INCLXXInterface( thePrecoModel ); 597 theINCLXXModel->SetMinEnergy( 1.0*CLHEP::MeV 539 theINCLXXModel->SetMinEnergy( 1.0*CLHEP::MeV ); 598 theINCLXXModel->SetMaxEnergy( 20.0*CLHEP::Ge 540 theINCLXXModel->SetMaxEnergy( 20.0*CLHEP::GeV ); 599 auto xsinel = G4HadProcesses::InelasticXS( x 541 auto xsinel = G4HadProcesses::InelasticXS( xsName ); 600 G4ParticleTable* table = G4ParticleTable::Ge 542 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 601 for ( auto & pdg : partList ) { 543 for ( auto & pdg : partList ) { 602 auto part = table->FindParticle( pdg ); 544 auto part = table->FindParticle( pdg ); 603 if ( part == nullptr ) continue; 545 if ( part == nullptr ) continue; 604 auto hadi = new G4HadronInelasticProcess( 546 auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part ); 605 hadi->AddDataSet( xsinel ); 547 hadi->AddDataSet( xsinel ); 606 hadi->RegisterMe( theTheoFSModel ); 548 hadi->RegisterMe( theTheoFSModel ); 607 hadi->RegisterMe( theINCLXXModel ); 549 hadi->RegisterMe( theINCLXXModel ); 608 if ( param->ApplyFactorXS() ) hadi->Multip 550 if ( param->ApplyFactorXS() ) hadi->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() ); 609 ph->RegisterProcess( hadi, part ); 551 ph->RegisterProcess( hadi, part ); 610 } 552 } 611 } 553 } 612 554