10 using namespace HEPREP;
18 DefaultHepRepPoint::DefaultHepRepPoint(
HepRepInstance* inst,
double xx,
double yy,
double zz)
21 if (instance == NULL) {
22 cerr <<
"HepRepPoints cannot be created without a HepRepInstance." << endl;
37 return (value != NULL) ? value : instance->
getAttValue(lowerCaseName);
64 return sqrt(
x*
x +
y*
y);
77 return sqrt(r*r +
z*
z);
82 return -0.5*log((1.-ct)/(1.+ct));
98 double dx =
getX(xVertex, yVertex, zVertex);
99 double dy =
getY(xVertex, yVertex, zVertex);
100 return sqrt(dx*dx + dy*dy);
104 return atan2(
getY(xVertex, yVertex, zVertex),
getX(xVertex, yVertex, zVertex));
108 return atan2(
getRho(xVertex, yVertex, zVertex),
getZ(xVertex, yVertex, zVertex));
112 double dr =
getRho(xVertex, yVertex, zVertex);
113 double dz =
getZ(xVertex, yVertex, zVertex);
114 return sqrt(dr*dr + dz*dz);
118 double ct = cos(
getTheta(xVertex, yVertex, zVertex));
119 return -0.5*log((1.-ct)/(1.+ct));
HEPREP::HepRepInstance * getInstance()
virtual void addPoint(HepRepPoint *point)=0
const XML_Char int const XML_Char * value
std::vector< double > * getXYZ(std::vector< double > *xyz)
HEPREP::HepRepPoint * copy(HEPREP::HepRepInstance *parent)
virtual HepRepAttValue * getAttValue(std::string name)=0
HEPREP::HepRepAttValue * getAttValueFromNode(std::string lowerCaseName)
DefaultHepRepPoint(HEPREP::HepRepInstance *instance, double x, double y, double z)
HEPREP::HepRepAttValue * getAttValue(std::string lowerCaseName)