20{
21 if (argc < 2) {
22 cout << "-----------------------------------------------"<< endl;
23 cout << "--- ShowRec ---" << endl;
24 cout << "--- A programm for running multiple shower reconstruction algorithms ---" << endl;
25 cout << "--- with different parameter settings for finding the optimum ---" << endl;
26 cout << "--- reconstruction set. ---" << endl;
27 cout << "-----------------------------------------------" << endl;
28 cout << "--- Usage: ShowRec -OPTION lnk.def ---" << endl << endl;
29 cout << "--- \t\t : -FP FirstPlate \t (1..57)\n";
30 cout << "--- \t\t\t : -default 1\n";
31 cout << "--- \t\t : -LP LastPlate \t (1..57) \n";
32 cout << "--- \t\t\t : -default 57 or number of plates in volume\n";
33 cout << "--- \t\t : -MP MiddlePlate \t (FP..LP)\n";
34 cout << "--- \t\t\t : -default 57 or number of plates in volume\n";
35 cout << "--- \t\t : -NP Maximal NumberofPlates reconstructed \t (1..57)\n";
36 cout << "--- \t\t\t : -default 57 or number of plates in volume\n";
37
38 cout << "--- \t\t : -LT use LinkedTracks.root for InBT \n";
39 cout << "--- \t\t\t : 0: dont use LinkedTracks.root for InBT\n";
40 cout << "--- \t\t\t : 1: use first basetrack of track\n";
41 cout << "--- \t\t\t : 2: use last basetrack of track\n";
42 cout << "--- \t\t\t : 3: use all basetrack of track\n";
43 cout << "--- \t\t\t : 4: use basetrack in [fp,mp] of track\n";
44 cout << "--- \t\t\t : -default 0\n";
45
46 cout << "--- \t\t : -MC use only SIM/BG events for InBT \n";
47 cout << "--- \t\t\t : 0: SIM+BG (i.e. all BT) \n";
48 cout << "--- \t\t\t : 1: SIM \n";
49 cout << "--- \t\t\t : 2: BG \n";
50 cout << "--- \t\t\t : -default 0\n";
51
52 cout << "--- \t\t : -VTX For InBT: Cut to IP for MC vertex (needs BRICK.TreePGunInfo.txt and -MC=1) \t (0,1:Ipcut:100,2:Ipcut250,3:500)\n";
53 cout << "--- \t\t\t : -default ????????\n";
54
55 cout << "--- \t\t : -HPLZ use specific P() or Z() conditions for MCEvt InBTs \n";
56 cout << "--- \t\t\t : 0: All \n";
57 cout << "--- \t\t\t : 1: Take Highest P() value for each MCEvt \n";
58 cout << "--- \t\t\t : 2: Take Lowest (i.e. lowest) z occurence for each MCEvt \n";
59 cout << "--- \t\t\t : -default 0\n";
60
61 cout << "--- \t\t : -FLMC use only PdgId Flag \t (PdgId)\n";
62 cout << "--- \t\t\t : -default 0\n";
63
64 cout << "--- \t\t : -ALI use gALI either\n";
65 cout << "--- \t\t\t : 0: from directory structured: cp.root files \n";
66 cout << "--- \t\t\t : 1: from a tracked root file : linkedtracks.root file\n";
67 cout << "--- \t\t\t : 2: from a volume root file : ScanVolume_Ali.root\n";
68 cout << "--- \t\t\t : 3: from a written volume file : ScanVolumeLinkedTracks_Ali.root \n";
69 cout << "--- \t\t\t : -default ????????\n";
70
71 cout << "--- \t\t : -MIXMC Extract Subpattern with all MCEvents mixed! --!WARNING!-- \n";
72 cout << "--- \t\t : -EXTHETA Extract Subpattern with Delta Theta Cut on Initiator BT angle. \n";
73 cout << "--- \t\t : -PADI ParentDirectory (only for naming the output file)\n";
74 cout << "--- \t\t : -BTPA BasetrackParametrisation (only for naming the output file)\n";
75 cout << "--- \t\t : -BGTP BackgroundType (only for naming the output file)\n";
76
77 cout << "--- \t\t : -ALTP AlgorithmType \n";
78 cout << "--- \t\t\t : 0: ReconstructShowers_CT ().. \n";
79 cout << "--- \t\t\t : 1: ReconstructShowers_CL (NOT USED ANYMORE, EXPERIMENTAL)\n";
80 cout << "--- \t\t\t : 2: ReconstructShowers_CA \n";
81 cout << "--- \t\t\t : 3: ReconstructShowers_NN \n";
82 cout << "--- \t\t\t : 4: ReconstructShowers_OI BEST WORKING ALGORITHM CURRENTLY\n";
83 cout << "--- \t\t\t : 5: ReconstructShowers_SA (take all MC Events only)\n";
84 cout << "--- \t\t\t : 6: ReconstructShowers_TC \n";
85 cout << "--- \t\t\t : 7: ReconstructShowers_RC \n";
86 cout << "--- \t\t\t : 8: ReconstructShowers_BW (EXPERIMENTAL, BEST PARAMETERS STILL TO BE SEARCHED)\n";
87 cout << "--- \t\t\t : 9: ReconstructShowers_AG (EXPERIMENTAL, BEST PARAMETERS STILL TO BE SEARCHED)\n";
88 cout << "--- \t\t\t : 10: ReconstructShowers_GS (same Implementation as in libShowRec----- BEST PARAMETERS STILL TO BE SEARCHED)\n";
89 cout << "--- \t\t\t : 11: ReconstructShowers_N3 REWRITING OF THE IMPLEMENTATION OF NN ALG - with some modifications.\n";
90 cout << "--- \t\t\t\t : -ALN3TRAIN1 Do Training of the Neural Net (default: 0, run)\n";
91 cout << "--- \t\t\t\t : -ALN3DUMP1 Write also TrainingsTrees in the Neural Net Root Info File (default: 0)\n";
92 cout << "--- \t\t\t\t : -ALN3EQUALIZE1 Try to have same number of SG/BG tracks for training (default: 1, yes)\n";
93 cout << "--- \t\t\t : -default 4\n";
94
95
96 cout << "--- \t\t : -PASTART ParametersetStart \n";
97 cout << "--- \t\t : -PAEND ParameterSetEnd \n";
98
99 cout << "--- \t\t : -CUTTP Algorithm CutType \n";
100 cout << "--- \t\t\t : 0: standard \n";
101 cout << "--- \t\t\t : 1: high purity \n";
102 cout << "--- \t\t\t : 2: high efficiency \n";
103 cout << "--- \t\t\t : 3: FJ_highPurity \n";
104 cout << "--- \t\t\t : 4: FJ_Standard \n";
105 cout << "--- \t\t\t : -default ????????\n";
106
107 cout << "--- \t\t : -CLEAN InputData BG Cleaning: 0: No, 1:20BT/mm2 2: 40BT/mm2 3:10BT/mm2 4:60BT/mm2 \n";
108 cout << "--- \t\t\t : -default ????????\n";
109 cout << "--- \t\t\t : ATTENTION ... NOT FULLY FUNCTIONING YET ... TO BE CHECK WITH\n";
110 cout << "--- \t\t\t : THE BG-CELANING IMPLEMENTATION IN LIBSHOWREC\n";
111
112 cout << "--- \t\t : InputData BG Cleaning: 10: Remove DoubleBT and Passing, No dens cut, 11: &&10BT/mm2 12: &&20BT/mm2 13: &&30BT/mm2 ... \n";
113 cout << "--- \t\t\t : -default ????????\n";
114 cout << "--- \t\t\t : ATTENTION ... NOT FULLY FUNCTIONING YET ... TO BE CHECK WITH\n";
115 cout << "--- \t\t\t : THE BG-CELANING IMPLEMENTATION IN LIBSHOWREC\n";
116
117 cout << "--- \t\t : -FILETP Filetype: Additional (distinguish-) variable to be written into treebranch. (only for naming the output tree)\n";
118 cout << "--- \t\t\t : -default ????????\n";
119 cout << "--- \t\t : -GBMC Global MC: addition variable to tell the program which MCEvt is doing (if only one is done).\n";
120 cout << "--- \t\t\t : -default ????????\n";
121 cout << "--- \t\t : -DEBUG gEDBDEBUGLEVEL \t (1..5)\n";
122 cout << "--- \t\t\t : -default 2\n";
123 cout << "--- \t\t : -OUT OUTPUTLEVEL \t (1,2,3)\n";
124 cout << "--- \t\t\t : -default 1\n";
125 cout << "--- \t\t : -STOP STOPLEVEL \t (0,1,2,3,4,5)\n";
126 cout << "--- \t\t\t : 0: Run until end of program \n";
127 cout << "--- \t\t\t : 1: Run until Read_ParasetDefinitionTree().\n";
128 cout << "--- \t\t\t : 2: Run until Do Background cleaning of input.\n";
129 cout << "--- \t\t\t : 3: Run until Fill the Initiator BT array.\n";
130 cout << "--- \t\t\t : 4: Run until Reconstruct showers is done.\n";
131 cout << "--- \t\t\t : 5: Run until Fill output structures.\n";
132 cout << "--- \t\t\t : -default 0\n";
133
134 cout << "--- \t\t : -LIST-PRESET \n";
135 cout << "--- \t\t\t : List built-in preset options. Most usage cases will be covered here. \n";
136
137 cout << "--- \t\t : -PRESET Number \t (0,1,2,3)\n";
138 cout << "--- \t\t\t : Details of switches: see option -LIST-PRESET \n";
139 cout << "--- \t\t\t : 0: Use all BTs of volume for InBT. Loooooong running time! (data driven reco)\n";
140 cout << "--- \t\t\t : 1: Use highest P() MCEvt BTs of whole volume for InBT.! (mc driven reco) \n";
141 cout << "--- \t\t\t : 2: Use all BTs linked_tracks.root file for InBT. (data driven reco) \n";
142 cout << "--- \t\t\t : 3: Use all BTs with IP to list of vertices for InBT. Possibly shortest running time. \n";
143 cout << "--- \t\t\t : -default 0\n";
144
145
146
147
148 cout << "--- Example usages: " << endl;
149
150 cout << "--- Reconstruct all possible showers for all possible Initiator Basetracks in the whole volume -- looooong runnning time!: ShowRec lnk_all.def" << endl<< endl;
151
152 cout << "--- Reconstruct all possible showers for the highest P()- MC Initiator Basetrack, given a ready ali.root file: ShowRec -HPLZ1 -MC1 -ALI2 " << endl<< endl;
153
154
155 cout << "--- Reconstruct all possible showers for the highest P()- MC Initiator Basetrack, given a linked tracks file for starting basetracks: ShowRec -LT1 -MC1 lnk_all.def " << endl<< endl;
156
157 cout << "--- Usage: ShowRec -FP1 -LP31 -MP1 -NP30 -HPLZ1 -MC1 -ALTP4 -PASTART0 -PAEND0 lnk.def ---" << endl<< endl;
158 cout << "--- Usage: ShowRec -FP1 -LP31 -MP30 -NP30 -HPLZ1 -MC1 -ALTP4 lnk_all.def ---" << endl<< endl;
159 cout << "--- Usage: ShowRec -HPLZ1 -MC1 lnk_all.def ---" << endl<< endl;
160 cout << "--- Usage: ShowRec -LT1 -MC1 lnk_all.def ---" << endl<< endl;
161 cout << "-----------------------------------------------"<<endl;
162 return 0;
163 }
164
165
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181 Bool_t IsSet_cmd_PRESET=kFALSE;
182
183 char *
name = argv[argc];
184 for (int i=1; i<argc; ++i ) {
185 char *key = argv[i];
186
187
188
189
190
191
192 if (!strncmp(key,"-HELP",5)) {
193 if (strlen(key)>5) {
195 }
197 return 0;
198 }
199 if (!strncmp(key,"-LIST-PRESET",12)) {
200 if (strlen(key)>12) {
202 }
204 return 0;
205 }
206
207
208
209 else if (!strncmp(key,"-DEBUG",6)) {
210 if (strlen(key)>6) {
212 }
213 }
214 else if (!strncmp(key,"-OUT",4)) {
215 if (strlen(key)>4) {
217 }
218 }
219 else if (!strncmp(key,"-STOP",5)) {
220 if (strlen(key)>5) {
222 }
223 }
224
225
226 if (!strncmp(key,"-PRESET",7)) {
227 if (strlen(key)>7) {
229 }
230
231
232
233 cout <<" If PRESET value was given then take only the given values for this preset scenario. Dont read any other given option values anymore. Skip directly out of this loop! "<< endl;
234
236 IsSet_cmd_PRESET=kTRUE;
237 }
238
239 if (IsSet_cmd_PRESET == kTRUE ) continue;
240
241
242 if (!strncmp(key,"-FP",3)) {
243 if (strlen(key)>3) {
244 sscanf(key+3,
"%d",&
cmd_FP);
245 }
246 }
247 else if (!strncmp(key,"-LP",3)) {
248 if (strlen(key)>3) {
249 sscanf(key+3,
"%d",&
cmd_LP);
250 }
251 }
252 else if (!strncmp(key,"-NP",3)) {
253 if (strlen(key)>3) {
254 sscanf(key+3,
"%d",&
cmd_NP);
255 }
256 }
257 else if (!strncmp(key,"-MP",3)) {
258 if (strlen(key)>3) {
259 sscanf(key+3,
"%d",&
cmd_MP);
260 }
261 }
262 else if (!strncmp(key,"-PADI",5)) {
263 if (strlen(key)>5) {
265 }
266 }
267 else if (!strncmp(key,"-BTPA",5)) {
268 if (strlen(key)>5) {
270 }
271 }
272 else if (!strncmp(key,"-BGTP",5)) {
273 if (strlen(key)>5) {
275 }
276 }
277 else if (!strncmp(key,"-ALTP",5)) {
278 if (strlen(key)>5) {
280 }
281 }
282 else if (!strncmp(key,"-ALN3TRAIN",10)) {
283 if (strlen(key)>10) {
285 }
286 }
287 else if (!strncmp(key,"-ALN3DUMP",9)) {
288 if (strlen(key)>9) {
290 }
291 }
292 else if (!strncmp(key,"-PASTART",8)) {
293 if (strlen(key)>8) {
295 }
296 }
297 else if (!strncmp(key,"-PAEND",6)) {
298 if (strlen(key)>6) {
300 }
301 }
302 else if (!strncmp(key,"-CUTTP",6)) {
303 if (strlen(key)>6) {
305 }
306 }
307 else if (!strncmp(key,"-CLEAN",6)) {
308 if (strlen(key)>6) {
310 }
311 }
312 else if (!strncmp(key,"-LT",3)) {
313 if (strlen(key)>3) {
314 sscanf(key+3,
"%d",&
cmd_LT);
315 }
316 }
317 else if (!strncmp(key,"-MC",3)) {
318 if (strlen(key)>3) {
319 sscanf(key+3,
"%d",&
cmd_MC);
320 }
321 }
322 else if (!strncmp(key,"-FLMC",5)) {
323 if (strlen(key)>5) {
325 }
326 }
327 else if (!strncmp(key,"-HPLZ",5)) {
328 if (strlen(key)>5) {
330 }
331 }
332 else if (!strncmp(key,"-ALI",4)) {
333 if (strlen(key)>4) {
335 }
336 }
337 else if (!strncmp(key,"-MIXMC",6)) {
338 if (strlen(key)>6) {
340 }
341 }
342 else if (!strncmp(key,"-EXTHETA",8)) {
343 if (strlen(key)>8) {
345 }
346 }
347 else if (!strncmp(key,"-VTX",4)) {
348 if (strlen(key)>4) {
350 }
351 }
352
353 else if (!strncmp(key,"-FILETP",7)) {
354 if (strlen(key)>7) {
356 }
357 }
358 else if (!strncmp(key,"-GBMC",5)) {
359 if (strlen(key)>5) {
361 }
362 }
363 }
365
366
367
368
369
370
371
372
373
374
375
377
378
379
380
381
382
383
386
387
389
390
391
393
394
395
396
397
399
400
401
402
403
404
405
408 cout << "Reached STOPLEVEL 1" << endl;
410
411
412
413
414
416
417
418
419
420
421
422
423
424
425 cout << "ATTENTION: Do Background Data Cleaning IS STILL TO BE MODIFIED " << endl;
426 cout << "ATTENTION: DO NOT USE FOR NOW UNLESS ALGO IS FINISHED. " << endl;
428 cout << "Reached STOPLEVEL 2" << endl;
430
431
432
433
434
435
436 cout << "// FillGlobalInBTArray();" << endl;
437 cout << "instead" << endl;
438 cout << "FillGlobalInBTArrayNEW();" << endl;
439
440
441
443
446 cout <<
"Fill the Initiator BT array:GLOBAL_InBTArray->GetEntries()= " <<
GLOBAL_InBTArray->GetEntries() << endl;
447 cout << "Reached STOPLEVEL 3" << endl;
449
450
451
452
453
454
455
456
457
462
464 if (
gEDBDEBUGLEVEL>2) cout <<
"GetEvent_ParasetDefinitionTree("<<i<<
") done."<<endl;
465
467 if (
gEDBDEBUGLEVEL>2) cout <<
"ReconstructShowers("<<i<<
") done."<<endl;
468 }
469 cout << "Reached STOPLEVEL 4" << endl;
471
472
473
474
475
476
477 cout << "Done with all reconstruction, fill files now:" << endl;
479 cout << "Reached STOPLEVEL 5" << endl;
481
482
483
484
485
486
487 cout << "Closing files, destructing elements and cleaning up orphaned stuff:" << endl;
489
490
491 cout << "Reached STOPLEVEL 0" << endl;
492 cout << "ShowRec finished." << endl;
493 return 0;
494}
void FillOutPutStructures()
Definition: ShowRec.cpp:7682
void CheckInputParameters()
Definition: ShowRec.cpp:8376
void GetEvent_ParasetDefinitionTree(Int_t nr)
Definition: ShowRec.cpp:1440
void SetDefaultValues_CommandLine()
Definition: ShowRec.cpp:380
Int_t Open_ParasetDefinitionFile()
Definition: ShowRec.cpp:619
void Read_ParasetDefinitionTree()
Definition: ShowRec.cpp:636
EdbPVRec * ReadEdbPVRecObjectFromCurrentDirectory()
Definition: ShowRec.cpp:539
void ReconstructShowers(Int_t nr)
Definition: ShowRec.cpp:1693
void BuildParametrizationsMCInfo_PGun(TString MCInfoFilename)
Definition: ShowRec.cpp:8904
void Fill2GlobalInBTArray()
Definition: ShowRec.cpp:8986
void RewriteSegmentPIDs_BGPID_To_SGPID(EdbPVRec *gAli)
Definition: ShowRec.cpp:6149
void CreateOutPutStructures()
Definition: ShowRec.cpp:448
Int_t cmd_gEDBDEBUGLEVEL
Definition: ShowRec.h:32
Int_t cmd_CUTTP
Definition: ShowRec.h:14
Int_t cmd_MCFL
Definition: ShowRec.h:21
Int_t cmd_FILETP
Definition: ShowRec.h:27
Int_t cmd_MCMIX
Definition: ShowRec.h:24
Int_t cmd_ALI
Definition: ShowRec.h:23
Int_t cmd_STOPLEVEL
Definition: ShowRec.h:34
Int_t cmd_EXTHETA
Definition: ShowRec.h:29
void Finalize()
Definition: ShowRec.cpp:498
void SetPresetParameters(Int_t cmd_PRESET)
Definition: ShowRec.cpp:7337
void DoBGTargetCleaning()
Definition: ShowRec.cpp:7288
Int_t cmd_ALN3DUMP
Definition: ShowRec.h:35
void PrintValues_CommandLine()
Definition: ShowRecHelper.cpp:21
Int_t cmd_ALN3TRAIN
Definition: ShowRec.h:34
void PrintPresetList()
Definition: ShowRecHelper.cpp:11
Int_t cmd_HELP
Definition: ShowRec.h:8
void PrintHelp()
Definition: ShowRecHelper.cpp:3
void FillGlobalInBTArrayNEW()
Definition: ShowRec_InBTFilling.cpp:3
Int_t cmd_PRESET
Definition: ShowRec.h:10
void CheckInputParametersNEW()
Definition: ShowRecHelper.cpp:138
const char * name
Definition: merge_Energy_SytematicSources_Electron.C:24