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

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

#include "TVirtualMC.h"
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 Example02 with Geant4.

Macro for running Example02 with Geant4.

Definition in file run_g4.C.

Function Documentation

◆ run_g4()

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

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

Parameters
configMacroconfiguration macro name, default E02/g4Config.C

Definition at line 16 of file run_g4.C.

17{
18/// Macro function for running Example02 with Geant4 from
19/// Root interactive session
20/// Note that since Root 6 the libraries have to be loaded first
21/// via load_g3.C.
22/// \param configMacro configuration macro name, default \ref E02/g4Config.C
23
24 // MC application
26 = new Ex02MCApplication("Example02", "The example02 MC application");
27
28 appl->InitMC(configMacro);
29
30 // TODO: pass this infor from master to workers
31 //gMC->SetCollectTracks(kTRUE);
32
33 // Setting Geant4 visualization
34 ((TGeant4*)gMC)->ProcessGeantMacro("g4vis.in");
35
36 // Enter in Geant4 interactive session
37 //((TGeant4*)gMC)->StartGeantUI();
38
39 appl->RunMC(5);
40
41 delete appl;
42}
Implementation of the TVirtualMCApplication.
void RunMC(Int_t nofEvents)
void InitMC(const char *setup)