VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
test_E03_7.C
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2007 - 2019 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_7.C
12
/// \brief Example E03 Test macro 6
13
///
14
/// Running Example03
15
16
void
test_E03_7
(
const
TString& configMacro =
"g4Config6.C"
, Bool_t oldGeometry = kFALSE)
17
{
18
/// Macro function for testing example E03
19
/// \param configMacro configuration macro loaded in initialization
20
/// (g4Config6.C or g4tgeoConfig6.C)
21
/// \param oldGeometry if true - geometry is defined via VMC, otherwise
22
/// via TGeo
23
///
24
/// Test special biasing operation which activates the INCXX physics in selected
25
/// media.
26
27
// Create application if it does not yet exist
28
Bool_t needDelete = kFALSE;
29
if
( ! TVirtualMCApplication::Instance() ) {
30
new
Ex03MCApplication
(
"Example03"
,
"The example03 MC application"
);
31
needDelete = kTRUE;
32
}
33
34
// MC application
35
Ex03MCApplication
* appl
36
= (
Ex03MCApplication
*)TVirtualMCApplication::Instance();
37
appl->
GetPrimaryGenerator
()->
SetPrimaryType
(
Ex03PrimaryGenerator::kPion
);
38
appl->
GetPrimaryGenerator
()->
SetNofPrimaries
(1);
39
40
// Set geometry defined via VMC
41
appl->
SetOldGeometry
(oldGeometry);
42
43
appl->
InitMC
(configMacro);
44
45
// Visualization setting
46
// Activate this code to check curving of trajectories in field
47
//set_vis();
48
49
appl->
RunMC
(1);
50
51
// Inactivate this code to check curving of trajectories in field
52
if
( needDelete )
delete
appl;
53
}
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::SetOldGeometry
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Definition
Ex03MCApplication.h:149
Ex03MCApplication::GetPrimaryGenerator
Ex03PrimaryGenerator * GetPrimaryGenerator() const
Definition
Ex03MCApplication.h:142
Ex03PrimaryGenerator::SetNofPrimaries
void SetNofPrimaries(Int_t nofPrimaries)
Definition
Ex03PrimaryGenerator.h:102
Ex03PrimaryGenerator::kPion
@ kPion
pi- ith a suitable energy to test biasing
Definition
Ex03PrimaryGenerator.h:44
Ex03PrimaryGenerator::SetPrimaryType
void SetPrimaryType(Type primaryType)
Definition
Ex03PrimaryGenerator.h:94
test_E03_7
void test_E03_7(const TString &configMacro="g4Config6.C", Bool_t oldGeometry=kFALSE)
Definition
test_E03_7.C:16
Generated on
for VMC Examples by
1.17.0