diff --git a/include/PhysicsList.h b/include/PhysicsList.h index ee1cdb8..6bf0adb 100644 --- a/include/PhysicsList.h +++ b/include/PhysicsList.h @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -17,7 +18,6 @@ class PhysicsList : public G4VModularPhysicsList { ~PhysicsList() override; protected: - // Construct particle and physics virtual void InitializePhysicsLists(); void ConstructParticle() override; @@ -34,6 +34,8 @@ class PhysicsList : public G4VModularPhysicsList { G4VPhysicsConstructor* fDecPhysicsList = nullptr; G4VPhysicsConstructor* fRadDecPhysicsList = nullptr; + G4StepLimiterPhysics* fStepLimiterPhysics = nullptr; + std::vector fHadronPhys; TRestGeant4PhysicsLists* fRestPhysicsLists = nullptr; diff --git a/src/PhysicsList.cxx b/src/PhysicsList.cxx index 5574859..a943dda 100644 --- a/src/PhysicsList.cxx +++ b/src/PhysicsList.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -159,6 +160,10 @@ void PhysicsList::InitializePhysicsLists() { fHadronPhys.push_back(new G4EmExtraPhysics()); } + fStepLimiterPhysics = new G4StepLimiterPhysics(); + fStepLimiterPhysics->SetApplyToAll(true); // by default only applies to charged particles + RegisterPhysics(fStepLimiterPhysics); + G4cout << "Number of hadronic physics lists added " << fHadronPhys.size() << G4endl; }