// example on using with exteral classes (doxygen page) /** \page ExtUsagePage Examples with external Packages
TVectorD r2(N) // %ROOT Linear Algebra Vector containing many vectors XYZVector v2; v2.SetCoordinates(&r2[INDEX],&r2[index]+3); // construct vector from x=r[INDEX], y=r[INDEX+1], z=r[INDEX+2]To fill a Linear Algebra Vector from a 3D or 4D Vector, with GetCoordinates() one can get the internal coordinate data.
HepVector c(3); // CLHEP Linear algebra vector v2.GetCoordinates(&c[0],&c[index]+3 ) // fill HepVector c with c[0] = x, c[1] = y , c[2] = zOr using TVectorD
double * data[3]; v2.GetCoordinates(data,data+3); TVectorD r1(3,data); // create a new Linear Algebra vector copying the dataIn the case of transformations, constructor and method to set/get components exist with Linear Algebra matrices. The requisite is that the matrix data are stored, for example in the cse of a LorentzRotation, from (0,0) thru (3,3)
TMatrixD(4,4) m; LorentzRotation r(m) // create LorentzRotation from matrix m r.GetComponents(m) // fill matrix m with LorentzRotation components
CLHEP::Hep3Vector hv; XYZVector v1(hv); // create 3D Vector from CLHEP 3D Vector HepGeom::Point3D*/hp; XYZPoint p1(hp); // create a 3D Point from CLHEP geom Point CLHEP::HepLorentzVector hq; XYZTVector q(hq); // create a LorentzVector from CLHEP L.V.