3 // Root macro that runs G4 test macro (alirunN.in) specified by macroName.
5 // alirun0.in - standard AliRoot run - all detectors, AliRoot event generator
6 // alirun1.in - interactive particle gun, event visualization - TPC
7 // alirun2.in - lego run - TRD
8 // alirun3.in - geometry test - all detectors (excluded MANY)");
9 // alirun4.in - geometry browser - FRAME;
11 void ag4test(const char* macroName)
13 // Load Geant4 + Geant4 VMC libraries
15 if (!gInterpreter->IsLoaded("$ALICE/geant4_vmc/examples/macro/g4libs.C"))
16 gROOT->LoadMacro("$ALICE/geant4_vmc/examples/macro/g4libs.C");
19 // Load AliGeant4 library
21 gSystem->Load("libAliGeant4.so");
23 // Create AliGeant4 VMC
27 // AliRoot run configuration for Geant4
28 AliRunConfiguration* runConfiguration
29 = new AliRunConfiguration();
33 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
35 cout << "Geant4 has been created." << endl;
38 cout << "Monte Carlo has been already created." << endl;
42 ((TGeant4*)gMC)->ProcessGeantMacro(macroName);