VMC Examples
Version 6.6
Loading...
Searching...
No Matches
examples
E02
test_E02.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_E02.C
12
/// \brief Example E02 Test macro
13
///
14
/// Running Example02
15
16
void
test_E02
(
const
TString& configMacro, Bool_t oldGeometry)
17
{
18
/// Macro function for testing example E02
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
Ex02MCApplication
(
"Example02"
,
"The example02 MC application"
);
27
needDelete = kTRUE;
28
}
29
30
// MC application
31
Ex02MCApplication
* appl
32
= (
Ex02MCApplication
*)TVirtualMCApplication::Instance();
33
34
// Set geometry defined via VMC
35
appl->
SetOldGeometry
(oldGeometry);
36
37
// Initialize MC
38
appl->
InitMC
(configMacro);
39
40
// Run MC
41
appl->
RunMC
(5);
42
43
if
( needDelete )
delete
appl;
44
}
Ex02MCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex02MCApplication.h:38
Ex02MCApplication::SetOldGeometry
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Definition
Ex02MCApplication.h:89
Ex02MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex02MCApplication.cxx:181
Ex02MCApplication::InitMC
void InitMC(const char *setup)
Definition
Ex02MCApplication.cxx:141
test_E02
void test_E02(const TString &configMacro, Bool_t oldGeometry)
Definition
test_E02.C:16
Generated on Thu Oct 17 2024 08:29:51 for VMC Examples by
1.12.0