42REveTrack::REveTrack() :
68 fV(t->Vx(), t->Vy(), t->Vz()),
69 fP(t->Px(), t->Py(), t->Pz()),
71 fBeta(t->P()/t->Energy()),
77 fStatus(t->GetStatusCode()),
100 fV(t->Vx(), t->Vy(), t->Vz()),
101 fP(t->Px(), t->Py(), t->Pz()),
103 fBeta(t->P()/t->Energy()),
109 fStatus(t->GetStatusCode()),
198 fLockPoints(t.fLockPoints),
200 fLastPMIdx(t.fLastPMIdx),
230 for (
Int_t i = 0; i <
n; ++i,
p += 3)
253 "pT=%.3f, pZ=%.3f\nV=(%.3f, %.3f, %.3f)",
284 std::back_insert_iterator<vPathMark_t>(
fPathMarks));
347 currP.
fX = pm->fP.fX; currP.
fY = pm->fP.fY; currP.
fZ = pm->fP.fZ;
360 currP.
fX -= pm->fP.fX; currP.
fY -= pm->fP.fY; currP.
fZ -= pm->fP.fZ;
365 if (
p > dp) currP *= 1.0 - dp /
p;
388 REveVectorD vtopass = pm->fV + pm->fE*(pm->fE.Dot(delta));
398 if (
p > dp) currP *= 1.0 - dp /
p;
403 Warning(
"REveTrack::MakeTrack",
"Failed to intersect plane for Cluster2D. Ignoring path-mark.");
417 if (
p > dp) currP *= 1.0 - dp /
p;
482 return TClass::GetClass<REveTrackProjected>();
487 struct Cmp_pathmark_t
490 {
return a.fTime <
b.fTime; }
509 printf(
"REveTrack '%s', number of path marks %d, label %d\n",
514 printf(
" %-9s p: %8f %8f %8f Vertex: %8e %8e %8e %g Extra:%8f %8f %8f\n",
516 pm.fP.fX, pm.fP.fY, pm.fP.fZ,
517 pm.fV.fX, pm.fV.fY, pm.fV.fZ,
518 pm.fE.fX, pm.fE.fY, pm.fE.fZ,
568 fPropagator(nullptr),
573 fMinPt (0), fMaxPt (0), fLimPt (0),
574 fMinP (0), fMaxP (0), fLimP (0)
594 fPropagator(nullptr),
599 fMinPt (0), fMaxPt (0), fLimPt (0),
600 fMinP (0), fMaxP (0), fLimP (0)
708 using namespace TMath;
710 if (
x < 1
e-3)
return 1
e-3;
712 Double_t fac = Power(10, 1 - Floor(Log10(
x)));
713 return Ceil(fac*
x) / fac;
734 if (track->GetRnrLine() ==
fRnrLine)
735 track->SetRnrLine(rnr);
749 if (track && (track->GetRnrLine() ==
fRnrLine))
764 track->SetRnrPoints(rnr);
794 track->SetLineColor(col);
808 if (track && track->GetLineColor() ==
fLineColor)
823 track->SetLineWidth(
width);
837 if (track && track->GetLineWidth() ==
fLineWidth)
852 track->SetLineStyle(
style);
866 if (track && track->GetLineStyle() ==
fLineStyle)
881 track->SetMarkerStyle(
style);
910 track->SetMarkerColor(col);
939 track->SetMarkerSize(
size);
953 if (track && track->GetMarkerSize() ==
fMarkerSize)
970 const Double_t minptsq = min_pt*min_pt;
971 const Double_t maxptsq = max_pt*max_pt;
975 Bool_t on = ptsq >= minptsq && ptsq <= maxptsq;
987 const Double_t minptsq = min_pt*min_pt;
988 const Double_t maxptsq = max_pt*max_pt;
993 const Double_t ptsq = track->fP.Perp2();
994 Bool_t on = ptsq >= minptsq && ptsq <= maxptsq;
995 track->SetRnrState(
on);
1012 const Double_t minpsq = min_p*min_p;
1013 const Double_t maxpsq = max_p*max_p;
1017 Bool_t on = psq >= minpsq && psq <= maxpsq;
1018 c->SetRnrState(psq >= minpsq && psq <= maxpsq);
1029 const Double_t minpsq = min_p*min_p;
1030 const Double_t maxpsq = max_p*max_p;
1036 Bool_t on = psq >= minpsq && psq <= maxpsq;
1037 track->SetRnrState(
on);
1095 TAttMarker::operator=(*
m);
1096 TAttLine::operator=(*
m);
1120 TAttLine ::SaveLineAttributes (out, var);
1138 return TClass::GetClass<REveTrackListProjected>();
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t SetLineWidth
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t SetLineColor
Option_t Option_t SetMarkerStyle
TRObject operator()(const T1 &t1) const
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void SetMainColorPtr(Color_t *colptr)
const char * GetCName() const
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
void SetTitle(const std::string &title)
Set title of an element.
Bool_t HasChildren() const
static const std::string & ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
virtual void CopyVizParams(const REveElement *el)
Copy visualization parameters from element el.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SetName(const std::string &name)
Set name of an element.
REveException Exception-type thrown by Eve classes.
REveLine An arbitrary polyline with fixed line and marker attributes.
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
void SetMarkerColor(Color_t col) override
Set marker color. Propagate to projected lines.
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
void SetLineWidth(Width_t lwidth) override
Set line-style of the line.
void SetLineColor(Color_t col) override
Set the line color.
void SetLineStyle(Style_t lstyle) override
Set line-style of the line.
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json.
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
void BuildRenderData() override
Virtual from REveElement. Prepares render data for binary streaming to client.
virtual void ClonePoints(const REvePointSet &e)
Clone points and all point-related information from point-set 'e'.
void SetMarkerSize(Size_t msize=1) override
Set marker size, propagate to projecteds.
std::vector< REveVector > fPoints
void Reset(Int_t n_points=0)
Drop all data and set-up the data structures to recive new data.
void SetMarkerStyle(Style_t mstyle=1) override
Set marker style, propagate to projecteds.
REveProjection Base for specific classes that implement non-linear projections.
REveRecTrack Template for reconstructed track (also used in VSD).
virtual void IncRefCount(REveElement *re)
Increase reference count and add re to the list of back-references.
virtual void DecRefCount(REveElement *re)
Decrease reference count and remove re from the list of back-references.
REveTrackList A list of tracks supporting change of common attributes and selection based on track pa...
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
void SetRnrLine(Bool_t rnr)
Set rendering of track as line for the list and the elements.
void SetRnrPoints(Bool_t r)
Set rendering of track as points for the list and the elements.
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
REveTrackPropagator * fPropagator
void SetMarkerSize(Size_t s) override
Set marker size for the list and the elements.
REveTrackList(const REveTrackList &)=delete
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveTrackListProjected class.
REveTrack * FindTrackByLabel(Int_t label)
Find track by label, select it and display it in the editor.
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
Double_t RoundMomentumLimit(Double_t x)
Round the momentum limit up to a nice value.
void SelectByP(Double_t min_p, Double_t max_p)
Select visibility of tracks by momentum.
void SelectByPt(Double_t min_pt, Double_t max_pt)
Select visibility of tracks by transverse momentum.
void SetLineWidth(Width_t w) override
Set line width for the list and the elements.
void SanitizeMinMaxCuts()
Set Min/Max cuts so that they are within detected limits.
REveTrack * FindTrackByIndex(Int_t index)
Find track by index, select it and display it in the editor.
void SetMainColor(Color_t c) override
Set main (line) color for the list and the elements.
~REveTrackList() override
Destructor.
Bool_t GetRnrPoints() const
void SetPropagator(REveTrackPropagator *prop)
Set default propagator for tracks.
void SetLineStyle(Style_t s) override
Set line style for the list and the elements.
void SetMarkerColor(Color_t c) override
Set marker color for the list and the elements.
void SetLineColor(Color_t c) override
Set the line color.
Bool_t GetRnrLine() const
void FindMomentumLimits(REveElement *el, Bool_t recurse=kTRUE)
Loop over track elements of argument el and find highest pT and p.
void SetMarkerStyle(Style_t s) override
Set marker style for the list and the elements.
REveTrackPropagator Calculates path of a particle taking into account special path-marks and imposed ...
virtual Bool_t GoToVertex(REveVectorD &v, REveVectorD &p)
Propagate particle with momentum p to vertex v.
static Bool_t IsOutsideBounds(const REveVectorD &point, Double_t maxRsqr, Double_t maxZ)
Bool_t GetFitLineSegments() const
Bool_t GetFitReferences() const
void ResetTrack()
Reset cache holding particle trajectory.
Double_t GetTrackLength(Int_t start_point=0, Int_t end_point=-1) const
Calculate track length from start_point to end_point.
void InitTrack(const REveVectorD &v, Int_t charge)
Initialize internal data-members for given particle parameters.
Bool_t IntersectPlane(const REveVectorD &p, const REveVectorD &point, const REveVectorD &normal, REveVectorD &itsect)
Find intersection of currently propagated track with a plane.
Int_t GetCurrentPoint() const
Get index of current point on track.
Bool_t GetFitDaughters() const
Bool_t GetFitDecay() const
void FillPointSet(REvePointSet *ps) const
Reset ps and populate it with points in propagation cache.
Bool_t GetFitCluster2Ds() const
virtual Bool_t GoToLineSegment(const REveVectorD &s, const REveVectorD &r, REveVectorD &p)
Propagate particle with momentum p to line with start point s and vector r to the second point.
static REveTrackPropagator fgDefault
virtual void GoToBounds(REveVectorD &p)
Propagate particle to bounds.
REveTrack Track with given vertex, momentum and optional referece-points (path-marks) along its path.
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Fill core part of JSON representation.
virtual void SecSelected(REveTrack *)
Emits "SecSelected(REveTrack*)" signal.
REveTrackPropagator * fPropagator
Last path-mark index tried in track-propagation.
void SetAttLineAttMarker(REveTrackList *tl)
Set line and marker attributes from REveTrackList.
virtual void SetTrackParams(const REveTrack &t)
Copy track parameters from t.
vPathMark_t & RefPathMarks()
virtual void MakeTrack(Bool_t recurse=kTRUE)
Calculate track representation based on track data and current settings of the propagator.
REveTrack()
Default constructor.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, return REveTrackProjected class.
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
virtual void SetPathMarks(const REveTrack &t)
Copy path-marks from t.
void SetPropagator(REveTrackPropagator *prop)
Set track's propagator.
void PrintPathMarks()
Print registered path-marks.
void BuildRenderData() override
Crates 3D point array for rendering.
void ComputeBBox() override
Compute the bounding box of the track.
virtual void SetStdTitle()
Set standard track title based on most data-member values.
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
void SortPathMarksByTime()
Sort registered pat-marks by time.
~REveTrack() override
Destructor.
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
virtual Color_t GetLineColor() const
Return the line color.
virtual Width_t GetLineWidth() const
Return the line width.
Width_t fLineWidth
Line width.
virtual Style_t GetLineStyle() const
Return the line style.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
Color_t fMarkerColor
Marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Description of the static properties of a particle.
Description of the dynamic properties of a particle.
TParticlePDG * GetPDG(Int_t mode=0) const
Returns a pointer to the TParticlePDG object using the pdgcode.
const char * GetName() const override
Return particle name.
const char * Data() const
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.