From 7818bfbbabfcd07167bf09a97792662e97287258 Mon Sep 17 00:00:00 2001 From: Greg <gchristian@gc-master.cyclotron.tamu.edu> Date: Wed, 19 Sep 2018 11:35:50 -0500 Subject: [PATCH] Added back in code to the PhysicsList files, to invoke the menate_R neutron library as an option in the users PhysicsListOption.txt --- NPSimulation/Process/PhysicsList.cc | 15 +++++++++++++++ NPSimulation/Process/PhysicsList.hh | 1 + 2 files changed, 16 insertions(+) diff --git a/NPSimulation/Process/PhysicsList.cc b/NPSimulation/Process/PhysicsList.cc index ed1a5bfac..a8e4d597d 100644 --- a/NPSimulation/Process/PhysicsList.cc +++ b/NPSimulation/Process/PhysicsList.cc @@ -46,6 +46,7 @@ #include "G4PAIModel.hh" #include "G4PAIPhotModel.hh" +#include "menate_R.hh" ///////////////////////////////////////////////////////////////////////////// PhysicsList::PhysicsList() : G4VUserPhysicsList(){ @@ -196,6 +197,7 @@ void PhysicsList::ReadConfiguration(std::string filename){ m_IonGasModels = 0; m_pai= 0; m_pai_photon= 0; + m_Menate_R = 0; std::ifstream file(filename.c_str()); if(!file.is_open()){ @@ -240,6 +242,8 @@ void PhysicsList::ReadConfiguration(std::string filename){ m_pai = value; else if (name == "pai_photon") m_pai_photon = value; + else if (name == "Menate_R") + m_Menate_R = value; else std::cout <<"WARNING: Physics List Token '" << name << "' unknown. Token is ignored." << std::endl; } @@ -420,6 +424,17 @@ void PhysicsList::AddParametrisation(){ // Add a Step limiter to the beam particle. // This will be used to limit the step of the beam in the target pmanager->AddProcess(new G4StepLimiter,-1,-1,5); + + // Add menate R to the process manager for neutrons + // (if selected as a option) + if(m_Menate_R > 0 && name == "neutron") { + menate_R* theMenate = new menate_R("menateR_neutron"); + theMenate->SetMeanFreePathCalcMethod("ORIGINAL"); + pmanager->AddDiscreteProcess(theMenate); + std::cout <<"||--------------------------------------------------||" << std::endl; + std::cout <<" MENATE_R Added to Process Manager " << std::endl; + std::cout <<"||--------------------------------------------------||" << std::endl; + } } } diff --git a/NPSimulation/Process/PhysicsList.hh b/NPSimulation/Process/PhysicsList.hh index 37e6b6da8..d7b01e5b5 100644 --- a/NPSimulation/Process/PhysicsList.hh +++ b/NPSimulation/Process/PhysicsList.hh @@ -117,6 +117,7 @@ class PhysicsList: public G4VUserPhysicsList{ double m_IonGasModels; double m_pai; double m_pai_photon; + double m_Menate_R; }; -- GitLab