170 cout <<
" *NcJet* Initial max. number of tracks entered : " << n << endl;
171 cout <<
" This is invalid. Default initial maximum will be used." << endl;
259 for (Int_t i=1; i<=
fNtrk; i++)
375 for (Int_t i=0; i<
fNtrk; i++)
378 if (tx == &t)
return;
423 const char* name=GetName();
424 const char* title=GetTitle();
426 cout <<
" *NcJet::Data*";
427 if (strlen(name)) cout <<
" Name : " << GetName();
428 if (strlen(title)) cout <<
" Title : " << GetTitle();
431 <<
" Momentum : " <<
GetMomentum() <<
" Energy scale : " <<
fEscale <<
" GeV" << endl;
460 if (
fRef) { cout <<
" Ref-point :";
fRef->Data(f,u); }
465 ntk=tracks->GetEntries();
474 cout <<
" *NcJet::List* No tracks are present." << endl;
481 for (Int_t it=1; it<=ntk; it++)
485 obj=tracks->At(it-1);
487 if (!obj->InheritsFrom(
"NcTrack"))
continue;
495 cout <<
" ---Track no. " << it << endl;
523 if (
fRef) { cout <<
" Ref-point :";
fRef->Data(f,u); }
528 ntk=tracks->GetEntries();
537 cout <<
" *NcJet::ListAll* No tracks are present." << endl;
544 for (Int_t it=1; it<=ntk; it++)
548 obj=tracks->At(it-1);
550 if (!obj->InheritsFrom(
"NcTrack"))
continue;
558 cout <<
" ---Track no. " << it << endl;
586 if (idmode==0 && chmode==2 && pcode==0)
594 n=tracks.GetEntries();
624 n=tracks.GetEntries();
674 Double_t norm=
fV.GetNorm();
718 Double_t inv=
Dot(*
this);
723 Double_t m=sqrt(inv);
724 if (m) dm=dinv/(2.*m);
763 cout <<
" *NcJet*::GetTrack* Invalid argument i : " << i
764 <<
" Ntrk = " <<
fNtrk << endl;
784 for (Int_t i=0; i<
fNtrk; i++)
787 if (
id == tx->
GetId())
return tx;
876 for (Int_t i=0; i<
fNtrk; i++)
882 if (pcode && abs(pcode)!=abs(code))
continue;
885 if (idmode==-1 &&
id>=0)
continue;
886 if (idmode==1 &&
id<=0)
continue;
889 if (chmode==-1 && q>=0)
continue;
890 if (chmode==0 && fabs(q)>1e-10)
continue;
891 if (chmode==1 && q<=0)
continue;
892 if (chmode==3 && fabs(q)<1e-10)
continue;
972 for (Int_t i=0; i<
fNtrk; i++)
979 if (name==
"*") isel=1;
980 if (!mode && s==name) isel=1;
981 if (mode==1 && s.Contains(name.Data())) isel=1;
1044 Int_t ntk=arr.GetEntries();
1048 for (Int_t i=0; i<ntk; i++)
1073 Int_t ntk=arr.GetEntries();
1077 for (Int_t i=0; i<ntk; i++)
1095 if (!told || !tnew || !
fTracks)
return;
1097 Int_t index=
fTracks->IndexOf(told);
1099 if (index<0 || index>=
fTracks->GetEntries())
return;
1138 TObject* obj=
fTracks->Remove(t);
1185 ntk=tracks->GetEntries();
1194 cout <<
" No tracks are present." << endl;
1200 cout <<
" There are " << ntk <<
" tracks available." << endl;
1206 cout <<
" The following " << ntk <<
" tracks are available :" << endl;
1209 for (Int_t i=1; i<=ntk; i++)
1213 obj=tracks->At(i-1);
1215 if (!obj->InheritsFrom(
"NcTrack"))
continue;
1223 const char* name=tx->GetName();
1224 const char* title=tx->GetTitle();
1225 cout <<
" Track : " << i;
1226 cout <<
" Id : " << tx->
GetId();
1228 if (strlen(name)) cout <<
" Name : " << name;
1229 if (strlen(title)) cout <<
" Title : " << title;
1234 if (mode==2)
List(f,u,tracks);
1236 if (mode==3)
ListAll(f,u,tracks);
1291 if (cos(a[1])<0) pl=-pl;
1367 Double_t pt=
GetPt();
1372 Double_t mt=sqrt(pt*pt+m*m);
1374 if (mt) dmt2=(pow((pt*dpt),2)+pow((m*dm),2))/(mt*mt);
1399 Double_t pl=
GetPl();
1404 Double_t y=9999,dy2=0;
1405 if (sum && dif) y=0.5*log(sum/dif);
1407 if (sum*dif) dy2=(1./(sum*dif))*(pow((pl*de),2)+pow((e*dpl),2));
1436 cout <<
"*NcJet::SetTrackCopy* Invalid argument : " << j << endl;
1441 cout <<
"*NcJet::SetTrackCopy* Storage already contained tracks."
1442 <<
" ==> TrackCopy mode not changed." << endl;
1563 if (ordered) ordered->Clear();
1565 TObjArray* atracks=tracks;
1566 if (!atracks) atracks=
fTracks;
1569 if (atracks) ntracks=atracks->GetEntries();
1571 if (!mode || abs(mode)>13 || !tracks || !ntracks)
return 0;
1575 ordered->Expand(ntracks);
1598 for (Int_t i=0; i<ntracks; i++)
1602 if (!obj->InheritsFrom(
"NcTrack"))
continue;
1608 arr->AddAt(tx,nord-1);
1612 for (Int_t j=0; j<=nord; j++)
1628 val2=((
NcTrack*)arr->At(j))->GetNsignals();
1632 val2=((
NcTrack*)arr->At(j))->GetEnergy(1);
1636 val2=((
NcTrack*)arr->At(j))->GetMomentum(1);
1640 val2=((
NcTrack*)arr->At(j))->GetMass(1);
1644 val2=((
NcTrack*)arr->At(j))->GetPt(1);
1648 val2=((
NcTrack*)arr->At(j))->GetPl(1);
1652 val2=((
NcTrack*)arr->At(j))->GetEt(1);
1656 val2=((
NcTrack*)arr->At(j))->GetEl(1);
1660 val2=((
NcTrack*)arr->At(j))->GetMt(1);
1664 val2=((
NcTrack*)arr->At(j))->GetRapidity();
1668 val2=((
NcTrack*)arr->At(j))->GetPseudoRapidity();
1672 val2=((
NcTrack*)arr->At(j))->GetCharge();
1676 val2=((
NcTrack*)arr->At(j))->GetProb();
1680 if (mode<0 && val1 <= val2)
continue;
1681 if (mode>0 && val1 >= val2)
continue;
1684 for (Int_t k=nord-1; k>j; k--)
1686 arr->AddAt(arr->At(k-1),k);
1729 if (!p)
return dist;
1734 if (!rx)
return dist;
1738 if (pj.
GetNorm() <= 0.)
return dist;
1774 if (!t)
return dist;
1779 if (!rx)
return dist;
1783 if (pj.
GetNorm() <= 0.)
return dist;
1821 if (!j)
return dist;
1826 if (!rx)
return dist;
1830 if (pj.
GetNorm() <= 0.)
return dist;
1857 if (
fNtrk<1)
return 0;
1864 for (Int_t i=1; i<=
fNtrk; i++)
1872 for (Int_t k=0; k<arr.GetEntries(); k++)
1882 if ((par==0 || par==2) && sx->InheritsFrom(classname.Data()))
1888 if (!parent)
continue;
1889 if ((par==1 || par==2) && parent->InheritsFrom(classname.Data())) arr.Add(sx);
1966 for (Int_t i=1; i<=
fNtrk; i++)
1974 for (Int_t k=0; k<arr->GetEntries(); k++)
1984 if ((par==0 || par==2) && sx->InheritsFrom(classname.Data()))
1990 if (!parent)
continue;
1991 if ((par==1 || par==2) && parent->InheritsFrom(classname.Data())) arr->Add(sx);
2029 Int_t nhits=hits.GetEntries();
2031 cout <<
" *NcJet::ShowSignals* There are " << nhits
2032 <<
" signals recorded for (device) class " << classname.Data() << endl;
2034 if (!nhits || !mode)
return;
2037 for (Int_t i=0; i<nhits; i++)
2040 if (sx) sx->
Data(f,u);
2046 cout <<
" Device Position";
2074 Int_t nhits=hits.GetEntries();
2076 if (!nhits)
return 0;
2079 for (Int_t i=0; i<nhits; i++)
2109 cout <<
" *NcJet::SetEscale* Invalid scale value : " << scale << endl;
2145 if (strlen(name)) jet->SetName(name);
Handling of 3-vectors in various reference frames.
Double_t GetResultError() const
void GetVector(Double_t *v, TString f, TString u="rad") const
Double_t GetPseudoRapidity()
Double_t Dot(Nc4Vector &q)
Nc3Vector GetVecLong() const
Double_t GetResultError() const
virtual void Data(TString f="car", TString u="rad")
Nc3Vector GetVecTrans() const
Nc3Vector Get3Vector() const
Double32_t fDresult
! The error on the scalar result of an operation (e.g. dotproduct)
Signal (Hit) handling of a generic device.
Creation and investigation of a jet of particle tracks.
Double_t GetInvmass(Float_t scale=-1)
Double_t GetEnergy(Float_t scale=-1)
void SetReferencePoint(NcPosition &p)
void ShowTracks(Int_t mode=1, TString f="car", TString u="rad", TObjArray *tracks=0)
Double_t GetEl(Float_t scale=-1)
NcPosition * GetReferencePoint()
virtual void List(TString f="car", TString u="rad", TObjArray *tracks=0)
TObjArray * GetTracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0, TObjArray *tracks=0)
Double_t GetPl(Float_t scale=-1)
Int_t GetNtracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
void RemoveTracks(Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
Int_t GetTrackCopy() const
NcTrack * GetTrack(Int_t i) const
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
NcTrack * GetIdTrack(Int_t id) const
void RemoveTrack(NcTrack *t)
TObjArray * fSelected
! Temp. array to hold user selected or ordered objects
Double_t GetMomentum(Float_t scale=-1)
Double_t GetSignalValue(TString classname, TString varname, Int_t mode=0, Int_t par=2)
Double_t GetPt(Float_t scale=-1)
Double_t GetEt(Float_t scale=-1)
void SetEscale(Float_t scale)
TObjArray * GetSignals(TString classname, Int_t par=0, TObjArray *signals=0)
void ShowSignals(TString classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
virtual void SetOwner(Bool_t own=kTRUE)
virtual TObject * Clone(const char *name="") const
TObjArray * SortTracks(Int_t mode=-1, TObjArray *tracks=0, TObjArray *ordered=0)
Float_t GetCharge() const
virtual void Data(TString f="car", TString u="rad")
void SetNtinit(Int_t n=2)
void SetTrackCopy(Int_t j)
Double_t GetMt(Float_t scale=-1)
virtual void ListAll(TString f="car", TString u="rad", TObjArray *tracks=0)
Int_t GetNsignals(TString classname="TObject", Int_t par=0) const
void ReplaceTrack(NcTrack *told, NcTrack *tnew)
Float_t GetEscale() const
Nc3Vector Get3Momentum(Float_t scale=-1) const
void AddTrack(NcTrack &t)
Handling of positions (with timestamps) in various reference frames.
void GetPosition(Double_t *r, TString f, TString u="rad", Float_t s=-1) 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
virtual Float_t GetSignal(Int_t j=1, Int_t mode=0) const
virtual void Data(TString f="car", TString u="rad") const
Handling of the attributes of a reconstructed particle track.
Double_t GetEt(Float_t scale=-1)
virtual void ListAll(TString f="car", TString u="rad")
void SetReferencePoint(NcPosition &p)
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
Double_t GetDistance(NcPosition *p, Float_t scale=-1)
Double_t GetEl(Float_t scale=-1)
virtual void Data(TString f="car", TString u="rad")
void Set3Momentum(Nc3Vector &p)
Double_t GetEnergy(Float_t scale=-1)
Double_t GetMass(Float_t scale=-1)
Double_t GetMt(Float_t scale=-1)
Float_t GetEscale() const
Float_t GetCharge() const
Double_t GetPt(Float_t scale=-1)
Double_t GetMomentum(Float_t scale=-1)