-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresults.php
More file actions
499 lines (308 loc) · 15.1 KB
/
results.php
File metadata and controls
499 lines (308 loc) · 15.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<?php
#include 'draw_plots.php';
include 'drawing_functions.php';
$rootdir='/afs/cern.ch/cms/tracking/www/plots';
$datadir='data';
if($_POST['request'] || $_POST['getpath'] || strlen($_GET['file']) !=0 ) {
if(strlen($_GET['file'])!=0) {
$wantedpage = $_GET['page'];
$wantedfile = $_GET['file'];
$wantedpath = $_GET['path'];
}
else {
$wantedpage = $_POST['wantedpage'];
$wantedfile = $_POST['wantedfile'];
$wantedpath = $_POST['wantedpath'];
}
}
?>
<H1>2010/2011 Collision Results Plots</H1>
<form action="results.php" method="post" enctype="multipart/form-data">
<select name="wantedfile">
<?php
#exec("ls /afs/cern.ch/cms/tracking/www/rootfiles2/Tracking_PFG_*.root",$dirlist);
#exec("cat $datadir/files.list",$dirlist);
exec("ls -F $datadir | grep fittedV0/",$dirlist);
foreach($dirlist as $dir) {
# $fullsuffix = sscanf($dir,"/afs/cern.ch/cms/tracking/output/rootfiles/Tracking_PFG_%s");
# $suffix =substr($fullsuffix[0],0,strlen($fullsuffix[0])-5);
$suffix =substr($dir,0,strlen($dir)-1);
if($suffix == $wantedfile ) {
echo " <option value=$suffix SELECTED>$suffix</option>";
}
else {
echo " <option value=$suffix>$suffix</option>";
}
}
#exec("cat $datadir/files_archived.list",$dirlistarc);
#
#foreach($dirlistarc as $dir) {
#
# $fullsuffix = sscanf($dir,"/afs/cern.ch/cms/tracking/workareas/rootfiles_archive/Tracking_PFG_%s");
# $suffix =substr($fullsuffix[0],0,strlen($fullsuffix[0])-5);
#
# if($suffix == $wantedfile ) {
#
# echo " <option value=$suffix SELECTED>$suffix</option>";
# }
# else {
# echo " <option value=$suffix>$suffix</option>";
# }
#}
?>
</select>
<select name="wantedpage">
<option value=stat>Statistics</option>
<option value=clusmult>Cluster Multiplicity</option>
<option value=gt>general Tracks</option>
<option value=d0phi>D0 vs phi correlation</option>
<option value=pxt>pixel Tracks</option>
<option value=hpt>high purity Tracks</option>
<option value=past>PAS Tracks</option>
<option value=onegevt>high purity Tracks with pt>1 GeV</option>
<option value=pvgoodonly>Primary Vertices: good only (ndof>4)</option>
<option value=pvgoodDAonly>Primary Vertices with DA: good only (ndof>4)</option>
<option value=pvgoodonlynoscraping>Primary Vertices: good only (ndof>4) prescale reweigthed</option>
<option value=pvfirstonly>Primary Vertices: only the first good one</option>
<option value=pv>Primary Vertices: all (no ZS)</option>
<option value=bspv>Primary Vertices - BeamSpot: official BS</option>
<option value=firstbspv>Primary Vertices (only the first one) - BeamSpot: official BS</option>
<option value=noslopebspv>Primary Vertices - BeamSpot: official BS (no slope correction)</option>
<option value=allgoodbspv>Primary Vertices - BeamSpot: official BS vs all vertices with ndof>4</option>
<option value=onlinebspv>Primary Vertices - Beam Spot: online BS</option>
<option value=testbspv>Primary Vertices - BeamSpot: database BS</option>
<option value=pxv>Pixel Vertices</option>
<option value=pxvhtl>Pixel Vertices (HTL like)</option>
<option value=pxvfts>Pixel Vertices (FinalTrackSelector like)</option>
<option value=pixelbspv>Pixel Vertices - BeamSpot: official BS</option>
<option value=gtnoncoll>general Tracks in non-colliding crossings</option>
<option value=pvnoncoll>Primary Vertex in Non-Colliding crossings</option>
<option value=pvgoodnoncoll>Good (ndof>4) Primary Vertex in Non-Colliding crossings</option>
<option value=V0>V0s</option>
<option value=trackjets>TrackJets</option>
</select>
<?php
if( strlen($wantedfile) !=0 ) {
echo "<select name='wantedpath'>";
# echo "<option value=''>No Selection</option>";
exec("ls $rootdir/$datadir/$wantedfile/nevents_colliding*_$wantedfile.gif",$pathlist);
foreach($pathlist as $pathstring) {
$patharr = sscanf($pathstring,"$rootdir/$datadir/$wantedfile/nevents_colliding%s");
$path = substr($patharr[0],0,strpos($patharr[0],"_"));
# $path = $patharr[0];
if($path == "" ) {
echo " <option value=$path>No Selection</option>";
}
else if($path == $wantedpath ) {
echo " <option value=$path SELECTED>$path</option>";
}
else {
echo " <option value=$path>$path</option>";
}
}
echo "</select>";
echo "<p><input onClick='return true;' name='request' type='submit' value='Show Plots'/></p>";
}
?>
<p><input onClick="return true;" name="getpath" type="submit" value="Get Paths"/></p>
</form>
<?php
if($_POST['request'] || strlen($_GET['file']) !=0 ) {
# if(strlen($_GET['file'])!=0) {
# $wantedpage = $_GET['page'];
# $wantedfile = $_GET['file'];
# }
# else {
# $wantedpage = $_POST['wantedpage'];
# $wantedfile = $_POST['wantedfile'];
# }
# echo "$wantedpage $wantedfile prova${wantedpath}_riprova <br>";
if($wantedpage=="V0") {
echo "<H3>Lambda mass distributions </H3>";
echo "<H4>Loose selection </H4>";
$filename="Lam${wantedpath}_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
$filename="Lammass${wantedpath}_*_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
# echo "<H4>Tight (out of the box) selection </H4>";
# $filename="Lamotob${wantedpath}_${wantedfile}.gif";
# draw_plots_indir("${filename}","${wantedfile}");
# $filename="Lammassotob${wantedpath}_*_${wantedfile}.gif";
# draw_plots_indir("${filename}","${wantedfile}");
echo "<H3>Ks mass distributions </H3>";
echo "<H4>Loose selection </H4>";
$filename="K0s${wantedpath}_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
$filename="K0mass${wantedpath}_*_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
echo "<H4>Tight (out of the box) selection </H4>";
$filename="K0sotob${wantedpath}_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
$filename="K0massotob${wantedpath}_*_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
}
if($wantedpage=="pvgoodonly") {
echo "<H3>Offline primary vertices with ndof>4 </H3>";
draw_pv("goodonly","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pvgoodDAonly") {
echo "<H3>Offline primary vertices (DA) with ndof>4 </H3>";
draw_pv("goodDAonly","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pvgoodonlynoscraping") {
echo "<H3>Offline primary vertices with ndof>4 </H3>";
draw_pv("goodonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pvfirstonly") {
echo "<H3>First good offline primary vertex</H3>";
draw_pv("firstonly","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pv") {
echo "<H3>All reconstructed offline primary vertices</H3>";
draw_pv("colliding","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="bspv") {
echo "<H3>Primary Vertices (with ndof>4 and within 24cm in Z) vs official BeamSpot </H3>";
draw_bspv("bspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="firstbspv") {
echo "<H3>FIRST Primary Vertex (with ndof>4) vs official BeamSpot </H3>";
draw_bspv("firstbspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="noslopebspv") {
echo "<H3>Primary Vertices (with ndof>4 and within 24cm in Z) vs official BeamSpot: no BS slope correction </H3>";
draw_bspv("noslopebspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="allgoodbspv") {
echo "<H3>Primary Vertices (with ndof>4) vs official BeamSpot </H3>";
draw_bspv("allgoodbspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="onlinebspv") {
echo "<H3>Primary Vertices (with ndof>4) vs online BeamSpot </H3>";
draw_bspv("onlinebspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="testbspv") {
echo "<H3>Primary Vertices (with ndof>4) vs database BeamSpot </H3>";
draw_bspv("testbspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pxvfts") {
echo "<H3>Pixel primary vertices used by FinalTrackSelector</H3>";
draw_pv("pixelvertexFTSlike","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pxvhtl") {
echo "<H3>Pixel primary vertices used by HLT</H3>";
draw_pv("pixelvertexHLTlike","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pxv") {
echo "<H3>All reconstructed pixel primary vertices </H3>";
draw_pv("pixelvertex","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pixelbspv") {
echo "<H3>Pixel Vertices vs official BeamSpot </H3>";
draw_bspv("pixelbspv","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="pvnoncoll") {
echo "<H3>Primary Vertex position in non-colliding crossings</H3>";
draw_noncollpv("noncolliding","${wantedfile}","${datadir}");
}
if($wantedpage=="pvgoodnoncoll") {
echo "<H3>Good (ndof>4) Primary Vertex position in non-colliding crossings</H3>";
draw_noncollpv("noncollidinggood","${wantedfile}","${datadir}");
}
if($wantedpage=="stat") {
echo "<H3>Number of events vs run </H3>";
echo "<H4>Colliding </H4>";
$filename="nevents_colliding${wantedpath}_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
echo "<H4>Non-Colliding: at least 10 clusters in Pixel detector </H4>";
$filename="nevents_noncolliding_${wantedfile}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
exec("ls $rootdir/$datadir/${wantedfile}/orbit_colliding${wantedpath}_${wantedfile}_run_*.gif",$runlist);
foreach($runlist as $runfile) {
sscanf($runfile,"$rootdir/$datadir/${wantedfile}/orbit_colliding${wantedpath}_${wantedfile}_run_%d.gif",$run);
echo "<H3>Event distribution in run $run </H3>";
echo "<H4>BX, DBX and Orbit distribution of events with BPTX AND</H4>";
$filename="orbit_colliding${wantedpath}_${wantedfile}_run_${run}.gif bx_colliding${wantedpath}_${wantedfile}_run_${run}.gif dbx_colliding${wantedpath}_${wantedfile}_run_${run}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
echo "<H4>BX, DBX and Orbit distribution of events with BPTX XOR and at least 10 clusters in Pixel detector</H4>";
$filename="orbit_noncolliding_${wantedfile}_run_${run}.gif bx_noncolliding_${wantedfile}_run_${run}.gif dbx_noncolliding_${wantedfile}_run_${run}.gif";
draw_plots_indir("${filename}","${datadir}/${wantedfile}");
}
}
if($wantedpage=="clusmult") {
echo "<H3>Cluster multiplicity</H3>";
echo "<H4>no scraping (high purity fraction) colliding events with a good vertex</H4>";
draw_clusmult("","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with a good vertex</H4>";
draw_clusmult("prescraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with scraping filter</H4>";
draw_clusmult("onlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Using DA vertices</H4>";
draw_clusmult("onlynoscrapingDA","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Using HLT-like pixel vertices</H4>";
draw_clusmult("onlynoscrapingHLTpixelvtx","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Using offline pixel vertices</H4>";
draw_clusmult("onlynoscrapingpixelvtx","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with trigger filter</H4>";
draw_clusmult("onlytrigger","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Non-colliding events (BPTX XOR) and at least 10 pixel clusters</H4>";
draw_clusmult("noncoll","","${wantedfile}","${datadir}");
echo "<H4>Non-colliding events (BPTX XOR)</H4>";
draw_clusmult("noncollearly","","${wantedfile}","${datadir}");
}
if($wantedpage=="d0phi") {
echo "<H3>D0 vs phi correlation</H3>";
echo "<H4>Colliding events with one good vertex and scraping filter: central tracks with pt>10 GeV</H4>";
draw_d0phi("centralTenGeV","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="gt") {
echo "<H3>General Tracks</H3>";
echo "<H4>Colliding events with one good vertex and scraping filter</H4>";
draw_trackcount("generalTracks","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with one good vertex</H4>";
draw_trackcount("generalTracksprescraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with scraping filter</H4>";
draw_trackcount("generalTracksonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H5>Ratio of tibtid , tobtec and pixelless tracks over iter0+iter1</H5>";
draw_pixelless("pxllessonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H5>Ratio of tibtid , tobtec and pixelless tracks over iter0+iter1: only if first vertex abs(z)<12cm </H5>";
draw_pixelless("pxllesscentralonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with trigger selection</H4>";
draw_trackcount("generalTracksonlytrigger","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="gtnoncoll") {
echo "<H3>General Tracks in non colliding crossings</H3>";
echo "<H4>Events in non-colliding crossings with 10 pixel hits</H4>";
draw_trackcount("generalTracksnoncolliding","","${wantedfile}","${datadir}");
echo "<H4>Events in non-collding crossings with 10 pixel hits and one good vertex (ndof>4)</H4>";
draw_trackcount("generalTracksnoncollidinggoodvtx","","${wantedfile}","${datadir}");
}
if($wantedpage=="pxt") {
echo "<H3>Pixel Tracks in colliding events with one good vertex</H3>";
draw_trackcount("pixelTracks","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="hpt") {
echo "<H3>High Purity Tracks</H3>";
echo "<H4>Colliding events with one good vertex and scraping filter</H4>";
draw_trackcount("hpTracks","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with scraping filter</H4>";
draw_trackcount("hpTracksonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H5>Ratio of iter4 and iter5 tracks over iter0+iter1</H5>";
draw_pixelless("pxllesshponlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H5>Ratio of iter4 and iter5 tracks over iter0+iter1: only if first vertex abs(z)<12cm </H5>";
draw_pixelless("pxllesshpcentralonlynoscraping","${wantedpath}","${wantedfile}","${datadir}");
echo "<H4>Colliding events with trigger filter</H4>";
draw_trackcount("hpTracksonlytrigger","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="past") {
echo "<H3>PAS-like Tracks (high purity and pt>500 MeV)</H3>";
echo "<H4>Colliding events with one good vertex and scraping filter</H4>";
draw_trackcount("pasTracks","${wantedpath}","${wantedfile}","${datadir}");
}
if($wantedpage=="onegevt") {
echo "<H3>High purity tracks with pt>1 GeV in colliding events with one good vertex</H3>";
echo "<H4>Colliding events with one good vertex and scraping filter</H4>";
draw_trackcount("oneGeVTracks","${wantedpath}","${wantedfile}","${datadir}");
}
}
?>