Changeset 19915


Ignore:
Timestamp:
Dec 16, 2019, 8:03:18 PM (5 weeks ago)
Author:
tbretz
Message:
Improved comments
Location:
trunk/FACT++/spectrum
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/spectrum/data.sql

    r19907 r19915  
    11SELECT
     2   -- Convert variable to bin index
    23   INTERVAL(Theta, %107:theta)  AS `.theta`,
    34   INTERVAL(LogEnergyEst, %108:sparse)  AS  `.sparse_est`,
     
    78   COUNT(IF(Weight<0, 1, NULL))  AS  `Background`,
    89
    9    -- Average Energy
     10   -- Average Energy: SumEnergyEst/SumW
    1011   SUM(Weight*POW(10, LogEnergyEst))  AS  SumEnergyEst,
    1112   SUM(Weight)                        AS  SumW
  • trunk/FACT++/spectrum/simulation.sql

    r19907 r19915  
    33   SELECT
    44      Weight, Energy, LogEnergyEst,
     5
     6      -- Convert variable to bin index
    57      INTERVAL(Theta, %107:theta)  AS `.theta`,
    68      INTERVAL(LogEnergyEst, %108:sparse)  AS `.sparse_est`,
     
    3840*/
    3941
    40    -- Binning in estimated energy: Signal, Background, Excess
     42   -- Binning in estimated energy: Signal, Background
    4143   SUM(  IF(Weight>0,        ZdWeight*SpectralWeight,    0))  AS  SignalW,
    4244   SUM(  IF(Weight<0,        ZdWeight*SpectralWeight,    0))  AS  BackgroundW,
     
    4446   SUM(  IF(Weight<0, POW(ErrZdWeight*SpectralWeight,2), 0))  AS  BackgroundW2,
    4547
    46    -- Energy Estimation
     48   -- Energy Estimation: Bias=ResidualW/SignalW; Resolution=sigma(Bias)
    4749   SUM(IF(Weight>0,     Residual*   ZdWeight*SpectralWeight, 0))  AS  ResidualW,
    4850   SUM(IF(Weight>0, POW(Residual,2)*ZdWeight*SpectralWeight, 0))  AS  ResidualW2,
    4951
     52   -- Average Energy: SumEnergyX/SignalW
    5053   SUM(IF(Weight>0, Energy               *ZdWeight*SpectralWeight, 0))  AS  SumEnergySimW,
    5154   SUM(IF(Weight>0, POW(10, LogEnergyEst)*ZdWeight*SpectralWeight, 0))  AS  SumEnergyEstW
  • trunk/FACT++/spectrum/summary-est.sql

    r19902 r19915  
    1111   SELECT
    1212      *,
    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
    1515   FROM
    1616      BinningEnergy_%100:binning
  • trunk/FACT++/spectrum/summary-sim.sql

    r19907 r19915  
    1111   SELECT
    1212      *,
    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
    1515   FROM
    1616      %101:binning
Note: See TracChangeset for help on using the changeset viewer.