iceCube.uhe.analysis
Class I3ParticleAnalysisFactory

java.lang.Object
  extended by iceCube.uhe.analysis.I3ParticleAnalysisFactory
Direct Known Subclasses:
I3ParticleIC22AnalysisFactory

public class I3ParticleAnalysisFactory
extends java.lang.Object

I3Particles Analysis Factory. Utility methods to help your analysis using I3Particles. A main function is making a histogram that consists of events satisfying the criteria defined by Criteria class. Written originally by S. Yoshida for the IceCube EHE analysis. 2007/1/21


Field Summary
static int[][] badRunID
          Bad Run Numbers..
protected  boolean filterOutBadRunData
          Flag for filtering out the bad run data
protected  double[][] histCosZenithFgQuality
           
protected  double[][] histLogEnergyCosZenith
           
protected  double[][] histLogNpeCosZenith
           
protected  double[][] histLogNpeFgQuality
           
protected  double[][] histLogNpeLogEnergy
           
protected  double[][] histLogNpeNDOM
           
protected static double ln10
           
protected static double maxLogEnergy
           
protected static double maxLogNpe
           
protected  double mcArea
          Area where juliet particles are thrown in the MC simulation .
protected  double mcCorsikaArea
          Area of the Corsika MMC particles are thrown
protected  double mcCorsikaOmega
          Solid angle of the Corsika mmc particles
protected  double mcOmega
          Solid angle where juliet particles are thrown in the MC simulation
protected static double minLogEnergy
           
protected static double minLogNpe
           
protected static double minLogNPEToAnalize
          The lowest level Requirement of NPEs.
protected  double minLogNumberOfEvents
           
protected static int minNDOMsToAnalize
          The lowest level Requirement of NDOMs.
protected  AtmMuonBundleFlux muonBundle
          AtmMuonBundleFlux object for calculating the primary cosmic ray energy
protected  int numberOfFilledI3Particles
           
protected  double observationTime
          Observation Time [sec]
protected static double xCenterOfIC9
           
protected static double yCenterOfIC9
           
 
Constructor Summary
I3ParticleAnalysisFactory(java.io.InputStream in)
          Default Constructor
I3ParticleAnalysisFactory(java.io.InputStream in, boolean filterOutBadRunData)
          Constructor
 
Method Summary
 void autoScale(boolean flag)
           
static IComparisonResult calcChi2(IHistogram1D mcHistogram, IHistogram1D dataHistogram)
          Chi^2 comparison - analysis utility method.
static IComparisonResult calcChi2(IHistogram1D mcHistogram, IHistogram1D dataHistogram, double xFirst, double xLast)
          Chi^2 comparison - analysis utility method.
static IComparisonResult calcChi2(IHistogram1D mcHistogram, IHistogram1D dataHistogram, int binFirst, int binLast)
          Chi^2 comparison - analysis utility method
 void changeAOmega()
          Change the MC area and solid angle to the Corska configuration
 double drawEnergyDistributionOnXfig()
          Draw Energy distribution with slices of cos(zenith) with its bin width
 void drawEventsWithAtmMuonWeights(java.lang.String modelName)
          draw atmospheric muon weighted-events
 void drawEventsWithGZKWeights(java.lang.String modelName)
          draw GZK flux weighted-events
 void drawEventsWithNoWeights()
          draw unweighted-events
 double drawFirstGuessQualityDistributionOnXfig()
          Draw First Guess Quality distribution with slices of Npe
 double drawNpeDistributionOnXfig()
          Draw Npe distribution with slices of cos(zenith) with its bin width
 double drawNpeDistributionWithNDOMsliceOnXfig()
          Draw NPE distribution with slices of NDOM with its bin width
 double drawNpeDistributionWithSliceOfEnergyOnXfig()
          Draw Npe distribution with slices of Log(Energy) with its bin width
 double drawZenithAngleDistributionOnXfig()
          Draw cos(zenith) distribution with slices of Npe with its bin width
 double drawZenithAngleDistributionWithFGsliceOnXfig()
          Draw cos(zenith) distribution with slices of First Guess quality with its bin width
protected static double getDNDLogE(double powerLaw, double energy, double logEnergyMinimum, double logEnergyMaximum)
          Calculate the MC Primary Spectrum dN/dLogE except normalization constatnt determined by the total numner of MC events.
protected  I3Particle getI3ParticleLite(I3Particle iceParticle)
          make I3Particle as a temporal dataclass for the analysis.
 java.util.ListIterator getParticleIterator()
          Return the Particle Iterator loping over I3Particles
protected  boolean isBadRunData(I3Particle iceParticle)
          Judge if this event has to be excluded because of the bad run.
 void makeHistogram()
          Making historgram for drawing by "grafig" graphics package on Xfig.
protected  IHistogram1D makeJaida1DHistogram(java.lang.String option, IHistogramFactory jaidaHistoFactory)
          Histogram name is assinged by the default - same as "option"
protected  IHistogram1D makeJaida1DHistogram(java.lang.String option, java.lang.String histName, boolean bootstrap, IHistogramFactory jaidaHistoFactory)
          Make and Fill IHistogram1D by reading out the variables of I3Particles
protected  IHistogram2D makeJaida2DHistogram(java.lang.String option, IHistogramFactory jaidaHistoFactory)
          Histogram name is assinged by the default - same as "option"
protected  IHistogram2D makeJaida2DHistogram(java.lang.String option, java.lang.String histName, boolean bootstrap, IHistogramFactory jaidaHistoFactory)
          Make and Fill IHistogram2D by reading out the variables of I3Particles
 void plotByJointLine()
          Plotting histogram by jointed-line
 void plotByPointsWithErrorBars()
          Plotting histogram by points with error bars
protected  void readI3Particles(java.io.InputStream in)
          reading the I3Particle objects
 void setBinSize(double deltaLogNpe, double deltaCosZenith)
           
 void setBinSize(double deltaLogNpe, double deltaCosZenith, double deltaFgQuality)
           
 void setBinSize(double deltaLogEnergy, double deltaLogNpe, double deltaCosZenith, double deltaFgQuality)
          Set historgram bin size
 void setCriteria(Criteria criteria)
          Sets the criteria on making Histogram
 void setMaxRangeOfNDOMsInDrawing(int nDOMs)
          Set Max Number Of DOMs in Drawing
 void setMCArea(double area)
          Set the MC area [cm^2]
 void setMCSolidAngle(double omega)
          Set the MC solid angle [sr]
 void setObservationTime(double time)
          Set the MC solid angle [sec]
 void switchToMCTruth()
          Switch to parameters concerned with MCtrue.
 void switchToReco()
          Switch to parameters concerned with Reco results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ln10

protected static final double ln10

xCenterOfIC9

protected static double xCenterOfIC9

yCenterOfIC9

protected static double yCenterOfIC9

minLogNumberOfEvents

protected double minLogNumberOfEvents

maxLogNpe

protected static double maxLogNpe

minLogNpe

protected static double minLogNpe

maxLogEnergy

protected static double maxLogEnergy

minLogEnergy

protected static double minLogEnergy

minNDOMsToAnalize

protected static int minNDOMsToAnalize
The lowest level Requirement of NDOMs. For saving memory. Only I3Particles to pass this condition will be stored in the container and subject to further analysis with higher level cuts defined by the Criteral class


minLogNPEToAnalize

protected static double minLogNPEToAnalize
The lowest level Requirement of NPEs. For saving memory. Only I3Particles to pass this condition will be stored in the container and subject to further analysis with higher level cuts defined by the Criteral class


numberOfFilledI3Particles

protected int numberOfFilledI3Particles

mcArea

protected double mcArea
Area where juliet particles are thrown in the MC simulation . Unit should be [cm^2].


mcOmega

protected double mcOmega
Solid angle where juliet particles are thrown in the MC simulation


mcCorsikaArea

protected double mcCorsikaArea
Area of the Corsika MMC particles are thrown


mcCorsikaOmega

protected double mcCorsikaOmega
Solid angle of the Corsika mmc particles


observationTime

protected double observationTime
Observation Time [sec]


muonBundle

protected AtmMuonBundleFlux muonBundle
AtmMuonBundleFlux object for calculating the primary cosmic ray energy


badRunID

public static final int[][] badRunID
Bad Run Numbers.. for the real data analsis only


filterOutBadRunData

protected boolean filterOutBadRunData
Flag for filtering out the bad run data


histLogNpeCosZenith

protected double[][] histLogNpeCosZenith

histLogNpeNDOM

protected double[][] histLogNpeNDOM

histLogNpeFgQuality

protected double[][] histLogNpeFgQuality

histCosZenithFgQuality

protected double[][] histCosZenithFgQuality

histLogNpeLogEnergy

protected double[][] histLogNpeLogEnergy

histLogEnergyCosZenith

protected double[][] histLogEnergyCosZenith
Constructor Detail

I3ParticleAnalysisFactory

public I3ParticleAnalysisFactory(java.io.InputStream in)
                          throws java.io.IOException
Default Constructor
        InputStream in  : Stream to readout a series of I3Particles that is subject
                          to your analysis
        
It reads all I3Particles from InputStream and hold them in form of List.

Throws:
java.io.IOException

I3ParticleAnalysisFactory

public I3ParticleAnalysisFactory(java.io.InputStream in,
                                 boolean filterOutBadRunData)
                          throws java.io.IOException
Constructor
        InputStream in  : Stream to readout a series of I3Particles that is subject
                          to your analysis
        filterOutBadRunData  :  do not use events in the bad run. The real data analysis only.
        
It reads all I3Particles from InputStream and hold them in form of List.

Throws:
java.io.IOException
Method Detail

readI3Particles

protected void readI3Particles(java.io.InputStream in)
                        throws java.io.IOException
reading the I3Particle objects

Throws:
java.io.IOException

getI3ParticleLite

protected I3Particle getI3ParticleLite(I3Particle iceParticle)
make I3Particle as a temporal dataclass for the analysis. This method is introduced for saving memory


getParticleIterator

public java.util.ListIterator getParticleIterator()
Return the Particle Iterator loping over I3Particles


setMCArea

public void setMCArea(double area)
Set the MC area [cm^2]


setMCSolidAngle

public void setMCSolidAngle(double omega)
Set the MC solid angle [sr]


changeAOmega

public void changeAOmega()
Change the MC area and solid angle to the Corska configuration


setObservationTime

public void setObservationTime(double time)
Set the MC solid angle [sec]


isBadRunData

protected boolean isBadRunData(I3Particle iceParticle)
Judge if this event has to be excluded because of the bad run. You have to set filterOutBadRunData(true) to get this method effective.


autoScale

public void autoScale(boolean flag)

getDNDLogE

protected static double getDNDLogE(double powerLaw,
                                   double energy,
                                   double logEnergyMinimum,
                                   double logEnergyMaximum)
Calculate the MC Primary Spectrum dN/dLogE except normalization constatnt determined by the total numner of MC events.
        double powerLaw    :   dN/dE = E**(-powerLaw)
        double energy      :   Energy of this I3Particle [GeV]
        double logEnergyMinimum :  log(Energy Minimum [GeV]) in the spectral range
        double logEnergyMaximum :  log(Energy Maximum [GeV]) in the spectral range
        


setBinSize

public void setBinSize(double deltaLogEnergy,
                       double deltaLogNpe,
                       double deltaCosZenith,
                       double deltaFgQuality)
Set historgram bin size
        double deltaLogEnergy  bin size of logEnergy
        double deltaLogNpe     bin size of logNpe
        double deltaCosZenith  bin size of cos(zenith angle)
        double deltaFgQuality  bin size of "First Guess Quality index" in unit of beta
        


setBinSize

public void setBinSize(double deltaLogNpe,
                       double deltaCosZenith,
                       double deltaFgQuality)

setBinSize

public void setBinSize(double deltaLogNpe,
                       double deltaCosZenith)

setMaxRangeOfNDOMsInDrawing

public void setMaxRangeOfNDOMsInDrawing(int nDOMs)
Set Max Number Of DOMs in Drawing


switchToMCTruth

public void switchToMCTruth()
Switch to parameters concerned with MCtrue.


switchToReco

public void switchToReco()
Switch to parameters concerned with Reco results.


plotByJointLine

public void plotByJointLine()
Plotting histogram by jointed-line


plotByPointsWithErrorBars

public void plotByPointsWithErrorBars()
Plotting histogram by points with error bars


drawEventsWithAtmMuonWeights

public void drawEventsWithAtmMuonWeights(java.lang.String modelName)
draw atmospheric muon weighted-events


drawEventsWithGZKWeights

public void drawEventsWithGZKWeights(java.lang.String modelName)
draw GZK flux weighted-events


drawEventsWithNoWeights

public void drawEventsWithNoWeights()
draw unweighted-events


setCriteria

public void setCriteria(Criteria criteria)
Sets the criteria on making Histogram


makeHistogram

public void makeHistogram()
Making historgram for drawing by "grafig" graphics package on Xfig. You have to call this method before drawing any plots on xfig.


drawNpeDistributionOnXfig

public double drawNpeDistributionOnXfig()
Draw Npe distribution with slices of cos(zenith) with its bin width


drawNpeDistributionWithSliceOfEnergyOnXfig

public double drawNpeDistributionWithSliceOfEnergyOnXfig()
Draw Npe distribution with slices of Log(Energy) with its bin width


drawEnergyDistributionOnXfig

public double drawEnergyDistributionOnXfig()
Draw Energy distribution with slices of cos(zenith) with its bin width


drawZenithAngleDistributionOnXfig

public double drawZenithAngleDistributionOnXfig()
Draw cos(zenith) distribution with slices of Npe with its bin width


drawZenithAngleDistributionWithFGsliceOnXfig

public double drawZenithAngleDistributionWithFGsliceOnXfig()
Draw cos(zenith) distribution with slices of First Guess quality with its bin width


drawNpeDistributionWithNDOMsliceOnXfig

public double drawNpeDistributionWithNDOMsliceOnXfig()
Draw NPE distribution with slices of NDOM with its bin width


drawFirstGuessQualityDistributionOnXfig

public double drawFirstGuessQualityDistributionOnXfig()
Draw First Guess Quality distribution with slices of Npe


makeJaida1DHistogram

protected IHistogram1D makeJaida1DHistogram(java.lang.String option,
                                            java.lang.String histName,
                                            boolean bootstrap,
                                            IHistogramFactory jaidaHistoFactory)
Make and Fill IHistogram1D by reading out the variables of I3Particles
        String option
        "logEnergy"      :  plot logE
        "logRecoEnergy"  :  plot logRecoEnergy
        "logNpe"         :  plot logNpe
        "cosZenith"      :  plot cos(Zenith Angle)
        "nDOMs"          :  plot numberOfDOMs
        "firstGuess"     :  plot beta - first guess quality
        boolean bootstrap 
        false : default. No bootstraping
        true  : resampling the (weighted) I3Particles 
                following the poisson distribution.
        


makeJaida1DHistogram

protected IHistogram1D makeJaida1DHistogram(java.lang.String option,
                                            IHistogramFactory jaidaHistoFactory)
Histogram name is assinged by the default - same as "option"


makeJaida2DHistogram

protected IHistogram2D makeJaida2DHistogram(java.lang.String option,
                                            java.lang.String histName,
                                            boolean bootstrap,
                                            IHistogramFactory jaidaHistoFactory)
Make and Fill IHistogram2D by reading out the variables of I3Particles
        String option
        "logE-Npe"        :  plot logE-logNpe
        "logECR-Npe"      :  plot log(Primary Cosmic Ray E)-logNpe
        "logECR-logE"     :  plot log(Primary Cosmic Ray E)-logE
        "logRecoE-Npe"    :  plot logRecoE-logNpe
        "logE-cosZenith"  :  plot logE-cosZenith
        "logNpe-cosZenith":  plot logNpe-cosZenith
        "logNpe-CobZ"     :  plot logNpe-ConterOfBrightnessZ
        "CobR-CobZ"       :  plot CenterOfBrightness(sqrt(x^2+y^2))-ConterOfBrightnessZ
        boolean bootstrap 
        false : default. No bootsraping
        true  : resampling the (weighted) I3Particles 
                following the poisson distribution.
        


makeJaida2DHistogram

protected IHistogram2D makeJaida2DHistogram(java.lang.String option,
                                            IHistogramFactory jaidaHistoFactory)
Histogram name is assinged by the default - same as "option"


calcChi2

public static IComparisonResult calcChi2(IHistogram1D mcHistogram,
                                         IHistogram1D dataHistogram,
                                         int binFirst,
                                         int binLast)
Chi^2 comparison - analysis utility method


calcChi2

public static IComparisonResult calcChi2(IHistogram1D mcHistogram,
                                         IHistogram1D dataHistogram,
                                         double xFirst,
                                         double xLast)
Chi^2 comparison - analysis utility method. [xFirst xMast] in the histograms participates the chi^2 calculation


calcChi2

public static IComparisonResult calcChi2(IHistogram1D mcHistogram,
                                         IHistogram1D dataHistogram)
Chi^2 comparison - analysis utility method. All bins in the histograms participates the chi^2 calculation