15\mainpage The VMC examples
18\section exa_s1 Introduction
20 To demonstrate use of VirtualMC, several Geant4 examples and one
21 Garfield example have been rewritten as VMC applications:
22 \ref E01, \ref E02, \ref E03, \ref E06, \ref A01, \ref ExGarfield, \ref Gflash, \ref Monopole, \ref TR.
24 The correspondence with the examples in Geant4 (since 10.00.x) is:
28 - E06 - extended/optical/OpNovice
30 - \ref Gflash - extended/parameterisation/gflash
31 - \ref Monopole - extended/exoticphysics/monopole
32 - \ref TR - extended/electromagnetic/TestEm10
34 In previous versions of Geant4 (up to 9.6), these examples
35 were provided as novice (N01, N02, N03, N06) and extended
36 (A01, gflash, TestEm10) examples.
37 See more detail description in the README files
38 within each example subdirectory:
44 - \ref README_ExGarfield
46 - \ref README_Monopole
49\section exa_s2 Geometry definition
51 The VirtualMC defines since beginning the methods for geometry
52 construction in the Geant3 style (the functions have the same names and
53 the same parameters sequence as the functions in Geant3).
54 This made the transition from a Geant3 application to VMC easier.
56 Since the integration of the TGeo geometry modeller,
57 users have a possibility to define geometry directly via TGeo,
58 with more user-friendly interfaces.
60 All VMC examples define by default geometry via TGeo (since
61 Geant4 VMC version 2.0).
62 The equivalent geometry definition via TVirtualMC
63 interface can be activated by setting the option "oldGeometry"
64 to the MC application (via Ex0NMCApplication::SetOldGeometry(kTRUE)).
66\section exa_s3 Macros for running examples
68 In all examples there are provides macros:
70run_g3.C - for running the example with Geant3
71run_g4.C - for running the example with Geant4
74 Since Geant4 VMC 3.0 loading of libraries was separated from run_g3[g4].C
77load_g3.C - loading all libraries needed to run the example with Geant3
78load_g4.C - loading all libraries needed to run the example with Geant4
81\section exa_s4 Configuration macros:
83 The selection of the concrete MC, geometry navigation
84 and eventually other options is done in the configuration
86 The following configuration macros are provided with
89g3Config.C - for G3 with native geometry
90g3tgeoConfig.C - for G3 with TGeo geometry (default)
92g4Config.C - for G4 with native geometry navigation (default)
93g4tgeoConfig.C - for G4 with TGeo geometry navigation
94xyzOld.C - the same as above but for geometry defined via VMC
96g4config.in - macro for G4 configuration using G4 commands
97g4vis.in - macro for G4 visualization settings
100\section exa_s5 To run an example:
110With G4 + TGeo navigation:
112root[1] .x run_g4.C("g4tgeoConfig.C");
115\section exa_s6 Test macros:
117 To test all possible configurations, a test macro (or a set of macros)
118 is provided for each example:
120test_EN.C(const TString& configMacro, Bool_t oldGeometry)
123 - configMacro: configuration macro loaded in initialization
124 - oldGeometry: if true - geometry is defined via VMC, otherwise via TGeo
126 The tests with all configurations can be run via the test suite:
130 which saves all test outputs in the files which names correspond
131 to test run configuration:
133test_g3_tgeo_tgeo.out - G3, geometry defined via TGeo, TGeo navigation
134test_g3_vmc_nat.out - G3, geometry defined via VMC, G3 native navigation
135test_g3_vmc_tgeo.out - G3, geometry defined via VMC, TGeo navigation
136test_g4_tgeo_nat.out - G4, geometry defined via TGeo, G4 native navigation
137test_g4_tgeo_tgeo.out - G4, geometry defined via TGeo, TGeo navigation
138test_g4_vmc_nat.out - G4, geometry defined via VMC, G4 native navigation
139test_g4_vmc_tgeo.out - G4, geometry defined via VMC, TGeo navigation
141 The files are saved in log/E0N directory.
142 The reference output files, which are updated with each release,
143 can be found at log_ref directory.
145 All run_*.C macros can be run via run suite script:
149 which saves all output in run_*.out files.