jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.model.plots
Class DataPoint

java.lang.Object
  extended by cedar.jetweb.model.plots.DataPoint
All Implemented Interfaces:
java.lang.Cloneable

public class DataPoint
extends java.lang.Object
implements java.lang.Cloneable

Represents a point in a JetWeb plot. A data point has the following properties;

Version:
$Date: 2006-06-08 13:12:58 +0100 (Thu, 08 Jun 2006) $ $Revision: 1178 $
Author:
J. Monk from S. Butterworth, UCL.

Constructor Summary
DataPoint()
          construct point data from array of doubles
 
Method Summary
 void add(DataPoint p2)
          Add another DataPoint to this DataPoint.
 java.lang.Object clone()
           
 void fixZeroError(double lumi)
          Set zero errors to upper limits.
 double getBinWidth()
          binwidth
 double getChi2()
          Chi squared
 double getX()
          x co-ordinate
 double getXMax()
          maximum x value, incorporating bin width
 double getXMin()
          minimum x value, incorporating bin width
 double getY()
          y co-ordinate
 double getYDown()
          error on y co-ordinate (down)
 double getYUp()
          error on y co-ordinate (up)
 DataPoint setBinWidth(double d)
          binwidth
 DataPoint setChi2(double d)
          Chi squared
 DataPoint setX(double d)
          x co-ordinate
 DataPoint setY(double d)
          y co-ordinate
 DataPoint setYDown(double d)
          error on y co-ordinate (down)
 DataPoint setYUp(double d)
          error on y co-ordinate (up)
 double[] toArray()
          returns double[6] array of point data point[X] = x value point[Y] = y value point[YUP] = y error (up) point[YDOWN] = y error (down) point[BINWIDTH] = bin width point[CHI2] = pull (chi2)
 java.lang.String toString()
          Outputs stringified point data
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataPoint

public DataPoint()
construct point data from array of doubles

Parameters:
pointArray -
  • point[X] = x value
  • point[Y] = y value
  • point[YUP] = y error (up)
  • point[YDOWN] = y error (down)
  • point[BINWIDTH] = bin width
  • point[CHI2] = pull (chi2)
Throws:
JetWebException

Method Detail

toArray

public double[] toArray()
returns double[6] array of point data


getX

public double getX()
x co-ordinate


getY

public double getY()
y co-ordinate


getYUp

public double getYUp()
error on y co-ordinate (up)


getYDown

public double getYDown()
error on y co-ordinate (down)


getBinWidth

public double getBinWidth()
binwidth


getChi2

public double getChi2()
Chi squared


setX

public DataPoint setX(double d)
x co-ordinate


setY

public DataPoint setY(double d)
y co-ordinate


setYUp

public DataPoint setYUp(double d)
error on y co-ordinate (up)


setYDown

public DataPoint setYDown(double d)
error on y co-ordinate (down)


setBinWidth

public DataPoint setBinWidth(double d)
binwidth


setChi2

public DataPoint setChi2(double d)
Chi squared


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getXMax

public double getXMax()
maximum x value, incorporating bin width


getXMin

public double getXMin()
minimum x value, incorporating bin width


toString

public java.lang.String toString()
Outputs stringified point data

Overrides:
toString in class java.lang.Object


add

public void add(DataPoint p2)
Add another DataPoint to this DataPoint.

Parameters:
p2 - point to add.


fixZeroError

public void fixZeroError(double lumi)
Set zero errors to upper limits. If you can tell the point how much integrated lumi it was generated from, and if the point has a zero value and zero errors, it will set it errors to the 1 sigma upper limit.