VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E01
test_E01.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_E01.C
12
/// \brief Example E01 test macro
13
///
14
/// Running Example E01 and testing VMC geometry getters
15
16
void
test_E01
(
const
TString& configMacro, Bool_t oldGeometry)
17
{
18
/// Macro function for testing example E01
19
/// \param configMacro configuration macro loaded in initialization
20
/// \param oldGeometry if true - geometry is defined via VMC, otherwise
21
/// via TGeo
22
23
// Create application if it does not yet exist
24
Bool_t needDelete = kFALSE;
25
if
( ! TVirtualMCApplication::Instance() ) {
26
new
Ex01MCApplication
(
"Example01"
,
"The example01 MC application"
);
27
needDelete = kTRUE;
28
}
29
30
// Set geometry defined via VMC
31
Ex01MCApplication
* appl
32
= (
Ex01MCApplication
*)TVirtualMCApplication::Instance();
33
appl->
SetOldGeometry
(oldGeometry);
34
35
// Initialize MC
36
appl->
InitMC
(configMacro);
37
38
// Run MC
39
appl->
RunMC
(1);
40
41
// Test VMC geometry getters
42
appl->
TestVMCGeometryGetters
();
43
44
if
( needDelete )
delete
appl;
45
}
Ex01MCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex01MCApplication.h:32
Ex01MCApplication::TestVMCGeometryGetters
void TestVMCGeometryGetters()
Definition
Ex01MCApplication.cxx:436
Ex01MCApplication::InitMC
void InitMC(const char *setup)
Definition
Ex01MCApplication.cxx:222
Ex01MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex01MCApplication.cxx:244
Ex01MCApplication::SetOldGeometry
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Definition
Ex01MCApplication.h:87
test_E01
void test_E01(const TString &configMacro, Bool_t oldGeometry)
Definition
test_E01.C:16
Generated on
for VMC Examples by
1.17.0