1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
20 /// \brief Configuration macro for MUON spectrometer Geant4 simulation
22 /// \author I. Hrivnacova, IPN Orsay
26 cout << "Running g4Config.C ... " << endl;
30 gROOT->LoadMacro("$ALICE_ROOT/MUON/commonConfig.C");
33 // Load Geant4 + Geant4 VMC libraries
35 if (gClassTable->GetID("TGeant4") == -1) {
36 // Load Geant4 libraries
37 if (!gInterpreter->IsLoaded("$ALICE/geant4_vmc/examples/macro/g4libs.C")) {
38 gROOT->LoadMacro("$ALICE/geant4_vmc/examples/macro/g4libs.C");
39 gInterpreter->ProcessLine("g4libs()");
47 TG4RunConfiguration* runConfiguration
48 = new TG4RunConfiguration("geomRoot",
50 "specialCuts+stepLimiter",
53 geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
54 cout << "Geant4 has been created." << endl;
57 cout << "Monte Carlo has been already created." << endl;
60 // Customization of Geant4 VMC
63 geant4->ProcessGeantCommand("/mcPhysics/rangeCuts 0.01 mm");
64 geant4->ProcessGeantCommand("/mcVerbose/all 1");
65 geant4->ProcessGeantCommand("/mcTracking/loopVerbose 0");
66 geant4->ProcessGeantCommand("/mcTracking/skipNeutrino true");
68 // Uncomment these lines when running with G4 native navigation
70 //geant4->ProcessGeantCommand("/vgm/setNameSeparator /");
71 //geant4->ProcessGeantCommand("/mcControl/accountAssemblies true");
73 // Uncomment this line to get a detail info from each step
74 // geant4->ProcessGeantCommand("/tracking/verbose 1");
76 // More info from the physics list
77 // the verbosity level is passed to all contained physics lists and their
79 //geant4->ProcessGeantCommand("/mcVerbose/composedPhysicsList 2");
81 // More info from optical processes
82 //geant4->ProcessGeantCommand("/mcVerbose/opticalPhysicsList 3");
84 // More info from geometry building
85 //geant4->ProcessGeantCommand("/mcVerbose/geometryManager 2");
87 // More info from setting geometry properties (in materials and surfaces)
88 // for optical physics
89 //geant4->ProcessGeantCommand("/mcVerbose/opGeometryManager 1");
91 // More info about regions construction
92 // and conversion of VMC cuts in cuts in range per regions
93 // geant4->ProcessGeantCommand("/mcVerbose/regionsManager 2");
95 // Suppress verbose info from tracks which reached maximum number of steps
96 // (default value is 30000)
97 //geant4->ProcessGeantCommand("/mcTracking/loopVerbose 0");
99 // AliRoot event generator
100 // (it has to be created after MC, as it may use decayer via VMC)
102 gROOT->LoadMacro("$ALICE_ROOT/MUON/genTestConfig.C");
105 // From external file
107 //gROOT->LoadMacro("$ALICE_ROOT/MUON/genExtFileConfig.C");
110 cout << "Running g4Config.C finished ... " << endl;