FreeHEP API
Version current

hep.graphics.heprep.corbavalue
Class HepRepPointAdapter

java.lang.Object
  extended byhep.graphics.heprep.corbavalue.HepRepAttributeAdapter
      extended byhep.graphics.heprep.corbavalue.HepRepPointAdapter
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepPoint

public class HepRepPointAdapter
extends HepRepAttributeAdapter
implements HepRepPoint

Version:
$Id: HepRepPointAdapter.java,v 1.15 2004/05/13 04:05:56 duns Exp $
Author:
Mark Donszelmann
Source Code:
HepRepPointAdapter.java

Field Summary
static String cvsId
           
 
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
HepRepPointAdapter(HepRepPoint hepRepPoint, HepRepInstance instance)
           
 
Method Summary
 HepRepPoint copy(HepRepInstance parent)
          Returns a deep copy of this point.
 boolean equals(Object o)
           
 HepRepAttValue getAttValue(String lowerCaseName)
          Returns the attValue specified by name.
 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).
 int hashCode()
           
 
Methods inherited from class hep.graphics.heprep.corbavalue.HepRepAttributeAdapter
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, 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
Constructor Detail

HepRepPointAdapter

public HepRepPointAdapter(HepRepPoint hepRepPoint,
                          HepRepInstance instance)
Method Detail

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.

getInstance

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

Specified by:
getInstance in interface HepRepPoint
Returns:
HepRepInstance.

getAttValue

public HepRepAttValue getAttValue(String lowerCaseName)
Description copied from interface: HepRepAttribute
Returns the attValue specified by name. This attValue is normally searched on the node itself and then on its type, moving up the typetree.

Specified by:
getAttValue in interface HepRepAttribute
Parameters:
lowerCaseName - of attribute value.
Returns:
attribute value.

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.

equals

public boolean equals(Object o)
Overrides:
equals in class HepRepAttributeAdapter

hashCode

public int hashCode()
Overrides:
hashCode in class HepRepAttributeAdapter

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.