Changeset 19900 for trunk/FACT++/spectrum/spectrum.sql
- Timestamp:
- 12/15/19 00:34:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/spectrum/spectrum.sql
r19897 r19900 17 17 SELECT 18 18 *, 19 SUM(`Signal`) OVER Integral AS IntegralSignal,20 SUM(`Background`) OVER Integral /5 AS IntegralBackground,21 SUM(SumEnergyEst) OVER Integral AS IntegralEnergyEst,22 SUM(SumW) OVER Integral AS IntegralSumW19 SUM(`Signal`) OVER Integral AS SignalI, 20 SUM(`Background`) OVER Integral /5 AS BackgroundI, 21 SUM(SumEnergyEst) OVER Integral AS EnergyEstI, 22 SUM(SumW) OVER Integral AS SumWI 23 23 FROM 24 24 BinnedData … … 39 39 `Background`, 40 40 41 IntegralSignal,42 IntegralBackground,41 SignalI, 42 BackgroundI, 43 43 44 `Signal` - `Background` 45 SQRT(`Signal`) 46 SQRT(`Background`) 47 ExcErr(`Signal`, `Background`) 48 LiMa( `Signal`, `Background`) 44 `Signal` - `Background` AS Excess, 45 SQRT(`Signal`) AS ErrSignal, 46 SQRT(`Background`) AS ErrBackground, 47 ExcErr(`Signal`, `Background`) AS ErrExcess, 48 LiMa( `Signal`, `Background`) AS Significance, 49 49 50 IntegralSignal - IntegralBackground AS IntegralExcess,51 SQRT( IntegralSignal) AS ErrIntegralSignal,52 SQRT( IntegralBackground) AS ErrIntegralBackground,53 ExcErr( IntegralSignal, IntegralBackground) AS ErrIntegralExcess,54 LiMa( IntegralSignal, IntegralBackground) AS IntegralSignificance,50 SignalI - BackgroundI AS ExcessI, 51 SQRT(SignalI) AS ErrSignalI, 52 SQRT(BackgroundI) AS ErrBackgroundI, 53 ExcErr(SignalI, BackgroundI) AS ErrExcessI, 54 LiMa( SignalI, BackgroundI) AS SignificanceI, 55 55 56 SumEnergyEst/SumW AS AvgEnergyEst,57 IntegralEnergyEst/IntegralSumW AS IntegralAvgEnergyEst,56 SumEnergyEst/SumW AS AvgEnergyEst, 57 EnergyEstI/SumWI AS AvgEnergyEstI, 58 58 59 %102:id.ExcessFluxW AS SimExcess,60 %102:id.ErrExcessFluxW AS ErrSimExcess,61 %102:id.IntegralExcessFluxW AS IntegralSimExcess,62 %102:id.ErrIntegralExcessFluxW AS ErrIntegralSimExcess,59 %102:id.ExcessFluxW AS SimExcess, 60 %102:id.ErrExcessFluxW AS ErrSimExcess, 61 %102:id.IntegralExcessFluxW AS SimExcessI, 62 %102:id.ErrIntegralExcessFluxW AS ErrSimExcessI, 63 63 64 64 -- For flux-vs-theta: Correction for already applied ZdWeights 65 65 Sim.SimFluxW/%103:weight AS SimFluxW, 66 66 Sim.ErrSimFluxW/%104:errweight AS ErrSimFluxW, 67 Sim.IntegralSimFluxW/%103:weight AS IntegralSimFluxW,68 Sim.ErrIntegralSimFluxW/%104:errweight AS Err IntegralSimFluxW67 Sim.IntegralSimFluxW/%103:weight AS SimFluxI, 68 Sim.ErrIntegralSimFluxW/%104:errweight AS ErrSimFluxI 69 69 FROM 70 70 Data … … 101 101 -- Integral Spectrum 102 102 103 IntegralSimExcess/IntegralSimFluxW AS IntegralEfficiency,103 SimExcessI/SimFluxI AS EfficiencyI, 104 104 105 IntegralExcess/IntegralSimExcess/AreaTime AS IntegralExcessRatio,106 IntegralExcess/IntegralSimExcess/AreaTime105 ExcessI/SimExcessI/AreaTime AS ExcessRatioI, 106 ExcessI/SimExcessI/AreaTime 107 107 * SQRT( 108 + POW(Err IntegralExcess / IntegralExcess, 2)109 + POW(Err IntegralSimExcess / IntegralSimExcess, 2)110 ) AS Err IntegralExcessRatio,108 + POW(ErrExcessI / ExcessI, 2) 109 + POW(ErrSimExcessI / SimExcessI, 2) 110 ) AS ErrExcessRatioI, 111 111 112 112 113 IntegralExcess/IntegralSimExcess*IntegralSimFluxW/AreaTime AS IntegralFlux,114 IntegralExcess/IntegralSimExcess*IntegralSimFluxW/AreaTime113 ExcessI/SimExcessI*SimFluxI/AreaTime AS FluxI, 114 ExcessI/SimExcessI*SimFluxI/AreaTime 115 115 * SQRT( 116 + POW(Err IntegralExcess / IntegralExcess, 2)117 + POW(Err IntegralSimExcess / IntegralSimExcess, 2)118 + POW(Err IntegralSimFluxW / IntegralSimFluxW,2)119 ) AS Err IntegralFlux116 + POW(ErrExcessI / ExcessI, 2) 117 + POW(ErrSimExcessI / SimExcessI, 2) 118 + POW(ErrSimFluxI / SimFluxI, 2) 119 ) AS ErrFluxI 120 120 121 121 FROM
Note:
See TracChangeset
for help on using the changeset viewer.