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 /// \file hadronic/Hadr02/src/HadronPhysicsCRM << 27 /// \brief Implementation of the CRMC_FTFP_BER << 28 // << 29 // 26 // 30 //-------------------------------------------- 27 //--------------------------------------------------------------------------- 31 // 28 // 32 // ClassName: HadronPhysicsCRMC_FTFP_BERT 29 // ClassName: HadronPhysicsCRMC_FTFP_BERT 33 // 30 // 34 // Authors: 2018 Alberto Ribon 31 // Authors: 2018 Alberto Ribon 35 // 32 // 36 // Modified: 33 // Modified: 37 // - 18-May-2021 Alberto Ribon : Migrated to << 38 // and used the << 39 // << 40 //-------------------------------------------- 34 //---------------------------------------------------------------------------- 41 // 35 // 42 #ifdef G4_USE_CRMC 36 #ifdef G4_USE_CRMC 43 37 44 # include "HadronPhysicsCRMC_FTFP_BERT.hh" << 38 #include <iomanip> >> 39 #include "HadronPhysicsCRMC_FTFP_BERT.hh" >> 40 #include "globals.hh" >> 41 #include "G4ios.hh" >> 42 #include "G4SystemOfUnits.hh" >> 43 #include "G4ParticleDefinition.hh" >> 44 #include "G4ParticleTable.hh" >> 45 #include "G4PionBuilder.hh" >> 46 #include "G4FTFPPionBuilder.hh" >> 47 #include "CRMCPionBuilder.hh" >> 48 #include "G4BertiniPionBuilder.hh" >> 49 #include "G4KaonBuilder.hh" >> 50 #include "G4FTFPKaonBuilder.hh" >> 51 #include "CRMCKaonBuilder.hh" >> 52 #include "G4BertiniKaonBuilder.hh" >> 53 #include "G4ProtonBuilder.hh" >> 54 #include "G4FTFPProtonBuilder.hh" >> 55 #include "CRMCProtonBuilder.hh" >> 56 #include "G4BertiniProtonBuilder.hh" >> 57 #include "G4NeutronBuilder.hh" >> 58 #include "G4FTFPNeutronBuilder.hh" >> 59 #include "CRMCNeutronBuilder.hh" >> 60 #include "G4BertiniNeutronBuilder.hh" >> 61 #include "G4HyperonFTFPBuilder.hh" >> 62 #include "G4AntiBarionBuilder.hh" >> 63 #include "G4FTFPAntiBarionBuilder.hh" >> 64 #include "G4MesonConstructor.hh" >> 65 #include "G4BaryonConstructor.hh" >> 66 #include "G4ShortLivedConstructor.hh" >> 67 #include "G4IonConstructor.hh" >> 68 #include "G4ComponentGGHadronNucleusXsc.hh" >> 69 #include "G4HadronCaptureProcess.hh" >> 70 #include "G4NeutronRadCapture.hh" >> 71 #include "G4NeutronInelasticXS.hh" >> 72 #include "G4NeutronCaptureXS.hh" >> 73 #include "G4CrossSectionInelastic.hh" >> 74 #include "G4CrossSectionDataSetRegistry.hh" >> 75 #include "G4PhysListUtil.hh" >> 76 #include "G4ProcessManager.hh" >> 77 #include "G4HadronicParameters.hh" >> 78 #include "G4PhysicsConstructorFactory.hh" >> 79 // >> 80 G4_DECLARE_PHYSCONSTR_FACTORY( HadronPhysicsCRMC_FTFP_BERT ); >> 81 >> 82 >> 83 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC_FTFP_BERT( G4int ) : >> 84 HadronPhysicsCRMC_FTFP_BERT( "hInelastic CRMC_FTFP_BERT" ) {} >> 85 >> 86 >> 87 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC_FTFP_BERT( const G4String& name ) : >> 88 G4VPhysicsConstructor( name ) { >> 89 minCRMC = 100.0*GeV; >> 90 maxFTFP = 110.0*GeV; >> 91 minFTFP = G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade(); >> 92 maxBERT = G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade(); >> 93 minBERT = 0.0*GeV; >> 94 } >> 95 >> 96 >> 97 HadronPhysicsCRMC_FTFP_BERT::~HadronPhysicsCRMC_FTFP_BERT() { >> 98 } >> 99 >> 100 >> 101 void HadronPhysicsCRMC_FTFP_BERT::ConstructParticle() { >> 102 G4MesonConstructor pMesonConstructor; >> 103 pMesonConstructor.ConstructParticle(); >> 104 G4BaryonConstructor pBaryonConstructor; >> 105 pBaryonConstructor.ConstructParticle(); >> 106 G4ShortLivedConstructor pShortLivedConstructor; >> 107 pShortLivedConstructor.ConstructParticle(); >> 108 } 45 109 46 # include "CRMCKaonBuilder.hh" << 110 47 # include "CRMCNeutronBuilder.hh" << 111 void HadronPhysicsCRMC_FTFP_BERT::DumpBanner() { 48 # include "CRMCPionBuilder.hh" << 112 G4cout << G4endl 49 # include "CRMCProtonBuilder.hh" << 113 << " CRMC_FTFP_BERT : thresholds for pions, kaons, protons & neutrons " << G4endl 50 << 114 << "\t BERT : " << minBERT/GeV << " to " << maxBERT/GeV << " GeV" << G4endl 51 # include "G4BertiniKaonBuilder.hh" << 115 << "\t FTFP : " << minFTFP/GeV << " to " << maxFTFP/GeV << " GeV" << G4endl 52 # include "G4BertiniNeutronBuilder.hh" << 116 << "\t CRMC : above " << minCRMC/GeV << " GeV" << G4endl 53 # include "G4BertiniPionBuilder.hh" << 117 << G4endl; 54 # include "G4BertiniProtonBuilder.hh" << 118 } 55 # include "G4FTFPKaonBuilder.hh" << 119 56 # include "G4FTFPNeutronBuilder.hh" << 120 57 # include "G4FTFPPionBuilder.hh" << 121 void HadronPhysicsCRMC_FTFP_BERT::CreateModels() { 58 # include "G4FTFPProtonBuilder.hh" << 122 Neutron(); 59 # include "G4HadParticles.hh" << 123 Proton(); 60 # include "G4KaonBuilder.hh" << 124 Pion(); 61 # include "G4NeutronBuilder.hh" << 125 Kaon(); 62 # include "G4NeutronCaptureXS.hh" << 126 Others(); 63 # include "G4NeutronInelasticXS.hh" << 127 } 64 # include "G4NeutronRadCapture.hh" << 128 65 # include "G4ParticleDefinition.hh" << 129 66 # include "G4ParticleTable.hh" << 130 void HadronPhysicsCRMC_FTFP_BERT::Neutron() { 67 # include "G4PhysListUtil.hh" << 131 // General schema: 68 # include "G4PhysicsConstructorFactory.hh" << 132 // 1) Create a builder 69 # include "G4PionBuilder.hh" << 133 // 2) Call AddBuilder 70 # include "G4ProcessManager.hh" << 134 // 3) Configure the builder, possibly with sub-builders 71 # include "G4ProcessVector.hh" << 135 // 4) Call builder->Build() 72 # include "G4ProtonBuilder.hh" << 136 auto neu = new G4NeutronBuilder; 73 # include "G4SystemOfUnits.hh" << 137 AddBuilder( neu ); 74 # include "G4ios.hh" << 138 auto epos_n = new CRMCNeutronBuilder; 75 # include "globals.hh" << 139 AddBuilder( epos_n ); 76 << 140 epos_n->SetMinEnergy( minCRMC ); 77 # include <iomanip> << 141 neu->RegisterMe( epos_n ); 78 << 142 auto ftfp_n = new G4FTFPNeutronBuilder( true ); 79 //....oooOO0OOooo........oooOO0OOooo........oo << 143 AddBuilder( ftfp_n ); 80 << 144 ftfp_n->SetMinEnergy( minFTFP ); 81 G4_DECLARE_PHYSCONSTR_FACTORY(HadronPhysicsCRM << 145 ftfp_n->SetMaxEnergy( maxFTFP ); 82 << 146 neu->RegisterMe( ftfp_n ); 83 const std::array<std::string, 13> HadronPhysic << 147 auto bert_n = new G4BertiniNeutronBuilder; 84 "EPOS-LHC", "EPOS-1.99", "QGSJET-01", "", << 148 AddBuilder( bert_n ); 85 "", "", "QGSJETII-03", "DPM << 149 bert_n->SetMinEnergy( minBERT ); 86 << 150 bert_n->SetMaxEnergy( maxBERT ); 87 //....oooOO0OOooo........oooOO0OOooo........oo << 151 neu->RegisterMe( bert_n ); 88 << 152 neu->Build(); 89 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC << 153 } 90 : HadronPhysicsCRMC_FTFP_BERT("hInelastic CR << 154 91 {} << 155 92 << 156 void HadronPhysicsCRMC_FTFP_BERT::Proton() { 93 //....oooOO0OOooo........oooOO0OOooo........oo << 157 auto pro = new G4ProtonBuilder; 94 << 158 AddBuilder( pro ); 95 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC << 159 auto epos_p = new CRMCProtonBuilder; 96 : G4HadronPhysicsFTFP_BERT(name, qe) << 160 AddBuilder( epos_p ); 97 { << 161 epos_p->SetMinEnergy( minCRMC ); 98 fModel = 0; //***LOOKHERE*** CRMC model: 0: << 162 pro->RegisterMe( epos_p ); 99 // 7: << 163 auto ftfp_p = new G4FTFPProtonBuilder( true ); 100 fMinCRMC = << 164 AddBuilder( ftfp_p ); 101 100.0 * GeV; //***LOOKHERE*** CRMC model << 165 ftfp_p->SetMinEnergy( minFTFP ); 102 fMaxFTFP = << 166 ftfp_p->SetMaxEnergy( maxFTFP ); 103 110.0 * GeV; //***LOOKHERE*** FTFP model << 167 pro->RegisterMe( ftfp_p ); 104 } << 168 auto bert_p = new G4BertiniProtonBuilder; 105 << 169 AddBuilder( bert_p ); 106 //....oooOO0OOooo........oooOO0OOooo........oo << 170 bert_p->SetMinEnergy( minBERT ); 107 << 171 bert_p->SetMaxEnergy( maxBERT ); 108 HadronPhysicsCRMC_FTFP_BERT::~HadronPhysicsCRM << 172 pro->RegisterMe( bert_p ); 109 << 173 pro->Build(); 110 //....oooOO0OOooo........oooOO0OOooo........oo << 174 } 111 << 175 112 void HadronPhysicsCRMC_FTFP_BERT::Neutron() << 176 113 { << 177 void HadronPhysicsCRMC_FTFP_BERT::Pion() { 114 auto neutronBuilder = new G4NeutronBuilder; << 178 auto pi = new G4PionBuilder; 115 AddBuilder(neutronBuilder); << 179 AddBuilder( pi ); 116 auto ftfpnBuilder = new G4FTFPNeutronBuilder << 180 auto epos_pi = new CRMCPionBuilder; 117 ftfpnBuilder->SetMinEnergy(minFTFP_neutron); << 181 AddBuilder( epos_pi ); 118 ftfpnBuilder->SetMaxEnergy(fMaxFTFP); << 182 epos_pi->SetMinEnergy( minCRMC ); 119 AddBuilder(ftfpnBuilder); << 183 pi->RegisterMe( epos_pi ); 120 neutronBuilder->RegisterMe(ftfpnBuilder); << 184 auto ftfp_pi = new G4FTFPPionBuilder( true ); 121 auto bertnBuilder = new G4BertiniNeutronBuil << 185 AddBuilder( ftfp_pi ); 122 bertnBuilder->SetMaxEnergy(maxBERT_neutron); << 186 pi->RegisterMe( ftfp_pi ); 123 AddBuilder(bertnBuilder); << 187 ftfp_pi->SetMinEnergy( minFTFP ); 124 neutronBuilder->RegisterMe(bertnBuilder); << 188 ftfp_pi->SetMaxEnergy( maxFTFP ); 125 auto crmcnBuilder = new CRMCNeutronBuilder(f << 189 auto bert_pi = new G4BertiniPionBuilder; 126 crmcnBuilder->SetMinEnergy(fMinCRMC); << 190 AddBuilder( bert_pi ); 127 AddBuilder(crmcnBuilder); << 191 pi->RegisterMe( bert_pi ); 128 neutronBuilder->RegisterMe(crmcnBuilder); << 192 bert_pi->SetMinEnergy( minBERT ); 129 neutronBuilder->Build(); << 193 bert_pi->SetMaxEnergy( maxBERT ); >> 194 pi->Build(); >> 195 } >> 196 >> 197 >> 198 void HadronPhysicsCRMC_FTFP_BERT::Kaon() { >> 199 auto k = new G4KaonBuilder; >> 200 AddBuilder( k ); >> 201 auto epos_k = new CRMCKaonBuilder; >> 202 AddBuilder( epos_k ); >> 203 epos_k->SetMinEnergy( minCRMC ); >> 204 k->RegisterMe( epos_k ); >> 205 auto ftfp_k = new G4FTFPKaonBuilder( true ); >> 206 AddBuilder( ftfp_k ); >> 207 k->RegisterMe( ftfp_k ); >> 208 ftfp_k->SetMinEnergy( minFTFP ); >> 209 ftfp_k->SetMaxEnergy( maxFTFP ); >> 210 auto bert_k = new G4BertiniKaonBuilder; >> 211 AddBuilder( bert_k ); >> 212 k->RegisterMe( bert_k ); >> 213 bert_k->SetMinEnergy( minBERT ); >> 214 bert_k->SetMaxEnergy( maxBERT ); >> 215 k->Build(); >> 216 } >> 217 >> 218 >> 219 void HadronPhysicsCRMC_FTFP_BERT::Others() { >> 220 // Hyperons >> 221 auto ftfp_hyp = new G4HyperonFTFPBuilder; >> 222 AddBuilder( ftfp_hyp ); >> 223 ftfp_hyp->Build(); >> 224 // Anti-baryons >> 225 auto abar = new G4AntiBarionBuilder; >> 226 AddBuilder( abar ); >> 227 auto ftfp_abar = new G4FTFPAntiBarionBuilder( true ); >> 228 AddBuilder( ftfp_abar ); >> 229 abar->RegisterMe( ftfp_abar ); >> 230 abar->Build(); >> 231 } >> 232 >> 233 >> 234 void HadronPhysicsCRMC_FTFP_BERT::ExtraConfiguration() { >> 235 // Modify cross sections for kaons >> 236 auto xsk = new G4ComponentGGHadronNucleusXsc; >> 237 xs_k.Put( xsk ); >> 238 G4VCrossSectionDataSet* kaonxs = new G4CrossSectionInelastic( xsk ); >> 239 xs_ds.Push_back( kaonxs ); >> 240 G4PhysListUtil::FindInelasticProcess( G4KaonMinus::KaonMinus() )->AddDataSet( kaonxs ); >> 241 G4PhysListUtil::FindInelasticProcess( G4KaonPlus::KaonPlus() )->AddDataSet( kaonxs ); >> 242 G4PhysListUtil::FindInelasticProcess( G4KaonZeroShort::KaonZeroShort() )->AddDataSet( kaonxs ); >> 243 G4PhysListUtil::FindInelasticProcess( G4KaonZeroLong::KaonZeroLong() )->AddDataSet( kaonxs ); >> 244 // Modify Neutrons 130 const G4ParticleDefinition* neutron = G4Neut 245 const G4ParticleDefinition* neutron = G4Neutron::Neutron(); 131 G4HadronicProcess* inel = G4PhysListUtil::Fi << 246 G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess( neutron ); 132 if (inel) inel->AddDataSet(new G4NeutronInel << 247 if ( inel ) inel->AddDataSet( new G4NeutronInelasticXS ); 133 G4HadronicProcess* capture = G4PhysListUtil: << 248 G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess( neutron ); 134 if (capture) capture->RegisterMe(new G4Neutr << 249 if ( capture ) capture->RegisterMe( new G4NeutronRadCapture ); 135 } << 250 } 136 << 251 137 //....oooOO0OOooo........oooOO0OOooo........oo << 252 138 << 253 void HadronPhysicsCRMC_FTFP_BERT::ConstructProcess() { 139 void HadronPhysicsCRMC_FTFP_BERT::Proton() << 254 if ( G4Threading::IsMasterThread() ) { 140 { << 255 DumpBanner(); 141 auto protonBuilder = new G4ProtonBuilder; << 256 } 142 AddBuilder(protonBuilder); << 257 CreateModels(); 143 auto ftfppBuilder = new G4FTFPProtonBuilder( << 258 ExtraConfiguration(); 144 ftfppBuilder->SetMinEnergy(minFTFP_proton); << 145 ftfppBuilder->SetMaxEnergy(fMaxFTFP); << 146 AddBuilder(ftfppBuilder); << 147 protonBuilder->RegisterMe(ftfppBuilder); << 148 auto bertpBuilder = new G4BertiniProtonBuild << 149 bertpBuilder->SetMaxEnergy(maxBERT_proton); << 150 AddBuilder(bertpBuilder); << 151 protonBuilder->RegisterMe(bertpBuilder); << 152 auto crmcpBuilder = new CRMCProtonBuilder(fM << 153 crmcpBuilder->SetMinEnergy(fMinCRMC); << 154 AddBuilder(crmcpBuilder); << 155 protonBuilder->RegisterMe(crmcpBuilder); << 156 protonBuilder->Build(); << 157 } << 158 << 159 //....oooOO0OOooo........oooOO0OOooo........oo << 160 << 161 void HadronPhysicsCRMC_FTFP_BERT::Pion() << 162 { << 163 auto pionBuilder = new G4PionBuilder; << 164 AddBuilder(pionBuilder); << 165 auto ftfppiBuilder = new G4FTFPPionBuilder(Q << 166 ftfppiBuilder->SetMinEnergy(minFTFP_pion); << 167 ftfppiBuilder->SetMaxEnergy(fMaxFTFP); << 168 AddBuilder(ftfppiBuilder); << 169 pionBuilder->RegisterMe(ftfppiBuilder); << 170 auto bertpiBuilder = new G4BertiniPionBuilde << 171 bertpiBuilder->SetMaxEnergy(maxBERT_pion); << 172 AddBuilder(bertpiBuilder); << 173 pionBuilder->RegisterMe(bertpiBuilder); << 174 auto crmcpiBuilder = new CRMCPionBuilder(fMo << 175 crmcpiBuilder->SetMinEnergy(fMinCRMC); << 176 AddBuilder(crmcpiBuilder); << 177 pionBuilder->RegisterMe(crmcpiBuilder); << 178 pionBuilder->Build(); << 179 } << 180 << 181 //....oooOO0OOooo........oooOO0OOooo........oo << 182 << 183 void HadronPhysicsCRMC_FTFP_BERT::Kaon() << 184 { << 185 auto kaonBuilder = new G4KaonBuilder; << 186 AddBuilder(kaonBuilder); << 187 auto ftfpkBuilder = new G4FTFPKaonBuilder(Qu << 188 ftfpkBuilder->SetMinEnergy(minFTFP_kaon); << 189 ftfpkBuilder->SetMaxEnergy(fMaxFTFP); << 190 AddBuilder(ftfpkBuilder); << 191 kaonBuilder->RegisterMe(ftfpkBuilder); << 192 auto bertkBuilder = new G4BertiniKaonBuilder << 193 bertkBuilder->SetMaxEnergy(maxBERT_kaon); << 194 AddBuilder(bertkBuilder); << 195 kaonBuilder->RegisterMe(bertkBuilder); << 196 auto crmckBuilder = new CRMCKaonBuilder(fMod << 197 crmckBuilder->SetMinEnergy(fMinCRMC); << 198 AddBuilder(crmckBuilder); << 199 kaonBuilder->RegisterMe(crmckBuilder); << 200 kaonBuilder->Build(); << 201 } 259 } 202 260 203 #endif // G4_USE_CRMC << 261 #endif //G4_USE_CRMC >> 262 >> 263 204 264