29 args[
"BEAM_P"].args =
"e-, 11*GeV, 0*deg, 0*deg";
30 args[
"BEAM_P"].help =
"Beam particle, momentum, angles (in respect of z-axis). \n";
31 args[
"BEAM_P"].help +=
" Example: -BEAM_P=\"e-, 6*GeV, 15*deg, 20*deg\" sets 6 GeV electrons 15 degrees in theta, 20 degrees in phi. \n";
32 args[
"BEAM_P"].help +=
" Use -BEAM_P=\"show_all\" to print the list of G4 supported particles.\n";
33 args[
"BEAM_P"].name =
"Beam particle, Energy, Theta, Phi";
34 args[
"BEAM_P"].type = 1;
35 args[
"BEAM_P"].ctgr =
"generator";
37 args[
"SPREAD_P"].args =
"0*GeV, 0*deg, 0*deg";
38 args[
"SPREAD_P"].help =
"Spread beam energy and angles (in respect of z-axis). \n";
39 args[
"SPREAD_P"].help +=
" Example: -SPREAD_P=\"0*GeV, 10*deg, 20*deg\" spreads 10 degrees in theta, 20 degrees in phi. \n";
40 args[
"SPREAD_P"].name =
"delta_Energy, delta_Theta, delta_phi";
41 args[
"SPREAD_P"].type = 1;
42 args[
"SPREAD_P"].ctgr =
"generator";
44 args[
"ALIGN_ZAXIS"].args =
"no";
45 args[
"ALIGN_ZAXIS"].help =
"Align z axis to a custom direction. Options:\n";
46 args[
"ALIGN_ZAXIS"].help +=
" - \"beamp\" aligns z axis to the beam directions specified by BEAM_P.\n";
47 args[
"ALIGN_ZAXIS"].help +=
" - \"custom, theta*unit, phi*unit\" aligns z axis to a custom direction, changes BEAM_P reference frame.";
48 args[
"ALIGN_ZAXIS"].name =
"Align z axis to a custom direction.";
49 args[
"ALIGN_ZAXIS"].type = 1;
50 args[
"ALIGN_ZAXIS"].ctgr =
"generator";
52 args[
"BEAM_V"].args =
"(0, 0, 0) cm";
53 args[
"BEAM_V"].help =
"Beam Vertex. Example: -BEAM_V=\"(0, 0, -20)cm\". ";
54 args[
"BEAM_V"].name =
"Beam Vertex";
55 args[
"BEAM_V"].type = 1;
56 args[
"BEAM_V"].ctgr =
"generator";
58 args[
"SPREAD_V"].args =
"(0, 0) cm";
59 args[
"SPREAD_V"].help =
"Spread Beam Radius, Z position. Example: -SPREAD_V=\"(0.1, 10)cm\". ";
60 args[
"SPREAD_V"].name =
"Vertex Spread";
61 args[
"SPREAD_V"].type = 1;
62 args[
"SPREAD_V"].ctgr =
"generator";
64 args[
"POLAR"].args =
"0, 0*deg, 0*deg";
65 args[
"POLAR"].help =
"Beam particle, polarization percentage and angles (in respect of z-axis). \n";
66 args[
"POLAR"].help +=
" Example: -POLAR=\"90, 90*deg, 270*deg\" sets 90% polarization 90 degrees in theta, 270 degrees in phi. \n";
67 args[
"POLAR"].help +=
" Use -POLAR=\"show_all\" to print the list of G4 supported particles.\n";
68 args[
"POLAR"].name =
"Beam polarization in %, Theta, Phi";
69 args[
"POLAR"].type = 1;
70 args[
"POLAR"].ctgr =
"generator";
73 args[
"N"].help =
"Number of events to be simulated.";
74 args[
"N"].name =
"Number of events to be simulated";
76 args[
"N"].ctgr =
"generator";
78 args[
"INPUT_GEN_FILE"].args =
"gemc_internal";
79 args[
"INPUT_GEN_FILE"].help =
"Generator Input. Current availables file formats:\n";
80 args[
"INPUT_GEN_FILE"].help +=
" LUND. \n";
81 args[
"INPUT_GEN_FILE"].help +=
" xample: -INPUT_GEN_FILE=\"LUND, input.dat\"\n";
82 args[
"INPUT_GEN_FILE"].name =
"Generator Input File";
83 args[
"INPUT_GEN_FILE"].type = 1;
84 args[
"INPUT_GEN_FILE"].ctgr =
"generator";
86 args[
"NGENP"].arg = 10;
87 args[
"NGENP"].help =
"Max Number of Generated Particles to save in the Output.";
88 args[
"NGENP"].name =
"Max Number of Generated Particles to save in the Output";
89 args[
"NGENP"].type = 0;
90 args[
"NGENP"].ctgr =
"generator";
101 args[
"LUMI_P"].args =
"e-, 11*GeV, 0*deg, 0*deg";
102 args[
"LUMI_P"].help =
"Luminosity Beam particle, momentum, angles (in respect of z-axis). \n";
103 args[
"LUMI_P"].help +=
" Example: -LUMI_P=\"proton, 1*GeV, 25*deg, 2*deg\" sets 1 GeV protons, 25 degrees in theta, 2 degrees in phi. \n";
104 args[
"LUMI_P"].help +=
" Use -LUMI_P=\"show_all\" to print the list of G4 supported particles.\n";
105 args[
"LUMI_P"].name =
"Luminosity Beam particle, Energy, Theta, Phi";
106 args[
"LUMI_P"].type = 1;
107 args[
"LUMI_P"].ctgr =
"luminosity";
109 args[
"LUMI_V"].args =
"(0, 0, -20) cm";
110 args[
"LUMI_V"].help =
"Luminosity Beam Vertex. Example: -LUMI_V=\"(0, 0, -20)cm\". ";
111 args[
"LUMI_V"].name =
"Luminosity Beam Vertex";
112 args[
"LUMI_V"].type = 1;
113 args[
"LUMI_V"].ctgr =
"luminosity";
115 args[
"LUMI_SPREAD_V"].args =
"(0, 0) cm";
116 args[
"LUMI_SPREAD_V"].help =
"Spread Luminosity Beam Radius, Z position. Example: -SPREAD_V=\"(0.1, 10)cm\". ";
117 args[
"LUMI_SPREAD_V"].name =
"Luminosity Beam Vertex Spread";
118 args[
"LUMI_SPREAD_V"].type = 1;
119 args[
"LUMI_SPREAD_V"].ctgr =
"luminosity";
121 args[
"LUMI_EVENT"].args =
"0, 0*ns, 2*ns";
122 args[
"LUMI_EVENT"].help =
"Luminosity Beam Parameters: number of Particles/Event, Time Window, Time Between Bunches\n";
123 args[
"LUMI_EVENT"].help +=
" Example: -LUMI_EVENT=\"10000, 120*ns, 2*ns\" simulate 10K particles per event distributed over 120 ns, at 2ns intervals. \n";
124 args[
"LUMI_EVENT"].name =
"Luminosity Beam Parameters";
125 args[
"LUMI_EVENT"].type = 1;
126 args[
"LUMI_EVENT"].ctgr =
"luminosity";
128 args[
"LUMI2_P"].args =
"proton, 50*GeV, 175*deg, 180*deg";
129 args[
"LUMI2_P"].help =
"Luminosity Beam Particle 2, momentum, angles (in respect of z-axis). \n";
130 args[
"LUMI2_P"].help +=
" Example: -LUMI2_P=\"proton, 1*GeV, 25*deg, 2*deg\" sets 1 GeV protons, 25 degrees in theta, 2 degrees in phi. \n";
131 args[
"LUMI2_P"].help +=
" Use -LUMI2_P=\"show_all\" to print the list of G4 supported particles.\n";
132 args[
"LUMI2_P"].name =
"Luminosity Beam particle 2, Energy, Theta, Phi";
133 args[
"LUMI2_P"].type = 1;
134 args[
"LUMI2_P"].ctgr =
"luminosity";
136 args[
"LUMI2_V"].args =
"(4, 0, 50) cm";
137 args[
"LUMI2_V"].help =
"Luminosity Beam Particle 2 Vertex. Example: -LUMI2_V=\"(0, 0, -20)cm\". ";
138 args[
"LUMI2_V"].name =
"Luminosity Beam Particle 2 Vertex";
139 args[
"LUMI2_V"].type = 1;
140 args[
"LUMI2_V"].ctgr =
"luminosity";
142 args[
"LUMI2_SPREAD_V"].args =
"(0, 0) cm";
143 args[
"LUMI2_SPREAD_V"].help =
"Spread Luminosity Beam 2 Radius, Z position. Example: -SPREAD_V=\"(0.1, 10)cm\". ";
144 args[
"LUMI2_SPREAD_V"].name =
"Luminosity Beam Vertex 2 Spread";
145 args[
"LUMI2_SPREAD_V"].type = 1;
146 args[
"LUMI2_SPREAD_V"].ctgr =
"luminosity";
148 args[
"LUMI2_EVENT"].args =
"0, 2*ns";
149 args[
"LUMI2_EVENT"].help =
"Luminosity Beam 2 Parameters: number of Particles/Event, Time Between Bunches. The Time Window is specified with the LUMI_EVENT flag\n";
150 args[
"LUMI2_EVENT"].help +=
" Example: -LUMI2_EVENT=\"10000, 2*ns\" simulate 10K particles per event at 2ns intervals. \n";
151 args[
"LUMI2_EVENT"].name =
"Luminosity Beam 2 Parameters";
152 args[
"LUMI2_EVENT"].type = 1;
153 args[
"LUMI2_EVENT"].ctgr =
"luminosity";
164 args[
"DBHOST"].args =
"clasdb.jlab.org";
165 args[
"DBHOST"].help =
"Select mysql server host name.";
166 args[
"DBHOST"].name =
"Select mysql server host name";
167 args[
"DBHOST"].type = 1;
168 args[
"DBHOST"].ctgr =
"mysql";
170 args[
"DATABASE"].args =
"clas12_geometry";
171 args[
"DATABASE"].help =
"Select mysql Database.";
172 args[
"DATABASE"].name =
"Select mysql Database";
173 args[
"DATABASE"].type = 1;
174 args[
"DATABASE"].ctgr =
"mysql";
176 args[
"BANK_DATABASE"].args =
"clas12_banks";
177 args[
"BANK_DATABASE"].help =
"Select mysql Bank Database.";
178 args[
"BANK_DATABASE"].name =
"Select mysql Bank Database";
179 args[
"BANK_DATABASE"].type = 1;
180 args[
"BANK_DATABASE"].ctgr =
"mysql";
182 args[
"DBUSER"].args =
"clasuser";
183 args[
"DBUSER"].help =
"Select mysql user name";
184 args[
"DBUSER"].name =
"Select mysql user name";
185 args[
"DBUSER"].type = 1;
186 args[
"DBUSER"].ctgr =
"mysql";
188 args[
"DBPSWD"].args =
"";
189 args[
"DBPSWD"].help =
"Select mysql password";
190 args[
"DBPSWD"].name =
"Select mysql password";
191 args[
"DBPSWD"].type = 1;
192 args[
"DBPSWD"].ctgr =
"mysql";
194 args[
"GT"].args =
"no";
195 args[
"GT"].help =
"Selects Geometry table. This option is overwritten with the gemc read card.";
196 args[
"GT"].name =
"Geometry table";
198 args[
"GT"].ctgr =
"mysql";
209 args[
"G4P_VERBOSITY"].arg = 1;
210 args[
"G4P_VERBOSITY"].help =
"Controls Physical Volumes Construction Log Output.";
211 args[
"G4P_VERBOSITY"].name =
"Logical Volume Verbosity";
212 args[
"G4P_VERBOSITY"].type = 0;
213 args[
"G4P_VERBOSITY"].ctgr =
"verbosity";
215 args[
"GEO_VERBOSITY"].arg = 1;
216 args[
"GEO_VERBOSITY"].help =
"Controls Geometry Construction Log Output.";
217 args[
"GEO_VERBOSITY"].name =
"Geometry Verbosity";
218 args[
"GEO_VERBOSITY"].type = 0;
219 args[
"GEO_VERBOSITY"].ctgr =
"verbosity";
221 args[
"GUI_VERBOSITY"].arg = 1;
222 args[
"GUI_VERBOSITY"].help =
"Controls GUI Construction Log Output.";
223 args[
"GUI_VERBOSITY"].name =
"GUI Verbosity";
224 args[
"GUI_VERBOSITY"].type = 0;
225 args[
"GUI_VERBOSITY"].ctgr =
"verbosity";
227 args[
"HIT_VERBOSITY"].arg = 1;
228 args[
"HIT_VERBOSITY"].help =
"Controls Hits Log Output. ";
229 args[
"HIT_VERBOSITY"].name =
"Hit Verbosity";
230 args[
"HIT_VERBOSITY"].type = 0;
231 args[
"HIT_VERBOSITY"].ctgr =
"verbosity";
233 args[
"LOG_MSG"].args =
" >>> gemc";
234 args[
"LOG_MSG"].help =
"Log Messages Header.";
235 args[
"LOG_MSG"].name =
"Log Messages Header";
236 args[
"LOG_MSG"].type = 1;
237 args[
"LOG_MSG"].ctgr =
"verbosity";
239 args[
"CATCH"].args =
"Maurizio";
240 args[
"CATCH"].help =
"Catch volumes matching the given string.";
241 args[
"CATCH"].name =
"Volume catcher";
242 args[
"CATCH"].type = 1;
243 args[
"CATCH"].ctgr =
"verbosity";
245 args[
"MGN_VERBOSITY"].arg = 1;
246 args[
"MGN_VERBOSITY"].help =
"Controls Magnetic Fields Log Output.";
247 args[
"MGN_VERBOSITY"].name =
"Magnetic Fields Verbosity";
248 args[
"MGN_VERBOSITY"].type = 0;
249 args[
"MGN_VERBOSITY"].ctgr =
"verbosity";
251 args[
"PRINT_EVENT"].arg = 1000;
252 args[
"PRINT_EVENT"].help =
"-PRINT_EVENT=N: Print Event Number every N events.";
253 args[
"PRINT_EVENT"].name =
"Print Event Modulus";
254 args[
"PRINT_EVENT"].type = 0;
255 args[
"PRINT_EVENT"].ctgr =
"verbosity";
257 args[
"OUT_VERBOSITY"].arg = 1;
258 args[
"OUT_VERBOSITY"].help =
"Controls Bank Log Output.";
259 args[
"OUT_VERBOSITY"].name =
"Bank Output Verbosity";
260 args[
"OUT_VERBOSITY"].type = 0;
261 args[
"OUT_VERBOSITY"].ctgr =
"verbosity";
263 args[
"PHY_VERBOSITY"].arg = 1;
264 args[
"PHY_VERBOSITY"].help =
"Controls Physics List Log Output.";
265 args[
"PHY_VERBOSITY"].name =
"Physics List Verbosity";
266 args[
"PHY_VERBOSITY"].type = 0;
267 args[
"PHY_VERBOSITY"].ctgr =
"verbosity";
269 args[
"GEN_VERBOSITY"].arg = 0;
270 args[
"GEN_VERBOSITY"].help =
"Controls Geant4 Generator Verbosity.";
271 args[
"GEN_VERBOSITY"].name =
"Geant4 Generator Verbosity";
272 args[
"GEN_VERBOSITY"].type = 0;
273 args[
"GEN_VERBOSITY"].ctgr =
"verbosity";
275 args[
"G4TRACK_VERBOSITY"].arg = 0;
276 args[
"G4TRACK_VERBOSITY"].help =
"Controls Geant4 Track Verbosity.";
277 args[
"G4TRACK_VERBOSITY"].name =
"Geant4 Track Verbosity";
278 args[
"G4TRACK_VERBOSITY"].type = 0;
279 args[
"G4TRACK_VERBOSITY"].ctgr =
"verbosity";
281 args[
"MATERIAL_VERBOSITY"].arg = 0;
282 args[
"MATERIAL_VERBOSITY"].help =
"Controls Geant4 Material Verbosity.";
283 args[
"MATERIAL_VERBOSITY"].name =
"Geant4 Material Verbosity";
284 args[
"MATERIAL_VERBOSITY"].type = 0;
285 args[
"MATERIAL_VERBOSITY"].ctgr =
"verbosity";
287 args[
"PARAMETER_VERBOSITY"].arg = 0;
288 args[
"PARAMETER_VERBOSITY"].help =
"Controls Parameters Verbosity.";
289 args[
"PARAMETER_VERBOSITY"].name =
"Parameters Verbosity";
290 args[
"PARAMETER_VERBOSITY"].type = 0;
291 args[
"PARAMETER_VERBOSITY"].ctgr =
"verbosity";
302 args[
"EXEC_MACRO"].args =
"no";
303 args[
"EXEC_MACRO"].help =
"Executes commands in macro file.";
304 args[
"EXEC_MACRO"].name =
"Executes commands in macro file";
305 args[
"EXEC_MACRO"].type = 1;
306 args[
"EXEC_MACRO"].ctgr =
"control";
308 args[
"CHECK_OVERLAPS"].arg = 0;
309 args[
"CHECK_OVERLAPS"].help =
"Checks Overlapping Volumes:\n";
310 args[
"CHECK_OVERLAPS"].help +=
" 1. Check Overlaps at Construction Time\n";
311 args[
"CHECK_OVERLAPS"].help +=
" 2. Check Overlaps based on standard lines grid setup\n";
312 args[
"CHECK_OVERLAPS"].help +=
" 3. Check Overlaps by shooting lines according to a cylindrical pattern\n";
313 args[
"CHECK_OVERLAPS"].name =
"Checks Overlapping Volumes";
314 args[
"CHECK_OVERLAPS"].type = 0;
315 args[
"CHECK_OVERLAPS"].ctgr =
"control";
317 args[
"USE_QT"].arg = 1;
318 args[
"USE_QT"].help =
"QT GUI switch\n";
319 args[
"USE_QT"].help +=
" 0. Don't use the graphical interface\n";
320 args[
"USE_QT"].help +=
" 1. QT OpenGL Immediate mode (can interact with picture; sliders works well; slower than Stored mode)\n";
321 args[
"USE_QT"].help +=
" 2. OpenGL Stored mode (can't interact with picture; sliders works well)\n";
322 args[
"USE_QT"].help +=
" 3. OpenGL Immediate mode (can't interact with picture; sliders works well; slower than Stored mode)\n";
323 args[
"USE_QT"].help +=
" 4. QT OpenGL Stored mode (can interact with picture; sliders works but picture needs to be updated by clicking on it)\n";
324 args[
"USE_QT"].name =
"QT Gui";
325 args[
"USE_QT"].type = 0;
326 args[
"USE_QT"].ctgr =
"control";
328 args[
"geometry"].args=
"600x600";
329 args[
"geometry"].help =
"Specify the size of the QT display window. Default '600x600' ";
330 args[
"geometry"].name=
"geometry";
331 args[
"geometry"].type=1;
332 args[
"geometry"].ctgr =
"control";
334 args[
"QTSTYLE"].args =
"no";
335 args[
"QTSTYLE"].name =
"Sets the GUI Style";
336 args[
"QTSTYLE"].help =
"Sets the GUI Style. Available options: \n";
337 args[
"QTSTYLE"].help +=
" - QCleanlooksStyle \n";
338 args[
"QTSTYLE"].help +=
" - QMacStyle \n";
339 args[
"QTSTYLE"].help +=
" - QPlastiqueStyle \n";
340 args[
"QTSTYLE"].help +=
" - QWindowsStyle \n";
341 args[
"QTSTYLE"].help +=
" - QMotifStyle";
342 args[
"QTSTYLE"].type = 1;
343 args[
"QTSTYLE"].ctgr =
"control";
345 args[
"RANDOM"].args =
"TIME";
346 args[
"RANDOM"].help =
"Random Engine Initialization. The argument (seed) can be an integer or the string TIME.";
347 args[
"RANDOM"].name =
"Random Engine Initialization";
348 args[
"RANDOM"].type = 1;
349 args[
"RANDOM"].ctgr =
"control";
351 args[
"gcard"].args =
"no";
352 args[
"gcard"].help =
"gemc card file.";
353 args[
"gcard"].name =
"gemc card file";
354 args[
"gcard"].type = 1;
355 args[
"gcard"].ctgr =
"control";
358 args[
"EVN"].help =
"Initial Event Number.";
359 args[
"EVN"].name =
"Initial Event Number";
360 args[
"EVN"].type = 0;
361 args[
"EVN"].ctgr =
"control";
363 args[
"ENERGY_CUT"].arg = -1.;
364 args[
"ENERGY_CUT"].help =
"Set an energy cut in MeV below which no particle will be tracked further. -1. turns this off.";
365 args[
"ENERGY_CUT"].name =
"Tracking Energy cut (in MeV)";
366 args[
"ENERGY_CUT"].type = 0;
367 args[
"ENERGY_CUT"].ctgr =
"control";
369 args[
"MAX_X_POS"].arg = 30000.;
370 args[
"MAX_X_POS"].help =
"Max X Position in millimeters. Beyond this the track will be killed";
371 args[
"MAX_X_POS"].name =
"Max X Position in millimeters. Beyond this the track will be killed";
372 args[
"MAX_X_POS"].type = 0;
373 args[
"MAX_X_POS"].ctgr =
"control";
375 args[
"MAX_Y_POS"].arg = 30000.;
376 args[
"MAX_Y_POS"].help =
"Max Y Position in millimeters. Beyond this the track will be killed";
377 args[
"MAX_Y_POS"].name =
"Max Y Position in millimeters. Beyond this the track will be killed";
378 args[
"MAX_Y_POS"].type = 0;
379 args[
"MAX_Y_POS"].ctgr =
"control";
381 args[
"MAX_Z_POS"].arg = 30000.;
382 args[
"MAX_Z_POS"].help =
"Max Z Position in millimeters. Beyond this the track will be killed";
383 args[
"MAX_Z_POS"].name =
"Max Z Position in millimeters. Beyond this the track will be killed";
384 args[
"MAX_Z_POS"].type = 0;
385 args[
"MAX_Z_POS"].ctgr =
"control";
387 args[
"DAWN_N"].arg = 0;
388 args[
"DAWN_N"].help =
"Number of events to be displayed with the DAWN driver (also activate the DAWN driver).";
389 args[
"DAWN_N"].name =
"Number of events to be displayed with the DAWN driver (also activate the DAWN driver)";
390 args[
"DAWN_N"].type = 0;
391 args[
"DAWN_N"].ctgr =
"control";
393 args[
"HIT_PROCESS_LIST"].args =
"clas12";
394 args[
"HIT_PROCESS_LIST"].name =
"Registers Hit Process Routines.";
395 args[
"HIT_PROCESS_LIST"].help =
"Registers Hit Process Routines. Can register multiple experiments, separated by space, e.v. \"clas12 aprime\"\n";
396 args[
"HIT_PROCESS_LIST"].help +=
" clas12. CLAS12 hit process routines (default)\n";
397 args[
"HIT_PROCESS_LIST"].help +=
" aprime. aprime hit process routines\n";
398 args[
"HIT_PROCESS_LIST"].help +=
" gluex. GlueX hit process routines\n";
399 args[
"HIT_PROCESS_LIST"].type = 1;
400 args[
"HIT_PROCESS_LIST"].ctgr =
"control";
402 args[
"SAVE_ALL_MOTHERS"].arg = 0;
403 args[
"SAVE_ALL_MOTHERS"].name =
"Set to 1 to save mother vertex and pid infos in output. High Memory Usage. Default is 0";
404 args[
"SAVE_ALL_MOTHERS"].help =
"Set to 1 to save mother vertex and pid infos in output. High Memory Usage. Default is 0.\n";
405 args[
"SAVE_ALL_MOTHERS"].type = 0;
406 args[
"SAVE_ALL_MOTHERS"].ctgr =
"control";
408 args[
"HIGH_RES"].arg = 1;
409 args[
"HIGH_RES"].name =
"Use High Resolution Graphics";
410 args[
"HIGH_RES"].help =
"Use High Resolution Graphics\n";
411 args[
"HIGH_RES"].type = 0;
412 args[
"HIGH_RES"].ctgr =
"control";
414 args[
"RECORD_PASSBY"].arg = 0;
415 args[
"RECORD_PASSBY"].name =
"Set to one if you want to save zero energy hits in the output. Default is 0.";
416 args[
"RECORD_PASSBY"].help =
"Set to one if you want to save zero energy hits in the output. Default is 0.\n";
417 args[
"RECORD_PASSBY"].type = 0;
418 args[
"RECORD_PASSBY"].ctgr =
"control";
420 args[
"RECORD_MIRRORS"].arg = 0;
421 args[
"RECORD_MIRRORS"].name =
"Set to one if you want to save mirror hits in the output. Default is 0.";
422 args[
"RECORD_MIRRORS"].help =
"Set to one if you want to save mirror hits in the output. Default is 0.\n";
423 args[
"RECORD_MIRRORS"].type = 0;
424 args[
"RECORD_MIRRORS"].ctgr =
"control";
426 args[
"RUNNO"].arg = 1;
427 args[
"RUNNO"].name =
"Run Number. Controls the geometry and calibration parameters.";
428 args[
"RUNNO"].help =
"Run Number. Controls the geometry and calibration parameters.\n";
429 args[
"RUNNO"].type = 0;
430 args[
"RUNNO"].ctgr =
"control";
432 args[
"MERGE_FILE"].args =
"no";
433 args[
"MERGE_FILE"].name =
"Merge banks from filename.";
434 args[
"MERGE_FILE"].help =
"Merge banks from filename. Format supported: \n";
435 args[
"MERGE_FILE"].help +=
" - EVIO";
436 args[
"MERGE_FILE"].type = 1;
437 args[
"MERGE_FILE"].ctgr =
"control";
448 args[
"OUTPUT"].args =
"no, output";
449 args[
"OUTPUT"].help =
"Type of output, output filename. Supported output: evio, txt. Example: -OUTPUT=\"evio, out.ev\"";
450 args[
"OUTPUT"].name =
"Type of output, output filename. ";
451 args[
"OUTPUT"].type = 1;
452 args[
"OUTPUT"].ctgr =
"output";
463 args[
"OPT_PH"].arg = 0;
464 args[
"OPT_PH"].help =
"Activate Optical Physics Processes in gemc Physics List.";
465 args[
"OPT_PH"].name =
"Optical Physics";
466 args[
"OPT_PH"].type = 0;
467 args[
"OPT_PH"].ctgr =
"physics";
469 args[
"USE_PHYSICSL"].args =
"QGSC_BERT";
470 args[
"USE_PHYSICSL"].help =
"Physics List. Avaliable choices: \n\n";
471 args[
"USE_PHYSICSL"].help +=
" * gemc: comprehensive physics list. Optical Physics may be activated with OPT_PH=1 \n\n";
472 args[
"USE_PHYSICSL"].help +=
" The following is a list of other physics lists. More infos can be found here:\n\n";
473 args[
"USE_PHYSICSL"].help +=
" http://geant4.cern.ch/support/proc_mod_catalog/physics_lists/referencePL.shtml\n\n";
474 args[
"USE_PHYSICSL"].help +=
" * LHEP: This is the main LHEP based physics list, using exclusively parameterised modeling. \n";
475 args[
"USE_PHYSICSL"].help +=
" * LHEP_BERT: Like LHEP, but using Geant4 Bertini cascade for primary protons, neutrons, \n";
476 args[
"USE_PHYSICSL"].help +=
" pions and Kaons below ~10GeV. \n";
477 args[
"USE_PHYSICSL"].help +=
" * LHEP_BERT_HP: Like LHEP_BERT with the addition to use the data driven high precision.\n";
478 args[
"USE_PHYSICSL"].help +=
" neutron package (NeutronHP) to transport neutrons below 20 MeV down to thermal energies.\n";
479 args[
"USE_PHYSICSL"].help +=
" * QGSP: Quark-Gluon String model based physics list. \n";
480 args[
"USE_PHYSICSL"].help +=
" * QGSP_BERT: Like QGSP, but using Geant4 Bertini cascade for primary protons, neutrons, \n";
481 args[
"USE_PHYSICSL"].help +=
" pions and Kaons below ~10GeV. \n";
482 args[
"USE_PHYSICSL"].help +=
" * QGSP_BERT_HP: Like QGSP_BERT with the addition to use the data driven high precision.\n";
483 args[
"USE_PHYSICSL"].help +=
" neutron package (NeutronHP) to transport neutrons below 20 MeV down to thermal energies.\n";
484 args[
"USE_PHYSICSL"].help +=
" * QGSP_BIC: Like QGSP, but using Geant4 Binary cascade for primary protons and neutrons \n";
485 args[
"USE_PHYSICSL"].help +=
" with energies below ~10GeV. \n";
486 args[
"USE_PHYSICSL"].help +=
" * QGSP_BIC_HP: Like QGSP_BIC with the addition to use the data driven high precision.\n";
487 args[
"USE_PHYSICSL"].help +=
" neutron package (NeutronHP) to transport neutrons below 20 MeV down to thermal energies.\n";
488 args[
"USE_PHYSICSL"].help +=
" * QGSC_BERT: The quark-gluon string (QGS) part handles the formation of strings in the initial\n";
489 args[
"USE_PHYSICSL"].help +=
" collision of a hadron with a nucleon in the nucleus. String fragmentation into hadrons is\n";
490 args[
"USE_PHYSICSL"].help +=
" handled by the Quark-Gluon String fragmentation model. The Chiral Invariant Phase Space (CHIPS)\n";
491 args[
"USE_PHYSICSL"].help +=
" part handles the de-excitation of the remnant nucleus. Uses Geant4 Bertini cascade for primary\n";
492 args[
"USE_PHYSICSL"].help +=
" protons, neutrons, pions and Kaons below ~10GeV. \n";
493 args[
"USE_PHYSICSL"].name =
"Choice of Physics List";
494 args[
"USE_PHYSICSL"].type = 1;
495 args[
"USE_PHYSICSL"].ctgr =
"physics";
497 args[
"LOW_EM_PHYS"].arg = 0;
498 args[
"LOW_EM_PHYS"].help =
"Turn on the low energy Electro-Magnetic physics, down to the X-rat scale.\n";
499 args[
"LOW_EM_PHYS"].help+=
" Currently only implemented for gemc physics list. \n";
500 args[
"LOW_EM_PHYS"].help+=
" 0 Turn off [default] \n";
501 args[
"LOW_EM_PHYS"].help+=
" 1 Standard E&M down to X-rays ( ~1 kEV cutoff) \n";
502 args[
"LOW_EM_PHYS"].name =
"Low Energy Physics";
503 args[
"LOW_EM_PHYS"].type = 0;
504 args[
"LOW_EM_PHYS"].ctgr =
"physics";
506 args[
"HALL_MATERIAL"].args =
"Air";
507 args[
"HALL_MATERIAL"].help =
"Composition of the Experimental Hall. \n";
508 args[
"HALL_MATERIAL"].help +=
" Air normal simulation\n";
509 args[
"HALL_MATERIAL"].help +=
" Air_Opt Simulation with Optical Physics (default)\n";
510 args[
"HALL_MATERIAL"].help +=
" Vacuum\n";
511 args[
"HALL_MATERIAL"].name =
"Composition of the Experimental Hall";
512 args[
"HALL_MATERIAL"].type = 1;
513 args[
"HALL_MATERIAL"].ctgr =
"physics";
515 args[
"DEFAULT_MATERIAL"].args =
"none";
516 args[
"DEFAULT_MATERIAL"].help =
"Default material for missing material field.\n";
517 args[
"DEFAULT_MATERIAL"].name =
"Default material for missing material field";
518 args[
"DEFAULT_MATERIAL"].type = 1;
519 args[
"DEFAULT_MATERIAL"].ctgr =
"physics";
521 args[
"HALL_FIELD"].args =
"no";
522 args[
"HALL_FIELD"].help =
"Magnetic Field of the Hall. \n";
523 args[
"HALL_FIELD"].name =
"Magnetic Field of the Hall";
524 args[
"HALL_FIELD"].type = 1;
525 args[
"HALL_FIELD"].ctgr =
"physics";
527 args[
"FIELD_DIR"].args =
"env";
528 args[
"FIELD_DIR"].help =
"Magnetic Field Maps Location. \n";
529 args[
"FIELD_DIR"].name =
"Magnetic Field Maps Location";
530 args[
"FIELD_DIR"].type = 1;
531 args[
"FIELD_DIR"].ctgr =
"physics";
533 args[
"NO_FIELD"].args =
"none";
534 args[
"NO_FIELD"].help =
"Sets Magnetic Field of a volume to zero. \"all\" means no magnetic field at all. \n";
535 args[
"NO_FIELD"].name =
"Sets Magnetic Field of a volume to zero. \"all\" means no magnetic field at all ";
536 args[
"NO_FIELD"].type = 1;
537 args[
"NO_FIELD"].ctgr =
"physics";
539 args[
"MAX_FIELD_STEP"].arg = 0;
540 args[
"MAX_FIELD_STEP"].help =
"Sets Maximum Acceptable Step in Magnetic Field (in mm).\n";
541 args[
"MAX_FIELD_STEP"].name =
"Sets Maximum Acceptable Step in Magnetic Field (in mm) ";
542 args[
"MAX_FIELD_STEP"].type = 0;
543 args[
"MAX_FIELD_STEP"].ctgr =
"physics";
545 args[
"SCALE_FIELD"].args =
"no, 1";
546 args[
"SCALE_FIELD"].help =
"Scales Magnetic Field by a factor.\n";
547 args[
"SCALE_FIELD"].help +=
" Usage:\n";
548 args[
"SCALE_FIELD"].help +=
" -SCALE_FIELD=\"fieldname, scalefactor\"\n";
549 args[
"SCALE_FIELD"].help +=
" Example: -SCALE_FIELD=\"srr-solenoid, 0.5\"\n";
550 args[
"SCALE_FIELD"].name =
"Scales Magnetic Field by a factor ";
551 args[
"SCALE_FIELD"].type = 1;
552 args[
"SCALE_FIELD"].ctgr =
"physics";
554 args[
"MATERIALSDB"].args =
"CPP";
555 args[
"MATERIALSDB"].help =
"Select Materials DB. \n";
556 args[
"MATERIALSDB"].help +=
" Available Databases: \n";
557 args[
"MATERIALSDB"].help +=
" * CPP: use the normal geant4 c++ constructor.\n";
558 args[
"MATERIALSDB"].help +=
" * MYSQL: use the mysql DB.\n";
559 args[
"MATERIALSDB"].name =
"Select Materials DB. ";
560 args[
"MATERIALSDB"].type = 1;
561 args[
"MATERIALSDB"].ctgr =
"physics";
572 args[
"PARAMETERSDB"].args =
"MYSQL";
573 args[
"PARAMETERSDB"].help =
"Select Parameters DB. \n";
574 args[
"PARAMETERSDB"].help +=
" Available Databases: \n";
575 args[
"PARAMETERSDB"].help +=
" * MYSQL: use the mysql DB.\n";
576 args[
"PARAMETERSDB"].name =
"Select Parameters DB";
577 args[
"PARAMETERSDB"].type = 1;
578 args[
"PARAMETERSDB"].ctgr =
"general";
580 args[
"DC_MSTAG_R3"].arg = 0.0;
581 args[
"DC_MSTAG_R3"].help =
"Mini Stagger for Region 3. Each layer will alternate +- |this value|";
582 args[
"DC_MSTAG_R3"].name =
"Mini Stagger for Region 3. Each layer will alternate +- |this value|";
583 args[
"DC_MSTAG_R3"].type = 0;
584 args[
"DC_MSTAG_R3"].ctgr =
"general";
586 args[
"DC_MSTAG_R2"].arg = 0.0;
587 args[
"DC_MSTAG_R2"].help =
"Mini Stagger for Region 2. Each layer will alternate +- |this value|";
588 args[
"DC_MSTAG_R2"].name =
"Mini Stagger for Region 2. Each layer will alternate +- |this value|";
589 args[
"DC_MSTAG_R2"].type = 0;
590 args[
"DC_MSTAG_R2"].ctgr =
"general";
599 QDomDocument domDocument;
601 cout <<
" >>> gemc Init: >> Parsing " << file <<
" for options: \n";
603 QFile gcard(file.c_str());
605 if( !gcard.exists() )
607 cout <<
" >>> gemc Init: >> gcard: " << file <<
" not found. Exiting." << endl;
611 if (!domDocument.setContent(&gcard))
614 cout <<
" >>> gemc Init: >> gcard format is wrong - check XML syntax. Exiting." << endl;
620 QDomElement docElem = domDocument.documentElement();
623 map<string, int> count;
624 map<string,opts>::iterator itm;
625 for(itm =
args.begin();itm !=
args.end(); itm++)
626 count[itm->first] = 0;
629 n = docElem.firstChild();
632 QDomElement e = n.toElement();
634 if(e.tagName().toStdString() ==
"option")
637 for(itm =
args.begin();itm !=
args.end(); itm++)
641 if(e.attributeNode(
"name").value().toStdString() == itm->first )
643 if(count[itm->first] == 0)
646 itm->second.args = e.attributeNode(
"value").value().toStdString();
647 itm->second.arg = atof(e.attributeNode(
"value").value().toStdString().c_str());
648 cout <<
" >>> gemc Init: >> Options: " << itm->second.name <<
" set to: ";
649 if(itm->second.type) cout << itm->second.args;
650 else cout << itm->second.arg;
655 count[itm->first] += 1;
657 if(count[itm->first]>1)
659 string new_opt = itm->first +
"__REPETITION__" +
stringify(count[itm->first] - 1);
660 args[new_opt].args = e.attributeNode(
"value").value().toStdString();
661 args[new_opt].arg = atof(e.attributeNode(
"value").value().toStdString().c_str());
662 args[new_opt].name = itm->second.name;
663 args[new_opt].help = itm->second.help;
664 args[new_opt].type = itm->second.type;
665 args[new_opt].ctgr = itm->second.ctgr;
666 cout <<
" >>> gemc Init: >> Options: " << itm->second.name <<
" set to: ";
667 if(itm->second.type) cout << itm->second.args;
668 else cout << itm->second.arg;
676 cout <<
"The option in the gcard file " << e.attributeNode(
"name").value().toStdString()
677 <<
" is not known to this system. Please check your spelling. \n\n";
683 QDomNode nn= e.firstChild();
684 while( !nn.isNull() && e.tagName().toStdString() ==
"option")
686 QDomElement ee = nn.toElement();
687 map<string,opts>::iterator itm;
689 for(itm =
args.begin();itm !=
args.end(); itm++)
691 if(ee.tagName().toStdString() == itm->first )
693 itm->second.args= ee.attributeNode(
"value").value().toStdString();
694 itm->second.arg = atof(ee.attributeNode(
"value").value().toStdString().c_str());
695 cout <<
" >>> gemc Init: >> Options: " << itm->second.name <<
" set to:";
696 if(itm->second.type) cout << itm->second.args;
697 else cout << itm->second.arg;
704 cout <<
"The option in the gcard file " << e.attributeNode(
"name").value().toStdString()
705 <<
" is not known to this system. Please check your spelling. \n\n";
708 nn = nn.nextSibling();
726 map<string, opts>::iterator itm;
728 set<string> category;
739 for(
int i=1;i<argc;i++)
742 if( (pos=arg.find(
"gcard="))!= string::npos)
744 file = arg.substr(pos+6);
751 for(itm =
args.begin(); itm !=
args.end(); itm++)
752 if(category.find(itm->second.ctgr) == category.end()) category.insert(itm->second.ctgr);
756 for(
int i=1; i<argc; i++)
762 cout <<
" Usage: -Option=<option>" << endl << endl;
763 cout <<
" Options:" << endl << endl ;
765 for(itm =
args.begin(); itm !=
args.end(); itm++)
766 cout <<
" > Option " << itm->first <<
": " << itm->second.help << endl;
768 cout << endl << endl;
775 set<string> :: iterator itcat;
776 for(
int i=1; i<argc; i++)
782 cout << endl << endl;
783 cout <<
" Help Options:" << endl << endl ;
784 cout <<
" > -help-all: all available options. " << endl << endl;
785 for(itcat = category.begin(); itcat != category.end(); itcat++)
788 cout <<
" > -help-" << *itcat <<
" ";
790 cout << *itcat <<
" options." << endl;
792 cout << endl << endl;
799 for(
int i=1; i<argc; i++)
802 for(itcat = category.begin(); itcat != category.end(); itcat++)
804 com =
"-help-" + *itcat;
807 cout << endl << endl <<
" ## " << *itcat <<
" ## " << endl << endl;
808 cout <<
" Usage: -Option=<option>" << endl << endl;
809 for(itm =
args.begin(); itm !=
args.end(); itm++)
810 if(itm->second.ctgr == *itcat) cout <<
" > " << itm->first <<
": " << itm->second.help << endl;
811 cout << endl << endl;
819 for(
int i=1; i<argc; i++)
822 for(itcat = category.begin(); itcat != category.end(); itcat++)
828 hf.open(
"gemc_help.html");
829 hf <<
"<html>" << endl;
830 hf <<
" <STYLE TYPE=\"text/css\">" << endl;
831 hf <<
"<!--" << endl;
832 hf <<
".pretty-table" << endl;
834 hf <<
" padding: 0;" << endl;
835 hf <<
" margin: 0;" << endl;
836 hf <<
" border-collapse: collapse;" << endl;
837 hf <<
" border: 1px solid #333;" << endl;
838 hf <<
" font-family: \"Trebuchet MS\", Verdana, Arial, Helvetica, sans-serif;" << endl;
839 hf <<
" font-size: 0.8em;" << endl;
840 hf <<
" color: #000;" << endl;
841 hf <<
" background: #bcd0e4;" << endl;
843 hf <<
".pretty-table caption" << endl;
845 hf <<
" caption-side: bottom;" << endl;
846 hf <<
" font-size: 0.9em;" << endl;
847 hf <<
" font-style: italic;" << endl;
848 hf <<
" text-align: right;" << endl;
849 hf <<
" padding: 0.5em 0;" << endl;
851 hf <<
".pretty-table th, .pretty-table td" << endl;
853 hf <<
" border: 1px dotted #666;" << endl;
854 hf <<
" padding: 0.5em;" << endl;
855 hf <<
" text-align: left;" << endl;
856 hf <<
" color: #632a39;" << endl;
858 hf <<
".pretty-table th[scope=col]" << endl;
860 hf <<
" color: #000;" << endl;
861 hf <<
" background-color: #8fadcc;" << endl;
862 hf <<
" text-transform: uppercase;" << endl;
863 hf <<
" font-size: 0.9em;" << endl;
864 hf <<
" border-bottom: 2px solid #333;" << endl;
865 hf <<
" border-right: 2px solid #333;" << endl;
867 hf <<
".pretty-table th+th[scope=col]" << endl;
869 hf <<
" color: #009;" << endl;
870 hf <<
" background-color: #7d98b3;" << endl;
871 hf <<
" border-right: 1px dotted #666;" << endl;
873 hf <<
".pretty-table th[scope=row]" << endl;
875 hf <<
" background-color: #b8cfe5;" << endl;
876 hf <<
" border-right: 2px solid #333;" << endl;
878 hf <<
"pre{font-family:Helvetica;font-size:12pt}" << endl;
880 hf <<
"--->" << endl;
881 hf <<
"</STYLE>" << endl;
882 hf <<
"</head>" << endl;
883 hf <<
"<body>" << endl;
884 hf <<
"<br><br>" << endl;
885 hf <<
"<center>" << endl;
886 hf <<
"<h1> GEMC options</h1>" << endl;
887 hf <<
"</center>" << endl;
888 hf <<
"<br><br><br>" << endl;
889 hf <<
"<table cellsize=20>" << endl;
890 hf <<
"<tr><td>" << endl;
891 hf <<
"<table class=\"pretty-table\">" << endl;
892 hf <<
"<caption>gemc options. This table is produced with the gemc option: gemc -help-html </caption>" << endl;
893 hf <<
"<tr><th scope=\"col\" >Category</th>" << endl;
894 hf <<
" <th scope=\"col\" >Option</th>" << endl;
895 hf <<
" <th scope=\"col\" >Help</th></tr>" << endl;
896 for(itcat = category.begin(); itcat != category.end(); itcat++)
897 for(itm =
args.begin(); itm !=
args.end(); itm++)
898 if(itm->second.ctgr == *itcat)
900 hf <<
"<tr><th scope=\"row\">";
905 hf <<
"</td><td><pre>" << endl;
906 hf << itm->second.help;
907 hf <<
"</pre></td></tr>" << endl;
911 hf <<
"</table>" << endl;
912 hf <<
"</td>" << endl;
913 hf <<
"<td>" << endl;
914 hf <<
"</table>" << endl;
915 hf <<
" </body></html>";
923 map<string, int> count;
924 for(itm =
args.begin();itm !=
args.end(); itm++)
925 count[itm->first] = 0;
927 for(
int i=1; i<argc; i++)
931 for(itm =
args.begin(); itm !=
args.end(); itm++)
933 com =
"-" + itm->first +
"=";
934 comp.assign(arg, 0, arg.find(
"=") + 1);
937 opt.assign(arg, com.size(), arg.size()-com.size());
938 if(count[itm->first] == 0)
940 itm->second.args = opt;
941 itm->second.arg = atof(opt.c_str());
942 cout <<
" >>> Options: " << itm->second.name <<
" set to: " ;
943 if(itm->second.type) cout << itm->second.args;
944 else cout << itm->second.arg ;
948 count[itm->first] += 1;
949 if(count[itm->first]>1)
951 string new_opt = itm->first +
"__REPETITION__" +
stringify(count[itm->first]-1);
952 args[new_opt].args = opt;
953 args[new_opt].arg = atof(opt.c_str());
954 args[new_opt].name = itm->second.name;
955 args[new_opt].help = itm->second.help;
956 args[new_opt].type = itm->second.type;
957 args[new_opt].ctgr = itm->second.ctgr;
959 cout <<
" >>> Options: " << itm->second.name <<
" set to: " ;
960 if(itm->second.type) cout <<
args[new_opt].args;
961 else cout <<
args[new_opt].arg ;
971 if( found == 0 && strncmp(argv[i],
"-psn_",4) !=0 )
973 cout <<
"The argument " << argv[i] <<
" is not known to this system. \n\n";
985 map<string, opts>::iterator itm;
986 vector<opts> options;
987 map<string, int> count;
988 for(itm =
args.begin();itm !=
args.end(); itm++)
990 if(itm->first.find(opt) != string::npos)
992 options.push_back(itm->second);
string stringify(double x)
map< string, opts > args
Options map.
void Scan_gcard(string file)
vector< opts > get_args(string)
get a vector of arguments matching a string
int Set(int argc, char **args)
Sets map from command line arguments.