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
Gflash
exampleGflash.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2015 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
/// \file exampleGflash.cxx
11
/// \brief The Geant4 VMC example Gflash application executable
12
///
13
/// \date 28/10/2015
14
/// \author I. Hrivnacova; IPN, Orsay
15
16
#include "MCApplication.h"
17
18
#ifdef USE_GEANT4
19
#include "TG4RunConfiguration.h"
20
#include "TGeant4.h"
21
#endif
22
23
#ifdef USE_GEANT3
24
#include "TGeant3TGeo.h"
25
#endif
26
27
#include "TROOT.h"
28
29
/// Application main program
30
int
main
(
int
argc,
char
** argv)
31
{
32
// Initialize Root threading.
33
// (Multi-threading is triggered automatically if Geant4 was built
34
// in MT mode.)
35
#ifdef G4MULTITHREADED
36
ROOT::EnableThreadSafety();
37
#endif
38
39
// Create MC application (thread local)
40
VMC::Gflash::MCApplication
* appl =
new
VMC::Gflash::MCApplication
(
41
"ExampleGflash"
,
"The exampleGflash MC application"
);
42
43
#ifdef USE_GEANT4
44
// RunConfiguration for Geant4
45
TG4RunConfiguration
* runConfiguration =
new
TG4RunConfiguration
(
46
"geomRootToGeant4"
,
"FTFP_BERT"
,
"gflash"
,
false
,
false
);
47
48
// TGeant4
49
TGeant4* geant4 =
new
TGeant4(
50
"TGeant4"
,
"The Geant4 Monte Carlo"
, runConfiguration, argc, argv);
51
52
// Customise Geant4 setting
53
// Fast simulation model configuration
54
// + verbose level, global range cuts, etc.
55
geant4->ProcessGeantMacro(
"g4config.in"
);
56
#endif
57
58
#ifdef USE_GEANT3
59
new
TGeant3TGeo(
"C++ Interface to Geant3"
);
60
#endif
61
62
// Run example
63
appl->
InitMC
(
""
);
64
65
#ifdef USE_GEANT4
66
// Setting Geant4 visualization
67
geant4->ProcessGeantMacro(
"g4vis.in"
);
68
#endif
69
70
appl->
RunMC
(10);
71
72
delete
appl;
73
}
30
int
main
(
int
argc,
char
** argv) {
…
}
TG4RunConfiguration
VMC::Gflash::MCApplication
Implementation of the TVirtualMCApplication.
Definition
MCApplication.h:48
VMC::Gflash::MCApplication::InitMC
void InitMC(const char *setup)
Definition
MCApplication.cxx:235
VMC::Gflash::MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
MCApplication.cxx:273
main
int main(int argc, char **argv)
Application main program.
Definition
exampleGflash.cxx:30
Generated on Tue Apr 1 2025 13:04:57 for VMC Examples by
1.13.2