// Updates
#include <Reve/ReveManager.h>
+#include <Reve/RGBrowser.h>
#include <Reve/NLTTrack.h>
#include <TCanvas.h>
//______________________________________________________________________________
// Track
//
+// Visual representation of a track.
+//
ClassImp(Reve::Track)
fP(),
fBeta(0),
fCharge(0),
- fLabel(-1),
- fIndex(-1),
+ fLabel(kMinInt),
+ fIndex(kMinInt),
fPathMarks(),
fRnrStyle(0)
fBeta(t->P()/t->Energy()),
fCharge(0),
fLabel(label),
- fIndex(-1),
+ fIndex(kMinInt),
fPathMarks(),
fRnrStyle(0)
{
static const Exc_t eH("Track::ImportClustersFromIndex ");
- if (fIndex < 0)
+ if (fIndex == kMinInt)
throw(eH + "index not set.");
Reve::LoadMacro("clusters_from_index.C");
{
static const Exc_t eH("Track::ImportKine ");
- if (fLabel < 0)
+ if (fLabel == kMinInt)
throw(eH + "label not set.");
+ Int_t label;
+ if (fLabel < 0) {
+ Warning(eH, "label negative, taking absolute value.");
+ label = -fLabel;
+ } else {
+ label = fLabel;
+ }
+
Reve::LoadMacro("kine_tracks.C");
gROOT->ProcessLine(Form("kine_track(%d, kFALSE, kTRUE, (Reve::RenderElement*)%p);",
- fLabel, this));
+ label, this));
}
{
static const Exc_t eH("Track::ImportKineWithArgs ");
- if (fLabel < 0)
+ if (fLabel == kMinInt)
throw(eH + "label not set.");
+ Int_t label;
+ if (fLabel < 0) {
+ Warning(eH, "label negative, taking absolute value.");
+ label = -fLabel;
+ } else {
+ label = fLabel;
+ }
+
Reve::LoadMacro("kine_tracks.C");
gROOT->ProcessLine(Form("kine_track(%d, %d, %d, (Reve::RenderElement*)%p);",
- fLabel, importMother, importDaugters, this));
+ label, importMother, importDaugters, this));
}
/******************************************************************************/
{
static const Exc_t eH("Track::PrintPathMarks ");
- if (fLabel < 0)
- throw(eH + "label not set.");
-
printf("Track '%s', number of path marks %d, label %d\n",
GetName(), fPathMarks.size(), fLabel);
/******************************************************************************/
/******************************************************************************/
-
//______________________________________________________________________________
// TrackRnrStyle
//
+// Holding structure for a number of track rendering parameters.
+//
+// This is decoupled from Track/TrackList to allow sharing of the
+// RnrStyle among several instances. Back references are kept so the
+// tracks can be recreated when the parameters change.
+//
+// TrackList has Get/Set methods for RnrStlye. TrackEditor and
+// TrackListEditor provide editor access.
ClassImp(Reve::TrackRnrStyle)
const Float_t TrackRnrStyle::fgkB2C = 0.299792458e-3;
TrackRnrStyle TrackRnrStyle::fgDefStyle;
+//______________________________________________________________________________
TrackRnrStyle::TrackRnrStyle() :
TObject(),
ReferenceBackPtr(),
fRnrFV(kFALSE),
fFVAtt()
{
+ // Default constructor.
+
fPMAtt.SetMarkerColor(4);
fPMAtt.SetMarkerStyle(2);
/**************************************************************************/
+//______________________________________________________________________________
void TrackRnrStyle::RebuildTracks()
{
+ // Rebuild all tracks using this render-style.
+
Track* track;
std::list<RenderElement*>::iterator i = fBackRefs.begin();
while (i != fBackRefs.end())
}
}
-/*************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackRnrStyle::SetMaxR(Float_t x)
{
+ // Set maximum radius and rebuild tracks.
+
fMaxR = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetMaxZ(Float_t x)
{
+ // Set maximum z and rebuild tracks.
+
fMaxZ = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetMaxOrbs(Float_t x)
{
+ // Set maximum number of orbits and rebuild tracks.
+
fMaxOrbs = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetMinAng(Float_t x)
{
+ // Set minimum step angle and rebuild tracks.
+
fMinAng = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetDelta(Float_t x)
{
+ // Set maximum error and rebuild tracks.
+
fDelta = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetFitDaughters(Bool_t x)
{
+ // Set daughter creation point fitting and rebuild tracks.
+
fFitDaughters = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetFitReferences(Bool_t x)
{
+ // Set track-reference fitting and rebuild tracks.
+
fFitReferences = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetFitDecay(Bool_t x)
{
+ // Set decay fitting and rebuild tracks.
+
fFitDecay = x;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetRnrDecay(Bool_t rnr)
{
+ // Set decay rendering and rebuild tracks.
+
fRnrDecay = rnr;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetRnrDaughters(Bool_t rnr)
{
+ // Set daughter rendering and rebuild tracks.
+
fRnrDaughters = rnr;
RebuildTracks();
}
+//______________________________________________________________________________
void TrackRnrStyle::SetRnrReferences(Bool_t rnr)
{
+ // Set track-reference rendering and rebuild tracks.
+
fRnrReferences = rnr;
RebuildTracks();
}
/**************************************************************************/
/**************************************************************************/
-//______________________________________________________________________
+
+//______________________________________________________________________________
// TrackList
//
ClassImp(Reve::TrackList)
+//______________________________________________________________________________
TrackList::TrackList(TrackRnrStyle* rs) :
RenderElementList(),
TAttMarker(1, 20, 1),
fMinPt (0), fMaxPt (0), fLimPt (0),
fMinP (0), fMaxP (0), fLimP (0)
{
+ // Constructor. If TrackRenderStyle argument is 0, a new default
+ // render-style is created.
+
fChildClass = Track::Class(); // override member from base RenderElementList
fMainColorPtr = &fLineColor;
SetRnrStyle(rs);
}
+//______________________________________________________________________________
TrackList::TrackList(const Text_t* name, TrackRnrStyle* rs) :
RenderElementList(name),
TAttMarker(1, 20, 1),
fMinPt (0), fMaxPt (0), fLimPt (0),
fMinP (0), fMaxP (0), fLimP (0)
{
+ // Constructor. If TrackRenderStyle argument is 0, a new default
+ // render-style is created.
+
fChildClass = Track::Class(); // override member from base RenderElementList
fMainColorPtr = &fLineColor;
SetRnrStyle(rs);
}
+//______________________________________________________________________________
TrackList::~TrackList()
{
+ // Destructor.
+
SetRnrStyle(0);
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetRnrStyle(TrackRnrStyle* rs)
{
+ // Set default render-style for tracks.
+ // This is not enforced onto the tracks themselves but this is the
+ // render-style that is show in the TrackListEditor.
+
if (fRnrStyle == rs) return;
if (fRnrStyle) fRnrStyle->DecRefCount();
fRnrStyle = rs;
/**************************************************************************/
+//______________________________________________________________________________
void TrackList::MakeTracks(Bool_t recurse)
{
+ // Regenerate the visual representations of tracks.
+ // The momentum limits are rescanned during the same traversal.
+
fLimPt = fLimP = 0;
- for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
+ for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
{
Track* track = (Track*)(*i);
track->MakeTrack(recurse);
gReve->Redraw3D();
}
+//______________________________________________________________________________
void TrackList::FindMomentumLimits(RenderElement* el, Bool_t recurse)
{
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ // Loop over track elements of argument el and find highest pT and p.
+ // These are stored in members fLimPt and fLimP.
+
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
Track* track = dynamic_cast<Track*>(*i);
if (track)
}
}
+//______________________________________________________________________________
Float_t TrackList::RoundMomentumLimit(Float_t x)
{
+ // Round the momentum limit up to a nice value.
+
using namespace TMath;
Double_t fac = Power(10, 1 - Floor(Log10(x)));
return Ceil(fac*x) / fac;
/**************************************************************************/
+//______________________________________________________________________________
void TrackList::SetRnrLine(Bool_t rnr)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set rendering of track as line for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetRnrLine() == fRnrLine) track->SetRnrLine(rnr);
- if (fRecurse) SetRnrLine(rnr, *i);
+ if (track->GetRnrLine() == fRnrLine)
+ track->SetRnrLine(rnr);
+ if (fRecurse)
+ SetRnrLine(rnr, *i);
}
fRnrLine = rnr;
}
+//______________________________________________________________________________
void TrackList::SetRnrLine(Bool_t rnr, RenderElement* el)
{
+ // Set rendering of track as line for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && (track->GetRnrLine() == fRnrLine))
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetRnrPoints(Bool_t rnr)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set rendering of track as points for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetRnrPoints() == fRnrPoints) track->SetRnrPoints(rnr);
- if (fRecurse) SetRnrPoints(rnr, *i);
+ if (track->GetRnrPoints() == fRnrPoints)
+ track->SetRnrPoints(rnr);
+ if (fRecurse)
+ SetRnrPoints(rnr, *i);
}
fRnrPoints = rnr;
}
+//______________________________________________________________________________
void TrackList::SetRnrPoints(Bool_t rnr, RenderElement* el)
{
+ // Set rendering of track as points for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track)
- if (track->GetRnrPoints() == fRnrPoints) track->SetRnrPoints(rnr);
-
- if (fRecurse) SetRnrPoints(rnr, *i);
+ if (track->GetRnrPoints() == fRnrPoints)
+ track->SetRnrPoints(rnr);
+ if (fRecurse)
+ SetRnrPoints(rnr, *i);
}
}
-/**************************************************************************/
+/******************************************************************************/
+
+//______________________________________________________________________________
void TrackList::SetMainColor(Color_t col)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set main (line) color for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetLineColor() == fLineColor) track->SetLineColor(col);
- if (fRecurse) SetLineColor(col, *i);
+ if (track->GetLineColor() == fLineColor)
+ track->SetLineColor(col);
+ if (fRecurse)
+ SetLineColor(col, *i);
}
RenderElement::SetMainColor(col);
}
+//______________________________________________________________________________
void TrackList::SetLineColor(Color_t col, RenderElement* el)
{
+ // Set line color for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetLineColor() == fLineColor)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetLineWidth(Width_t width)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set line width for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetLineWidth() == fLineWidth) track->SetLineWidth(width);
- if (fRecurse) SetLineWidth(width, *i);
+ if (track->GetLineWidth() == fLineWidth)
+ track->SetLineWidth(width);
+ if (fRecurse)
+ SetLineWidth(width, *i);
}
fLineWidth=width;
}
+//______________________________________________________________________________
void TrackList::SetLineWidth(Width_t width, RenderElement* el)
{
+ // Set line width for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetLineWidth() == fLineWidth)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetLineStyle(Style_t style)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set line style for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetLineStyle() == fLineStyle) track->SetLineStyle(style);
- if (fRecurse)SetLineStyle(style, *i);
+ if (track->GetLineStyle() == fLineStyle)
+ track->SetLineStyle(style);
+ if (fRecurse)
+ SetLineStyle(style, *i);
}
fLineStyle=style;
}
+//______________________________________________________________________________
void TrackList::SetLineStyle(Style_t style, RenderElement* el)
{
+ // Set line style for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetLineStyle() == fLineStyle)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetMarkerStyle(Style_t style)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set marker style for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetMarkerStyle() == fMarkerStyle) track->SetMarkerStyle(style);
- if (fRecurse) SetMarkerStyle(style, *i);
+ if (track->GetMarkerStyle() == fMarkerStyle)
+ track->SetMarkerStyle(style);
+ if (fRecurse)
+ SetMarkerStyle(style, *i);
}
fMarkerStyle=style;
}
+//______________________________________________________________________________
void TrackList::SetMarkerStyle(Style_t style, RenderElement* el)
{
+ // Set marker style for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetMarkerStyle() == fMarkerStyle)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetMarkerColor(Color_t col)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set marker color for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetMarkerColor() == fMarkerColor) track->SetMarkerColor(col);
- if (fRecurse) SetMarkerColor(col, *i);
+ if (track->GetMarkerColor() == fMarkerColor)
+ track->SetMarkerColor(col);
+ if (fRecurse)
+ SetMarkerColor(col, *i);
}
fMarkerColor=col;
}
+//______________________________________________________________________________
void TrackList::SetMarkerColor(Color_t col, RenderElement* el)
{
+ // Set marker color for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetMarkerColor() == fMarkerColor)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SetMarkerSize(Size_t size)
{
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ // Set marker size for the list and the elements.
+
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
Track* track = (Track*)(*i);
- if (track->GetMarkerSize() == fMarkerSize) track->SetMarkerSize(size);
- if (fRecurse) SetMarkerSize(size, *i);
+ if (track->GetMarkerSize() == fMarkerSize)
+ track->SetMarkerSize(size);
+ if (fRecurse)
+ SetMarkerSize(size, *i);
}
fMarkerSize=size;
}
+//______________________________________________________________________________
void TrackList::SetMarkerSize(Size_t size, RenderElement* el)
{
+ // Set marker size for children of el.
+
Track* track;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
track = dynamic_cast<Track*>(*i);
if (track && track->GetMarkerSize() == fMarkerSize)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
void TrackList::SelectByPt(Float_t min_pt, Float_t max_pt)
{
fMinPt = min_pt;
const Float_t minptsq = min_pt*min_pt;
const Float_t maxptsq = max_pt*max_pt;
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
const Float_t ptsq = ((Track*)(*i))->fP.Perp2();
Bool_t on = ptsq >= minptsq && ptsq <= maxptsq;
}
}
+//______________________________________________________________________________
void TrackList::SelectByPt(Float_t min_pt, Float_t max_pt, RenderElement* el)
{
const Float_t minptsq = min_pt*min_pt;
const Float_t maxptsq = max_pt*max_pt;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
Track* track = dynamic_cast<Track*>(*i);
if (track)
}
}
+//______________________________________________________________________________
void TrackList::SelectByP(Float_t min_p, Float_t max_p)
{
fMinP = min_p;
const Float_t minpsq = min_p*min_p;
const Float_t maxpsq = max_p*max_p;
- for(List_i i=BeginChildren(); i!=EndChildren(); ++i)
+ for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
{
const Float_t psq = ((Track*)(*i))->fP.Mag2();
Bool_t on = psq >= minpsq && psq <= maxpsq;
}
}
+//______________________________________________________________________________
void TrackList::SelectByP(Float_t min_p, Float_t max_p, RenderElement* el)
{
const Float_t minpsq = min_p*min_p;
const Float_t maxpsq = max_p*max_p;
- for(List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
+ for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
{
Track* track = dynamic_cast<Track*>(*i);
if (track)
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
+Track* TrackList::FindTrackByLabel(Int_t label)
+{
+ // Find track by label, select it and display it in the editor.
+
+ for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ if (((Track*)(*i))->GetLabel() == label) {
+ TGListTree *lt = gReve->GetLTEFrame()->GetListTree();
+ TGListTreeItem *mlti = lt->GetSelected();
+ if (mlti->GetUserData() != this)
+ mlti = FindListTreeItem(lt);
+ TGListTreeItem *tlti = (*i)->FindListTreeItem(lt, mlti);
+ lt->HighlightItem(tlti);
+ lt->SetSelected(tlti);
+ gReve->EditRenderElement(*i);
+ return (Track*) *i;
+ }
+ }
+ return 0;
+}
+
+//______________________________________________________________________________
+Track* TrackList::FindTrackByIndex(Int_t index)
+{
+ // Find track by index, select it and display it in the editor.
+
+ for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ if (((Track*)(*i))->GetIndex() == index) {
+ TGListTree *lt = gReve->GetLTEFrame()->GetListTree();
+ TGListTreeItem *mlti = lt->GetSelected();
+ if (mlti->GetUserData() != this)
+ mlti = FindListTreeItem(lt);
+ TGListTreeItem *tlti = (*i)->FindListTreeItem(lt, mlti);
+ lt->HighlightItem(tlti);
+ lt->SetSelected(tlti);
+ gReve->EditRenderElement(*i);
+ return (Track*) *i;
+ }
+ }
+ return 0;
+}
+
+//______________________________________________________________________________
void TrackList::ImportHits()
{
- for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((Track*)(*i))->ImportHits();
}
}
+//______________________________________________________________________________
void TrackList::ImportClusters()
{
- for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((Track*)(*i))->ImportClusters();
}
}
-/**************************************************************************/
+/******************************************************************************/
+//______________________________________________________________________________
TClass* TrackList::ProjectedClass() const
{
return NLTTrackList::Class();
}
-/**************************************************************************/
-/**************************************************************************/
-/**************************************************************************/
+
+
+/******************************************************************************/
+/******************************************************************************/
#include "RGEditor.h"
-//______________________________________________________________________
+//______________________________________________________________________________
// TrackCounter
//
typedef std::vector<Reve::PathMark*>::iterator vpPathMark_i;
protected:
- Reve::Vector fV;
- Reve::Vector fP;
- Double_t fBeta;
- Int_t fCharge;
- Int_t fLabel;
- Int_t fIndex;
- vpPathMark_t fPathMarks;
+ Reve::Vector fV; // Starting vertex
+ Reve::Vector fP; // Starting momentum
+ Double_t fBeta; // Relativistic beta factor
+ Int_t fCharge; // Charge in units of e0
+ Int_t fLabel; // Simulation label
+ Int_t fIndex; // Reconstruction index
+ vpPathMark_t fPathMarks; // Vector of known points along the track
- TrackRnrStyle* fRnrStyle;
+ TrackRnrStyle* fRnrStyle; // Pointer to shared render-style
public:
Track();
virtual TClass* ProjectedClass() const;
- ClassDef(Track, 1);
+ ClassDef(Track, 1); // Visual representation of a track.
}; // endclass Track
// TrackRnrStyle
/**************************************************************************/
-// This is decoupled from Track/TrackList to allow sharing of the
-// RnrStyle among several instances. The interface is half cooked and
-// there is no good way to set RnrStyle after the object has been
-// created (shouldn't be too hard to fix).
-//
-// TrackList has Get/Set methods for RnrStlye and
-// TrackListEditor provides editor access to them.
-
class TrackRnrStyle : public TObject,
public ReferenceBackPtr
{
void RebuildTracks();
public:
- Float_t fMagField;
- // track limits
- Float_t fMaxR;
- Float_t fMaxZ;
- // helix limits
- Float_t fMaxOrbs; // Maximal angular path of tracks' orbits (1 ~ 2Pi).
- Float_t fMinAng; // Minimal angular step between two helix points.
- Float_t fDelta; // Maximal error at the mid-point of the line connecting to helix points.
-
- Bool_t fEditPathMarks;
- TMarker fPMAtt;
-
- Bool_t fFitDaughters;
- Bool_t fFitReferences;
- Bool_t fFitDecay;
-
- Bool_t fRnrDaughters;
- Bool_t fRnrReferences;
- Bool_t fRnrDecay;
-
- Bool_t fRnrFV; // first vertex
- TMarker fFVAtt;
+ Float_t fMagField; // Constant magnetic field along z.
+
+ // Track limits
+ Float_t fMaxR; // Max radius for track extrapolation
+ Float_t fMaxZ; // Max z-coordinate for track extrapolation.
+ // Helix limits
+ Float_t fMaxOrbs; // Maximal angular path of tracks' orbits (1 ~ 2Pi).
+ Float_t fMinAng; // Minimal angular step between two helix points.
+ Float_t fDelta; // Maximal error at the mid-point of the line connecting to helix points.
+
+ // Path-mark control
+ Bool_t fEditPathMarks; // Show widgets for path-mark control in GUI editor.
+ TMarker fPMAtt; // Marker attributes for rendering of path-marks.
+
+ Bool_t fFitDaughters; // Pass through daughter creation points when extrapolating a track.
+ Bool_t fFitReferences; // Pass through given track-references when extrapolating a track.
+ Bool_t fFitDecay; // Pass through decay point when extrapolating a track.
+
+ Bool_t fRnrDaughters; // Render daughter path-marks.
+ Bool_t fRnrReferences; // Render track-reference path-marks.
+ Bool_t fRnrDecay; // Render decay path-marks.
+
+ // First vertex control
+ Bool_t fRnrFV; // Render first vertex.
+ TMarker fFVAtt; // Marker attributes for fits vertex.
TrackRnrStyle();
Float_t GetMagField() const { return fMagField; }
void SetMagField(Float_t mf) { fMagField = mf; }
- static Float_t fgDefMagField;
- static const Float_t fgkB2C;
- static TrackRnrStyle fgDefStyle;
+ static Float_t fgDefMagField; // Default value for constant solenoid magnetic field.
+ static const Float_t fgkB2C; // Constant for conversion of momentum to curvature.
+ static TrackRnrStyle fgDefStyle; // Default track render-style.
- ClassDef(TrackRnrStyle, 1);
+ ClassDef(TrackRnrStyle, 1); // Rendering parameters for tracks.
}; // endclass TrackRnrStyle
private:
TrackList(const TrackList&); // Not implemented
TrackList& operator=(const TrackList&); // Not implemented
- Bool_t fRecurse;
+
+ Bool_t fRecurse; // Recurse when propagating marker/line attributes to tracks.
protected:
- TrackRnrStyle* fRnrStyle;
+ TrackRnrStyle* fRnrStyle; // Basic track rendering parameters, not enforced to elements.
- Bool_t fRnrLine;
- Bool_t fRnrPoints;
+ Bool_t fRnrLine; // Render track as line.
+ Bool_t fRnrPoints; // Render track as points.
- Float_t fMinPt;
- Float_t fMaxPt;
- Float_t fLimPt;
- Float_t fMinP;
- Float_t fMaxP;
- Float_t fLimP;
+ Float_t fMinPt; // Minimum track pT for display selection.
+ Float_t fMaxPt; // Maximum track pT for display selection.
+ Float_t fLimPt; // Highest track pT in the container.
+ Float_t fMinP; // Minimum track p for display selection.
+ Float_t fMaxP; // Maximum track p for display selection.
+ Float_t fLimP; // Highest track p in the container.
Float_t RoundMomentumLimit(Float_t x);
//--------------------------------
+ Track* FindTrackByLabel(Int_t label); // *MENU*
+ Track* FindTrackByIndex(Int_t index); // *MENU*
+
void ImportHits(); // *MENU*
void ImportClusters(); // *MENU*
virtual TClass* ProjectedClass() const;
- ClassDef(TrackList, 1);
+ ClassDef(TrackList, 1); // A list of tracks.
};
+
/**************************************************************************/
// TrackCounter
/**************************************************************************/