jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.model.plots
Class PredictedPlot

java.lang.Object
  extended by cedar.jetweb.model.plots.DataPlot
      extended by cedar.jetweb.model.plots.PredictedPlot
All Implemented Interfaces:
java.io.Serializable

public class PredictedPlot
extends DataPlot

A plot of predicted data. May contain two histograms - one predicted data set and a set of Real Data to which it can be compared.

Version:
$Date: 2006-05-16 20:26:13 +0100 (Tue, 16 May 2006) $ $Revision: 1145 $
Author:
S Butterworth
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cedar.jetweb.model.plots.DataPlot
chi2, collisionId, csnId, dataPoints, ecms, FITTED, hasdata, number, paperId, PREDICTED, proc, procIdWanted, REAL, shape, sysScale, title
 
Constructor Summary
PredictedPlot(DataPlot basePlot, RunSeries runSeriesIn)
          Instantiate a PredictedPlot using an existing plot
 
Method Summary
 void add(PredictedPlot plot2)
          Add plot2 to this plot.
static void adjustErrors(PredictedPlot plot)
           
 void fixZeroErrors(double lumi)
          Set zero errors to upper limits.
 DataPlot getCompPlot()
          Comparison DataPlot - a Real data set to be compared to this one - which should not itself be real.
 MCProcessType getMCProcessType()
          Return the MCProcessType used to generate this plot.
 int getProcIdWanted()
          Return the Id of the MCProcessType which should be used to generate this plot for the model which was used.
 int getRunSeriesId()
          The runSeriesId associated with this MC plot.
 boolean hasData()
          Populate the dataPoints array of points with points for this crossection from predicted points table
 boolean isPredictedBy(RunSeries rs)
          Return true if this plot is predicted by the input RunSeries.
 void setCompPlot(DataPlot newplot)
          Comparison DataPlot - a Real data set to be compared to this one - which should not itself be real.
 void setDataPoints(java.util.Enumeration<DataPoint> newDataPoints)
          Sets data points vector.
 void setRunSeriesId(int id)
          The runSeriesId associated with this MC plot.
 void toDB(int update)
          Write the data plot to the DB.
 boolean validMCProcessType()
          Return true if the RunSeries used to generate this plot is consistent with the requirements of the PlotSwitches.
 
Methods inherited from class cedar.jetweb.model.plots.DataPlot
addSwitch, deleteSwitch, getChi2, getChi2, getChi2, getCMEnergy, getCollisionId, getDataPoints, getId, getNDataSources, getNumber, getPaperId, getProcIdWanted, getSwitches, getSysScale, getTitle, getXLabel, getYLabel, getYMax, getYMin, getYMinNonZero, isDefaultFit, isDefaultSum, isLogarithmic, isShape, populateDBData, setChi2, setCMEnergy, setCollisionId, setDefaultFit, setDefaultSum, setFrom, setHasData, setId, setLogarithmic, setNumber, setPaperId, setShape, setSysScale, setTitle, setXLabel, setYLabel, storeSwitches, zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredictedPlot

public PredictedPlot(DataPlot basePlot,
                     RunSeries runSeriesIn)
              throws JetWebException
Instantiate a PredictedPlot using an existing plot

Parameters:
plot - DataPlot from which most things will be set and which will be used as the comparison plot.
dirName - relative name of DirName where the xml files are for this plot. If this is null, the data for the plot will be read from the database instead.
runSeriesIn - The runSeries used to generate this plot.
Throws:
JetWebException

Method Detail

setDataPoints

public void setDataPoints(java.util.Enumeration<DataPoint> newDataPoints)
Description copied from class: DataPlot
Sets data points vector.

Overrides:
setDataPoints in class DataPlot
See Also:
DataPoint


setRunSeriesId

public void setRunSeriesId(int id)
The runSeriesId associated with this MC plot. This is the pointer to the parameters used in this prediction.

Parameters:
id - - the runSeriesId


getRunSeriesId

public int getRunSeriesId()
The runSeriesId associated with this MC plot. This is the pointer to the parameters used in this prediction.

Returns:
runSeriesId


getCompPlot

public DataPlot getCompPlot()
Comparison DataPlot - a Real data set to be compared to this one - which should not itself be real.

Returns:
comparisonPlot


setCompPlot

public void setCompPlot(DataPlot newplot)
Comparison DataPlot - a Real data set to be compared to this one - which should not itself be real.

Parameters:
newplot - - the comparison plot


hasData

public boolean hasData()
                throws JetWebException
Populate the dataPoints array of points with points for this crossection from predicted points table

Overrides:
hasData in class DataPlot
Returns:
hasDBData
Throws:
JetWebException


toDB

public void toDB(int update)
          throws JetWebException
Write the data plot to the DB.

Parameters:
int - update = 0 do an update, otherwise insert.
Throws:
JetWebException


adjustErrors

public static void adjustErrors(PredictedPlot plot)
                         throws JetWebException
Throws:
JetWebException

add

public void add(PredictedPlot plot2)
         throws JetWebException
Add plot2 to this plot. The plot number and xml subdirName are checked and should be equal.

Throws:
JetWebException


fixZeroErrors

public void fixZeroErrors(double lumi)
                   throws JetWebException
Set zero errors to upper limits. If you can tell the plot how much integrated lumi it was generated from, and it has point with zero errors, it will set the errors for these points to the 1 sigma upper limit.

Throws:
JetWebException


isPredictedBy

public boolean isPredictedBy(RunSeries rs)
Return true if this plot is predicted by the input RunSeries.

Overrides:
isPredictedBy in class DataPlot


getMCProcessType

public MCProcessType getMCProcessType()
                               throws JetWebException
Return the MCProcessType used to generate this plot.

Specified by:
getMCProcessType in class DataPlot
Throws:
JetWebException


validMCProcessType

public boolean validMCProcessType()
                           throws JetWebException
Return true if the RunSeries used to generate this plot is consistent with the requirements of the PlotSwitches.

Throws:
JetWebException


getProcIdWanted

public int getProcIdWanted()
                    throws JetWebException
Return the Id of the MCProcessType which should be used to generate this plot for the model which was used.

Specified by:
getProcIdWanted in class DataPlot
Throws:
JetWebException