FreeHEP API
Version current

hep.graphics.heprep1.adapter
Class HepRepPointAdapter

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepAttribute
      extended byhep.graphics.heprep.ref.DefaultHepRepDefinition
          extended byhep.graphics.heprep1.adapter.HepRepAttributeAdapter
              extended byhep.graphics.heprep1.adapter.HepRepPointAdapter
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepDefinition, HepRepPoint, Serializable

public class HepRepPointAdapter
extends HepRepAttributeAdapter
implements HepRepPoint

Version:
$Id: HepRepPointAdapter.java,v 1.1 2004/07/18 08:19:43 duns Exp $
Author:
Mark Donszelmann
See Also:
Serialized Form
Source Code:
HepRepPointAdapter.java

Field Summary
 
Fields inherited from class hep.graphics.heprep.ref.DefaultHepRepDefinition
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 point, HepRepInstance parent)
           
 
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).
 
Methods inherited from class hep.graphics.heprep1.adapter.HepRepAttributeAdapter
getAttDef
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepDefinition
addAttDef, addAttDef, equals, getAttDefFromNode, getAttDefsFromNode
 
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, finalize, getClass, hashCode, 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
 

Constructor Detail

HepRepPointAdapter

public HepRepPointAdapter(HepRepPoint point,
                          HepRepInstance parent)
Method Detail

getInstance

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

Specified by:
getInstance in interface HepRepPoint
Returns:
HepRepInstance.

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.

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

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.