20 if (instance == NULL) {
21 cerr <<
"HepRepPoints cannot be created without a HepRepInstance." << endl;
36 return (value != NULL) ? value : instance->
getAttValue(lowerCaseName);
63 return sqrt(
x*
x +
y*
y);
76 return sqrt(r*r +
z*
z);
81 return -0.5*log((1.-ct)/(1.+ct));
97 double dx =
getX(xVertex, yVertex, zVertex);
98 double dy =
getY(xVertex, yVertex, zVertex);
99 return sqrt(dx*dx + dy*dy);
103 return atan2(
getY(xVertex, yVertex, zVertex),
getX(xVertex, yVertex, zVertex));
107 return atan2(
getRho(xVertex, yVertex, zVertex),
getZ(xVertex, yVertex, zVertex));
111 double dr =
getRho(xVertex, yVertex, zVertex);
112 double dz =
getZ(xVertex, yVertex, zVertex);
113 return sqrt(dr*dr + dz*dz);
117 double ct = cos(
getTheta(xVertex, yVertex, zVertex));
118 return -0.5*log((1.-ct)/(1.+ct));
virtual HepRepAttValue * getAttValue(std::string name)=0
virtual void addPoint(HepRepPoint *point)=0
HEPREP::HepRepAttValue * getAttValueFromNode(std::string lowerCaseName)
DefaultHepRepPoint(HEPREP::HepRepInstance *instance, double x, double y, double z)
HEPREP::HepRepAttValue * getAttValue(std::string lowerCaseName)
std::vector< double > * getXYZ(std::vector< double > *xyz)
HEPREP::HepRepInstance * getInstance()
HEPREP::HepRepPoint * copy(HEPREP::HepRepInstance *parent)