// AliRun with this g4Config.C
//
// aliroot
-// root [0] gAlice->Init("g4Config.C");
-// root [1] gAlice->Run();
+// root [0] AliSimulation sim("$ALICE_ROOT/macros/g4Config.C");
+// root [1] .... customize your simulation setting here
+// root [1] sim.Run(10);
//
// You can also start from a mini GUI - g4menu.C.
// See description in this macro.
+//
+// By I. Hrivnacova, IPN Orsay
void Config()
{
- // =============================
- // Geant4
- // =============================
+ cout << "Running g4Config.C ... " << endl;
+
+ // AliRoot setup
+ //
+ gROOT->LoadMacro("$ALICE_ROOT/macros/g4ConfigCommon1.C");
+ ConfigCommon1();
// Load Geant4 + Geant4 VMC libraries
//
// Create Geant4 VMC
//
- if (!gMC) {
-
+ TGeant4 *geant4 = 0;
+ if ( ! gMC ) {
TG4RunConfiguration* runConfiguration
- = new TG4RunConfiguration(true);
-
- TGeant4* geant4
- = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
+ = new TG4RunConfiguration("geomRoot",
+ "QGSP_BERT_EMV+optical",
+ "specialCuts+stackPopper+stepLimiter",
+ true);
+// = new TG4RunConfiguration("geomRootToGeant4",
+// "emStandard+optical",
+// "specialCuts+specialControls+stackPopper+stepLimiter",
+// true);
+
+ geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
cout << "Geant4 has been created." << endl;
- }
- else
+ }
+ else {
cout << "Monte Carlo has been already created." << endl;
-
- // Switch on special cuts process
- geant4->ProcessGeantCommand("/mcPhysics/setSpecialCuts true");
+ }
- // =============================
- // AliRoot setup
- // =============================
+ // Customization of Geant4 VMC
+ //
+
+ geant4->ProcessGeantCommand("/mcPhysics/rangeCuts 0.01 mm");
+ geant4->ProcessGeantCommand("/mcVerbose/all 1");
+
+ // Uncomment this line to get a detail info from each step
+ //geant4->ProcessGeantCommand("/tracking/verbose 1");
+
+ // More info from the physics list
+ // the verbosity level is passed to all contained physics lists and their
+ // physics builders
+ //geant4->ProcessGeantCommand("/mcVerbose/composedPhysicsList 2");
+
+ // More info from optical processes
+ //geant4->ProcessGeantCommand("/mcVerbose/opticalPhysicsList 3");
+
+ // More info from geometry building
+ //geant4->ProcessGeantCommand("/mcVerbose/geometryManager 1");
+
+ // More info from setting geometry properties (in materials and surfaces)
+ // for optical physics
+ //geant4->ProcessGeantCommand("/mcVerbose/opGeometryManager 1");
+
+ // More info about regions construction
+ // and conversion of VMC cuts in cuts in range per regions
+ //geant4->ProcessGeantCommand("/mcVerbose/regionsManager 2");
+
+ // Suppress verbose info from tracks which reached maximum number of steps
+ // (default value is 30000)
+ geant4->ProcessGeantCommand("/mcTracking/loopVerbose 0");
+
+ // AliRoot event generator
+ // (it has to be created after MC, as it may use decayer via VMC)
+ //
+ gROOT->LoadMacro("$ALICE_ROOT/macros/g4ConfigCommon2.C");
+ ConfigCommon2();
- gROOT->LoadMacro("g4ConfigCommon.C");
- ConfigCommon(false);
+ cout << "Running g4Config.C finished ... " << endl;
}