Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cheprep::DefaultHepRepPoint Class Reference

#include <DefaultHepRepPoint.h>

Inheritance diagram for cheprep::DefaultHepRepPoint:
Collaboration diagram for cheprep::DefaultHepRepPoint:

Public Member Functions

 DefaultHepRepPoint (HEPREP::HepRepInstance *instance, double x, double y, double z)
 
 ~DefaultHepRepPoint ()
 
HEPREP::HepRepInstancegetInstance ()
 
HEPREP::HepRepAttValuegetAttValue (std::string lowerCaseName)
 
HEPREP::HepRepPointcopy (HEPREP::HepRepInstance *parent)
 
double getX ()
 
double getY ()
 
double getZ ()
 
std::vector< double > * getXYZ (std::vector< double > *xyz)
 
double getRho ()
 
double getPhi ()
 
double getTheta ()
 
double getR ()
 
double getEta ()
 
double getX (double xVertex, double yVertex, double zVertex)
 
double getY (double xVertex, double yVertex, double zVertex)
 
double getZ (double xVertex, double yVertex, double zVertex)
 
double getRho (double xVertex, double yVertex, double zVertex)
 
double getPhi (double xVertex, double yVertex, double zVertex)
 
double getTheta (double xVertex, double yVertex, double zVertex)
 
double getR (double xVertex, double yVertex, double zVertex)
 
double getEta (double xVertex, double yVertex, double zVertex)
 
- Public Member Functions inherited from cheprep::DefaultHepRepAttribute
 DefaultHepRepAttribute ()
 
 ~DefaultHepRepAttribute ()
 
std::set
< HEPREP::HepRepAttValue * > 
getAttValuesFromNode ()
 
void addAttValue (HEPREP::HepRepAttValue *hepRepAttValue)
 
void addAttValue (std::string key, char *value, int showLabel)
 
void addAttValue (std::string key, std::string value, int showLabel)
 
void addAttValue (std::string key, int value, int showLabel)
 
void addAttValue (std::string key, int64 value, int showLabel)
 
void addAttValue (std::string key, double value, int showLabel)
 
void addAttValue (std::string key, bool value, int showLabel)
 
void addAttValue (std::string key, std::vector< double > value, int showLabel)
 
void addAttValue (std::string key, double red, double green, double blue, double alpha, int showLabel)
 
HEPREP::HepRepAttValuegetAttValueFromNode (std::string lowerCaseName)
 
HEPREP::HepRepAttValueremoveAttValue (std::string key)
 
- Public Member Functions inherited from HEPREP::HepRepAttribute
virtual ~HepRepAttribute ()
 Destructor. More...
 
- Public Member Functions inherited from HEPREP::HepRepPoint
virtual ~HepRepPoint ()
 Destructor. More...
 

Protected Attributes

double x
 
double y
 
double z
 

Detailed Description

Definition at line 23 of file DefaultHepRepPoint.h.

Constructor & Destructor Documentation

cheprep::DefaultHepRepPoint::DefaultHepRepPoint ( HEPREP::HepRepInstance instance,
double  x,
double  y,
double  z 
)

Definition at line 18 of file DefaultHepRepPoint.cc.

19  : DefaultHepRepAttribute(), instance(inst), x(xx), y(yy), z(zz) {
20 
21  if (instance == NULL) {
22  cerr << "HepRepPoints cannot be created without a HepRepInstance." << endl;
23  } else {
24  instance->addPoint(this);
25  }
26 }
virtual void addPoint(HepRepPoint *point)=0

Here is the call graph for this function:

Here is the caller graph for this function:

cheprep::DefaultHepRepPoint::~DefaultHepRepPoint ( )

Definition at line 28 of file DefaultHepRepPoint.cc.

28  {
29 }

Member Function Documentation

HepRepPoint * cheprep::DefaultHepRepPoint::copy ( HEPREP::HepRepInstance parent)
virtual

Returns a deep copy of this point.

Parameters
parentto add the copy to.
Returns
copy of this point.

Implements HEPREP::HepRepPoint.

Definition at line 40 of file DefaultHepRepPoint.cc.

40  {
41  return new DefaultHepRepPoint(inst, x, y, z);
42 }
DefaultHepRepPoint(HEPREP::HepRepInstance *instance, double x, double y, double z)

Here is the call graph for this function:

HepRepAttValue * cheprep::DefaultHepRepPoint::getAttValue ( std::string  name)
virtual

Returns the attValue specified by name. This attValue is normally searched on the node itself and then on its type, moving up the typetree.

Parameters
nameof attribute value.
Returns
attribute value.

Implements cheprep::DefaultHepRepAttribute.

Definition at line 35 of file DefaultHepRepPoint.cc.

35  {
36  HepRepAttValue* value = getAttValueFromNode(lowerCaseName);
37  return (value != NULL) ? value : instance->getAttValue(lowerCaseName);
38 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
virtual HepRepAttValue * getAttValue(std::string name)=0
HEPREP::HepRepAttValue * getAttValueFromNode(std::string lowerCaseName)

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getEta ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));

Implements HEPREP::HepRepPoint.

Definition at line 80 of file DefaultHepRepPoint.cc.

80  {
81  double ct = cos(getTheta());
82  return -0.5*log((1.-ct)/(1.+ct));
83 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getEta ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));

Implements HEPREP::HepRepPoint.

Definition at line 117 of file DefaultHepRepPoint.cc.

117  {
118  double ct = cos(getTheta(xVertex, yVertex, zVertex));
119  return -0.5*log((1.-ct)/(1.+ct));
120 }

Here is the call graph for this function:

HepRepInstance * cheprep::DefaultHepRepPoint::getInstance ( )
virtual

Returns associated instance (parent).

Returns
HepRepInstance.

Implements HEPREP::HepRepPoint.

Definition at line 31 of file DefaultHepRepPoint.cc.

31  {
32  return instance;
33 }
double cheprep::DefaultHepRepPoint::getPhi ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
phi = std::atan2(dy, dx);

Implements HEPREP::HepRepPoint.

Definition at line 67 of file DefaultHepRepPoint.cc.

67  {
68  return atan2(y, x);
69 }
double cheprep::DefaultHepRepPoint::getPhi ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
phi = std::atan2(dy, dx);

Implements HEPREP::HepRepPoint.

Definition at line 103 of file DefaultHepRepPoint.cc.

103  {
104  return atan2(getY(xVertex, yVertex, zVertex), getX(xVertex, yVertex, zVertex));
105 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getR ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
r = std::sqrt(dx2+dy2+dz2);

Implements HEPREP::HepRepPoint.

Definition at line 75 of file DefaultHepRepPoint.cc.

75  {
76  double r = getRho();
77  return sqrt(r*r + z*z);
78 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getR ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
r = std::sqrt(dx2+dy2+dz2);

Implements HEPREP::HepRepPoint.

Definition at line 111 of file DefaultHepRepPoint.cc.

111  {
112  double dr = getRho(xVertex, yVertex, zVertex);
113  double dz = getZ(xVertex, yVertex, zVertex);
114  return sqrt(dr*dr + dz*dz);
115 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getRho ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
rho = std::sqrt(dx2+dy2);

Implements HEPREP::HepRepPoint.

Definition at line 63 of file DefaultHepRepPoint.cc.

63  {
64  return sqrt(x*x + y*y);
65 }

Here is the caller graph for this function:

double cheprep::DefaultHepRepPoint::getRho ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
rho = std::sqrt(dx2+dy2);

Implements HEPREP::HepRepPoint.

Definition at line 97 of file DefaultHepRepPoint.cc.

97  {
98  double dx = getX(xVertex, yVertex, zVertex);
99  double dy = getY(xVertex, yVertex, zVertex);
100  return sqrt(dx*dx + dy*dy);
101 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getTheta ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
theta = std::atan2(rho, dx);

Implements HEPREP::HepRepPoint.

Definition at line 71 of file DefaultHepRepPoint.cc.

71  {
72  return atan2(getRho(), z);
73 }

Here is the call graph for this function:

Here is the caller graph for this function:

double cheprep::DefaultHepRepPoint::getTheta ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
theta = std::atan2(rho, dx);

Implements HEPREP::HepRepPoint.

Definition at line 107 of file DefaultHepRepPoint.cc.

107  {
108  return atan2(getRho(xVertex, yVertex, zVertex), getZ(xVertex, yVertex, zVertex));
109 }

Here is the call graph for this function:

double cheprep::DefaultHepRepPoint::getX ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
dx-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 44 of file DefaultHepRepPoint.cc.

44  {
45  return x;
46 }

Here is the caller graph for this function:

double cheprep::DefaultHepRepPoint::getX ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
dx-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 85 of file DefaultHepRepPoint.cc.

85  {
86  return x - xVertex;
87 }
vector< double > * cheprep::DefaultHepRepPoint::getXYZ ( std::vector< double > *  xyz)
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Parameters
xyzlist of three coordinates which are filled and returned. If null, a new list of three coordinates is allocated.
Returns
list of 3 coordinates.

Implements HEPREP::HepRepPoint.

Definition at line 56 of file DefaultHepRepPoint.cc.

56  {
57  (*xyz)[0] = x;
58  (*xyz)[1] = y;
59  (*xyz)[2] = z;
60  return xyz;
61 }
double cheprep::DefaultHepRepPoint::getY ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
dy-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 48 of file DefaultHepRepPoint.cc.

48  {
49  return y;
50 }

Here is the caller graph for this function:

double cheprep::DefaultHepRepPoint::getY ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
dy-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 89 of file DefaultHepRepPoint.cc.

89  {
90  return y - yVertex;
91 }
double cheprep::DefaultHepRepPoint::getZ ( )
virtual

Returns coordinate with respect to vertex at (0, 0, 0).

Returns
dz-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 52 of file DefaultHepRepPoint.cc.

52  {
53  return z;
54 }

Here is the caller graph for this function:

double cheprep::DefaultHepRepPoint::getZ ( double  xVertex,
double  yVertex,
double  zVertex 
)
virtual

Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).

Returns
dz-coordinate

Implements HEPREP::HepRepPoint.

Definition at line 93 of file DefaultHepRepPoint.cc.

93  {
94  return z - zVertex;
95 }

Member Data Documentation

double cheprep::DefaultHepRepPoint::x
protected

Definition at line 29 of file DefaultHepRepPoint.h.

double cheprep::DefaultHepRepPoint::y
protected

Definition at line 29 of file DefaultHepRepPoint.h.

double cheprep::DefaultHepRepPoint::z
protected

Definition at line 29 of file DefaultHepRepPoint.h.


The documentation for this class was generated from the following files: