Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 08:29:46

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file HadronPhysicsCRMC_FTFP_BERT.cc
0027 /// \brief Implementation of the HadronPhysicsCRMC_FTFP_BERT class
0028 
0029 //---------------------------------------------------------------------------
0030 //
0031 // ClassName:   HadronPhysicsCRMC_FTFP_BERT
0032 //
0033 // Authors: 2018 Alberto Ribon
0034 //
0035 // Modified:
0036 // -  18-May-2021 Alberto Ribon : Migrated to newer physics constructor
0037 //                                and used the latest Geant4-CRMC interface.
0038 //
0039 //----------------------------------------------------------------------------
0040 //
0041 #ifdef G4_USE_CRMC
0042 
0043 #  include "HadronPhysicsCRMC_FTFP_BERT.hh"
0044 
0045 #  include "CRMCKaonBuilder.hh"
0046 #  include "CRMCNeutronBuilder.hh"
0047 #  include "CRMCPionBuilder.hh"
0048 #  include "CRMCProtonBuilder.hh"
0049 
0050 #  include "G4BertiniKaonBuilder.hh"
0051 #  include "G4BertiniNeutronBuilder.hh"
0052 #  include "G4BertiniPionBuilder.hh"
0053 #  include "G4BertiniProtonBuilder.hh"
0054 #  include "G4FTFPKaonBuilder.hh"
0055 #  include "G4FTFPNeutronBuilder.hh"
0056 #  include "G4FTFPPionBuilder.hh"
0057 #  include "G4FTFPProtonBuilder.hh"
0058 #  include "G4HadParticles.hh"
0059 #  include "G4KaonBuilder.hh"
0060 #  include "G4NeutronBuilder.hh"
0061 #  include "G4NeutronCaptureXS.hh"
0062 #  include "G4NeutronInelasticXS.hh"
0063 #  include "G4NeutronRadCapture.hh"
0064 #  include "G4ParticleDefinition.hh"
0065 #  include "G4ParticleTable.hh"
0066 #  include "G4PhysListUtil.hh"
0067 #  include "G4PhysicsConstructorFactory.hh"
0068 #  include "G4PionBuilder.hh"
0069 #  include "G4ProcessManager.hh"
0070 #  include "G4ProcessVector.hh"
0071 #  include "G4ProtonBuilder.hh"
0072 #  include "G4SystemOfUnits.hh"
0073 #  include "G4ios.hh"
0074 #  include "globals.hh"
0075 
0076 #  include <iomanip>
0077 
0078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0079 
0080 G4_DECLARE_PHYSCONSTR_FACTORY(HadronPhysicsCRMC_FTFP_BERT);
0081 
0082 const std::array<std::string, 13> HadronPhysicsCRMC_FTFP_BERT::fModelNames = {
0083   "EPOS-LHC", "EPOS-1.99", "QGSJET-01",   "",           "", "", "SIBYLL-2.3", "QGSJETII-04", "",
0084   "",         "",          "QGSJETII-03", "DPMJET-3.06"};
0085 
0086 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0087 
0088 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC_FTFP_BERT(G4int)
0089   : HadronPhysicsCRMC_FTFP_BERT("hInelastic CRMC_FTFP_BERT", false)
0090 {}
0091 
0092 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0093 
0094 HadronPhysicsCRMC_FTFP_BERT::HadronPhysicsCRMC_FTFP_BERT(const G4String& name, G4bool qe)
0095   : G4HadronPhysicsFTFP_BERT(name, qe)
0096 {
0097   fModel = 0;  //***LOOKHERE*** CRMC model: 0:EPOS-LHC, 1:EPOS-1.99, 2:QGSJET:01, 6:SIBYLL-2.3,
0098                //                           7:QGSJETII-04, 11:QGSJETII-03, 12:DPMJET-3.06
0099   fMinCRMC =
0100     100.0 * GeV;  //***LOOKHERE*** CRMC model is applied only above this projectile lab energy
0101   fMaxFTFP =
0102     110.0 * GeV;  //***LOOKHERE*** FTFP model is applied only below this projectile lab energy
0103 }
0104 
0105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0106 
0107 HadronPhysicsCRMC_FTFP_BERT::~HadronPhysicsCRMC_FTFP_BERT() {}
0108 
0109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0110 
0111 void HadronPhysicsCRMC_FTFP_BERT::Neutron()
0112 {
0113   auto neutronBuilder = new G4NeutronBuilder;
0114   AddBuilder(neutronBuilder);
0115   auto ftfpnBuilder = new G4FTFPNeutronBuilder(QuasiElastic);
0116   ftfpnBuilder->SetMinEnergy(minFTFP_neutron);
0117   ftfpnBuilder->SetMaxEnergy(fMaxFTFP);
0118   AddBuilder(ftfpnBuilder);
0119   neutronBuilder->RegisterMe(ftfpnBuilder);
0120   auto bertnBuilder = new G4BertiniNeutronBuilder;
0121   bertnBuilder->SetMaxEnergy(maxBERT_neutron);
0122   AddBuilder(bertnBuilder);
0123   neutronBuilder->RegisterMe(bertnBuilder);
0124   auto crmcnBuilder = new CRMCNeutronBuilder(fModel, fModelNames[fModel]);
0125   crmcnBuilder->SetMinEnergy(fMinCRMC);
0126   AddBuilder(crmcnBuilder);
0127   neutronBuilder->RegisterMe(crmcnBuilder);
0128   neutronBuilder->Build();
0129   const G4ParticleDefinition* neutron = G4Neutron::Neutron();
0130   G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
0131   if (inel) inel->AddDataSet(new G4NeutronInelasticXS);
0132   G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
0133   if (capture) capture->RegisterMe(new G4NeutronRadCapture);
0134 }
0135 
0136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0137 
0138 void HadronPhysicsCRMC_FTFP_BERT::Proton()
0139 {
0140   auto protonBuilder = new G4ProtonBuilder;
0141   AddBuilder(protonBuilder);
0142   auto ftfppBuilder = new G4FTFPProtonBuilder(QuasiElastic);
0143   ftfppBuilder->SetMinEnergy(minFTFP_proton);
0144   ftfppBuilder->SetMaxEnergy(fMaxFTFP);
0145   AddBuilder(ftfppBuilder);
0146   protonBuilder->RegisterMe(ftfppBuilder);
0147   auto bertpBuilder = new G4BertiniProtonBuilder;
0148   bertpBuilder->SetMaxEnergy(maxBERT_proton);
0149   AddBuilder(bertpBuilder);
0150   protonBuilder->RegisterMe(bertpBuilder);
0151   auto crmcpBuilder = new CRMCProtonBuilder(fModel, fModelNames[fModel]);
0152   crmcpBuilder->SetMinEnergy(fMinCRMC);
0153   AddBuilder(crmcpBuilder);
0154   protonBuilder->RegisterMe(crmcpBuilder);
0155   protonBuilder->Build();
0156 }
0157 
0158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0159 
0160 void HadronPhysicsCRMC_FTFP_BERT::Pion()
0161 {
0162   auto pionBuilder = new G4PionBuilder;
0163   AddBuilder(pionBuilder);
0164   auto ftfppiBuilder = new G4FTFPPionBuilder(QuasiElastic);
0165   ftfppiBuilder->SetMinEnergy(minFTFP_pion);
0166   ftfppiBuilder->SetMaxEnergy(fMaxFTFP);
0167   AddBuilder(ftfppiBuilder);
0168   pionBuilder->RegisterMe(ftfppiBuilder);
0169   auto bertpiBuilder = new G4BertiniPionBuilder;
0170   bertpiBuilder->SetMaxEnergy(maxBERT_pion);
0171   AddBuilder(bertpiBuilder);
0172   pionBuilder->RegisterMe(bertpiBuilder);
0173   auto crmcpiBuilder = new CRMCPionBuilder(fModel, fModelNames[fModel]);
0174   crmcpiBuilder->SetMinEnergy(fMinCRMC);
0175   AddBuilder(crmcpiBuilder);
0176   pionBuilder->RegisterMe(crmcpiBuilder);
0177   pionBuilder->Build();
0178 }
0179 
0180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0181 
0182 void HadronPhysicsCRMC_FTFP_BERT::Kaon()
0183 {
0184   auto kaonBuilder = new G4KaonBuilder;
0185   AddBuilder(kaonBuilder);
0186   auto ftfpkBuilder = new G4FTFPKaonBuilder(QuasiElastic);
0187   ftfpkBuilder->SetMinEnergy(minFTFP_kaon);
0188   ftfpkBuilder->SetMaxEnergy(fMaxFTFP);
0189   AddBuilder(ftfpkBuilder);
0190   kaonBuilder->RegisterMe(ftfpkBuilder);
0191   auto bertkBuilder = new G4BertiniKaonBuilder;
0192   bertkBuilder->SetMaxEnergy(maxBERT_kaon);
0193   AddBuilder(bertkBuilder);
0194   kaonBuilder->RegisterMe(bertkBuilder);
0195   auto crmckBuilder = new CRMCKaonBuilder(fModel, fModelNames[fModel]);
0196   crmckBuilder->SetMinEnergy(fMinCRMC);
0197   AddBuilder(crmckBuilder);
0198   kaonBuilder->RegisterMe(crmckBuilder);
0199   kaonBuilder->Build();
0200 }
0201 
0202 #endif  // G4_USE_CRMC