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

Example TR Test macro. More...

Go to the source code of this file.

Functions

void test_TR (const TString &configMacro)
 

Detailed Description

Example TR Test macro.

Running Example TR

Definition in file test_TR.C.

Function Documentation

◆ test_TR()

void test_TR ( const TString & configMacro)

Macro function for testing example TR

Parameters
configMacroconfiguration macro loaded in initialization

Run 5000 events and print the Mean energy deposit in absorber.

Definition at line 18 of file test_TR.C.

19{
20/// Macro function for testing example TR
21/// \param configMacro configuration macro loaded in initialization
22///
23/// Run 5000 events and print the Mean energy deposit in absorber.
24
25 // Create application if it does not yet exist
26 Bool_t needDelete = kFALSE;
27 if ( ! TVirtualMCApplication::Instance() ) {
28 new VMC::TR::MCApplication("ExampleTR", "The exampleTR MC application");
29 needDelete = kTRUE;
30 }
31
32 // MC application
34 = (VMC::TR::MCApplication*)TVirtualMCApplication::Instance();
36 appl->SetPrintModulo(10000);
37 appl->InitMC(configMacro);
38
39 // visualization setting
40 // set_vis();
41
42 appl->RunMC(5000);
43
44 if ( needDelete ) delete appl;
45}
Implementation of the TVirtualMCApplication.
PrimaryGenerator * GetPrimaryGenerator() const
void SetPrintModulo(Int_t value)
void RunMC(Int_t nofEvents)
void InitMC(const char *setup)
void SetNofPrimaries(Int_t nofPrimaries)