iceCube.uhe.muonModel
Class ElbertFluxTableFactory

java.lang.Object
  extended by iceCube.uhe.muonModel.ElbertFluxTableFactory

public class ElbertFluxTableFactory
extends java.lang.Object

This class handles the table containing the atmospheric muon flux calculated by PropagatingAtmMuonFlux class PropagatingAtmMuonFlux.getDFMuDLogE(logE,cosZenith) for combinations of alpha and Eth in AtmMuonBundleFlux. While direct use of PropagatingAtmMuonFlux must reads propagation matrix data each time which takes I/O time, this class does not need to read the matrix data that realizes faster processing. It is mainly used in AtmMuonBunfleFitter static class in the analysis package. The main method of MakeElbertFluxTable class generates the table file this class handles. In order to reduce the data size, fluxes with only the limited range of Eth in the Elbert model that can be consistent with the IceCube data are stored in the table. This range is stored in the protected vauluables

    protected double[] muEThMin;       // [alpha]
    protected double[] muEThStepSize;  // [alpha]
    public int[] numberOfMuEThSteps;// [alpha]
   
in each of alpha bins. The range of the alpha parameter of the Elbert formola is defined by the protected member valuables
    protected double alphaMin = 1.85;
    protected double alphaStepSize = 0.01;
    public final int numberOfAlphaSteps = 36;

   alpha =  alphaMin + alphaStepSize x alphabin
   
Check out the simple main method for demonstration of this factory. Written by S. Yoshida 2008 June 2nd


Field Summary
protected  int alphaBin
           
static double alphaMin
          Minimum bound of alpha in the tanle.
static double alphaStepSize
          Step size of the alpha in the table
protected  double[][][][] dFMuDLogEarray
           
protected static double[] icedist
           
protected  double logEmuonMin
           
protected  double logEmuonStepSize
           
static int maxNumberOfMuEThSteps
          Number of bins of the Muon Energy Threshold in the table
protected  int muEThBin
           
protected  double[] muEThMin
           
protected  double[] muEThStepSize
           
static int numberOfAlphaSteps
          Number of bins of the alpha in the table
protected static int numberOfDistance
           
protected  int numberOfEmuon
           
 int[] numberOfMuEThSteps
           
protected static java.lang.String[] tableFileName
           
static java.lang.String tablePath
          Path to the directory where the flux tables are stored.
 
Constructor Summary
ElbertFluxTableFactory()
          Default constrctor : Reads the table data from all the files tablePath + tableFileName[i].
ElbertFluxTableFactory(java.lang.String fileName, int distanceIndex)
          This consrtuctor reads the single table data from the fine given in the argument.
 
Method Summary
 double getAlpha()
          Return the alpha value set by setElbertParameters
 double getDFMuDLogE(double distance, double logEmu)
          Returns dFMu/dLogE for given indexes of distance, logEmu.
 double getDFMuDLogE(double alpha, double muETh, double distance, double logEmu)
          Returns dFMu/dLogE for given alpha, muEth, distance, logEmu.
 double getDFMuDLogE(int ialpha, int iMuETh, double distance, double logEmu)
          Returns dFMu/dLogE for given indexes of alpha, muEth, distance, logEmu.
 double getMuETh()
          Return the muETh value set by setElbertParameters
static void main(java.lang.String[] args)
          Simple main function for debugging/demonstrating this class
protected  void readTableData()
          Reading out the table data files from tableFileName[i]
protected  void readTableData(java.lang.String fileName, int distanceIndex)
          Reading out the table data file with name fileName
 void setElbertParameters(double alpha)
          Set alpha.Eth is set to be the lowest value i.e.
 void setElbertParameters(double alpha, double muETh)
          Set alpha and the threshold energy of Muon.
 void setElbertParameters(int alphabin)
          Set the bin numbers of alpha.
 void setElbertParameters(int alphabin, int muEThbin)
          Set the bin numbers of alpha and the threshold energy of Muon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tablePath

public static java.lang.String tablePath
Path to the directory where the flux tables are stored.


tableFileName

protected static final java.lang.String[] tableFileName

numberOfDistance

protected static final int numberOfDistance

icedist

protected static double[] icedist

alphaMin

public static double alphaMin
Minimum bound of alpha in the tanle. any value of alpha larger than this works in this class. Determined by range of the flux table generated by the MakeElbertFluxTable in the muonModel package.


alphaStepSize

public static double alphaStepSize
Step size of the alpha in the table


numberOfAlphaSteps

public static int numberOfAlphaSteps
Number of bins of the alpha in the table


muEThMin

protected double[] muEThMin

muEThStepSize

protected double[] muEThStepSize

numberOfMuEThSteps

public int[] numberOfMuEThSteps

maxNumberOfMuEThSteps

public static int maxNumberOfMuEThSteps
Number of bins of the Muon Energy Threshold in the table


logEmuonMin

protected double logEmuonMin

logEmuonStepSize

protected double logEmuonStepSize

numberOfEmuon

protected int numberOfEmuon

dFMuDLogEarray

protected double[][][][] dFMuDLogEarray

alphaBin

protected int alphaBin

muEThBin

protected int muEThBin
Constructor Detail

ElbertFluxTableFactory

public ElbertFluxTableFactory()
                       throws java.io.IOException
Default constrctor : Reads the table data from all the files tablePath + tableFileName[i].

Throws:
java.io.IOException

ElbertFluxTableFactory

public ElbertFluxTableFactory(java.lang.String fileName,
                              int distanceIndex)
                       throws java.io.IOException
This consrtuctor reads the single table data from the fine given in the argument.
        String fileName   : name of the table file name you read
        int distanceIndex : index of distance to contain the flux data in the array
        

Throws:
java.io.IOException
Method Detail

readTableData

protected void readTableData()
                      throws java.io.IOException
Reading out the table data files from tableFileName[i]

Throws:
java.io.IOException

readTableData

protected void readTableData(java.lang.String fileName,
                             int distanceIndex)
                      throws java.io.IOException
Reading out the table data file with name fileName
        String fileName   : name of the table file name you read
        int distanceIndex : index of distance to contain the flux data in the array
        

Throws:
java.io.IOException

getDFMuDLogE

public double getDFMuDLogE(int ialpha,
                           int iMuETh,
                           double distance,
                           double logEmu)
Returns dFMu/dLogE for given indexes of alpha, muEth, distance, logEmu.
        ialpha = (alpha - alphaMin)/alphaStepSize
        iMuETh = (muETh - muEThMin)/muEThStepSize
        distance : Propagation distance [cm]
        logEmu : log(Muon Bundle Energy[GeV])
        


getDFMuDLogE

public double getDFMuDLogE(double alpha,
                           double muETh,
                           double distance,
                           double logEmu)
Returns dFMu/dLogE for given alpha, muEth, distance, logEmu.
        alpha : The Elbert formula's parameter - used in AtmMuonBundleFlux class
        muETh : The threshold energy of muon   - used in AtmMuonBundleFlux class
        distance : Propagation distance [cm]
        logEmu : log(Muon Bundle Energy[GeV])
        


setElbertParameters

public void setElbertParameters(int alphabin,
                                int muEThbin)
Set the bin numbers of alpha and the threshold energy of Muon. Once you set these bins, calling getDFMuDLogE(distance, logEmu) gives the bundle flux. The relation between bin number and the values are :
        alphabin = (alpha - alphaMin)/alphaStepSize
        muEThbin = (muETh - muEThMin)/muEThStepSize
        
They are must be within [0, numberOfAlphaSteps], [0, numberOfMuEThSteps[alphabin]], which is determined by the calculated range of the table data.


setElbertParameters

public void setElbertParameters(double alpha,
                                double muETh)
Set alpha and the threshold energy of Muon. Once you set these bins, calling getDFMuDLogE(distance, logEmu) gives the bundle flux.


setElbertParameters

public void setElbertParameters(int alphabin)
Set the bin numbers of alpha. Eth is set to be the lowest value i.e. that in the first bin. Once you set these bins, calling getDFMuDLogE(distance, logEmu) gives the bundle flux. The relation between bin number and the values are :
        alphabin = (alpha - alphaMin)/alphaStepSize
        
They are must be within [0, numberOfAlphaSteps], which is determined by the calculated range of the table data.


setElbertParameters

public void setElbertParameters(double alpha)
Set alpha.Eth is set to be the lowest value i.e. that in the first bin. Once you set these bins, calling getDFMuDLogE(distance, logEmu) gives the bundle flux.


getAlpha

public double getAlpha()
Return the alpha value set by setElbertParameters


getMuETh

public double getMuETh()
Return the muETh value set by setElbertParameters


getDFMuDLogE

public double getDFMuDLogE(double distance,
                           double logEmu)
Returns dFMu/dLogE for given indexes of distance, logEmu. The parameters in the Elbert Formula, alpha and muETh must be set in advance by the method setElbertParameters.
        distance : Propagation distance [cm]
        logEmu : log(Muon Bundle Energy[GeV])
        


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Simple main function for debugging/demonstrating this class

Throws:
java.io.IOException