31#include <G4UImessenger.hh>
36#include <XmlVGM/AGDDExporter.h>
37#include <XmlVGM/GDMLExporter.h>
42 const TString& physicsList,
const TString& specialProcess,
43 Bool_t specialStacking, Bool_t mtApplication)
44 : fUserGeometry(userGeometry),
45 fPhysicsListSelection(physicsList),
46 fSpecialProcessSelection(),
47 fSpecialStacking(specialStacking),
48 fMTApplication(mtApplication),
49 fSpecialControls(false),
51 fSpecialCutsOld(false),
58 if (userGeometry !=
"geomVMCtoGeant4" && userGeometry !=
"geomVMCtoRoot" &&
59 userGeometry !=
"geomRoot" && userGeometry !=
"geomRootToGeant4" &&
60 userGeometry !=
"geomVMC+RootToGeant4" && userGeometry !=
"geomGeant4") {
63 "User geometry " + userGeometry +
" not recognized." +
65 "geomVMCtoGeant4 geomVMCtoRoot geomRoot geomRootToGeant4 "
66 "geomVMC+RootToGeant4 geomGeant4");
79 "Physics list selection " + physicsList +
" not recognized." +
81 "EMonly, EMonly+Extra, Hadron_EM, Hadron_EM+Extra" +
91 " The Extra selections are cumulative, while Hadron selections are "
95 }
while (token !=
"");
97 G4String g4SpecialProcess(specialProcess.Data());
99 if (G4StrUtil::contains(g4SpecialProcess,
"specialControls")) {
102 g4SpecialProcess.erase(g4SpecialProcess.find(
"specialControls"), 15);
103 if (g4SpecialProcess.find(
"++") != std::string::npos)
104 g4SpecialProcess.erase(g4SpecialProcess.find(
"++"), 1);
108 if (G4StrUtil::contains(g4SpecialProcess,
"specialCuts")) {
115 "Special process selection " + specialProcess +
" is not recognized." +
159 G4String emSelection;
160 G4String hadronSelection;
161 G4String extraSelection;
163 G4bool isValid =
true;
172 hadronSelection = token;
181 extraSelection += token;
182 extraSelection +=
" ";
194 "The EMonly selections cannot be combined with Hadron selections." +
198 if (emSelection !=
"") {
199 G4cout <<
"Adding EMPhysicsList " << emSelection << G4endl;
203 if (hadronSelection !=
"") {
204 G4cout <<
"Adding HadronPhysicsList " << hadronSelection << G4endl;
208 if (extraSelection !=
"") {
209 G4cout <<
"Adding ExtraPhysicsList " << extraSelection << G4endl;
313 std::map<TString, Double_t>::iterator it =
fParameters.find(name);
330 <<
"### Special cuts old activated: production cuts will be set by ranges."
343 userGeometry = userGeometry.Remove(0, 4);
Definition of the TG4ComposedPhysicsList class.
Definition of the TG4DetConstruction class.
Definition of the TG4EmPhysicsList class.
Definition of the TG4EventAction class.
Definition of the TG4Globals class and basic container types.
Definition of the TG4HadronPhysicsList class.
Definition of the TG4PrimaryGeneratorAction class.
Definition of the TG4RunAction class.
Definition of the TG4RunConfiguration class.
Definition of the TG4SpecialPhysicsList class.
Definition of the TG4SpecialStackingAction class.
Definition of the TG4SteppingAction class.
Definition of the TG4TrackingAction class.
Definition of the TG4VGMMessenger class.
Definition of the TG4VUserRegionConstruction class.
The Geant4 VMC physics list builder.
void AddPhysicsList(G4VUserPhysicsList *physicsList)
Detector construction for building geometry using TVirtualMCApplication.
The standard EM physics list.
static G4bool IsAvailableSelection(const G4String &selection)
static G4String AvailableSelections()
Actions at the beginning and the end of event.
static G4String GetToken(Int_t i, const TString &s)
static void Exception(const TString &className, const TString &methodName, const TString &text)
The hadron physics list helper class.
static G4String AvailableHadronSelections()
static G4String AvailableEMSelections()
static G4bool IsAvailableSelection(const G4String &selection)
Primary generator action defined via TVirtualMCStack and TVirtualMCApplication.
Actions at the beginning and the end of run.
std::map< TString, Double_t > fParameters
virtual G4VUserPhysicsList * CreatePhysicsList()
TG4RunConfiguration()
Not implemented.
Bool_t IsSpecialCutsOld() const
virtual ~TG4RunConfiguration()
TString fPhysicsListSelection
physics list selection
Bool_t IsSpecialControls() const
virtual TG4SteppingAction * CreateSteppingAction()
virtual G4UserStackingAction * CreateStackingAction()
Bool_t IsSpecialCuts() const
virtual TG4VUserFastSimulation * CreateUserFastSimulation()
Bool_t fSpecialStacking
option for special stacking
virtual G4VUserDetectorConstruction * CreateDetectorConstruction()
G4UImessenger * fAGDDMessenger
XML messenger.
Bool_t fMTApplication
option for MT mode if available
virtual TG4VUserRegionConstruction * CreateUserRegionConstruction()
Bool_t IsSpecialStacking() const
virtual G4UserEventAction * CreateEventAction()
virtual TG4TrackingAction * CreateTrackingAction()
Bool_t fSpecialCuts
option for special cuts
Bool_t fSpecialCutsOld
option for special cuts old
virtual G4VUserPrimaryGeneratorAction * CreatePrimaryGenerator()
TString GetUserGeometry() const
TString fUserGeometry
way of building geometry
Bool_t IsMTApplication() const
Bool_t fSpecialControls
option for special controls
TString fSpecialProcessSelection
special process selection
void SetMTApplication(Bool_t mtApplication)
virtual TG4VUserPostDetConstruction * CreateUserPostDetConstruction()
virtual G4UserRunAction * CreateRunAction()
G4UImessenger * fGDMLMessenger
XML messenger.
void SetParameter(const TString &name, Double_t value)
The Geant4 VMC special physics list helper class.
static G4String AvailableSelections()
static G4bool IsAvailableSelection(const G4String &selection)
Defines a special stacking mechanism.
Actions at the beginnig and at the end of track.
Messenger class that defines commands for VGM XML Exporter.
The abstract base class which is used to build fast simulation models.
The abstract base class for user defined class to customize geometry.
The abstract base class for user defined regions.