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

Go to the source code of this file.

Functions

void test_E06_2 (const TString &configMacro, Bool_t oldGeometry)
 

Function Documentation

◆ test_E06_2()

void test_E06_2 ( const TString & configMacro,
Bool_t oldGeometry )

Macro function for testing example E06

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

Stack popper test.

Definition at line 14 of file test_E06_2.C.

15{
16/// Macro function for testing example E06
17/// \param configMacro configuration macro loaded in initialization
18/// \param oldGeometry if true - geometry is defined via VMC, otherwise
19/// via TGeo
20///
21/// Stack popper test.
22
23
24 // Create application if it does not yet exist
25 Bool_t needDelete = kFALSE;
26 if ( ! TVirtualMCApplication::Instance() ) {
27 new Ex06MCApplication("Example06", "The example06 MC application");
28 needDelete = kTRUE;
29 }
30
31 // MC application
33 = (Ex06MCApplication*)TVirtualMCApplication::Instance();
35 appl->SetTestStackPopper(true);
36
37 // Set geometry defined via VMC
38 appl->SetOldGeometry(oldGeometry);
39
40
41 // Initialize MC
42 appl->InitMC(configMacro);
43
44 if ( TString(gMC->GetName()) == "TGeant4" ) {
45 // Customise Geant4 setting after initialization:
46 gROOT->LoadMacro("g4Config2.C");
47 gInterpreter->ProcessLine("g4Config2()");
48 }
49
50 // Run MC
51 appl->RunMC(10);
52
53 if ( needDelete ) delete appl;
54}
Implementation of the TVirtualMCApplication.
void RunMC(Int_t nofEvents)
void InitMC(const char *setup)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
void SetTestStackPopper(Bool_t option=kFALSE)
Ex06PrimaryGenerator * GetPrimaryGenerator() const
void SetNofPrimaries(Int_t nofPrimaries)