171 for (Int_t i=1; i<=nsig; i++)
178 for (Int_t j=1; j<=nhyp; j++)
290 for (Int_t it=1; it<=ndec; it++)
301 for (Int_t is=1; is<=nsig; is++)
313 for (Int_t ih=1; ih<=nhyp; ih++)
439 Double_t inv=pow(m,2);
440 Double_t dinv=fabs(2.*m*dm);
472 const char* name=GetName();
473 const char* title=GetTitle();
475 cout <<
" *" << ClassName() <<
"::Data*";
476 if (strlen(name)) cout <<
" Name : " << name;
477 if (strlen(title)) cout <<
" Title : " << title;
481 <<
" m : " << m <<
" dm : " << dm <<
" Charge : " <<
fQ
484 <<
" Nsignals : " <<
GetNsignals() <<
" Energy scale : " <<
fEscale <<
" GeV" << endl;
487 cout <<
" Parent track Id : " <<
fParent->GetId() <<
" Code : " <<
fParent->GetParticleCode()
488 <<
" m : " <<
fParent->GetMass() <<
" Q : " <<
fParent->GetCharge()
489 <<
" p : " <<
fParent->GetMomentum();
490 const char* pname=
fParent->GetName();
491 const char* ptitle=
fParent->GetTitle();
492 if (strlen(pname)) cout <<
" Name : " << pname;
493 if (strlen(ptitle)) cout <<
" Title : " << ptitle;
498 cout <<
" Fit details present in object of class " <<
fFit->ClassName() << endl;
520 if (
fBegin) { cout <<
" Begin-point :";
fBegin->Data(f,u); }
521 if (
fEnd) { cout <<
" End-point :";
fEnd->Data(f,u); }
522 if (
fRef) { cout <<
" Ref-point :";
fRef->Data(f,u); }
531 cout <<
" ---Level 1 sec. track no. " <<
id << endl;
536 cout <<
" *NcTrack::List* Error : Empty decay track slot." << endl;
557 if (
fBegin) { cout <<
" Begin-point :";
fBegin->Data(f,u); }
558 if (
fEnd) { cout <<
" End-point :";
fEnd->Data(f,u); }
559 if (
fRef) { cout <<
" Ref-point :";
fRef->Data(f,u); }
564 cout <<
" List of the " << nhyp <<
" track hypotheses : " << endl;
565 for (Int_t ih=1; ih<=nhyp; ih++)
568 if (tx) tx->
Data(f,u);
587 for (Int_t
id=1;
id<=t->
GetNdecay();
id++)
592 cout <<
" ---Level " << n <<
" sec. track no. " <<
id << endl;
598 cout <<
" List of the " << nhyp <<
" track hypotheses : " << endl;
599 for (Int_t ih=1; ih<=nhyp; ih++)
602 if (tx) tx->
Data(f,u);
609 cout <<
" List of the " << nsig <<
" related signals : " << endl;
610 for (Int_t is=1; is<=nsig; is++)
613 if (sx) sx->
Data(f,u);
622 cout <<
" *NcTrack::Dumps* Error : Empty decay track slot." << endl;
642 Double_t norm=
fV.GetNorm();
691 Double_t m=sqrt(inv);
692 if (m) dm=dinv/(2.*m);
703 cout <<
"*NcTrack::GetMass* Unphysical situation m**2 = " << inv << endl;
704 cout <<
" Value 0 will be returned." << endl;
748 cout <<
"*NcTrack::GetEnergy* Unphysical situation E = " << E << endl;
749 cout <<
" Value 0 will be returned." << endl;
771 if (M) e1=((M*M)+(m1*m1)-(m2*m2))/(2.*M);
773 if (M) e2=((M*M)+(m2*m2)-(m1*m1))/(2.*M);
774 Double_t pnorm=(e1*e1)-(m1*m1);
853 cout <<
" *NcTrack::GetDecayTrack* No tracks present." << endl;
864 cout <<
" *NcTrack* decay track number : " << j <<
" out of range."
907 for (Int_t i=0; i<nsig; i++)
960 for (Int_t i=0; i<ns; i++)
1003 if ((par==0 || par==2) && sx->InheritsFrom(classname))
1010 if (!parent)
continue;
1012 if ((par==1 || par==2) && parent->InheritsFrom(classname)) nsigs++;
1028 cout <<
" *NcTrack::GetSignal* No signals present." << endl;
1039 cout <<
" *NcTrack* signal number : " << j <<
" out of range."
1084 fTemp=
new TObjArray();
1104 if ((par==0 || par==2) && sx->InheritsFrom(classname))
1111 if (!parent)
continue;
1113 if ((par==1 || par==2) && parent->InheritsFrom(classname)) arr->Add(sx);
1149 Int_t nhits=hits.GetEntries();
1151 cout <<
" *NcTrack::ShowSignals* There are " << nhits
1152 <<
" signals recorded for (device) class " << classname << endl;
1154 if (!nhits || !mode)
return;
1157 for (Int_t i=0; i<nhits; i++)
1160 if (sx) sx->
Data(f,u);
1166 cout <<
" Device Position";
1194 Int_t nhits=hits.GetEntries();
1196 if (!nhits)
return 0;
1199 for (Int_t i=0; i<nhits; i++)
1235 if (flag==0 || flag==1)
1241 cout <<
" *" << ClassName() <<
"::SetHypCopy* Invalid argument : " << flag << endl;
1322 t->SetTitle(
"Mass hypothesis");
1393 cout <<
" *NcTrack* hypothesis number : " << j <<
" out of range."
1394 <<
" Nhyp = " << nhyp << endl;
1406 for (Int_t ih=1; ih<nhyp; ih++)
1412 if (probx > prob) t=tx;
1520 cout <<
" *NcTrack::SetMass()* No hypothesis present => No action." << endl;
1576 if (cos(a[1])<0) pl=-pl;
1652 Double_t pt=
GetPt();
1657 Double_t mt=sqrt(pt*pt+m*m);
1659 if (mt) dmt2=(pow((pt*dpt),2)+pow((m*dm),2))/(mt*mt);
1684 Double_t pl=
GetPl();
1689 Double_t y=9999,dy2=0;
1690 if (sum && dif) y=0.5*log(sum/dif);
1692 if (sum*dif) dy2=(1./(sum*dif))*(pow((pl*de),2)+pow((e*dpl),2));
1710 if (q==
"x" || q==
"X") axis=1;
1711 if (q==
"y" || q==
"Y") axis=2;
1712 if (q==
"z" || q==
"Z") axis=3;
1732 cout <<
"*NcTrack::SetImpactPoint* Unsupported axis : " << q << endl
1733 <<
" Possible axes are 'X', 'Y' and 'Z'." << endl;
1750 if (q==
"x" || q==
"X") axis=1;
1751 if (q==
"y" || q==
"Y") axis=2;
1752 if (q==
"z" || q==
"Z") axis=3;
1766 cout <<
"*NcTrack::GetImpactPoint* Unsupported axis : " << q << endl
1767 <<
" Possible axes are 'X', 'Y' and 'Z'." << endl;
1837 cout <<
" *NcTrack::SetEscale* Invalid scale value : " << scale << endl;
1959 if (obj)
fFit=obj->Clone();
2037 if (!p)
return dist;
2044 if (!rx)
return dist;
2048 if (p1.
GetNorm() <= 0.)
return dist;
2054 if ((tscale/pscale > 1.1) || (pscale/tscale > 1.1)) r0=r0*(tscale/pscale);
2107 if (!t)
return dist;
2114 if (!rx)
return dist;
2121 if (!ry)
return dist;
2148 if ((scaley/scalex > 1.1) || (scalex/scaley > 1.1)) r2=r2*(scaley/scalex);
2150 dist=fabs(r.Dot(n));
2184 if (strlen(name)) trk->SetName(name);
Handling of 3-vectors in various reference frames.
void GetErrors(Double_t *e, TString f, TString u="rad") const
void SetVector(Double_t *v, TString f, TString u="rad")
Nc3Vector Cross(Nc3Vector &q) const
void SetErrors(Double_t *e, TString f, TString u="rad")
Double_t GetResultError() const
void GetVector(Double_t *v, TString f, TString u="rad") const
void SetInvariant(Double_t v2, Double_t dv2=0)
void SetVector(Double_t v0, Nc3Vector &v)
Nc3Vector GetVecLong() const
Double_t GetResultError() const
virtual void Data(TString f="car", TString u="rad")
void Set3Vector(Nc3Vector &v)
Nc3Vector GetVecTrans() const
Nc3Vector Get3Vector() const
void SetScalarError(Double_t dv0)
Double32_t fDresult
! The error on the scalar result of an operation (e.g. dotproduct)
Perform various Lorentz transformations.
Nc4Vector Inverse(Nc4Vector &v)
void Set4Momentum(Nc4Vector &p)
Signal (Hit) handling of a generic device.
Handling of positions (with timestamps) in various reference frames.
void GetPosition(Double_t *r, TString f, TString u="rad", Float_t s=-1) const
Float_t GetUnitScale() const
virtual void Data(TString f="car", TString u="rad") const
Handling of positions in various reference frames.
Generic handling of (extrapolated) detector signals.
NcDevice * GetDevice() const
void RemoveTrack(NcTrack &t, Int_t mode=1)
virtual Float_t GetSignal(Int_t j=1, Int_t mode=0) const
void AddTrack(NcTrack &t, Int_t mode=1)
virtual void Data(TString f="car", TString u="rad") const
Handling of timestamps for (astro)particle physics research.
Handling of the attributes of a reconstructed particle track.
NcPosition * GetEndPoint()
NcPosition * GetBeginPoint()
void Set4Momentum(Nc4Vector &p)
Double_t GetEt(Float_t scale=-1)
void RemoveSignals(Int_t mode=1)
TObjArray * fTemp
! Temporary storage for exchange of object pointers
virtual void ListAll(TString f="car", TString u="rad")
NcTrack * GetTrackHypothesis(Int_t j=0) const
NcTrack * GetDecayTrack(Int_t j) const
virtual void List(TString f="car", TString u="rad")
void SetCharge(Float_t q)
void SetBeginPoint(NcPosition &p)
NcPosition * GetImpactPoint(TString q)
void AddTrackHypothesis(NcTrack &t)
NcPositionObj * fImpactYZ
NcPositionObj * fImpactXZ
NcTimestamp * GetTimestamp()
void SetEndPoint(NcPosition &p)
NcPositionObj * fImpactXY
NcTrack * GetParentTrack()
void SetReferencePoint(NcPosition &p)
void SetMass(Double_t m, Double_t dm=0)
virtual TObject * Clone(const char *name="") const
Double_t GetPl(Float_t scale=-1)
NcSignal * GetSignal(Int_t j) const
Int_t GetParticleCode() const
Int_t GetNsignals() const
void Decay(Double_t m1, Double_t m2, Double_t thcms, Double_t phicms)
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
void SetParticleCode(Int_t code)
Double_t GetEl(Float_t scale=-1)
void Dumps(NcTrack *t, Int_t n, TString f, TString u)
virtual void Data(TString f="car", TString u="rad")
NcPosition * GetClosestPoint()
void RemoveTrackHypothesis(NcTrack &t)
void AddSignal(NcSignal &s, Int_t mode=0)
void Set3Momentum(Nc3Vector &p)
void SetProb(Double_t prob)
Double_t GetEnergy(Float_t scale=-1)
void SetFitDetails(TObject *obj)
NcPosition * GetReferencePoint()
Double_t GetMass(Float_t scale=-1)
void ShowSignals(const char *classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
Int_t GetNhypotheses() const
Nc3Vector Get3Momentum(Float_t scale=-1) const
Double_t GetSignalValue(TString classname, TString varname, Int_t mode=0, Int_t par=2)
Double_t GetMt(Float_t scale=-1)
Float_t GetEscale() const
TObject * GetFitDetails()
TObjArray * GetSignals(const char *classname, Int_t par=0, TObjArray *signals=0)
void SetHypCopy(Int_t flag)
Float_t GetCharge() const
Double_t GetPt(Float_t scale=-1)
void RemoveTrackHypotheses()
void SetClosestPoint(NcPosition &p)
void SetImpactPoint(NcPosition &p, TString q)
void RemoveSignal(NcSignal &s, Int_t mode=1)
Double_t GetMomentum(Float_t scale=-1)
void SetParentTrack(NcTrack *t)
void SetTimestamp(NcTimestamp &t)
void SetEscale(Float_t scale)