Changeset 19901 for trunk/FACT++
- Timestamp:
- 12/15/19 11:57:40 (5 years ago)
- Location:
- trunk/FACT++/spectrum
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/spectrum/spectrum.sql
r19900 r19901 17 17 SELECT 18 18 *, 19 SUM(`Signal`) OVER Integral 20 SUM(`Background`) OVER Integral /5AS BackgroundI,21 SUM(SumEnergyEst) OVER Integral 22 SUM(SumW) OVER Integral 19 SUM(`Signal`) OVER Integral AS SignalI, 20 SUM(`Background`) OVER Integral AS BackgroundI, 21 SUM(SumEnergyEst) OVER Integral AS EnergyEstI, 22 SUM(SumW) OVER Integral AS SumWI 23 23 FROM 24 24 BinnedData … … 44 44 `Signal` - `Background` AS Excess, 45 45 SQRT(`Signal`) AS ErrSignal, 46 SQRT(`Background` )AS ErrBackground,46 SQRT(`Background`/5) AS ErrBackground, 47 47 ExcErr(`Signal`, `Background`) AS ErrExcess, 48 48 LiMa( `Signal`, `Background`) AS Significance, … … 50 50 SignalI - BackgroundI AS ExcessI, 51 51 SQRT(SignalI) AS ErrSignalI, 52 SQRT(BackgroundI )AS ErrBackgroundI,52 SQRT(BackgroundI/5) AS ErrBackgroundI, 53 53 ExcErr(SignalI, BackgroundI) AS ErrExcessI, 54 54 LiMa( SignalI, BackgroundI) AS SignificanceI, … … 123 123 WHERE 124 124 Excess>0 125 ORDER BY126 %101:bin127 125 ) 128 126 SELECT … … 136 134 FROM 137 135 Spectrum 138 139 136 WINDOW 140 137 Integral AS (ORDER BY %101:bin DESC) 138 ORDER BY 139 %101:bin ASC -
trunk/FACT++/spectrum/summary-est.sql
r19897 r19901 23 23 `.%100:binning:_est`, 24 24 25 SUM(SignalN) AS SignalN,26 SUM(SignalW) AS SignalW,27 SUM(SignalW2) AS SignalW2,25 SUM(SignalN) AS SignalN, 26 SUM(SignalW) AS SignalW, 27 SUM(SignalW2) AS SignalW2, 28 28 29 SUM(BackgroundN) AS BackgroundN,30 SUM(BackgroundW) AS BackgroundW,31 SUM(BackgroundW2) 29 SUM(BackgroundN)/5 AS BackgroundN, 30 SUM(BackgroundW)/5 AS BackgroundW, 31 SUM(BackgroundW2)/25 AS BackgroundW2, 32 32 33 SUM(ResidualW) AS ResidualW,34 SUM(ResidualW2) AS ResidualW2,33 SUM(ResidualW) AS ResidualW, 34 SUM(ResidualW2) AS ResidualW2, 35 35 36 SUM(SumEnergySimW) AS SumEnergySimW,37 SUM(SumEnergyEstW) AS SumEnergyEstW36 SUM(SumEnergySimW) AS SumEnergySimW, 37 SUM(SumEnergyEstW) AS SumEnergyEstW 38 38 FROM 39 39 AnalysisMC … … 46 46 *, 47 47 48 SignalN - BackgroundN /5AS ExcessN,48 SignalN - BackgroundN AS ExcessN, 49 49 50 SQRT(SignalN + BackgroundN /25) AS ErrExcessN,51 SQRT(SignalN) 52 SQRT(BackgroundN) 50 SQRT(SignalN + BackgroundN) AS ErrExcessN, 51 SQRT(SignalN) AS ErrSignalN, 52 SQRT(BackgroundN) AS ErrBackgroundN, 53 53 54 SignalW 55 BackgroundW /5/Width/AreaTime AS BackgroundFluxW,56 (SignalW - BackgroundW /5)/Width/AreaTime AS ExcessFluxW,57 SQRT(SignalW2) 58 SQRT(BackgroundW2) /5/Width/AreaTime AS ErrBackgroundFluxW,59 SQRT(SignalW2 + BackgroundW2 /25) /Width/AreaTime AS ErrExcessFluxW,54 SignalW /Width/AreaTime AS SignalFluxW, 55 BackgroundW /Width/AreaTime AS BackgroundFluxW, 56 (SignalW - BackgroundW) /Width/AreaTime AS ExcessFluxW, 57 SQRT(SignalW2) /Width/AreaTime AS ErrSignalFluxW, 58 SQRT(BackgroundW2) /Width/AreaTime AS ErrBackgroundFluxW, 59 SQRT(SignalW2 + BackgroundW2) /Width/AreaTime AS ErrExcessFluxW, 60 60 61 SumEnergyEstW/SignalW 62 SumEnergySimW/SignalW 61 SumEnergyEstW/SignalW AS AvgEnergyEstW, 62 SumEnergySimW/SignalW AS AvgEnergySimW, 63 63 64 64 IF(SignalW>0, ResidualW/SignalW, NULL) AS BiasW, … … 84 84 *, 85 85 86 IntegralSignalFluxW-IntegralBackgroundFluxW /5AS IntegralExcessFluxW,87 SQRT(IntegralSignalFluxW2+IntegralBackgroundFluxW2 /25) AS ErrIntegralExcessFluxW,88 SQRT(IntegralSignalFluxW2) 89 SQRT(IntegralBackgroundFluxW2) 86 IntegralSignalFluxW-IntegralBackgroundFluxW AS IntegralExcessFluxW, 87 SQRT(IntegralSignalFluxW2+IntegralBackgroundFluxW2) AS ErrIntegralExcessFluxW, 88 SQRT(IntegralSignalFluxW2) AS ErrIntegralSignalFluxW, 89 SQRT(IntegralBackgroundFluxW2) AS ErrIntegralBackgroundFluxW, 90 90 91 IntegralEnergyEstW/IntegralSignalW 92 IntegralEnergySimW/IntegralSignalW 91 IntegralEnergyEstW/IntegralSignalW AS AvgIntegralEnergyEstW, 92 IntegralEnergySimW/IntegralSignalW AS AvgIntegralEnergySimW 93 93 94 94 FROM -
trunk/FACT++/spectrum/summary-sim.sql
r19897 r19901 47 47 %102:bin, 48 48 49 SUM(SignalN) AS SignalN,50 SUM(SignalW) AS SignalW,51 SUM(SignalW2) AS SignalW2,49 SUM(SignalN) AS SignalN, 50 SUM(SignalW) AS SignalW, 51 SUM(SignalW2) AS SignalW2, 52 52 53 SUM(BackgroundN) AS BackgroundN,54 SUM(BackgroundW) AS BackgroundW,55 SUM(BackgroundW2) 53 SUM(BackgroundN)/5 AS BackgroundN, 54 SUM(BackgroundW)/5 AS BackgroundW, 55 SUM(BackgroundW2)/25 AS BackgroundW2, 56 56 57 SUM(ResidualW) AS ResidualW,58 SUM(ResidualW2) AS ResidualW2,57 SUM(ResidualW) AS ResidualW, 58 SUM(ResidualW2) AS ResidualW2, 59 59 60 SUM(SumEnergySimW) AS SumEnergyEstW,61 SUM(SumEnergyEstW) AS SumEnergySimW60 SUM(SumEnergySimW) AS SumEnergyEstW, 61 SUM(SumEnergyEstW) AS SumEnergySimW 62 62 FROM 63 63 AnalysisMC … … 69 69 SELECT 70 70 *, 71 TrigCountN/SimCountN 72 TrigSumW/SimSumW 71 TrigCountN/SimCountN AS TriggerEfficiencyN, 72 TrigSumW/SimSumW AS TriggerEfficiencyW, 73 73 74 SignalW - BackgroundW /5AS ExcessW,75 SignalW2 + BackgroundW2 /25AS ExcessW274 SignalW - BackgroundW AS ExcessW, 75 SignalW2 + BackgroundW2 AS ExcessW2 76 76 FROM 77 77 Simulated … … 88 88 *, 89 89 90 SQRT(SimCountN) AS ErrSimCountN,91 SQRT(TrigCountN) AS ErrTrigCountN,90 SQRT(SimCountN) AS ErrSimCountN, 91 SQRT(TrigCountN) AS ErrTrigCountN, 92 92 SQRT(SignalN) AS ErrSignalN, 93 93 … … 95 95 TrigSumW /Width/AreaTime AS TrigFluxW, 96 96 SignalW /Width/AreaTime AS SignalFluxW, 97 BackgroundW /5/Width/AreaTime AS BackgroundFluxW,97 BackgroundW /Width/AreaTime AS BackgroundFluxW, 98 98 ExcessW /Width/AreaTime AS ExcessFluxW, 99 99 100 SQRT(SimSumW2) /Width/AreaTime AS ErrSimFluxW, 100 101 SQRT(TrigSumW2) /Width/AreaTime AS ErrTrigFluxW, 101 102 SQRT(SignalW2) /Width/AreaTime AS ErrSignalFluxW, 102 SQRT(BackgroundW2) /5/Width/AreaTime AS ErrBackgroundFluxW,103 SQRT(BackgroundW2) /Width/AreaTime AS ErrBackgroundFluxW, 103 104 SQRT(ExcessW2) /Width/AreaTime AS ErrExcessFluxW, 104 105 … … 144 145 CutEfficiencyW*SQRT(ExcessW2/POW(ExcessW,2) + TrigSumW2/POW(TrigSumW,2)) AS ErrCutEfficiencyW, 145 146 146 IntegralSignalFluxW - IntegralBackgroundFluxW /5AS IntegralExcessFluxW,147 SQRT(IntegralSignalFluxW2+IntegralBackgroundFluxW2 /25) AS ErrIntegralExcessFluxW,148 SQRT(IntegralSignalFluxW2) 149 SQRT(IntegralBackgroundFluxW2) 150 SQRT(IntegralSimFluxW2) 147 IntegralSignalFluxW - IntegralBackgroundFluxW AS IntegralExcessFluxW, 148 SQRT(IntegralSignalFluxW2+IntegralBackgroundFluxW2) AS ErrIntegralExcessFluxW, 149 SQRT(IntegralSignalFluxW2) AS ErrIntegralSignalFluxW, 150 SQRT(IntegralBackgroundFluxW2) AS ErrIntegralBackgroundFluxW, 151 SQRT(IntegralSimFluxW2) AS ErrIntegralSimFluxW, 151 152 152 IntegralEnergyEstW/IntegralSignalW 153 IntegralEnergySimW/IntegralSignalW 153 IntegralEnergyEstW/IntegralSignalW AS AvgIntegralEnergyEstW, 154 IntegralEnergySimW/IntegralSignalW AS AvgIntegralEnergySimW 154 155 155 156 FROM
Note:
See TracChangeset
for help on using the changeset viewer.