Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-28 07:50:25

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 IonCRMCPhysics.cc
0027 /// \brief Implementation of the IonCRMCPhysics class
0028 
0029 //---------------------------------------------------------------------------
0030 //
0031 // Class:     IonCRMCPhysics
0032 //
0033 // Author:    2018 Alberto Ribon
0034 //
0035 // Modified:
0036 // -  18-May-2021 Alberto Ribon : Used the latest Geant4-CRMC interface.
0037 //
0038 //---------------------------------------------------------------------------
0039 //
0040 #ifdef G4_USE_CRMC
0041 
0042 #  include "IonCRMCPhysics.hh"
0043 
0044 #  include "HadronicInelasticModelCRMC.hh"
0045 
0046 #  include "G4Alpha.hh"
0047 #  include "G4BinaryLightIonReaction.hh"
0048 #  include "G4BuilderType.hh"
0049 #  include "G4ComponentGGNuclNuclXsc.hh"
0050 #  include "G4CrossSectionInelastic.hh"
0051 #  include "G4Deuteron.hh"
0052 #  include "G4ExcitationHandler.hh"
0053 #  include "G4FTFBuilder.hh"
0054 #  include "G4GenericIon.hh"
0055 #  include "G4HadronInelasticProcess.hh"
0056 #  include "G4HadronicInteraction.hh"
0057 #  include "G4HadronicInteractionRegistry.hh"
0058 #  include "G4HadronicParameters.hh"
0059 #  include "G4He3.hh"
0060 #  include "G4IonConstructor.hh"
0061 #  include "G4IonPhysics.hh"
0062 #  include "G4ParticleDefinition.hh"
0063 #  include "G4PreCompoundModel.hh"
0064 #  include "G4ProcessManager.hh"
0065 #  include "G4SystemOfUnits.hh"
0066 #  include "G4Triton.hh"
0067 
0068 using namespace std;
0069 
0070 // factory
0071 #  include "G4PhysicsConstructorFactory.hh"
0072 //
0073 G4_DECLARE_PHYSCONSTR_FACTORY(IonCRMCPhysics);
0074 
0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0076 
0077 const std::array<std::string, 13> IonCRMCPhysics::fModelNames = {
0078   "EPOS-LHC", "EPOS-1.99", "QGSJET-01",   "",           "", "", "SIBYLL-2.3", "QGSJETII-04", "",
0079   "",         "",          "QGSJETII-03", "DPMJET-3.06"};
0080 
0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0082 
0083 IonCRMCPhysics::IonCRMCPhysics(G4int ver) : G4VPhysicsConstructor("ionInelasticCRMC")
0084 {
0085   fModel = 0;  //***LOOKHERE*** CRMC model: 0:EPOS-LHC, 1:EPOS-1.99, 2:QGSJET:01, 6:SIBYLL-2.3,
0086                //                           7:QGSJETII-04, 11:QGSJETII-03, 12:DPMJET-3.06
0087   fVerbose = ver;
0088   if (fVerbose > 1) G4cout << "### IonCRMCPhysics" << G4endl;
0089   SetPhysicsType(bIons);
0090 }
0091 
0092 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0093 
0094 IonCRMCPhysics::~IonCRMCPhysics() {}
0095 
0096 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0097 
0098 void IonCRMCPhysics::ConstructParticle()
0099 {
0100   // Construct ions
0101   G4IonConstructor pConstructor;
0102   pConstructor.ConstructParticle();
0103 }
0104 
0105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0106 
0107 void IonCRMCPhysics::ConstructProcess()
0108 {
0109   fModel = 0;  //***LOOKHERE*** 0:EPOS-LHC, 1:EPOS-1.99, 2:QGSJET:01, 6:SIBYLL-2.3,
0110                //               7:QGSJETII-04, 11:QGSJETII-03, 12:DPMJET-3.06
0111   const G4double minCRMC =
0112     100.0
0113     * GeV;  //***LOOKHERE*** CRMC model is applied only above this projectile lab energy per nucleon
0114   const G4double maxFTFP =
0115     110.0
0116     * GeV;  //***LOOKHERE*** FTFP model is applied only below this projectile lab energy per nucleon
0117   G4HadronicInteraction* p = G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
0118   G4PreCompoundModel* thePreCompound = static_cast<G4PreCompoundModel*>(p);
0119   if (!thePreCompound) thePreCompound = new G4PreCompoundModel;
0120   // Binary Cascade
0121   G4HadronicInteraction* theIonBC = new G4BinaryLightIonReaction(thePreCompound);
0122   theIonBC->SetMinEnergy(0.0);
0123   theIonBC->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade());
0124   // FTFP
0125   G4FTFBuilder theBuilder("FTFP", thePreCompound);
0126   G4HadronicInteraction* theFTFP = theBuilder.GetModel();
0127   theFTFP->SetMinEnergy(G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade());
0128   theFTFP->SetMaxEnergy(maxFTFP);
0129   // CRMC
0130   G4HadronicInteraction* theCRMC = new HadronicInelasticModelCRMC(fModel, fModelNames[fModel]);
0131   theCRMC->SetMinEnergy(minCRMC);
0132   theCRMC->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergy());
0133   // Cross section
0134   G4CrossSectionInelastic* theXS = new G4CrossSectionInelastic(new G4ComponentGGNuclNuclXsc);
0135   // Processes
0136   AddProcess("dInelastic", G4Deuteron::Deuteron(), theIonBC, theFTFP, theCRMC, theXS);
0137   AddProcess("tInelastic", G4Triton::Triton(), theIonBC, theFTFP, theCRMC, theXS);
0138   AddProcess("He3Inelastic", G4He3::He3(), theIonBC, theFTFP, theCRMC, theXS);
0139   AddProcess("alphaInelastic", G4Alpha::Alpha(), theIonBC, theFTFP, theCRMC, theXS);
0140   AddProcess("ionInelastic", G4GenericIon::GenericIon(), theIonBC, theFTFP, theCRMC, theXS);
0141   if (fVerbose > 1) G4cout << "IonCRMCPhysics::ConstructProcess done! " << G4endl;
0142 }
0143 
0144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0145 
0146 void IonCRMCPhysics::AddProcess(const G4String& name, G4ParticleDefinition* part,
0147                                 G4HadronicInteraction* theIonBC, G4HadronicInteraction* theFTFP,
0148                                 G4HadronicInteraction* theCRMC, G4VCrossSectionDataSet* xs)
0149 {
0150   G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
0151   G4ProcessManager* pManager = part->GetProcessManager();
0152   pManager->AddDiscreteProcess(hadi);
0153   if (xs) hadi->AddDataSet(xs);
0154   if (theIonBC) hadi->RegisterMe(theIonBC);
0155   if (theFTFP) hadi->RegisterMe(theFTFP);
0156   if (theCRMC) hadi->RegisterMe(theCRMC);
0157 }
0158 
0159 #endif  // G4_USE_CRMC