source: trunk/FACT++/spectrum/data.sql@ 19914

Last change on this file since 19914 was 19907, checked in by tbretz, 5 years ago
Fixed Error calculation for final spectrum, it is difficult to keep usage of the zenith angle consistent. To avoid strange features in the plots, the best is to use the telescope pointing for data and correlate it with the particle direction for simulations.
File size: 457 bytes
Line 
1SELECT
2 INTERVAL(Theta, %107:theta) AS `.theta`,
3 INTERVAL(LogEnergyEst, %108:sparse) AS `.sparse_est`,
4
5 -- Signal and Background counts
6 COUNT(IF(Weight>0, 1, NULL)) AS `Signal`,
7 COUNT(IF(Weight<0, 1, NULL)) AS `Background`,
8
9 -- Average Energy
10 SUM(Weight*POW(10, LogEnergyEst)) AS SumEnergyEst,
11 SUM(Weight) AS SumW
12FROM
13 Excess
14GROUP BY
15 `.theta`, `.sparse_est`
16ORDER BY
17 `.theta`, `.sparse_est`
Note: See TracBrowser for help on using the repository browser.