ClassImp(Reve::Track)
Track::Track() :
- RenderElement(),
- TPolyLine3D(),
+ Line(),
fV(),
fP(),
fLabel(0),
fPathMarks(),
- fRnrStyle(0),
-
- fName(),
- fTitle()
+ fRnrStyle(0)
{}
Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
- RenderElement(),
- TPolyLine3D(),
+ Line(),
fV(t->Vx(), t->Vy(), t->Vz()),
fP(t->Px(), t->Py(), t->Pz()),
fLabel(label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
TParticlePDG* pdgp = t->GetPDG();
if (pdgp)
fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
+
+ SetName(t->GetName());
}
Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
- RenderElement(),
- TPolyLine3D(),
+ Line(),
fV(t->Vx(), t->Vy(), t->Vz()),
fP(t->Px(), t->Py(), t->Pz()),
fLabel(t->label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
t->ResetPdgCode(); pdgp = t->GetPDG();
}
fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
+
+ SetName(t->GetName());
}
Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs) :
- RenderElement(),
- TPolyLine3D(),
+ Line(),
fV(t->V),
fP(t->P),
fLabel(t->label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
+
+ SetName(t->GetName());
}
Track::~Track()
delete *i;
}
+/*
void Track::Reset(Int_t n_points)
{
delete [] TPolyLine3D::fP; TPolyLine3D::fP = 0;
memset(TPolyLine3D::fP, 0, 3*fN*sizeof(Float_t));
fLastPoint = -1;
}
+*/
/**************************************************************************/
TObject(),
fColor(1),
+ fWidth(1),
fMagField(fgDefMagField),
fMaxR (350),
/**************************************************************************/
/*************************************************************************/
+void TrackList::SetWidth(Width_t w)
+{
+ Width_t oldw = fRnrStyle->fWidth;
+ fRnrStyle->fWidth = w;
+ for (lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ Track& t = *((Track*)(*i));
+ if (t.GetLineWidth() == oldw)
+ t.SetLineWidth(w);
+ }
+}
+
void TrackList::SetMaxR(Float_t x)
{
fRnrStyle->fMaxR = x;