VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
test_E03_5.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_E03_5.C
12
/// \brief Example E03 Test macro 5
13
///
14
/// Running Example03
15
16
void
test_E03_5
(
const
TString& configMacro =
"g4Config4.C"
, Bool_t oldGeometry = kFALSE)
17
{
18
/// Macro function for testing example E03
19
/// \param configMacro configuration macro loaded in initialization
20
/// \param oldGeometry if true - geometry is defined via VMC, otherwise
21
/// via TGeo
22
///
23
/// Run 1 primary with specialCuts and specialControls
24
/// and verbosity level switched on.
25
26
// Create application if it does not yet exist
27
Bool_t needDelete = kFALSE;
28
if
( ! TVirtualMCApplication::Instance() ) {
29
new
Ex03MCApplication
(
"Example03"
,
"The example03 MC application"
);
30
needDelete = kTRUE;
31
}
32
33
// MC application
34
Ex03MCApplication
* appl
35
= (
Ex03MCApplication
*)TVirtualMCApplication::Instance();
36
appl->
GetPrimaryGenerator
()->
SetNofPrimaries
(1);
37
appl->
SetControls
(kTRUE);
38
appl->
SetPrintModulo
(1);
39
appl->
SetVerboseLevel
(3);
40
41
// Set geometry defined via VMC
42
appl->
SetOldGeometry
(oldGeometry);
43
44
appl->
InitMC
(configMacro);
45
46
appl->
RunMC
(1);
47
48
if
( needDelete )
delete
appl;
49
}
Ex03MCApplication
Ex03bMCApplication Ex03MCApplication
Definition
Ex03bMCApplication.h:111
Ex03MCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex03MCApplication.h:40
Ex03MCApplication::SetVerboseLevel
void SetVerboseLevel(Int_t verboseLevel)
Definition
Ex03MCApplication.h:116
Ex03MCApplication::InitMC
void InitMC(const char *setup)
Definition
Ex03MCApplication.cxx:175
Ex03MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex03MCApplication.cxx:214
Ex03MCApplication::SetControls
void SetControls(Bool_t isConstrols)
Definition
Ex03MCApplication.h:156
Ex03MCApplication::SetOldGeometry
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Definition
Ex03MCApplication.h:149
Ex03MCApplication::SetPrintModulo
void SetPrintModulo(Int_t value)
Definition
Ex03MCApplication.h:109
Ex03MCApplication::GetPrimaryGenerator
Ex03PrimaryGenerator * GetPrimaryGenerator() const
Definition
Ex03MCApplication.h:142
Ex03PrimaryGenerator::SetNofPrimaries
void SetNofPrimaries(Int_t nofPrimaries)
Definition
Ex03PrimaryGenerator.h:102
test_E03_5
void test_E03_5(const TString &configMacro="g4Config4.C", Bool_t oldGeometry=kFALSE)
Definition
test_E03_5.C:16
Generated on
for VMC Examples by
1.17.0