FreeHEP API
Version current

hep.graphics.heprep.ref
Class DefaultHepRepPoint

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepAttribute
      extended byhep.graphics.heprep.ref.DefaultHepRepPoint
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepPoint, Serializable

public class DefaultHepRepPoint
extends DefaultHepRepAttribute
implements HepRepPoint, Serializable

Version:
$Id: DefaultHepRepPoint.java,v 1.16 2004/07/05 22:09:46 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form
Source Code:
DefaultHepRepPoint.java

Field Summary
static String cvsId
           
protected  HepRepInstance instance
           
protected  double x
           
protected  double y
           
protected  double z
           
 
Fields inherited from interface hep.graphics.heprep.HepRepConstants
SHOW_DESC, SHOW_EXTRA, SHOW_NAME, SHOW_NONE, SHOW_VALUE, TYPE_BOOLEAN, TYPE_COLOR, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_UNKNOWN
 
Constructor Summary
protected DefaultHepRepPoint(HepRepInstance instance, double x, double y, double z)
           
 
Method Summary
 HepRepPoint copy(HepRepInstance parent)
          Returns a deep copy of this point.
 HepRepAttValue getAttValue(String lowerCaseName)
          look for attribute on this node, otherwise delegate to instance
 double getEta()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getEta(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 HepRepInstance getInstance()
          Returns associated instance (parent).
 double getPhi()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getPhi(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double getR()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getR(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double getRho()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getRho(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double getTheta()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getTheta(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double getX()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getX(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double[] getXYZ(double[] xyz)
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getY()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getY(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 double getZ()
          Returns coordinate with respect to vertex at (0, 0, 0).
 double getZ(double xVertex, double yVertex, double zVertex)
          Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
 String toString()
           
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepAttribute
addAttColor, addAttColor, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hep.graphics.heprep.HepRepAttribute
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values

x

protected double x

y

protected double y

z

protected double z

instance

protected HepRepInstance instance
Constructor Detail

DefaultHepRepPoint

protected DefaultHepRepPoint(HepRepInstance instance,
                             double x,
                             double y,
                             double z)
Method Detail

getInstance

public HepRepInstance getInstance()
Description copied from interface: HepRepPoint
Returns associated instance (parent).

Specified by:
getInstance in interface HepRepPoint
Returns:
HepRepInstance.

toString

public String toString()

getAttValue

public HepRepAttValue getAttValue(String lowerCaseName)
look for attribute on this node, otherwise delegate to instance

Specified by:
getAttValue in interface HepRepAttribute
Specified by:
getAttValue in class DefaultHepRepAttribute

copy

public HepRepPoint copy(HepRepInstance parent)
                 throws CloneNotSupportedException
Description copied from interface: HepRepPoint
Returns a deep copy of this point.

Specified by:
copy in interface HepRepPoint
Parameters:
parent - to add the copy to.
Returns:
copy of this point.
Throws:
CloneNotSupportedException - if copying is not possible.

getX

public double getX()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getX in interface HepRepPoint
Returns:
dx-coordinate

getY

public double getY()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getY in interface HepRepPoint
Returns:
dy-coordinate

getZ

public double getZ()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getZ in interface HepRepPoint
Returns:
dz-coordinate

getXYZ

public double[] getXYZ(double[] xyz)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getXYZ in interface HepRepPoint
Parameters:
xyz - list of three coordinates which are filled and returned. If null, a new list of three coordinates is allocated.
Returns:
list of 3 coordinates.

getRho

public double getRho()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getRho in interface HepRepPoint
Returns:
rho = sqrt(dx2+dy2);

getPhi

public double getPhi()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getPhi in interface HepRepPoint
Returns:
phi = atan2(dy, dx);

getTheta

public double getTheta()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getTheta in interface HepRepPoint
Returns:
theta = atan2(rho, dx);

getR

public double getR()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getR in interface HepRepPoint
Returns:
r = sqrt(dx2+dy2+dz2);

getEta

public double getEta()
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (0, 0, 0).

Specified by:
getEta in interface HepRepPoint
Returns:
eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));

getX

public double getX(double xVertex,
                   double yVertex,
                   double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getX in interface HepRepPoint
Returns:
dx-coordinate

getY

public double getY(double xVertex,
                   double yVertex,
                   double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getY in interface HepRepPoint
Returns:
dy-coordinate

getZ

public double getZ(double xVertex,
                   double yVertex,
                   double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getZ in interface HepRepPoint
Returns:
dz-coordinate

getRho

public double getRho(double xVertex,
                     double yVertex,
                     double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getRho in interface HepRepPoint
Returns:
rho = sqrt(dx2+dy2);

getPhi

public double getPhi(double xVertex,
                     double yVertex,
                     double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getPhi in interface HepRepPoint
Returns:
phi = atan2(dy, dx);

getTheta

public double getTheta(double xVertex,
                       double yVertex,
                       double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getTheta in interface HepRepPoint
Returns:
theta = atan2(rho, dx);

getR

public double getR(double xVertex,
                   double yVertex,
                   double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getR in interface HepRepPoint
Returns:
r = sqrt(dx2+dy2+dz2);

getEta

public double getEta(double xVertex,
                     double yVertex,
                     double zVertex)
Description copied from interface: HepRepPoint
Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Specified by:
getEta in interface HepRepPoint
Returns:
eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.