--- PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx 2009/02/18 17:05:15 1.2 +++ PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx 2009/06/12 18:38:54 1.5 @@ -1,13 +1,6 @@ -#include #include "PamG4RunConfiguration.h" -#include -#include -#include -#include -#include +#include "PamG4RegionConstruction.h" - -#include "PamG4RangeCutsPhysicsList.h" ClassImp(PamG4RunConfiguration) @@ -26,36 +19,7 @@ } -G4VUserPhysicsList* PamG4RunConfiguration::CreatePhysicsList() -{ -// Create default Geant4 VMC physics list - - TG4ComposedPhysicsList* builder = new TG4ComposedPhysicsList(); - - TString token1 = TG4Globals::GetToken(0, fPhysicsListSelection); - TString token2 = TG4Globals::GetToken(1, fPhysicsListSelection); - if ( token1 == "emStandard" ) { - G4cout << "Adding EMPhysicsList" << G4endl; - builder->AddPhysicsList(new TG4EmPhysicsList()); -} -else { - G4cout << "Adding HadronPhysicsList " << token1.Data() << G4endl; - builder->AddPhysicsList(new TG4HadronPhysicsList(token1.Data())); -} - -if ( token2 == "optical" ) { - G4cout << "Adding OpticalPhysicsList " << G4endl; - builder->AddPhysicsList(new TG4OpticalPhysicsList()); -} - - // add option here - G4cout << "Adding SpecialPhysicsList " << G4endl; - builder->AddPhysicsList(new TG4SpecialPhysicsList( - fSpecialProcessSelection.Data())); - - G4cout << "Adding Range Cuts PhysicsList " << G4endl; - builder->AddPhysicsList(new PamG4RangeCutsPhysicsList()); - -return builder; -} +TG4VUserRegionConstruction* PamG4RunConfiguration::CreateUserRegionConstruction(){ + return new PamG4RegionConstruction(1, "Pamela Tracking Media cuts"); +}