VMC Examples
Version 6.7
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
1
2
3
6
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
~
Functions
1
2
3
6
a
b
c
d
e
f
g
h
i
m
o
p
r
s
t
u
~
Variables
c
f
n
Enumerations
Enumerator
Files
File List
File Members
All
3
b
c
e
f
g
h
i
l
m
n
o
r
s
t
u
v
Functions
b
c
g
h
i
l
m
n
o
r
s
t
u
v
Variables
Typedefs
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Pages
Loading...
Searching...
No Matches
examples
E02
run_g4.C
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
10
/// \ingroup E02
11
/// \file E02/run_g4.C
12
/// \brief Macro for running Example02 with Geant4.
13
14
#include "TVirtualMC.h"
15
16
void
run_g4
(
const
TString& configMacro =
"g4Config.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
25
Ex02MCApplication
* appl
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
}
16
void
run_g4
(
const
TString& configMacro =
"g4Config.C"
) {
…
}
run_g4
void run_g4(const TString &configMacro="g4Config.C")
Definition
run_g4.C:16
Ex02MCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex02MCApplication.h:38
Ex02MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex02MCApplication.cxx:181
Ex02MCApplication::InitMC
void InitMC(const char *setup)
Definition
Ex02MCApplication.cxx:141
Generated on Tue Apr 1 2025 13:04:57 for VMC Examples by
1.13.2