- Timestamp:
- 05/05/19 21:28:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/dch/db_explorer.php
r19500 r19501 76 76 $offset = 0; 77 77 78 switch($table) 79 { 80 case "LP": 81 $zdfactor="(pow(cos(fZenithDistanceMean*PI()/180),3)+14.8/21.9*pow(sin(2*fZenithDistanceMean*PI()/180),5))"; 82 $thfactor="(1-0.00124/1.21*(fThresholdMinSet-500)*(fThresholdMinSet>=500))"; 83 // ETh: 715 GeV 84 $crabflux="3.6"; 85 break; 86 case "ISDC": 87 $zdfactor="pow(cos(fZenithDistanceMean*PI()/180)*exp(1-cos(fZenithDistanceMean*PI()/180)),4.2)"; 88 $thfactor="(1.18-IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)*0.00062)"; 89 // ETh: 764 GeV 90 $crabflux="3.3"; 91 case "CutsLC": 92 $zdfactor="pow(cos(fZenithDistanceMean*PI()/180)*exp(1-cos(fZenithDistanceMean*PI()/180)),4.5)"; 93 $thfactor="(1.37-IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)*0.00118)"; 94 // ETh: 543 GeV 95 $crabflux="5.7"; 96 default: 97 $zdfactor="0"; 98 $thfactor="0"; 99 $crabflux="0"; 100 break; 101 } 102 103 78 104 /* 79 105 $join = isset($_GET["join"]) ? "LEFT JOIN ".$_GET["join"]." USING(fNight,fRunID)" : ""; … … 112 138 $g = $_GET["good"]; 113 139 114 if ($g&0x1) $good .= " AND f NumThreshold750/(cos(fZenithDistanceMean*PI()/180)+0.179*pow(sin(1.89*fZenithDistanceMean*PI()/180),5))/TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))/fEffectiveOn>3.7";115 if ($g&0x2) $good .= " AND ((fNumEvtsAfterCleaning*1.0-fNum27Sec*1.0)/((-2381.1+2766.3*LOG10(fThresholdMinSet)-1049.9*POW(LOG10(fThresholdMinSet),2)+131.05*POW(LOG10(fThresholdMinSet),3))/21.15)/(COS(fZenithDistanceMean*PI()/180)+0.179*POW(SIN(1.89*fZenithDistanceMean*PI()/180),5)))/(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)>16.2";116 if ($g&0x4) $good .= " AND (fNumEvtsAfterQualCuts/(cos(fZenithDistanceMean*PI()/180)+0.179*pow(sin(1.89*fZenithDistanceMean*PI()/180),5))/((8598.9- 13181*log10(fThresholdMinSet)+7567.4*pow(log10(fThresholdMinSet),2)-1925.2*pow(log10(fThresholdMinSet),3)+183*pow(log10(fThresholdMinSet),4))/9.2 ))/(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)>6.7";117 if ($g&0x8) $good .= " AND (fNumEvtsAfterBgCuts/(1.41*POW(fZenithDistanceMean*PI()/180,2)+0.975)/(-7.53e-12*POW(10, LOG10(fThresholdMinSet)*3.69)+1.035) )/(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)>0.6";140 if ($g&0x1) $good .= " AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 "; 141 if ($g&0x2) $good .= " AND fZenithDistance < 45 "; 142 if ($g&0x4) $good .= " AND IF (ISNULL(fThresholdMinSet), fThresholdMedian, fThresholdMinSet) < 550 "; 143 if ($g&0x8) $good .= " AND fTNGDust<10 "; 118 144 } 119 145 … … 360 386 $selecty="SUM(fNumSigEvts)/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)"; 361 387 $isnull="AND NOT ISNULL(fNumSigEvts)"; 362 $titley="Signal events";388 $titley="Signal rate"; 363 389 break; 364 390 case 5: 365 391 $selecty="SUM(fNumBgEvts)/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)"; 366 392 $isnull="AND NOT ISNULL(fNumBgEvts)"; 367 $titley="Background events";393 $titley="Background rate"; 368 394 break; 369 395 case 6: … … 371 397 $selecterr="EXCERR(SUM(fNumSigEvts), SUM(fNumBgEvts))/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)*3600"; 372 398 $isnull="AND NOT ISNULL(fNumExcEvts) AND NOT ISNULL(fEffectiveOn)"; 373 $titley="Excess events";399 $titley="Excess rate"; 374 400 $unity="[1/h]"; 401 $errors = $noerr ? 0 : 1; 402 break; 403 case 31: 404 $selecty="SUM(fNumExcEvts/".$zdfactor."/".$thfactor.")*3600/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)"; 405 $selecterr="EXCERR(SUM(fNumSigEvts), SUM(fNumBgEvts))/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)*3600*SUM(fNumExcEvts/".$zdfactor."/".$thfactor.")/SUM(fNumExcEvts)"; 406 $isnull="AND NOT ISNULL(fNumExcEvts) AND NOT ISNULL(fEffectiveOn) AND NOT ISNULL(fZenithDistanceMean) AND NOT (ISNULL(fThresholdMinSet) AND ISNULL(fThresholdMedian)) "; 407 $sqlhaving=" AND e < 1000 "; 408 $titley="Corrected excess rate"; 409 $unity="[1/h]"; 410 $errors = $noerr ? 0 : 1; 411 break; 412 case 32: 413 $selecty="SUM(fNumExcEvts/".$zdfactor."/".$thfactor."/fCU)*3600/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)"; 414 $selecterr="EXCERR(SUM(fNumSigEvts), SUM(fNumBgEvts))/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)*3600*SUM(fNumExcEvts/".$zdfactor."/".$thfactor."/fCU)/SUM(fNumExcEvts)"; 415 $isnull="AND NOT ISNULL(fNumExcEvts) AND NOT ISNULL(fEffectiveOn) AND NOT ISNULL(fZenithDistanceMean) AND NOT (ISNULL(fThresholdMinSet) AND ISNULL(fThresholdMedian)) "; 416 $sqlhaving=" AND e < 1000 "; 417 $titley="Flux"; 418 $unity="[CU]"; 419 $errors = $noerr ? 0 : 1; 420 break; 421 case 33: 422 $selecty=$crabflux." * SUM(fNumExcEvts/".$zdfactor."/".$thfactor."/fCU)*3600/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)"; 423 $selecterr=$crabflux." * EXCERR(SUM(fNumSigEvts), SUM(fNumBgEvts))/SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn)*3600*SUM(fNumExcEvts/".$zdfactor."/".$thfactor."/fCU)/SUM(fNumExcEvts)"; 424 $isnull="AND NOT ISNULL(fNumExcEvts) AND NOT ISNULL(fEffectiveOn) AND NOT ISNULL(fZenithDistanceMean) AND NOT (ISNULL(fThresholdMinSet) AND ISNULL(fThresholdMedian)) "; 425 $sqlhaving=" AND e < 1000 "; 426 $titley="Flux"; 427 $unity="[10^-11/cm2/s]"; 375 428 $errors = $noerr ? 0 : 1; 376 429 break; … … 898 951 899 952 $( "#source" ).selectmenu(); 953 $( "#table" ).selectmenu(); 900 954 901 955 $("#input_y").prop('disabled', $rate<42); … … 905 959 $('#select_y').val($rate).selectmenu("refresh"); 906 960 $('#source').val($source).selectmenu("refresh"); 961 $('#table').val('$table').selectmenu("refresh"); 907 962 $('#sql_cut').val("$cut"); 908 963 $('#input_x').val("$sql_x"); … … 1177 1232 <option value="42">Average</option> 1178 1233 </optgroup> 1179 <optgroup label="Analysis event rates [Effective on time]"> 1234 <optgroup label="Light curves"> 1235 <option value="6">Excess rate</option> 1236 <option value="31">Corrected excess rate (Zd/TH)</option> 1237 <option value="32">Flux [CU]</option> 1238 <option value="33">Flux [10^-11/cm2/s]</option> 1239 </optgroup> 1240 <optgroup label="Analysis event rates [Eff. ontime]"> 1180 1241 <option value="5">Background rate</option> 1181 1242 <option value="17">Signal rate</option> 1182 1243 <option value="6">Excess rate</option> 1183 1244 </optgroup> 1184 <optgroup label="Raw event rates [Eff ective ontime]">1245 <optgroup label="Raw event rates [Eff. ontime]"> 1185 1246 <option value="21">Physics trigger</option> 1186 1247 <option value="22">Physics trigger minus 27s events</option> … … 1192 1253 </optgroup> 1193 1254 1194 <optgroup label="Corrected [Zd/TH] event rates [Eff. on time]"> 1255 <!-- 1256 <optgroup label="Corrected [Zd/TH] event rates [Eff. ontime]"> 1195 1257 <option value="20">Events after cleaning minus 27s events</option> 1196 1258 <option value="24">Events after background cuts</option> … … 1198 1260 <option value="16">Artifical trigger TH750</option> 1199 1261 </optgroup> 1200 1201 <optgroup label="Artificial trigger rates [Eff ective ontime]">1262 --> 1263 <optgroup label="Artificial trigger rates [Eff. ontime]"> 1202 1264 <option value="7">27s events</option> 1203 1265 <option value="8">TH500</option> … … 1211 1273 1212 1274 <optgroup label="On time comparison"> 1213 <option value="15">Avg difference Eff. ontime minus Stop-Start time</option>1214 <option value="26">Avg difference Eff. ontime minus OnTimeAfterCuts</option>1275 <option value="15">Avg Eff. ontime minus Stop-Start time</option> 1276 <option value="26">Avg Eff. ontime minus OnTimeAfterCuts</option> 1215 1277 <option value="27">Avg Stop-Start time minus OnTimeAfterCuts</option> 1216 1278 <option value="18">Avg FTM effective on time</option> 1217 <option value="19">Sum FTM on time divided by Sum FTM elapsed time</option> 1218 </optgroup> 1219 1279 <option value="19">Sum(FTM ontime) / Sum(FTM elapsed time)</option> 1280 </optgroup> 1281 1282 <!-- 1220 1283 <optgroup label="Others"> 1221 1284 <option value="28">Excess rate correction factor (fNumEvtsAfterBgCuts / PRELIMINARY)</option> … … 1223 1286 <option value="30">Excess rate correction factor (fNumExcEvts / PRELIMINARY)</option> 1224 1287 </optgroup> 1288 --> 1225 1289 </select> 1226 1290 … … 1232 1296 <optgroup label="Sources"> 1233 1297 $sourceoptions 1298 </optgroup> 1299 </select> 1300 1301 <label for="table">Analysis</label> 1302 <select name="t" id="table"> 1303 <optgroup label="Online Analysis"> 1304 <option value="LP">QLA</option> 1305 </optgroup> 1306 <optgroup label="Offline Analyses"> 1307 <option value="ISDC">ISDC</option> 1308 <option value="CutsLC">CutsLC</option> 1234 1309 </optgroup> 1235 1310 </select> … … 1354 1429 <dt>&r = 24</dt><dd>Rate after background cuts runwise corrected for zenith angle and threshold</dd> 1355 1430 <dt>&r = 25</dz><dd>Rate after quallity cuts runwise corrected for zenith angle and threshold</dd> 1431 <dt>&r = 31</dt><dd>corrected excess rate</dd> 1432 <dt>&r = 32</dt><dd>flux [CU]</dd> 1433 <dt>&r = 33</dt><dd>flux [10^-11/cm2/s]</dd> 1356 1434 <dt>&r = 42</dz><dd>Plot average of &y=... (profile histogram with &y as weights)</dd> 1357 1435 <dt>&r = 43</dz><dd>Plot sum of &y=... (histogram with &y as weights)</dd> … … 1373 1451 <dt>&print</dt><dd>Show the plot only [&print] </dd> 1374 1452 <dt>&s=...</dt><dd>Restrict to given source id [eg. &s=5] </dd> 1375 <dt>&t=...</dt><dd>Choose table with analysis results ( ISDC, LP:default) [eg. &t=ISDC] </dd>1453 <dt>&t=...</dt><dd>Choose table with analysis results (CutsLC, ISDC, LP:default) [eg. &t=CutsLC] </dd> 1376 1454 <dt>&cut=...</dt><dd>Additional where statement to be added with AND [eg. &cut=fZenithDistance<35]</dd> 1377 1455 <dt>&min=...</dt><dd>y-axis minimum [eg. &min=0]</dd> … … 1385 1463 <dt>&sum=...</dt><dd>short for &y=... [forces &r=43, eg. &y=fOnTime]</dd> 1386 1464 <dt>&hist=...</dt><dd>short for &x=... [forces &r=45, eg. &y=fOnTime]</dd> 1465 <dt>&good=...</dt><dd>some predefined data quality selection: 1 (standard datacheck with R750), 2 (zd<45), 3 (TH<550), 4 (Dust<10), values can be combined [eg. &good=14]</dd> 1387 1466 </dl> 1388 1467 </div>
Note:
See TracChangeset
for help on using the changeset viewer.