OMSim
Geant4 for IceCube optical module studies
OMSim.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 
13 #include "OMSimDetectorConstruction.hh"
14 #include "OMSimPhysicsList.hh"
15 #include "OMSimPrimaryGeneratorAction.hh"
16 #include "OMSimRunAction.hh"
17 #include "OMSimEventAction.hh"
18 #include "OMSimTrackingAction.hh"
19 #include "OMSimSteppingAction.hh"
20 #include "OMSimUIinterface.hh"
21 
22 #include <G4MTRunManager.hh>
23 #include <G4VisExecutive.hh>
24 #include <G4UIExecutive.hh>
25 
26 #include <boost/program_options.hpp>
27 
28 namespace po = boost::program_options;
29 
42 class OMSim
43 {
44 public:
45  OMSim();
46  ~OMSim();
47 
48  void initialiseSimulation(OMSimDetectorConstruction *pDetectorConstruction);
49  void configureLogger();
50  bool handleArguments(int pArgumentCount, char *pArgumentVector[]);
51  void startVisualisation();
52 
53  G4Navigator *getNavigator() { return m_navigator.get(); };
54  void extendOptions(po::options_description pNewOptions);
55  po::options_description m_generalOptions;
56 
57 private:
58  void initialLoggerConfiguration();
59  int determineNumberOfThreads();
60  po::variables_map parseArguments(int pArgumentCount, char *pArgumentVector[]);
61  void setUserArgumentsToArgTable(po::variables_map pVariablesMap);
62  void setGeneralOptions();
63 
64  std::unique_ptr<G4MTRunManager> m_runManager;
65  std::unique_ptr<G4VisExecutive> m_visManager;
66  std::unique_ptr<G4VUserPhysicsList> m_physics;
67  std::unique_ptr<G4TouchableHistory> m_history;
68  std::unique_ptr<G4Navigator> m_navigator;
69 
70  std::chrono::high_resolution_clock::time_point m_startingTime;
71 };
Defines OMSimSteppingAction.Currently it only checks for trapped photons.
Class for detector construction in the effective area simulation.
Definition: OMSimDetectorConstruction.hh:19
Controls the main simulation process.
Definition: OMSim.hh:43
bool handleArguments(int pArgumentCount, char *pArgumentVector[])
Parses the user arguments into variables that can be accessed in the simulation via OMSimCommandArgsT...
Definition: OMSim.cc:213
void setUserArgumentsToArgTable(po::variables_map pVariablesMap)
Sets variables from a variables map to the instance of OMSimCommandArgsTable.
Definition: OMSim.cc:198
po::variables_map parseArguments(int pArgumentCount, char *pArgumentVector[])
Parses user terminal arguments to a variables map.
Definition: OMSim.cc:186
void startVisualisation()
uiEx session is started for visualisation.
Definition: OMSim.cc:96
void initialiseSimulation(OMSimDetectorConstruction *pDetectorConstruction)
Initialize the simulation constructing all Geant instances.
Definition: OMSim.cc:125
void extendOptions(po::options_description pNewOptions)
Adds options from the different simulation modules to the option description list (what is printed in...
Definition: OMSim.cc:177