VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
A01
run_g3.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 A01
11
/// \file A01/run_g3.C
12
/// \brief Macro for running Example A01 with Geant3
13
14
#include "
set_g3_vis.C
"
15
16
void
run_g3
(
const
TString& configMacro =
"g3tgeoConfig.C"
)
17
{
18
/// Macro function for running Example A01 with Geant3 from
19
/// Root interactive session
20
/// Note that since Root 6 the libraries have to be loaded first
21
/// via load_g4.C.
22
/// \param configMacro configuration macro name, default \ref E03/g3Config.C
23
24
// MC application
25
A01MCApplication
* appl
26
=
new
A01MCApplication
(
"ExampleA01"
,
"The exampleA01 MC application"
);
27
appl->
GetPrimaryGenerator
()->
SetRandomize
(
false
);
28
appl->
SetWriteStack
(
true
);
29
appl->
SetWriteHits
(
true
);
30
31
appl->
InitMC
(configMacro);
32
33
// visualization setting
34
set_g3_vis
();
35
36
TStopwatch timer;
37
timer.Start();
38
appl->
RunMC
(5);
39
timer.Stop();
40
timer.Print();
41
42
delete
appl;
43
}
run_g3
void run_g3(const TString &configMacro="g3tgeoConfig.C")
Definition
run_g3.C:16
set_g3_vis.C
Macro for setting G3 visualization for Example A01.
set_g3_vis
void set_g3_vis()
Definition
set_g3_vis.C:15
A01MCApplication
Implementation of the TVirtualMCApplication.
Definition
A01MCApplication.h:43
A01MCApplication::SetWriteHits
void SetWriteHits(Bool_t writeHits)
Definition
A01MCApplication.cxx:493
A01MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
A01MCApplication.cxx:249
A01MCApplication::SetWriteStack
void SetWriteStack(Bool_t writeStack)
Definition
A01MCApplication.h:121
A01MCApplication::GetPrimaryGenerator
A01PrimaryGenerator * GetPrimaryGenerator() const
Definition
A01MCApplication.h:146
A01MCApplication::InitMC
void InitMC(const char *setup)
Definition
A01MCApplication.cxx:207
A01PrimaryGenerator::SetRandomize
void SetRandomize(Bool_t val)
Definition
A01PrimaryGenerator.h:50
Generated on
for VMC Examples by
1.17.0