313 for (Int_t i=0; i<3; i++)
381 for (Int_t i=0; i<3; i++)
409 for (Int_t i=0; i<4; i++)
437 for (Int_t i=0; i<4; i++)
460 Double_t dot=
fV.Dot(
fV);
461 Double_t ddot=
fV.GetResultError();
462 Double_t v02=dot+
fV2;
463 Double_t dv02=sqrt(pow(ddot,2)+pow(
fDv2,2));
464 Double_t v0=sqrt(fabs(v02));
466 if (v0) dv0=dv02/(2.*v0);
482 Int_t val=
fV.HasVector();
496 Int_t val=
fV.HasErrors();
544 Double_t norm=
fV.GetNorm();
545 Double_t dnorm=
fV.GetResultError();
546 fDv2=sqrt(pow(2.*
fV0*
fDv0,2)+pow(2.*norm*dnorm,2));
598 for (Int_t i=0; i<3; i++)
634 for (Int_t i=0; i<3; i++)
726 Double_t inv=
Dot(*
this);
761 for (Int_t i=0; i<3; i++)
814 for (Int_t i=0; i<4; i++)
848 for (Int_t i=0; i<3; i++)
875 for (Int_t i=0; i<4; i++)
900 if (f==
"car" || f==
"sph" || f==
"cyl")
902 Double_t vec[4],err[4];
909 cout <<
" Contravariant vector in " << f.Data() <<
" (" << u.Data() <<
") coordinates : "
910 << vec[0] <<
" " << vec[1] <<
" " << vec[2] <<
" " << vec[3] << endl;
914 cout <<
" 4-Vector not initialised." << endl;
918 cout <<
" ------------- Errors in " << f.Data() <<
" (" << u.Data() <<
") coordinates : "
919 << err[0] <<
" " << err[1] <<
" " << err[2] <<
" " << err[3] << endl;
923 cout <<
" --- Lorentz invariant (v^2) : " << inv <<
" error : " << dinv << endl;
928 cout <<
" *Nc4Vector::Data* Unsupported frame : " << f.Data() << endl
929 <<
" Possible frames are 'car', 'sph' and 'cyl'." << endl;
946 Double_t norm=
fV.GetNorm();
947 Double_t dnorm=
fV.GetResultError();
948 dotpro=pow(a0,2)-pow(norm,2);
949 fDresult=sqrt(pow(2.*a0*da0,2)+pow(2.*norm*dnorm,2));
957 Double_t dot=
fV.Dot(b);
958 Double_t ddot=
fV.GetResultError();
962 fDresult=sqrt(pow(b0*da0,2)+pow(a0*db0,2)+pow(ddot,2));
986 Double_t dc0=sqrt(pow(da0,2)+pow(db0,2));
1012 Double_t dc0=sqrt(pow(da0,2)+pow(db0,2));
1055 cout <<
" *Nc4Vector::/* Division by 0 detected. No action taken." << endl;
1094 Double_t dc0=sqrt(pow(da0,2)+pow(db0,2));
1120 Double_t dc0=sqrt(pow(da0,2)+pow(db0,2));
1162 cout <<
" *Nc4Vector::/* Division by 0 detected. No action taken." << endl;
1202 return fV.GetVecTrans();
1214 return fV.GetVecLong();
1229 Double_t a[3],ea[3];
1231 fV.GetVector(a,
"sph");
1232 fV.GetErrors(ea,
"sph");
1239 dst2=pow((sin(a[1])*ds),2)+pow((s*cos(a[1])*ea[1]),2);
1257 Double_t a[3],ea[3];
1259 fV.GetVector(a,
"sph");
1260 fV.GetErrors(ea,
"sph");
1267 dsl2=pow((cos(a[1])*ds),2)+pow((s*sin(a[1])*ea[1]),2);
1283 Double_t eta=
fV.GetPseudoRapidity();
1300 Double_t vecv[3],errv[3],errb[3];
1302 fV.GetVector(vecv,
"car");
1303 fV.GetErrors(errv,
"car");
1304 for (Int_t i=0; i<3; i++)
1307 errb[i]=sqrt(sqerr);
1339 Double_t inv=sqrt(fabs(
fV2));
1342 Double_t dinv=
fDv2/(2.*inv);
1344 Double_t sqerr=pow((
fDv0/inv),2)+pow((
fV0*dinv/
fV2),2);
1372 if (i<0 || i>3)
return 0;
Handling of 3-vectors in various reference frames.
void SetErrors(Double_t *e, TString f, TString u="rad")
virtual Double_t GetOpeningAngle(Nc3Vector &q, TString u="rad")
Double_t GetResultError() const
Handling of Lorentz 4-vectors in various reference frames.
Double_t GetPseudoRapidity()
void SetInvariant(Double_t v2, Double_t dv2=0)
Nc4Vector & operator-=(Nc4Vector &q)
Nc4Vector operator*(Double_t s)
void SetScalar(Double_t v0, Double_t dv0=0)
Nc4Vector operator+(Nc4Vector &q)
Double_t GetX(Int_t i, TString f, TString u="rad")
Nc4Vector & operator=(const Nc4Vector &q)
Nc3Vector GetBetaVector() const
Double_t Dot(Nc4Vector &q)
virtual Double_t GetOpeningAngle(Nc4Vector &q, TString u="rad")
virtual void Load(Nc4Vector &q)
Nc4Vector operator/(Double_t s)
void SetUserData(NcSignal *s)
void SetVector(Double_t v0, Nc3Vector &v)
Nc3Vector GetVecLong() const
Double_t GetResultError() const
void SetErrors(Double_t *v, TString f, TString u="rad")
Nc4Vector & operator+=(Nc4Vector &q)
Int_t GetScalarFlag() const
void GetVector(Double_t *v, TString f, TString u="rad")
virtual void Data(TString f="car", TString u="rad")
Nc4Vector operator-(Nc4Vector &q)
void Set3Vector(Nc3Vector &v)
void GetErrors(Double_t *v, TString f, TString u="rad")
Nc4Vector & operator/=(Double_t s)
Nc3Vector GetVecTrans() const
Nc3Vector Get3Vector() const
Nc4Vector & operator*=(Double_t s)
NcSignal * GetUserData() const
void SetInvariantError(Double_t dv2)
void SetScalarError(Double_t dv0)
Double32_t fDresult
! The error on the scalar result of an operation (e.g. dotproduct)
Generic handling of (extrapolated) detector signals.
virtual TObject * Clone(const char *name="") const