VMC Examples Version 6.6
Loading...
Searching...
No Matches
test_E03_3.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_3.C
12/// \brief Example E03 Test macro 3
13///
14/// Running Example03
15
16//#include "set_vis.C"
17
18void test_E03_3(const TString& configMacro, Bool_t oldGeometry)
19{
20/// Macro function for testing example E03
21/// \param configMacro configuration macro loaded in initialization
22/// \param oldGeometry if true - geometry is defined via VMC, otherwise
23/// via TGeo
24///
25/// Run user defined primary particles with verbosity level switched on
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
36 = (Ex03MCApplication*)TVirtualMCApplication::Instance();
39 appl->SetPrintModulo(1);
40 appl->SetVerboseLevel(3);
41
42 // Set geometry defined via VMC
43 appl->SetOldGeometry(oldGeometry);
44
45 appl->InitMC(configMacro);
46
47 // visualization setting
48 // set_vis();
49
50 appl->RunMC(1);
51
52 if ( needDelete ) delete appl;
53}
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void SetVerboseLevel(Int_t verboseLevel)
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
void SetPrintModulo(Int_t value)
Ex03PrimaryGenerator * GetPrimaryGenerator() const
void SetNofPrimaries(Int_t nofPrimaries)
@ kUser
user defined particle and ion
void SetPrimaryType(Type primaryType)
void test_E03_3(const TString &configMacro, Bool_t oldGeometry)
Definition test_E03_3.C:18