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

Example E03 Test macro 5. More...

Go to the source code of this file.

Functions

void test_E03_5 (const TString &configMacro="g4Config4.C", Bool_t oldGeometry=kFALSE)
 

Detailed Description

Example E03 Test macro 5.

Running Example03

Definition in file test_E03_5.C.

Function Documentation

◆ test_E03_5()

void test_E03_5 ( const TString & configMacro = "g4Config4.C",
Bool_t oldGeometry = kFALSE )

Macro function for testing example E03

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

Run 1 primary with specialCuts and specialControls and verbosity level switched on.

Definition at line 16 of file test_E03_5.C.

17{
18/// Macro function for testing example E03
19/// \param configMacro configuration macro loaded in initialization
20/// \param oldGeometry if true - geometry is defined via VMC, otherwise
21/// via TGeo
22///
23/// Run 1 primary with specialCuts and specialControls
24/// and verbosity level switched on.
25
26 // Create application if it does not yet exist
27 Bool_t needDelete = kFALSE;
28 if ( ! TVirtualMCApplication::Instance() ) {
29 new Ex03MCApplication("Example03", "The example03 MC application");
30 needDelete = kTRUE;
31 }
32
33 // MC application
35 = (Ex03MCApplication*)TVirtualMCApplication::Instance();
37 appl->SetControls(kTRUE);
38 appl->SetPrintModulo(1);
39 appl->SetVerboseLevel(3);
40
41 // Set geometry defined via VMC
42 appl->SetOldGeometry(oldGeometry);
43
44 appl->InitMC(configMacro);
45
46 appl->RunMC(1);
47
48 if ( needDelete ) delete appl;
49}
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void SetVerboseLevel(Int_t verboseLevel)
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void SetControls(Bool_t isConstrols)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
void SetPrintModulo(Int_t value)
Ex03PrimaryGenerator * GetPrimaryGenerator() const
void SetNofPrimaries(Int_t nofPrimaries)