VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
ExGarfield
run_g4.C
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2007 - 2016 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 ExGarfield
11
/// \file ExGarfield/run_g4.C
12
/// \brief Macro for running Example ExGarfield with Geant4.
13
14
#include "TVirtualMC.h"
15
16
#include "
set_g4_vis.C
"
17
18
void
run_g4
(
const
TString& configMacro =
"g4Config.C"
)
19
{
20
/// Macro function for running Example ExGarfield with Geant4 from
21
/// Root interactive session
22
/// Note that since Root 6 the libraries have to be loaded first
23
/// via load_g4.C.
24
/// \param configMacro configuration macro name, default \ref ExGarfield/g4Config.C
25
26
// MC application
27
VMC::ExGarfield::MCApplication
* appl
28
=
new
VMC::ExGarfield::MCApplication
(
"ExampleExGarfield"
,
"The example ExGarfield MC application"
);
29
appl->
InitMC
(configMacro);
30
31
// Customise Geant4 setting after initialization:
32
((TGeant4*)gMC)->ProcessGeantMacro(
"g4config2.in"
);
33
34
// Visualization setting
35
set_g4_vis
();
36
37
// Enter in Geant4 interactive session
38
//((TGeant4*)gMC)->StartGeantUI();
39
40
appl->
RunMC
(5);
41
42
//delete appl;
43
}
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 ExGarfield example.
VMC::ExGarfield::MCApplication
Implementation of the TVirtualMCApplication.
Definition
MCApplication.h:48
VMC::ExGarfield::MCApplication::InitMC
void InitMC(const char *setup)
Definition
MCApplication.cxx:153
VMC::ExGarfield::MCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
MCApplication.cxx:191
Generated on
for VMC Examples by
1.17.0