VMC Examples Version 6.8
Loading...
Searching...
No Matches
run_g4_ttree.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 E03
11/// \file E03/run_g4_ttree.C
12/// \brief Macro for running Example03d with Geant4
13/// with kTTree output mode
14
15#include "set_g4_vis.C"
16
17void run_g4_ttree(const TString& configMacro = "g4tgeoConfig.C")
18{
19/// Macro function for running Example03 with Geant4 from
20/// Root interactive session
21/// Note that since Root 6 the libraries have to be loaded first
22/// via load_g4.C.
23/// \param configMacro configuration macro name, default \ref E03/g4Config.C
24
25 // MC application
27 = new Ex03dMCApplication("Example03", "The example03 MC application");
29 appl->SetPrintModulo(100);
30
31 appl->InitMC(configMacro, TMCRootManager::kTTree);
32
33 // Visualization setting
34 //set_g4_vis();
35
36 // Enter in Geant4 interactive session
37 //((TGeant4*)gMC)->StartGeantUI();
38
39 appl->RunMC(1000);
40
41 delete appl;
42}
Macro for setting G4 visualization for Example03.
void SetNofPrimaries(Int_t nofPrimaries)
Implementation of the TVirtualMCApplication.
void RunMC(Int_t nofEvents)
Ex03PrimaryGenerator * GetPrimaryGenerator() const
void InitMC(const char *setup, TMCRootManager::StorageMode storageMode=TMCRootManager::kRNTuple)
void SetPrintModulo(Int_t value)
void run_g4_ttree(const TString &configMacro="g4tgeoConfig.C")