22 ClassImp(TEveVectorT<Float_t>);
23 ClassImp(TEveVectorT<Double_t>);
28 template<
typename TT>
void TEveVectorT<TT>::Dump()
const
30 printf(
"(%f, %f, %f)\n", fX, fY, fZ);
36 template<
typename TT>
void TEveVectorT<TT>::Set(
const TVector3& v)
38 fX = v.x(); fY = v.y(); fZ = v.z();
44 template<
typename TT> TT TEveVectorT<TT>::Eta()
const
46 TT cosTheta = CosTheta();
47 if (cosTheta*cosTheta < 1)
return -0.5* TMath::Log( (1.0-cosTheta)/(1.0+cosTheta) );
48 Warning(
"Eta",
"transverse momentum = 0, returning +/- 1e10");
49 return (fZ >= 0) ? 1e10 : -1e10;
56 template<
typename TT> TT TEveVectorT<TT>::Normalize(TT length)
62 fX *= length; fY *= length; fZ *= length;
70 template<
typename TT> TEveVectorT<TT> TEveVectorT<TT>::Orthogonal()
const
72 Float_t xx = fX < 0 ? -fX : fX;
73 Float_t yy = fY < 0 ? -fY : fY;
74 Float_t zz = fZ < 0 ? -fZ : fZ;
76 return xx < zz ? TEveVectorT<TT>(0,fZ,-fY) : TEveVectorT<TT>(fY,-fX,0);
78 return yy < zz ? TEveVectorT<TT>(-fZ,0,fX) : TEveVectorT<TT>(fY,-fX,0);
86 template<
typename TT>
void TEveVectorT<TT>::OrthoNormBase(TEveVectorT<TT>& a, TEveVectorT<TT>& b)
const
88 TEveVectorT<TT> v(*
this);
96 template class TEveVectorT<Float_t>;
97 template class TEveVectorT<Double_t>;
106 ClassImp(TEveVector4T<Float_t>);
107 ClassImp(TEveVector4T<Double_t>);
112 template<
typename TT>
void TEveVector4T<TT>::Dump()
const
114 printf(
"(%f, %f, %f; %f)\n", TP::fX, TP::fY, TP::fZ, fT);
117 template class TEveVector4T<Float_t>;
118 template class TEveVector4T<Double_t>;
127 ClassImp(TEveVector2T<Float_t>);
128 ClassImp(TEveVector2T<Double_t>);
133 template<
typename TT>
void TEveVector2T<TT>::Normalize(TT length)
146 template<
typename TT>
void TEveVector2T<TT>::Dump()
const
148 printf(
"(%f, %f)\n", fX, fY);
151 template class TEveVector2T<Float_t>;
152 template class TEveVector2T<Double_t>;