iceCube.uhe.analysis
Class NPEthresholdOptimizer

java.lang.Object
  extended by iceCube.uhe.analysis.NPEthresholdOptimizer

public class NPEthresholdOptimizer
extends java.lang.Object

Optimize NPE threshold to minimize either the model rejection potential or the signal discovery potential. Rely on numRecipes.FeldmanCousins.java Written originally by S. Yoshida for the IceCube EHE analysis. 2010/3/29


Field Summary
protected  java.lang.String aidaFileName
          name of the output Aida Tree file
protected  IHistogram1D bgRate1D
           
protected  IHistogram2D bgRate2D
          histogram to store number of background events
protected  int dimensionNPE
          dimension of the logNPE.
protected  int dimensionY
          dimension of the parameter y.
protected  double logNPEMax
          maximum range of logNPE
protected  double logNPEMin
          mininum range of logNPE
protected  IHistogram1D modelRejectHisto
          Histogram to store the model rejection factor
protected  IHistogram1D signalDiscoverPotentialHisto
          Histogram to store the signal discovery potential
protected  IHistogram1D signalRate1D
           
protected  IHistogram2D signalRate2D
          histogram to store number of signal events
protected  double yMax
          maximum range of the parameter y (ex.
protected  double yMin
          mininum range of the parameter y (ex.
 
Constructor Summary
NPEthresholdOptimizer()
          Constructor.
NPEthresholdOptimizer(int dimensionY, double yMin, double yMax, int dimensionNPE, double logNPEMin, double logNPEMax)
          Constructor.
 
Method Summary
 void calculateAndFillModelRejectionFactor(double y, boolean isIntegral)
          Calculate the model rejection factor for each NPE threshold and fill the 1D histogram(ogNPE) with the factors.
 void calculateAndFillSignalDiscoveryPotential(double y, double significanceOfDiscovery, boolean isIntegral)
          Calculate the signal discovery potential for each NPE threshold and fill the 1D histogram(ogNPE) with the factors.
static void main(java.lang.String[] args)
          A simple main method for test
 void plot()
          Plot the model rejection factor and the signal discovery poteintial as a function of logNPE
 void readAndFillEventRate(java.io.DataInputStream in)
          Reading the number of signal and background events binned in logNPE and y(such as cos(Zenith)
 void readAndFillEventRate(java.io.DataInputStream in, boolean wideFormat)
          Reading the number of signal and background events binned in logNPE and y(such as cos(Zenith).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dimensionY

protected int dimensionY
dimension of the parameter y. usually cosZenith, but depends on analysis


yMax

protected double yMax
maximum range of the parameter y (ex. cos(Zenith))


yMin

protected double yMin
mininum range of the parameter y (ex. cos(Zenith))


dimensionNPE

protected int dimensionNPE
dimension of the logNPE. bin


logNPEMax

protected double logNPEMax
maximum range of logNPE


logNPEMin

protected double logNPEMin
mininum range of logNPE


signalRate2D

protected IHistogram2D signalRate2D
histogram to store number of signal events


signalRate1D

protected IHistogram1D signalRate1D

bgRate2D

protected IHistogram2D bgRate2D
histogram to store number of background events


bgRate1D

protected IHistogram1D bgRate1D

modelRejectHisto

protected IHistogram1D modelRejectHisto
Histogram to store the model rejection factor


signalDiscoverPotentialHisto

protected IHistogram1D signalDiscoverPotentialHisto
Histogram to store the signal discovery potential


aidaFileName

protected java.lang.String aidaFileName
name of the output Aida Tree file

Constructor Detail

NPEthresholdOptimizer

public NPEthresholdOptimizer(int dimensionY,
                             double yMin,
                             double yMax,
                             int dimensionNPE,
                             double logNPEMin,
                             double logNPEMax)
                      throws java.io.IOException
Constructor. Creaate the Jaida Histogram [logNPE][y] to store number of background and signal events.
        int dimensionY   dimension of the parameter y (ex. cos(zenith) in histograms
        double yMin      mininum rang of the parameter y (ex. cos(zenith) in histograms
        double yMax      maximum rang of the parameter y (ex. cos(zenith) in histograms
        int dimensionNPE dimension of log(NPE)  in histograms
        double logNPEMin    mininum rang of log(NPE) in histograms
        double logNPEMax    maximum rang of log(NPE) in histograms
        

Throws:
java.io.IOException

NPEthresholdOptimizer

public NPEthresholdOptimizer()
                      throws java.io.IOException
Constructor. Creaate the Jaida Histogram [logNPE][y] to store number of background and signal events. Range of bins and dimensions are set by default values

Throws:
java.io.IOException
Method Detail

readAndFillEventRate

public void readAndFillEventRate(java.io.DataInputStream in)
                          throws java.io.IOException
Reading the number of signal and background events binned in logNPE and y(such as cos(Zenith)

Throws:
java.io.IOException

readAndFillEventRate

public void readAndFillEventRate(java.io.DataInputStream in,
                                 boolean wideFormat)
                          throws java.io.IOException
Reading the number of signal and background events binned in logNPE and y(such as cos(Zenith). Data format is different from the method above.

Throws:
java.io.IOException

calculateAndFillModelRejectionFactor

public void calculateAndFillModelRejectionFactor(double y,
                                                 boolean isIntegral)
Calculate the model rejection factor for each NPE threshold and fill the 1D histogram(ogNPE) with the factors. You have to fill the background and signal number historam first by FillSignalRate() and FillBGRate()
        double y  : presumably cosZenith, a parameter on y-axis. logNPE is on x-axis.
        boolean isIntegral  : if the filled BG/Signal rate is integral rate, set true.
        


calculateAndFillSignalDiscoveryPotential

public void calculateAndFillSignalDiscoveryPotential(double y,
                                                     double significanceOfDiscovery,
                                                     boolean isIntegral)
                                              throws java.io.IOException
Calculate the signal discovery potential for each NPE threshold and fill the 1D histogram(ogNPE) with the factors. You have to fill the background and signal number historam first by FillSignalRate() and FillBGRate()
        double y  : presumably cosZenith, a parameter on y-axis. logNPE is on x-axis.
        double significanceOfDiscovery : significance to define "discovery" of signals. 5.0 e.x., 5sigma
        boolean isIntegral  : if the filled BG/Signal rate is integral rate, set true.
        

Throws:
java.io.IOException

plot

public void plot()
Plot the model rejection factor and the signal discovery poteintial as a function of logNPE


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
A simple main method for test

Throws:
java.io.IOException