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

Macro for running Example A01 with Geant3. More...

#include "set_g3_vis.C"
Include dependency graph for run_g3.C:

Go to the source code of this file.

Functions

void run_g3 (const TString &configMacro="g3tgeoConfig.C")
 

Detailed Description

Macro for running Example A01 with Geant3.

Definition in file run_g3.C.

Function Documentation

◆ run_g3()

void run_g3 ( const TString & configMacro = "g3tgeoConfig.C")

Macro function for running Example A01 with Geant3 from Root interactive session Note that since Root 6 the libraries have to be loaded first via load_g4.C.

Parameters
configMacroconfiguration macro name, default E03/g3Config.C

Definition at line 16 of file run_g3.C.

17{
18/// Macro function for running Example A01 with Geant3 from
19/// Root interactive session
20/// Note that since Root 6 the libraries have to be loaded first
21/// via load_g4.C.
22/// \param configMacro configuration macro name, default \ref E03/g3Config.C
23
24 // MC application
26 = new A01MCApplication("ExampleA01", "The exampleA01 MC application");
27 appl->GetPrimaryGenerator()->SetRandomize(false);
28 appl->SetWriteStack(true);
29 appl->SetWriteHits(true);
30
31 appl->InitMC(configMacro);
32
33 // visualization setting
34 set_g3_vis();
35
36 TStopwatch timer;
37 timer.Start();
38 appl->RunMC(5);
39 timer.Stop();
40 timer.Print();
41
42 delete appl;
43}
void set_g3_vis()
Definition set_g3_vis.C:15
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 SetRandomize(Bool_t val)