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

Macro for loading libraries to run Example01 with Geant4. More...

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 Example01 with Geant4.

Macro for running Example01 with Geant4.

Definition in file run_g4.C.

Function Documentation

◆ run_g4()

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

Macro function for running Example01 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 E01/g4Config.C

Definition at line 14 of file run_g4.C.

15{
16/// Macro function for running Example01 with Geant4 from
17/// Root interactive session.
18/// Note that since Root 6 the libraries have to be loaded first
19/// via load_g4.C.
20/// \param configMacro configuration macro name, default \ref E01/g4Config.C
21
22 // MC application
24 = new Ex01MCApplication("Example01", "The example01 MC application");
25
26 // Initialize MC
27 appl->InitMC(configMacro);
28
29 // Run MC
30 appl->RunMC(1);
31
32 delete appl;
33}
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)