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

Last change on this file since 20064 was 19915, checked in by tbretz, 5 years ago
Improved comments
File size: 512 bytes
Line 
1SELECT
2 -- Convert variable to bin index
3 INTERVAL(Theta, %107:theta) AS `.theta`,
4 INTERVAL(LogEnergyEst, %108:sparse) AS `.sparse_est`,
5
6 -- Signal and Background counts
7 COUNT(IF(Weight>0, 1, NULL)) AS `Signal`,
8 COUNT(IF(Weight<0, 1, NULL)) AS `Background`,
9
10 -- Average Energy: SumEnergyEst/SumW
11 SUM(Weight*POW(10, LogEnergyEst)) AS SumEnergyEst,
12 SUM(Weight) AS SumW
13FROM
14 Excess
15GROUP BY
16 `.theta`, `.sparse_est`
17ORDER BY
18 `.theta`, `.sparse_est`
Note: See TracBrowser for help on using the repository browser.