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

Example E02 Test macro. More...

Go to the source code of this file.

Functions

void test_E02 (const TString &configMacro, Bool_t oldGeometry)
 

Detailed Description

Example E02 Test macro.

Running Example02

Definition in file test_E02.C.

Function Documentation

◆ test_E02()

void test_E02 ( const TString & configMacro,
Bool_t oldGeometry )

Macro function for testing example E02

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

Definition at line 16 of file test_E02.C.

17{
18/// Macro function for testing example E02
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 Ex02MCApplication("Example02", "The example02 MC application");
27 needDelete = kTRUE;
28 }
29
30 // MC application
32 = (Ex02MCApplication*)TVirtualMCApplication::Instance();
33
34 // Set geometry defined via VMC
35 appl->SetOldGeometry(oldGeometry);
36
37 // Initialize MC
38 appl->InitMC(configMacro);
39
40 // Run MC
41 appl->RunMC(5);
42
43 if ( needDelete ) delete appl;
44}
Implementation of the TVirtualMCApplication.
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
void RunMC(Int_t nofEvents)
void InitMC(const char *setup)