Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
12#ifndef ROOT_TEveTrack
13#define ROOT_TEveTrack
15#include <vector>
17#include "TEveVector.h"
18#include "TEvePathMark.h"
19#include "TEveVSDStructs.h"
20#include "TEveElement.h"
21#include "TEveLine.h"
23#include "TPolyMarker3D.h"
24#include "TMarker.h"
27class TEveTrackList;
29class TEveMCTrack;
30class TParticle;
32class TEveTrack : public TEveLine
34 friend class TEveTrackPropagator;
35 friend class TEveTrackList;
36 friend class TEveTrackGL;
39 TEveTrack& operator=(const TEveTrack&); // Not implemented
42 typedef std::vector<TEvePathMarkD> vPathMark_t;
43 typedef vPathMark_t::iterator vPathMark_i;
44 typedef vPathMark_t::const_iterator vPathMark_ci;
46 // Deprecated -- to be removed.
50 TEveVectorD fV; // Starting vertex
51 TEveVectorD fP; // Starting momentum
52 TEveVectorD fPEnd; // Momentum at the last point of extrapolation
53 Double_t fBeta; // Relativistic beta factor
54 Double_t fDpDs; // Momentum loss over distance
55 Int_t fPdg; // PDG code
56 Int_t fCharge; // Charge in units of e0
57 Int_t fLabel; // Simulation label
58 Int_t fIndex; // Reconstruction index
59 Int_t fStatus; // Status-word, user-defined.
60 Bool_t fLockPoints; // Lock points that are currently in - do nothing in MakeTrack().
61 vPathMark_t fPathMarks; // TEveVector of known points along the track
62 Int_t fLastPMIdx; //!Last path-mark index tried in track-propagation.
64 TEveTrackPropagator *fPropagator; // Pointer to shared render-style
67 TEveTrack();
72 TEveTrack(const TEveTrack& t);
73 virtual ~TEveTrack();
75 virtual void ComputeBBox();
77 virtual void SetStdTitle();
79 virtual void SetTrackParams(const TEveTrack& t);
80 virtual void SetPathMarks (const TEveTrack& t);
82 virtual void MakeTrack(Bool_t recurse=kTRUE);
85 Int_t GetLastPMIdx() const { return fLastPMIdx; }
89 const TEveVectorD& GetVertex() const { return fV; }
90 const TEveVectorD& GetMomentum() const { return fP; }
91 const TEveVectorD& GetEndMomentum() const { return fPEnd; }
93 Double_t GetDpDs() const { return fDpDs; }
94 void SetDpDs(Double_t dpds) { fDpDs = dpds; }
96 Int_t GetPdg() const { return fPdg; }
97 void SetPdg(Int_t pdg) { fPdg = pdg; }
98 Int_t GetCharge() const { return fCharge; }
99 void SetCharge(Int_t chg) { fCharge = chg; }
100 Int_t GetLabel() const { return fLabel; }
101 void SetLabel(Int_t lbl) { fLabel = lbl; }
102 Int_t GetIndex() const { return fIndex; }
103 void SetIndex(Int_t idx) { fIndex = idx; }
104 Int_t GetStatus() const { return fStatus; }
105 void SetStatus(Int_t idx) { fStatus = idx; }
107 void AddPathMark(const TEvePathMarkD& pm) { fPathMarks.push_back(pm); }
108 void AddPathMark(const TEvePathMark& pm) { fPathMarks.push_back(pm); }
110 void SortPathMarksByTime();
112 const vPathMark_t& RefPathMarks() const { return fPathMarks; }
114 void PrintPathMarks(); // *MENU*
117 Bool_t GetLockPoints() const { return fLockPoints; }
119 //-------------------------------------------------------------------
121 virtual void SecSelected(TEveTrack*); // *SIGNAL*
125 virtual void CopyVizParams(const TEveElement* el);
126 virtual void WriteVizParams(std::ostream& out, const TString& var);
128 virtual TClass* ProjectedClass(const TEveProjection* p) const;
130 ClassDef(TEveTrack, 0); // Track with given vertex, momentum and optional referece-points (path-marks) along its path.
134// TEveTrackList
138 public TAttMarker,
139 public TAttLine
144 TEveTrackList(const TEveTrackList&); // Not implemented
145 TEveTrackList& operator=(const TEveTrackList&); // Not implemented
148 TEveTrackPropagator* fPropagator; // Basic track rendering parameters, not enforced to elements.
150 Bool_t fRecurse; // Recurse when propagating marker/line/etc attributes to tracks.
152 Bool_t fRnrLine; // Render track as line.
153 Bool_t fRnrPoints; // Render track as points.
155 Double_t fMinPt; // Minimum track pTfor display selection.
156 Double_t fMaxPt; // Maximum track pTfor display selection.
157 Double_t fLimPt; // Highest track pT in the container.
158 Double_t fMinP; // Minimum track pfor display selection.
159 Double_t fMaxP; // Maximum track pfor display selection.
160 Double_t fLimP; // Highest track p in the container.
162 void FindMomentumLimits(TEveElement* el, Bool_t recurse=kTRUE);
164 void SanitizeMinMaxCuts();
168 TEveTrackList(const char* name, TEveTrackPropagator* prop=nullptr);
169 virtual ~TEveTrackList();
171 void MakeTracks(Bool_t recurse=kTRUE);
172 void FindMomentumLimits(Bool_t recurse=kTRUE);
177 Bool_t GetRecurse() const { return fRecurse; }
180 //--------------------------------
182 virtual void SetMainColor(Color_t c);
183 virtual void SetLineColor(Color_t c) { SetMainColor(c); }
184 virtual void SetLineColor(Color_t c, TEveElement* el);
185 virtual void SetLineWidth(Width_t w);
186 virtual void SetLineWidth(Width_t w, TEveElement* el);
187 virtual void SetLineStyle(Style_t s);
188 virtual void SetLineStyle(Style_t s, TEveElement* el);
190 virtual void SetMarkerColor(Color_t c);
191 virtual void SetMarkerColor(Color_t c, TEveElement* el);
192 virtual void SetMarkerSize(Size_t s);
193 virtual void SetMarkerSize(Size_t s, TEveElement* el);
194 virtual void SetMarkerStyle(Style_t s);
195 virtual void SetMarkerStyle(Style_t s, TEveElement* el);
197 void SetRnrLine(Bool_t rnr);
198 void SetRnrLine(Bool_t rnr, TEveElement* el);
199 Bool_t GetRnrLine() const { return fRnrLine; }
201 void SetRnrPoints(Bool_t r);
202 void SetRnrPoints(Bool_t r, TEveElement* el);
203 Bool_t GetRnrPoints() const { return fRnrPoints; }
205 void SelectByPt(Double_t min_pt, Double_t max_pt);
206 void SelectByPt(Double_t min_pt, Double_t max_pt, TEveElement* el);
207 void SelectByP (Double_t min_p, Double_t max_p);
208 void SelectByP (Double_t min_p, Double_t max_p, TEveElement* el);
210 Double_t GetMinPt() const { return fMinPt; }
211 Double_t GetMaxPt() const { return fMaxPt; }
212 Double_t GetLimPt() const { return fLimPt; }
213 Double_t GetMinP() const { return fMinP; }
214 Double_t GetMaxP() const { return fMaxP; }
215 Double_t GetLimP() const { return fLimP; }
217 //-------------------------------------------------------------------
219 TEveTrack* FindTrackByLabel(Int_t label); // *MENU*
222 virtual void CopyVizParams(const TEveElement* el);
223 virtual void WriteVizParams(std::ostream& out, const TString& var);
225 virtual TClass* ProjectedClass(const TEveProjection* p) const;
227 ClassDef(TEveTrackList, 0); // A list of tracks supporting change of common attributes and selection based on track parameters.
#define c(i)
Definition: RSha256.hxx:101
short Style_t
Definition: RtypesCore.h:89
bool Bool_t
Definition: RtypesCore.h:63
int Int_t
Definition: RtypesCore.h:45
short Color_t
Definition: RtypesCore.h:92
float Size_t
Definition: RtypesCore.h:96
const Bool_t kFALSE
Definition: RtypesCore.h:101
short Width_t
Definition: RtypesCore.h:91
double Double_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDef(name, id)
Definition: Rtypes.h:335
winID h TVirtualViewer3D TVirtualGLPainter p
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 r
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
char name[80]
Definition: TGX11.cxx:110
Line Attributes class.
Definition: TAttLine.h:18
Marker Attributes class.
Definition: TAttMarker.h:19
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:81
A list of TEveElements.
Definition: TEveElement.h:433
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:26
Special-point on track:
Definition: TEvePathMark.h:23
Base-class for non-linear projections.
GL-renderer for TEveTrack class.
Definition: TEveTrackGL.h:23
Editor for TEveTrackList class.
A list of tracks supporting change of common attributes and selection based on track parameters.
Definition: TEveTrack.h:140
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveTrack.cxx:1153
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveTrackListProjected class.
Definition: TEveTrack.cxx:1175
Double_t fMinPt
Definition: TEveTrack.h:155
virtual void SetLineWidth(Width_t w)
Set line width for the list and the elements.
Definition: TEveTrack.cxx:833
void SetPropagator(TEveTrackPropagator *prop)
Set default propagator for tracks.
Definition: TEveTrack.cxx:623
void SelectByP(Double_t min_p, Double_t max_p)
Select visibility of tracks by momentum.
Definition: TEveTrack.cxx:1040
void SetRnrPoints(Bool_t r)
Set rendering of track as points for the list and the elements.
Definition: TEveTrack.cxx:768
Double_t fMaxPt
Definition: TEveTrack.h:156
void SanitizeMinMaxCuts()
Set Min/Max cuts so that they are within detected limits.
Definition: TEveTrack.cxx:723
Bool_t fRecurse
Definition: TEveTrack.h:150
Bool_t GetRnrLine() const
Definition: TEveTrack.h:199
virtual void SetLineStyle(Style_t s)
Set line style for the list and the elements.
Definition: TEveTrack.cxx:865
virtual void SetMarkerStyle(Style_t s)
Set marker style for the list and the elements.
Definition: TEveTrack.cxx:897
Double_t fMaxP
Definition: TEveTrack.h:159
Double_t GetMinP() const
Definition: TEveTrack.h:213
Bool_t fRnrPoints
Definition: TEveTrack.h:153
Double_t GetMaxP() const
Definition: TEveTrack.h:214
TEveTrackPropagator * fPropagator
Definition: TEveTrack.h:148
Bool_t GetRecurse() const
Definition: TEveTrack.h:177
TEveTrack * FindTrackByIndex(Int_t index)
Find track by index, select it and display it in the editor.
Definition: TEveTrack.cxx:1106
Bool_t GetRnrPoints() const
Definition: TEveTrack.h:203
virtual void SetLineColor(Color_t c)
Set the line color.
Definition: TEveTrack.h:183
TEveTrackList & operator=(const TEveTrackList &)
TEveTrackList(const TEveTrackList &)
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveTrack.cxx:1129
virtual void SetMarkerColor(Color_t c)
Set marker color for the list and the elements.
Definition: TEveTrack.cxx:929
Double_t GetLimP() const
Definition: TEveTrack.h:215
void SelectByPt(Double_t min_pt, Double_t max_pt)
Select visibility of tracks by transverse momentum.
Definition: TEveTrack.cxx:995
Double_t GetMaxPt() const
Definition: TEveTrack.h:211
void SetRecurse(Bool_t x)
Definition: TEveTrack.h:178
virtual ~TEveTrackList()
Definition: TEveTrack.cxx:613
TEveTrack * FindTrackByLabel(Int_t label)
Find track by label, select it and display it in the editor.
Definition: TEveTrack.cxx:1083
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
Definition: TEveTrack.cxx:635
Double_t fLimP
Definition: TEveTrack.h:160
Double_t RoundMomentumLimit(Double_t x)
Round the momentum limit up to a nice value.
Definition: TEveTrack.cxx:710
virtual void SetMainColor(Color_t c)
Set main (line) color for the list and the elements.
Definition: TEveTrack.cxx:801
Double_t GetMinPt() const
Definition: TEveTrack.h:210
Double_t fLimPt
Definition: TEveTrack.h:157
Bool_t fRnrLine
Definition: TEveTrack.h:152
TEveTrackPropagator * GetPropagator()
Definition: TEveTrack.h:175
Double_t fMinP
Definition: TEveTrack.h:158
void SetRnrLine(Bool_t rnr)
Set rendering of track as line for the list and the elements.
Definition: TEveTrack.cxx:736
Double_t GetLimPt() const
Definition: TEveTrack.h:212
void FindMomentumLimits(TEveElement *el, Bool_t recurse=kTRUE)
Loop over track elements of argument el and find highest pT and p.
Definition: TEveTrack.cxx:692
virtual void SetMarkerSize(Size_t s)
Set marker size for the list and the elements.
Definition: TEveTrack.cxx:961
Holding structure for a number of track rendering parameters.
Visual representation of a track.
Definition: TEveTrack.h:33
vPathMark_t::iterator vPathMark_i
Definition: TEveTrack.h:43
std::vector< TEvePathMarkD > vPathMark_t
Definition: TEveTrack.h:42
const vPathMark_t & RefPathMarks() const
Definition: TEveTrack.h:112
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveTrack.cxx:487
virtual void SecSelected(TEveTrack *)
Emits "SecSelected(TEveTrack*)" signal.
Definition: TEveTrack.cxx:546
Int_t fCharge
Definition: TEveTrack.h:56
void SetPropagator(TEveTrackPropagator *prop)
Set track's render style.
Definition: TEveTrack.cxx:307
void SetStatus(Int_t idx)
Definition: TEveTrack.h:105
Int_t fPdg
Definition: TEveTrack.h:55
virtual ~TEveTrack()
Definition: TEveTrack.cxx:222
vPathMark_t & RefPathMarks()
Definition: TEveTrack.h:111
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveTrack.cxx:473
Bool_t GetLockPoints() const
Definition: TEveTrack.h:117
virtual void MakeTrack(Bool_t recurse=kTRUE)
Calculate track representation based on track data and current settings of the propagator.
Definition: TEveTrack.cxx:336
TEveTrackPropagator * fPropagator
Last path-mark index tried in track-propagation.
Definition: TEveTrack.h:64
TEveTrackPropagator * GetPropagator() const
Definition: TEveTrack.h:84
TEveVectorD fP
Definition: TEveTrack.h:51
void SetLabel(Int_t lbl)
Definition: TEveTrack.h:101
virtual void ComputeBBox()
Compute the bounding box of the track.
Definition: TEveTrack.cxx:239
vPathMark_t::const_iterator vPathMark_ci
Definition: TEveTrack.h:44
void SetIndex(Int_t idx)
Definition: TEveTrack.h:103
void SetAttLineAttMarker(TEveTrackList *tl)
Set line and marker attributes from TEveTrackList.
Definition: TEveTrack.cxx:318
void AddPathMark(const TEvePathMarkD &pm)
Definition: TEveTrack.h:107
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, return TEveTrackProjected class.
Definition: TEveTrack.cxx:497
Int_t fIndex
Definition: TEveTrack.h:58
virtual void SetPathMarks(const TEveTrack &t)
Copy path-marks from t.
Definition: TEveTrack.cxx:297
Int_t fStatus
Definition: TEveTrack.h:59
Int_t GetLastPMIdx() const
Definition: TEveTrack.h:85
void SortPathMarksByTime()
Sort registered pat-marks by time.
Definition: TEveTrack.cxx:514
void PrintPathMarks()
Print registered path-marks.
Definition: TEveTrack.cxx:522
void SetCharge(Int_t chg)
Definition: TEveTrack.h:99
TEveTrack & operator=(const TEveTrack &)
void AddPathMark(const TEvePathMark &pm)
Definition: TEveTrack.h:108
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns list-tree icon for TEveTrack.
Definition: TEveTrack.cxx:231
Int_t GetStatus() const
Definition: TEveTrack.h:104
Double_t GetDpDs() const
Definition: TEveTrack.h:93
Default constructor.
Definition: TEveTrack.cxx:45
Double_t fDpDs
Definition: TEveTrack.h:54
const TEveVectorD & GetEndMomentum() const
Definition: TEveTrack.h:91
Int_t fLabel
Definition: TEveTrack.h:57
Int_t GetIndex() const
Definition: TEveTrack.h:102
Int_t GetLabel() const
Definition: TEveTrack.h:100
Definition: TEveTrack.h:47
@ kBPTAlways
Definition: TEveTrack.h:47
@ kBPTNever
Definition: TEveTrack.h:47
@ kBPTDefault
Definition: TEveTrack.h:47
Int_t GetCharge() const
Definition: TEveTrack.h:98
Bool_t fLockPoints
Definition: TEveTrack.h:60
virtual void SetTrackParams(const TEveTrack &t)
Copy track parameters from t.
Definition: TEveTrack.cxx:280
void SetDpDs(Double_t dpds)
Definition: TEveTrack.h:94
Double_t fBeta
Definition: TEveTrack.h:53
TEveVectorD fV
Definition: TEveTrack.h:50
Int_t GetPdg() const
Definition: TEveTrack.h:96
void SetLockPoints(Bool_t l)
Definition: TEveTrack.h:116
virtual void SetStdTitle()
Set standard track title based on most data-member values.
Definition: TEveTrack.cxx:264
void SetPdg(Int_t pdg)
Definition: TEveTrack.h:97
vPathMark_t fPathMarks
Definition: TEveTrack.h:61
const TEveVectorD & GetVertex() const
Definition: TEveTrack.h:89
Int_t fLastPMIdx
Definition: TEveTrack.h:62
TEveVectorD fPEnd
Definition: TEveTrack.h:52
const TEveVectorD & GetMomentum() const
Definition: TEveTrack.h:90
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
Description of the dynamic properties of a particle.
Definition: TParticle.h:26
Basic string class.
Definition: TString.h:136
Double_t x[n]
Definition: legend1.C:17
static constexpr double s
TLine l
Definition: textangle.C:4