Equivalent of HepPoint3D

Hello,

If I want the equivalanet of a Hep3Vector I can use TVector3 in root. However I would like the equivalent of HePoint3D. Is there such an equivalent in root? (I cant find it using the reference classes webpage)

Thanks,

Mark

Hello Mark,

if you are using ROOT version 5, the equivalent of the HepPoint3D is the class PositionVector3D in mathcore. Reference documentation for the mathcore classes is available at
seal.web.cern.ch/seal/MathLibs/M … _0_4/html/

Please let me know if you have further questions,

Cheers

Lorenzo

[quote=“moneta”]Hello Mark,

if you are using ROOT version 5, the equivalent of the HepPoint3D is the class PositionVector3D in mathcore. Reference documentation for the mathcore classes is available at
seal.web.cern.ch/seal/MathLibs/M … _0_4/html/

Please let me know if you have further questions,

Cheers

Lorenzo[/quote]

I tried to use it but I dont understand how. I put in my code:

ROOT::Math::PositionVector3D showerCenter(xc,yc,zc);

where xc,yc and zc are Double_t. The compiler says:

[hodgkinson@hep1 EFlowAnalysis]$ gmake
Compiling EFlowCompiledMacros.cc
In file included from EFlowCompiledMacros.cc:92:
/home/hodgkinson/EFlowAnalysis/macros/TrackPid_reCalcMoments.C: In function
void TrackPid_reCalcMoments()': /home/hodgkinson/EFlowAnalysis/macros/TrackPid_reCalcMoments.C:91: invalid use of templatetemplate class ROOT::Math::PositionVector3D’
/home/hodgkinson/EFlowAnalysis/macros/TrackPid_reCalcMoments.C:91: syntax error
before `(’ token

in the link you sent I see CoordSystem is a template and scalar is defined as CoordSystem::Scalar. I still dont understand what a scalar is or how to use Positionvector3D.

What is the equivalent of saying HepPoint3D myPoint(3,4,5)?

Thanks,

Mark

Hi Mark,

The class PositionVector3D is template on the Coordinate system.
You can choose the coordinate system on which to base the Vector, like Cartesian or Polar.
I you want to use the Cartesian I would recommend you to use the
typdef XYZPoint which is a PositionVector3D<Cartesian3D >.

do:

#include “Math/Point3D.h”

ROOT::Math::XYZPoint( xc, yc, zc);

you find also examples how to use it (for Points) in

seal.web.cern.ch/seal/MathLibs/M … DPage.html

hope this help,

Cheers,

Lorenzo