VMC Examples Version 6.8
Loading...
Searching...
No Matches
test_E03_8.C
Go to the documentation of this file.
1//------------------------------------------------
2// The Virtual Monte Carlo examples
3// Copyright (C) 2007 - 2026 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_8.C
12/// \brief Example E03 test macro 8
13///
14/// Test CurrentVolOffID/Name with nested TGeo assemblies.
15
16void test_E03_8(const TString& configMacro = "g4tgeoConfig.C", Bool_t oldGeometry = false)
17{
18 /// Macro function for testing assembly levels in example E03a.
19 /// \param configMacro configuration macro loaded in initialization
20 /// \param oldGeometry must be false; assemblies require TGeo geometry
21
22 // Create application if it does not yet exist
23 Bool_t needDelete = kFALSE;
24 if (!TVirtualMCApplication::Instance()) {
25 new Ex03MCApplication("Example03", "The example03 MC application");
26 needDelete = kTRUE;
27 }
28
29 Ex03MCApplication* appl =
30 (Ex03MCApplication*)TVirtualMCApplication::Instance();
32 appl->SetPrintModulo(1);
33 appl->SetOldGeometry(oldGeometry);
35
36 appl->InitMC(configMacro);
37 appl->RunMC(1);
38
39 if (needDelete) delete appl;
40}
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Ex03DetectorConstruction * GetDetectorConstruction() const
void SetPrintModulo(Int_t value)
Ex03PrimaryGenerator * GetPrimaryGenerator() const
void SetNofPrimaries(Int_t nofPrimaries)
void test_E03_8(const TString &configMacro="g4tgeoConfig.C", Bool_t oldGeometry=false)
Definition test_E03_8.C:16