iceCube.uhe.analysis
Class I3ParticleBuilder

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

public class I3ParticleBuilder
extends java.lang.Object

Build IceCube event(s) reading from the f2k data via standard input. By this way, You can leave the IceTray/i3 file framwork into the pure java world. The built I3Particle objects are outputed via outputStream. Orignally written by S. Yoshida for the IceCube EHE analysis


Constructor Summary
I3ParticleBuilder(boolean isMCTruth)
          Constructor.
 
Method Summary
 void corsikaMMC()
          Call this method before executing process() when you read out the Corsika-mmc track primary.
 void fillMCPrimarySpectrumWeight(double powerLaw)
          decide if you fills the MC spectrum weight with the dN/dLogE of the MC data.
 void fillNeutrinoWeight(InteractionsMatrix nuCCmtx, InteractionsMatrix nuNCmtx)
          You must call this method if the primary is a (interaction-weighted) neutrino.
protected  I3Particle generateI3Particle(int flavor, int doublet, double energyMCTruth, double energyReco, double distance, double mcWeight, J3Line axisInIce3MCTruth, J3Line axisInIce3Reco, int eventNumber, double npeFADC, double npeATWD, double npeBest, int nDOMsFADC, int nDOMsATWD, int nDOMsLaunch)
          Generate I3Particle from a set of the given valuables.
protected  I3Particle generateI3Particle(int flavor, int doublet, double energy, double distance, J3Line axisInIce3, int eventNumber, double npeFADC, double npeATWD, double npeBest, int nDOMsFADC, int nDOMsATWD, int nDOMsLaunch)
          Generate I3Particle from a set of the given valuables.
 void process(java.io.DataInputStream in, java.io.OutputStream out, boolean isFullData)
          the method to build I3Particle objects with data from the DataInputStream.
 void setRangeOfMCSpectrum(double logEnergyMinimum, double logEnergyMaximum)
          Set range of MC primary spectrum dN/dE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I3ParticleBuilder

public I3ParticleBuilder(boolean isMCTruth)
Constructor. You are forced to choose MC or real data mode.

Method Detail

setRangeOfMCSpectrum

public void setRangeOfMCSpectrum(double logEnergyMinimum,
                                 double logEnergyMaximum)
Set range of MC primary spectrum dN/dE
       double logEnergyMinimum :  log(Energy Minimum [GeV]) in the spectral range
       double logEnergyMaximum :  log(Energy Maximum [GeV]) in the spectral range
       


fillMCPrimarySpectrumWeight

public void fillMCPrimarySpectrumWeight(double powerLaw)
decide if you fills the MC spectrum weight with the dN/dLogE of the MC data. If true, then the method process() calls I3ParticleAnalysisFactor.getDNDLogE() and fills the MC weight with the retuned value
        double powerLaw    :   dN/dE = E**(-powerLaw)
        


fillNeutrinoWeight

public void fillNeutrinoWeight(InteractionsMatrix nuCCmtx,
                               InteractionsMatrix nuNCmtx)
You must call this method if the primary is a (interaction-weighted) neutrino. Then MCPrimarySpectrum weight is convoluted with the interaction weight. You have to call fillMCPrimarySpectrumWeight() a priori. InteractionsMatrix of NeutrinoCharge and NeutrinoNeutral objects in the interaction package (iceCube.uhe.interactions) are set for calculating the relevant cross section.


corsikaMMC

public void corsikaMMC()
Call this method before executing process() when you read out the Corsika-mmc track primary.


process

public void process(java.io.DataInputStream in,
                    java.io.OutputStream out,
                    boolean isFullData)
             throws java.io.IOException
the method to build I3Particle objects with data from the DataInputStream. Generated I3Particle objects are serialized and written out to OutputStream.

Throws:
java.io.IOException

generateI3Particle

protected I3Particle generateI3Particle(int flavor,
                                        int doublet,
                                        double energy,
                                        double distance,
                                        J3Line axisInIce3,
                                        int eventNumber,
                                        double npeFADC,
                                        double npeATWD,
                                        double npeBest,
                                        int nDOMsFADC,
                                        int nDOMsATWD,
                                        int nDOMsLaunch)
Generate I3Particle from a set of the given valuables.


generateI3Particle

protected I3Particle generateI3Particle(int flavor,
                                        int doublet,
                                        double energyMCTruth,
                                        double energyReco,
                                        double distance,
                                        double mcWeight,
                                        J3Line axisInIce3MCTruth,
                                        J3Line axisInIce3Reco,
                                        int eventNumber,
                                        double npeFADC,
                                        double npeATWD,
                                        double npeBest,
                                        int nDOMsFADC,
                                        int nDOMsATWD,
                                        int nDOMsLaunch)
Generate I3Particle from a set of the given valuables. This method will be used when you build a MC event.