VMC Examples Version 6.6
Loading...
Searching...
No Matches
run_g4.C File Reference

Macro for loading libraries to run Example ExGarfield with Geant4. More...

#include "TVirtualMC.h"
#include "set_g4_vis.C"
Include dependency graph for run_g4.C:

Go to the source code of this file.

Functions

void run_g4 (const TString &configMacro="g4Config.C")
 

Detailed Description

Macro for loading libraries to run Example ExGarfield with Geant4.

Macro for running Example ExGarfield with Geant4.

Definition in file run_g4.C.

Function Documentation

◆ run_g4()

void run_g4 ( const TString & configMacro = "g4Config.C")

Macro function for running Example ExGarfield with Geant4 from Root interactive session Note that since Root 6 the libraries have to be loaded first via load_g4.C.

Parameters
configMacroconfiguration macro name, default ExGarfield/g4Config.C

Definition at line 18 of file run_g4.C.

19{
20/// Macro function for running Example ExGarfield with Geant4 from
21/// Root interactive session
22/// Note that since Root 6 the libraries have to be loaded first
23/// via load_g4.C.
24/// \param configMacro configuration macro name, default \ref ExGarfield/g4Config.C
25
26 // MC application
28 = new VMC::ExGarfield::MCApplication("ExampleExGarfield", "The example ExGarfield MC application");
29 appl->InitMC(configMacro);
30
31 // Customise Geant4 setting after initialization:
32 ((TGeant4*)gMC)->ProcessGeantMacro("g4config2.in");
33
34 // Visualization setting
35 set_g4_vis();
36
37 // Enter in Geant4 interactive session
38 //((TGeant4*)gMC)->StartGeantUI();
39
40 appl->RunMC(5);
41
42 //delete appl;
43}
void set_g4_vis()
Definition set_g4_vis.C:15
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)