VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
run_g4.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 E03
11
/// \file E03/run_g4.C
12
/// \brief Macro for running Example03 with Geant4.
13
14
#include "
set_g4_vis.C
"
15
16
void
run_g4
(
const
TString& configMacro =
"g4Config.C"
)
17
{
18
/// Macro function for running Example03 with Geant4 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/g4Config.C
23
24
// MC application
25
Ex03MCApplication
* appl
26
=
new
Ex03MCApplication
(
"Example03"
,
"The example03 MC application"
);
27
appl->
GetPrimaryGenerator
()->
SetNofPrimaries
(20);
28
appl->
SetPrintModulo
(1);
29
30
appl->
InitMC
(configMacro);
31
32
// Visualization setting
33
set_g4_vis
();
34
35
// Enter in Geant4 interactive session
36
//((TGeant4*)gMC)->StartGeantUI();
37
38
appl->
RunMC
(5);
39
40
delete
appl;
41
}
run_g4
void run_g4(const TString &configMacro="g4Config.C")
Definition
run_g4.C:16
set_g4_vis
void set_g4_vis()
Definition
set_g4_vis.C:15
set_g4_vis.C
Macro for setting G4 visualization for Example03.
Ex03MCApplication
Ex03bMCApplication Ex03MCApplication
Definition
Ex03bMCApplication.h:111
Ex03MCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex03MCApplication.h:40
Ex03MCApplication::InitMC
void InitMC(const char *setup)
Definition
Ex03MCApplication.cxx:175
Ex03MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex03MCApplication.cxx:214
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
Generated on
for VMC Examples by
1.17.0