Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-07 08:05:47

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