Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RunManager.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4RunManager
27//
28// Class description:
29//
30// This is a class for run control in Geant4
31//
32// For the sequential mode of Geant4 application, user must provide his
33// own classes derived from the following three abstract classes and register
34// them to the RunManager:
35// G4VUserDetectorConstruction - Detector Geometry, Materials
36// G4VUserPhysicsList - Particle types and Processes
37// G4VUserPrimaryGeneratorAction - Event Generator selection
38//
39// In addition to the above mandatory classes, user can easily customise
40// the default functionality of a Geant4 simulation by deriving his own
41// classes from the following 5 user-action classes:
42// G4UserRunAction - Actions for each Run
43// G4UserEventAction - Actions for each Event
44// G4UserStackingAction - Tracks Stacking selection
45// G4UserTrackingAction - Actions for each Track
46// G4UserSteppingAction - Actions for each Step
47//
48// User may use G4VUserActionInitialization class to instantiate any of
49// the six user action-classes (1 mandatory + 6 optional).
50// In this case, user's concrete G4VUserActionInitialization should be
51// defined to the RunManager.
52//
53// If in multi-threaed mode, a user must provide his own classes derived
54// from the following two abstract classes and register them to the
55// G4MTRunManager or G4TaskingRunManager:
56// G4VUserDetectorConstruction - Detector Geometry, Materials
57// G4VUserPhysicsList - Particle types and Processes
58// In addition, user may optionally specify the following:
59// G4UserWorkerInitialization - Defining thread-local actions
60// G4UserRunAction - Actions for entire Run
61//
62// In multi-threaded mode, the use of G4VUserActionInitialization
63// is mandatory.
64// In G4VUserActionInitialization, the user has to specify
65// G4VUserPrimaryGeneratorAction class. In addition, the default
66// functionality of a Geant4 simulation can be customised by making
67// user's classes derived from the following 5 user-action classes:
68// G4VUserPrimaryGeneratorAction - Event Generator selection
69// G4UserRunAction - Actions for each tread-local Run
70// G4UserEventAction - Actions for each Event
71// G4UserStackingAction - Tracks Stacking selection
72// G4UserTrackingAction - Actions for each Track
73// G4UserSteppingAction - Actions for each Step
74//
75// G4RunManager MUST be constructed (either explicitly or through
76// G4RunManagerFactory) by the user in the main() for enabling sequential
77// mode operation of a Geant4 application.
78//
79// In multi-threaded mode, G4MTRunManager is the dedicated run manager
80// which the user MUST construct (either explicitly or through
81// G4RunManagerFactory) in the main().
82//
83// Note: G4WorkerRunManager is the run manager for an individual thread,
84// and is instantiated automatically; the user does not need to take care
85// of instantiating/deleting it.
86// Also, the behavior of the run control can be customised by deriving
87// a user class from G4RunManager. In this case, the user should directly
88// use the provided protected methods in this class for procedures he/she
89// does not want to change.
90//
91// G4RunManager (or a derived class of it) MUST act as a singleton.
92// The user MUST NOT construct more than one such object even if there
93// are two different concrete implementations, nor its state can be reset
94// to zero, once the object has been created.
95//
96// G4RunManager controls all of state changes. See G4ApplicationState.hh
97// in intercoms category for the meaning of each application state.
98
99// Original author: M.Asai, 1996
100// --------------------------------------------------------------------
101#ifndef G4RunManager_hh
102#define G4RunManager_hh 1
103
104#include "G4Event.hh"
105#include "G4EventManager.hh"
106#include "G4Profiler.hh"
107#include "G4RunManagerKernel.hh"
108#include "globals.hh"
109
110#include "rundefs.hh"
111
112#include <algorithm>
113#include <list>
114
115// userAction classes
121class G4UserRunAction;
127
129class G4LogicalVolume;
130class G4Region;
131class G4Timer;
132class G4RunMessenger;
133class G4DCtable;
134class G4Run;
137
139{
141
142 public:
143 // the profiler aliases are only used when compiled with the
144 // GEANT4_USE_TIMEMORY flag enabled.
146
147 public:
148 // Static method which returns the singleton pointer of G4RunManager
149 // or its derived class.
150 // Note this returns the per-thread singleton in case of a
151 // multi-threaded build.
152 static G4RunManager* GetRunManager();
153
154 // The constructor and the destructor. The user must construct
155 // this class object at the beginning of his/her main() and must
156 // delete it at the bottom of the main().
157 G4RunManager();
158 virtual ~G4RunManager();
159
160 // Forbidden copy constructor and assignment operator.
161 G4RunManager(const G4RunManager&) = delete;
163
164 // This method starts an event loop of "n_event" events. The condition of
165 // Geant4 is examined before starting the event loop. This method must be
166 // invoked at 'Idle' state. The state will be changed to 'GeomClosed'
167 // during the event loop and will go back to 'Idle' when the loop is over
168 // or aborted.
169 // In case a string "macroFile" which represents the name of a macro file
170 // is provided, the macro file will be executed AT THE END of each event
171 // processing. In case "n_select" is greater than zero, at the end of the
172 // first "n_select" events, the macro file is executed.
173 virtual void BeamOn(G4int n_event, const char* macroFile = nullptr, G4int n_select = -1);
174
175 // This method invokes all the necessary initialisation procedures for an
176 // event loop. This method must be invoked at the Geant4 'PreInit' state
177 // or 'Idle'. The state will be changed to 'Init' during initialization
178 // procedures and then changed to 'Idle'.
179 // This method invokes two protected methods, InitializeGeometry() and
180 // InitializePhysics().
181 // After some event loops, the user can invoke this method once again.
182 // It is required if the user changes geometry, physics process, and/or
183 // cut-off value. If the user forget the second invocation, the BeamOn()
184 // method will invoke this method (Note that this feature is not valid
185 // for the first initialization).
186 virtual void Initialize();
187
188 // This method must be invoked if the geometry setup has been changed
189 // between runs. The flag "topologyIsChanged" will specify if the geometry
190 // topology is different from the original one used in the previous run;
191 // if not, it must be set to false, so that the original optimisation and
192 // navigation history are preserved. This method is invoked also at
193 // initialisation.
194 virtual void DefineWorldVolume(G4VPhysicalVolume* worldVol, G4bool topologyIsChanged = true);
195
196 // This method safely aborts the current event loop even if an event is
197 // in progress. This method is available for 'GeomClosed' and 'EventProc'
198 // Geant4 states. The application state will be changed to 'Idle', so that
199 // another event loop can be processed.
200 // If the "softAbort" flag is true, the event loop is aborted after
201 // processing the current event, while the current event is aborted if the
202 // flag is set to false.
203 virtual void AbortRun(G4bool softAbort = false);
204
205 // This method aborts the currently processing event, remaining events
206 // in the current event loop will be processed. This method is available
207 // only for 'EventProc' application state.
208 virtual void AbortEvent();
209
210 // These methods are invoked from the Initialize() method for the
211 // initializations of geometry and physics processes. The user's concrete
212 // G4VUserDetectorConstruction class will be accessed from the method
213 // InitializeGeometry() and the G4VUserPhysicsList class will be accessed
214 // from the method InitializePhysics().
215 virtual void InitializeGeometry();
216 virtual void InitializePhysics();
217
218 // These four methods are invoked from the BeamOn() method and they're
219 // invoked in this order.
220 // ConfirmBeamOnCondition() method checks if all the necessary
221 // initialisations have been done already. If the condition is not
222 // satisfied, false is returned and the following three methods will be
223 // skipped.
224 // The RunInitialization() method initialises a run. e.g., a G4Run class
225 // object is constructed in this method.
226 // The DoEventLoop() method controls an event loop. Arguments are the same
227 // as for the BeamOn() method.
228 // Inside the event loop, the two following methods are invoked at the
229 // beginning and at the end of each event.
230 // The RunTermination() method terminates a run processing. e.g., a G4Run
231 // class object is deleted in this method. If the user adopts ODBMS and
232 // wants to store the G4Run object, he/she must override this method.
234 virtual void RunInitialization();
235 virtual void DoEventLoop(G4int n_event, const char* macroFile = nullptr, G4int n_select = -1);
236 virtual void RunTermination();
237
238 // Granular virtual methods invoked from DoEventLoop().
239 virtual void InitializeEventLoop(G4int n_event, const char* macroFile = nullptr,
240 G4int n_select = -1);
241 virtual void ProcessOneEvent(G4int i_event);
242 virtual void TerminateOneEvent();
243 virtual void TerminateEventLoop();
244
245 // These two methods are invoked from DoEventLoop() at the beginning and
246 // at the end of each event processing.
247 // GenerateEvent() constructs a G4Event class object and invoke the user's
248 // G4VUserPrimaryGeneratorAction concrete class. If the user is adopting
249 // an ODBMS system and event objects have been created and stored in the
250 // data-base, he/she must override this method.
251 // AnalyzeEvent() stores an event to a data-base if a concrete
252 // G4VPersistentManager class is defined.
253 virtual G4Event* GenerateEvent(G4int i_event);
254 virtual void AnalyzeEvent(G4Event* anEvent);
255
256 // This method configures the global fallback query and label generators.
257 virtual void ConfigureProfilers(const std::vector<std::string>& args = {});
258
259 // Calls the above virtual method.
260 void ConfigureProfilers(G4int argc, char** argv);
261
262 // Dummy methods to dispatch generic inheritance calls from G4RunManager
263 // base class.
264 virtual void SetNumberOfThreads(G4int) {}
265 virtual G4int GetNumberOfThreads() const { return 1; }
266
267 // Dump information of a region.
268 void DumpRegion(const G4String& rname) const;
269
270 // Dump information of a region.
271 // If the pointer is NULL, all regions are shown.
272 void DumpRegion(G4Region* region = nullptr) const;
273
274 // This method must be invoked (or equivalent UI command can be used)
275 // in case the user changes his/her detector geometry after Initialize()
276 // method has been invoked. Then, at the beginning of the next BeamOn(),
277 // all necessary geometry optimisations will be made.
278 // The parameter "prop" has to be true if this C++ method is directly
279 // invoked.
280 void GeometryHasBeenModified(G4bool prop = true);
281
282 // This method must be invoked (or equivalent UI command can be used)
283 // in case the user needs his/her detector construction has to be
284 // re-invoked. Geometry optimisations will be also done.
285 // If the first parameter "destroyFirst" is true, G4SolidStore,
286 // G4LogicalVolumeStore and G4PhysicalVolumeStore are cleaned up, and
287 // thus all solids, logical volumes and physical volumes previously
288 // defined are deleted.
289 // The second parameter "prop" has to be true if this C++ method is
290 // directly invoked.
291 void ReinitializeGeometry(G4bool destroyFirst = false, G4bool prop = true);
292
293 // This method must be invoked (or equivalent UI command can be used)
294 // in case the user changes his/her physics process(es), e.g. (in)activate
295 // some processes. Once this method is invoked, regardless of cuts are
296 // changed or not, BuildPhysicsTable() of a PhysicsList is invoked for
297 // refreshing all physics tables.
299
301 {
302 G4cerr << "CutOffHasBeenModified becomes obsolete." << G4endl;
303 G4cerr << "It is safe to remove invoking this method." << G4endl;
304 }
305
306 // This method may be used if the orientation and/or size of a
307 // particular physical volume has been modified while the rest of the
308 // geometries in the world has not been changed. This avoids the
309 // full re-optimisation of the entire geometry tree which is forced
310 // if GeometryHasBeenModified() method is invoked.
312
313 // Same as above, but the mother logical volume is specified instead.
315
325
327
328 // This is used only by workers thread to reset RNG engines from files
329 // that are event specific. Not implemented for sequential since run seed
330 // defines event seeds.
332
333 virtual void ConstructScoringWorlds();
334
335 virtual void rndmSaveThisRun();
336 virtual void rndmSaveThisEvent();
337 virtual void RestoreRandomNumberStatus(const G4String& fileN);
339 { /* No effect in SEQ */
340 }
341
342 // Set user-actions and user-initialization to the kernel.
343 // Store respective user initialization and action classes.
344 // In MT mode, actions are shared among all threads, and should be set
345 // in the master thread, while user-actions are thread-private and each `
346 // thread has private instances. Master thread does not have user-actions
347 // except for the (optional) run-action.
348 // User should instantiate the user-actions in the action-initialization
349 // and use that class' setters to set user-actions and *not* directly
350 // the methods provided here.
351 // Multiple Run, Event, Tracking and Stepping actions are allowed, the
352 // multiple instances will be appended to the current configuration.
353 // Multiple Stacking and PrimaryGeneration are not allowed.
355 virtual void SetUserInitialization(G4VUserPhysicsList* userInit);
359 virtual void SetUserAction(G4UserRunAction* userAction);
360 virtual void SetUserAction(G4VUserPrimaryGeneratorAction* userAction);
361 virtual void SetUserAction(G4UserEventAction* userAction);
362 virtual void SetUserAction(G4UserStackingAction* userAction);
363 virtual void SetUserAction(G4UserTrackingAction* userAction);
364 virtual void SetUserAction(G4UserSteppingAction* userAction);
365
366 // Methods returning respective user initialization and action classes.
368 {
369 return userDetector;
370 }
371 inline const G4VUserPhysicsList* GetUserPhysicsList() const { return physicsList; }
388 inline const G4UserRunAction* GetUserRunAction() const { return userRunAction; }
393 inline const G4UserEventAction* GetUserEventAction() const { return userEventAction; }
397
398 // Set the number of additional (optional) waiting stacks.
399 // This method must be invoked at 'PreInit', 'Init' or 'Idle' states.
400 // Once the user sets the number of additional waiting stacks,
401 // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
406
407 inline const G4String& GetVersionString() const { return kernel->GetVersionString(); }
408
413
414 // if vl = 1 : status before primary particle generation is stored
415 // if vl = 2 : status before event processing (after primary particle
416 // generation) is stored if vl = 3 : both are stored if vl = 0 : none is
417 // stored (default).
423
428
431 inline void SetRandomNumberStoreDir(const G4String& dir)
432 {
433 G4String dirStr = dir;
434 if (dirStr.back() != '/') dirStr += "/";
435#ifndef WIN32
436 G4String shellCmd = "mkdir -p ";
437#else
438 std::replace(dirStr.begin(), dirStr.end(), '/', '\\');
439 G4String shellCmd = "if not exist " + dirStr + " mkdir ";
440#endif
441 shellCmd += dirStr;
442 randomNumberStatusDir = dirStr;
443 G4int sysret = system(shellCmd);
444 if (sysret != 0) {
445 G4String errmsg = "\"" + shellCmd + "\" returns non-zero value. Directory creation failed.";
446 G4Exception("GrRunManager::SetRandomNumberStoreDir", "Run0071", JustWarning, errmsg);
447 G4cerr << " return value = " << sysret << G4endl;
448 }
449 }
452 {
454 }
456 {
458 G4Exception("GrRunManager::SetRandomNumberStoreDir", "Run0072", JustWarning,
459 "Random number status is not available for this event.");
460 }
462 }
465
466 inline void SetVerboseLevel(G4int vl)
467 {
468 verboseLevel = vl;
470 }
471 inline G4int GetVerboseLevel() const { return verboseLevel; }
472 inline G4int GetPrintProgress() { return printModulo; }
473 inline void SetPrintProgress(G4int i) { printModulo = i; }
474
475 // Sets the number of events to be kept after processing. That is,
476 // "val" previous events can be used with the most recent event for
477 // digitizing pileup. "val"+1 previous event is deleted.
478 // This method must be invoked before starting the event loop.
480
481 // Returns the pointer to the current run. This method is available for
482 // 'GeomClosed' and 'EventProc' application states.
483 inline const G4Run* GetCurrentRun() const { return currentRun; }
484 inline G4Run* GetNonConstCurrentRun() const { return currentRun; }
485
486 // Returns the pointer to the current event. This method is available for
487 // 'EventProc' application state.
488 inline const G4Event* GetCurrentEvent() const { return currentEvent; }
489
490 // Returns the pointer to the "i" previous event. This method is available
491 // for 'EventProc' application state. In case the event loop has not yet
492 // reached the requested event, null will be returned. To use this method,
493 // SetNumberOfEventsToBeStored() method mentioned above must be invoked
494 // previously to the event loop.
495 inline const G4Event* GetPreviousEvent(G4int i) const
496 {
497 if (i >= 1 && i <= n_perviousEventsToBeStored) {
498 auto itr = previousEvents->cbegin();
499 for (G4int j = 1; j < i; ++j) {
500 ++itr;
501 }
502 return *itr;
503 }
504 return nullptr;
505 }
506
507 // Set the run number counter. Initially, the counter is initialized
508 // to zero and incremented by one for every BeamOn().
509 inline void SetRunIDCounter(G4int i) { runIDCounter = i; }
510
514 inline G4int GetNumberOfSelectEvents() const { return n_select_msg; }
515 inline const G4String& GetSelectMacro() const { return selectMacro; }
516 inline void SetDCtable(G4DCtable* DCtbl) { DCtable = DCtbl; }
517
524
525 inline RMType GetRunManagerType() const { return runManagerType; }
526
527 protected:
528 // This constructor is called in case of multi-threaded build.
529 G4RunManager(RMType rmType);
530
532 void CleanUpUnnecessaryEvents(G4int keepNEvents);
533 void StackPreviousEvent(G4Event* anEvent);
534
535 virtual void StoreRNGStatus(const G4String& filenamePrefix);
536
537 void UpdateScoring();
538
539 // Called by destructor to delete user detector. Note: the user detector
540 // is shared among threads, thus this should be re-implemented in derived
541 // classes that implement the worker model.
542 virtual void DeleteUserInitializations();
543
544 protected:
547
559
565
569 G4Timer* timer = nullptr;
570 G4DCtable* DCtable = nullptr;
571
572 G4Run* currentRun = nullptr;
574 std::list<G4Event*>* previousEvents = nullptr;
577
584
586
588
595
597
599
600 // This Boolean flag has to be shared by all derived objects.
602
603 private:
604 // Per-thread static instance of the run manager singleton.
605 static G4ThreadLocal G4RunManager* fRunManager;
606
607 G4RunMessenger* runMessenger = nullptr;
608
609 std::unique_ptr<ProfilerConfig> masterRunProfiler;
610};
611
612#endif
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
void StoreRandomNumberStatusToG4Event(G4int vl)
G4StackManager * GetStackManager() const
void SetGeometryToBeOptimized(G4bool vl)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
const G4String & GetVersionString() const
void SetVerboseLevel(G4int vl)
const G4UserTrackingAction * GetUserTrackingAction() const
G4bool isScoreNtupleWriter
G4bool geometryInitialized
void CleanUpPreviousEvents()
void CleanUpUnnecessaryEvents(G4int keepNEvents)
G4int storeRandomNumberStatusToG4Event
G4UserWorkerInitialization * userWorkerInitialization
virtual void SetNumberOfThreads(G4int)
virtual void AbortRun(G4bool softAbort=false)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
virtual void Initialize()
G4int nParallelWorlds
std::list< G4Event * > * previousEvents
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
G4Timer * timer
void SetRunIDCounter(G4int i)
G4RunManager(const G4RunManager &)=delete
virtual G4int GetNumberOfThreads() const
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
G4bool geometryDirectlyUpdated
G4int numberOfEventProcessed
virtual void RestoreRandomNumberStatus(const G4String &fileN)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
G4int GetNumberOfEventsToBeProcessed() const
const G4UserEventAction * GetUserEventAction() const
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
G4UserEventAction * userEventAction
const G4VUserActionInitialization * GetUserActionInitialization() const
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void SetRandomNumberStoreDir(const G4String &dir)
G4Run * GetNonConstCurrentRun() const
virtual void rndmSaveThisEvent()
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
virtual void DeleteUserInitializations()
const G4Event * GetPreviousEvent(G4int i) const
G4RunManagerKernel * kernel
G4Run * currentRun
virtual G4bool ConfirmBeamOnCondition()
G4bool geometryToBeOptimized
virtual void RestoreRndmEachEvent(G4bool)
static G4RunManager * GetRunManager()
virtual void AbortEvent()
virtual void rndmSaveThisRun()
virtual void InitializePhysics()
G4DCtable * DCtable
G4String randomNumberStatusForThisRun
G4String msgText
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
static G4bool IfGeometryHasBeenDestroyed()
G4UserRunAction * userRunAction
const G4String & GetRandomNumberStatusForThisEvent() const
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
const G4UserStackingAction * GetUserStackingAction() const
G4bool rngStatusEventsFlag
G4RunManager & operator=(const G4RunManager &)=delete
const G4String & GetVersionString() const
G4String selectMacro
virtual void InitializeGeometry()
RMType GetRunManagerType() const
virtual void RunTermination()
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
const G4UserSteppingAction * GetUserSteppingAction() const
void SetDCtable(G4DCtable *DCtbl)
void SetNumberOfEventsToBeStored(G4int val)
const G4String & GetSelectMacro() const
G4bool physicsInitialized
G4VUserActionInitialization * userActionInitialization
void PhysicsHasBeenModified()
G4VPhysicalVolume * currentWorld
const G4Event * GetCurrentEvent() const
void StackPreviousEvent(G4Event *anEvent)
static G4RUN_DLL G4bool fGeometryHasBeenDestroyed
void ReOptimize(G4LogicalVolume *)
const G4String & GetRandomNumberStatusForThisRun() const
void SetNumberOfEventsToBeProcessed(G4int val)
void SetVerboseLevel(G4int vl)
G4bool GetRandomNumberStore() const
const G4VUserPhysicsList * GetUserPhysicsList() const
G4VUserDetectorConstruction * userDetector
const G4String & GetRandomNumberStoreDir() const
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
const G4Run * GetCurrentRun() const
G4int numberOfEventToBeProcessed
virtual ~G4RunManager()
G4int GetNumberOfParallelWorld() const
G4String randomNumberStatusDir
virtual void TerminateEventLoop()
virtual void SetUserAction(G4UserRunAction *userAction)
void SetRandomNumberStorePerEvent(G4bool flag)
G4String randomNumberStatusForThisEvent
const G4UserRunAction * GetUserRunAction() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
void GeometryHasBeenModified(G4bool prop=true)
void SetGeometryToBeOptimized(G4bool vl)
G4UserTrackingAction * userTrackingAction
RMType runManagerType
G4int n_perviousEventsToBeStored
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
void ReOptimizeMotherOf(G4VPhysicalVolume *)
void GeometryDirectlyUpdated(G4bool val=true)
void StoreRandomNumberStatusToG4Event(G4int vl)
virtual void ProcessOneEvent(G4int i_event)
void CutOffHasBeenModified()
virtual void ConfigureProfilers(const std::vector< std::string > &args={})
G4bool storeRandomNumberStatus
virtual G4Event * GenerateEvent(G4int i_event)
G4int GetFlagRandomNumberStatusToG4Event() const
void SetRandomNumberStore(G4bool flag)
G4bool initializedAtLeastOnce
G4EventManager * eventManager
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void DoEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
virtual void TerminateOneEvent()
virtual void RunInitialization()
void DumpRegion(const G4String &rname) const
G4int GetNumberOfSelectEvents() const
G4int GetPrintProgress()
G4VUserPhysicsList * physicsList
virtual void AnalyzeEvent(G4Event *anEvent)
G4bool GetRandomNumberStorePerEvent() const
G4bool GetGeometryToBeOptimized()
G4UserStackingAction * userStackingAction
G4int GetVerboseLevel() const
void UpdateScoring()
G4Event * currentEvent
virtual void ConstructScoringWorlds()
void SetPrintProgress(G4int i)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4UserSteppingAction * userSteppingAction
Definition G4Run.hh:49
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
#define G4RUN_DLL
Definition rundefs.hh:45
#define G4ThreadLocal
Definition tls.hh:77