VMC Examples Version 6.6
Loading...
Searching...
No Matches
test_E01.C File Reference

Example E01 test macro. More...

Go to the source code of this file.

Functions

void test_E01 (const TString &configMacro, Bool_t oldGeometry)
 

Detailed Description

Example E01 test macro.

Running Example E01 and testing VMC geometry getters

Definition in file test_E01.C.

Function Documentation

◆ test_E01()

void test_E01 ( const TString & configMacro,
Bool_t oldGeometry )

Macro function for testing example E01

Parameters
configMacroconfiguration macro loaded in initialization
oldGeometryif true - geometry is defined via VMC, otherwise via TGeo

Definition at line 16 of file test_E01.C.

17{
18/// Macro function for testing example E01
19/// \param configMacro configuration macro loaded in initialization
20/// \param oldGeometry if true - geometry is defined via VMC, otherwise
21/// via TGeo
22
23 // Create application if it does not yet exist
24 Bool_t needDelete = kFALSE;
25 if ( ! TVirtualMCApplication::Instance() ) {
26 new Ex01MCApplication("Example01", "The example01 MC application");
27 needDelete = kTRUE;
28 }
29
30 // Set geometry defined via VMC
32 = (Ex01MCApplication*)TVirtualMCApplication::Instance();
33 appl->SetOldGeometry(oldGeometry);
34
35 // Initialize MC
36 appl->InitMC(configMacro);
37
38 // Run MC
39 appl->RunMC(1);
40
41 // Test VMC geometry getters
43
44 if ( needDelete ) delete appl;
45}
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)