Changeset 19915
 Timestamp:
 Dec 16, 2019, 8:03:18 PM (5 weeks ago)
 Location:
 trunk/FACT++/spectrum
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/FACT++/spectrum/data.sql
r19907 r19915 1 1 SELECT 2  Convert variable to bin index 2 3 INTERVAL(Theta, %107:theta) AS `.theta`, 3 4 INTERVAL(LogEnergyEst, %108:sparse) AS `.sparse_est`, … … 7 8 COUNT(IF(Weight<0, 1, NULL)) AS `Background`, 8 9 9  Average Energy 10  Average Energy: SumEnergyEst/SumW 10 11 SUM(Weight*POW(10, LogEnergyEst)) AS SumEnergyEst, 11 12 SUM(Weight) AS SumW 
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 
trunk/FACT++/spectrum/summaryest.sql
r19902 r19915 11 11 SELECT 12 12 *, 13 (POW(10,hi)POW(10,lo))/1000 AS Width, 14 Area*ObsTime AS AreaTime 13 (POW(10,hi)POW(10,lo))/1000 AS Width,  Bin Windth in TeV 14 Area*ObsTime AS AreaTime  Total scale dA*dT 15 15 FROM 16 16 BinningEnergy_%100:binning 
trunk/FACT++/spectrum/summarysim.sql
r19907 r19915 11 11 SELECT 12 12 *, 13 (%103:binwidth) AS Width, 14 Area*ObsTime AS AreaTime 13 (%103:binwidth) AS Width,  Bin Windth in TeV or just 1 14 Area*ObsTime AS AreaTime  Total scale dA*dT 15 15 FROM 16 16 %101:binning
Note: See TracChangeset
for help on using the changeset viewer.