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

Example E03 Test macro 6. More...

Go to the source code of this file.

Functions

void test_E03_7 (const TString &configMacro="g4Config6.C", Bool_t oldGeometry=kFALSE)
 

Detailed Description

Example E03 Test macro 6.

Running Example03

Definition in file test_E03_7.C.

Function Documentation

◆ test_E03_7()

void test_E03_7 ( const TString & configMacro = "g4Config6.C",
Bool_t oldGeometry = kFALSE )

Macro function for testing example E03

Parameters
configMacroconfiguration macro loaded in initialization (g4Config6.C or g4tgeoConfig6.C)
oldGeometryif true - geometry is defined via VMC, otherwise via TGeo

Test special biasing operation which activates the INCXX physics in selected media.

Definition at line 16 of file test_E03_7.C.

17{
18/// Macro function for testing example E03
19/// \param configMacro configuration macro loaded in initialization
20/// (g4Config6.C or g4tgeoConfig6.C)
21/// \param oldGeometry if true - geometry is defined via VMC, otherwise
22/// via TGeo
23///
24/// Test special biasing operation which activates the INCXX physics in selected
25/// media.
26
27 // Create application if it does not yet exist
28 Bool_t needDelete = kFALSE;
29 if ( ! TVirtualMCApplication::Instance() ) {
30 new Ex03MCApplication("Example03", "The example03 MC application");
31 needDelete = kTRUE;
32 }
33
34 // MC application
36 = (Ex03MCApplication*)TVirtualMCApplication::Instance();
39
40 // Set geometry defined via VMC
41 appl->SetOldGeometry(oldGeometry);
42
43 appl->InitMC(configMacro);
44
45 // Visualization setting
46 // Activate this code to check curving of trajectories in field
47 //set_vis();
48
49 appl->RunMC(1);
50
51 // Inactivate this code to check curving of trajectories in field
52 if ( needDelete ) delete appl;
53}
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void SetOldGeometry(Bool_t oldGeometry=kTRUE)
Ex03PrimaryGenerator * GetPrimaryGenerator() const
void SetNofPrimaries(Int_t nofPrimaries)
@ kPion
pi- ith a suitable energy to test biasing
void SetPrimaryType(Type primaryType)