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
ExGarfield
test_ExGarfield.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 Tests
11
/// \file test_ExGarfield.C
12
/// \brief Example ExGarfield Test macro 1
13
///
14
/// Running Example ExGarfield
15
16
//#include "set_vis.C"
17
18
void
test_ExGarfield
(
const
TString& configMacro)
19
{
20
/// Macro function for testing example ExGarfield
21
/// \param configMacro configuration macro loaded in initialization
22
///
23
/// Run 10 events and print the calorimeter hits.
24
25
// Create application if it does not yet exist
26
Bool_t needDelete = kFALSE;
27
if
( ! TVirtualMCApplication::Instance() ) {
28
new
VMC::ExGarfield::MCApplication
(
"ExampleExGarfield"
,
"The example ExGarfield MC application"
);
29
needDelete = kTRUE;
30
}
31
32
// MC application
33
VMC::ExGarfield::MCApplication
* appl
34
= (
VMC::ExGarfield::MCApplication
*)TVirtualMCApplication::Instance();
35
appl->
InitMC
(configMacro);
36
37
// visualization setting
38
// set_vis();
39
40
appl->
RunMC
(5);
41
42
if
( needDelete )
delete
appl;
43
}
18
void
test_ExGarfield
(
const
TString& configMacro) {
…
}
VMC::ExGarfield::MCApplication
Implementation of the TVirtualMCApplication.
Definition
MCApplication.h:48
VMC::ExGarfield::MCApplication::InitMC
void InitMC(const char *setup)
Definition
MCApplication.cxx:153
VMC::ExGarfield::MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
MCApplication.cxx:191
test_ExGarfield
void test_ExGarfield(const TString &configMacro)
Definition
test_ExGarfield.C:18
Generated on Tue Apr 1 2025 13:04:57 for VMC Examples by
1.13.2