VMC Examples Version 6.6
Loading...
Searching...
No Matches
test_TR.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_TR.C
12/// \brief Example TR Test macro
13///
14/// Running Example TR
15
16//#include "set_vis.C"
17
18void test_TR(const TString& configMacro)
19{
20/// Macro function for testing example TR
21/// \param configMacro configuration macro loaded in initialization
22///
23/// Run 5000 events and print the Mean energy deposit in absorber.
24
25 // Create application if it does not yet exist
26 Bool_t needDelete = kFALSE;
27 if ( ! TVirtualMCApplication::Instance() ) {
28 new VMC::TR::MCApplication("ExampleTR", "The exampleTR MC application");
29 needDelete = kTRUE;
30 }
31
32 // MC application
34 = (VMC::TR::MCApplication*)TVirtualMCApplication::Instance();
36 appl->SetPrintModulo(10000);
37 appl->InitMC(configMacro);
38
39 // visualization setting
40 // set_vis();
41
42 appl->RunMC(5000);
43
44 if ( needDelete ) delete appl;
45}
Implementation of the TVirtualMCApplication.
PrimaryGenerator * GetPrimaryGenerator() const
void SetPrintModulo(Int_t value)
void RunMC(Int_t nofEvents)
void InitMC(const char *setup)
void SetNofPrimaries(Int_t nofPrimaries)
void test_TR(const TString &configMacro)
Definition test_TR.C:18