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

Example Monopole Test macro. More...

Go to the source code of this file.

Functions

void test_Monopole (const TString &configMacro)
 

Detailed Description

Example Monopole Test macro.

Definition in file test_Monopole.C.

Function Documentation

◆ test_Monopole()

void test_Monopole ( const TString & configMacro)

Macro function for testing example Monopole

Parameters
configMacroconfiguration macro loaded in initialization

Definition at line 14 of file test_Monopole.C.

15{
16/// Macro function for testing example Monopole
17/// \param configMacro configuration macro loaded in initialization
18
19 // Create application if it does not yet exist
20 Bool_t needDelete = kFALSE;
21 if ( ! TVirtualMCApplication::Instance() ) {
22 new VMC::Monopole::MCApplication("Example06", "The example06 MC application");
23 needDelete = kTRUE;
24 }
25
26 // MC application
28 = (VMC::Monopole::MCApplication*)TVirtualMCApplication::Instance();
29
30 // Set detector parameters
31 // /testex/det/setMat G4_Si
32 // /testex/det/setSizeX 10 cm
33 // /testex/det/setSizeYZ 20 cm
34 // /testex/det/setStepSize 0.2 mm
35 // /testex/run/binSize 0.2 mm
37 detector->SetAbsorberMaterial("Si");
38 detector->SetAbsorberSizeX(10);
39 detector->SetAbsorberSizeYZ(20);
40 detector->SetMaxStepSize(0.02);
41 appl->SetBinSize(0.02);
42
43 // Initialize MC
44 appl->InitMC(configMacro);
45
46 if ( TString(gMC->GetName()) == "TGeant4" ) {
47 // Customise Geant4 setting after initialization:
48 // Physics list
49 ((TGeant4*)gMC)->ProcessGeantMacro("g4config2.in");
50 }
51
52 // Run MC
53 appl->RunMC(100);
54
55 if ( needDelete ) delete appl;
56}
The detector construction (via TGeo )
void SetAbsorberMaterial(const TString &name)
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void SetBinSize(Double_t binSize)
void RunMC(Int_t nofEvents)
DetectorConstruction * GetDetectorConstruction() const