142#ifdef G4MULTITHREADED
143 ROOT::EnableThreadSafety();
150 std::string g4Geometry =
"geomRootToGeant4";
151 std::string g4PhysicsList =
"FTFP_BERT";
152 std::string g4SpecialPhysics =
"stepLimiter+gflash";
153 std::string g4Macro =
"g4config.in";
154 std::string g4VisMacro =
"g4vis.in";
155 std::string g4Session =
"";
158 std::string g3Geometry =
"TGeant3TGeo";
163 for (Int_t i = 1; i < argc; i = i + 2) {
164 std::cout <<
"processing " << argv[i] <<
" with " << argv[i + 1]
167 if (std::string(argv[i]) ==
"--g4-geometry" ||
168 std::string(argv[i]) ==
"-g4g")
169 g4Geometry = argv[i + 1];
170 else if (std::string(argv[i]) ==
"--g4-physics-list" ||
171 std::string(argv[i]) ==
"-g4pl")
172 g4PhysicsList = argv[i + 1];
173 else if (std::string(argv[i]) ==
"--g4-special-physics" ||
174 std::string(argv[i]) ==
"-g4sp")
175 g4SpecialPhysics = argv[i + 1];
176 else if (std::string(argv[i]) ==
"--g4-macro" ||
177 std::string(argv[i]) ==
"-g4m")
178 g4Macro = argv[i + 1];
179 else if (std::string(argv[i]) ==
"--g4-vis-macro" ||
180 std::string(argv[i]) ==
"-g4vm")
181 g4VisMacro = argv[i + 1];
182 else if (std::string(argv[i]) ==
"--g4-session" ||
183 std::string(argv[i]) ==
"-g4s")
184 g4Session = argv[i + 1];
187 if (std::string(argv[i]) ==
"--g3-geometry" ||
188 std::string(argv[i]) ==
"-g3g")
189 g3Geometry = argv[i + 1];
191 else if (std::string(argv[i]) ==
"--root-macro" ||
192 std::string(argv[i]) ==
"-rm")
194 else if (std::string(argv[i]) ==
"--verbose" ||
195 std::string(argv[i]) ==
"-v")
198 PrintUsage(
"testGflash");
205 PrintG4Configuration(
"testGflash", g4Geometry, g4PhysicsList,
206 g4SpecialPhysics, g4Macro, g4VisMacro, g4Session,
rootMacro);
209 PrintG3Configuration(
"testGflash", g3Geometry,
rootMacro);
217 "ExampleGflash",
"The exampleGflash MC application");
222 g4Geometry, g4PhysicsList, g4SpecialPhysics,
false,
false);
225 TGeant4* geant4 =
new TGeant4(
226 "TGeant4",
"The Geant4 Monte Carlo", runConfiguration, argc, argv);
230 if (g4Macro.size()) {
231 geant4->ProcessGeantMacro(g4Macro.data());
236 if (g3Geometry ==
"TGeant3") {
237 new TGeant3(
"C++ Interface to Geant3");
239 else if (g3Geometry ==
"TGeant3TGeo") {
240 new TGeant3TGeo(
"C++ Interface to Geant3");
243 PrintUsage(
"testGflash");
253 if (g4VisMacro.size()) {
254 geant4->ProcessGeantMacro(g4VisMacro.data());