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

Example A01 Test macro. More...

Go to the source code of this file.

Functions

void test_A01_1 (const TString &configMacro, Bool_t oldGeometry)
 

Detailed Description

Example A01 Test macro.

Running A01 example

Definition in file test_A01_1.C.

Function Documentation

◆ test_A01_1()

void test_A01_1 ( const TString & configMacro,
Bool_t oldGeometry )

Macro function for testing example A01

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

Definition at line 16 of file test_A01_1.C.

17{
18/// Macro function for testing example A01
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 A01MCApplication("ExampleA01", "The exampleA01 MC application");
27 needDelete = kTRUE;
28 }
29
30 // MC application
32 = (A01MCApplication*)TVirtualMCApplication::Instance();
34 appl->SetWriteStack(true);
35 appl->SetWriteHits(true);
36
37 appl->InitMC(configMacro);
38
39 TStopwatch timer;
40 timer.Start();
41 appl->RunMC(5);
42 timer.Stop();
43 timer.Print();
44
45 if ( needDelete ) delete appl;
46}
Implementation of the TVirtualMCApplication.
void SetWriteHits(Bool_t writeHits)
void RunMC(Int_t nofEvents)
void SetWriteStack(Bool_t writeStack)
A01PrimaryGenerator * GetPrimaryGenerator() const
void InitMC(const char *setup)
void SetNofPrimaries(Int_t nofPrimaries)