Changeset 19915 for trunk/FACT++/spectrum/simulation.sql
- Timestamp:
- 12/16/19 20:03:18 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/spectrum/simulation.sql
r19907 r19915 3 3 SELECT 4 4 Weight, Energy, LogEnergyEst, 5 6 -- Convert variable to bin index 5 7 INTERVAL(Theta, %107:theta) AS `.theta`, 6 8 INTERVAL(LogEnergyEst, %108:sparse) AS `.sparse_est`, … … 38 40 */ 39 41 40 -- Binning in estimated energy: Signal, Background , Excess42 -- Binning in estimated energy: Signal, Background 41 43 SUM( IF(Weight>0, ZdWeight*SpectralWeight, 0)) AS SignalW, 42 44 SUM( IF(Weight<0, ZdWeight*SpectralWeight, 0)) AS BackgroundW, … … 44 46 SUM( IF(Weight<0, POW(ErrZdWeight*SpectralWeight,2), 0)) AS BackgroundW2, 45 47 46 -- Energy Estimation 48 -- Energy Estimation: Bias=ResidualW/SignalW; Resolution=sigma(Bias) 47 49 SUM(IF(Weight>0, Residual* ZdWeight*SpectralWeight, 0)) AS ResidualW, 48 50 SUM(IF(Weight>0, POW(Residual,2)*ZdWeight*SpectralWeight, 0)) AS ResidualW2, 49 51 52 -- Average Energy: SumEnergyX/SignalW 50 53 SUM(IF(Weight>0, Energy *ZdWeight*SpectralWeight, 0)) AS SumEnergySimW, 51 54 SUM(IF(Weight>0, POW(10, LogEnergyEst)*ZdWeight*SpectralWeight, 0)) AS SumEnergyEstW
Note:
See TracChangeset
for help on using the changeset viewer.