ROOT  6.06/09
Reference Guide
TEveTrack.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
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  *************************************************************************/
11 
12 #include "TEveTrack.h"
13 #include "TEveTrackPropagator.h"
14 #include "TEvePointSet.h"
15 
16 #include "TPolyLine3D.h"
17 #include "TMarker.h"
18 #include "TPolyMarker3D.h"
19 #include "TColor.h"
20 #include "TParticlePDG.h"
21 
22 // Updates
23 #include "TEveManager.h"
24 #include "TEveBrowser.h"
25 #include "TEveTrackProjected.h"
26 
27 #include "Riostream.h"
28 
29 #include <vector>
30 #include <algorithm>
31 #include <functional>
32 
33 /** \class TEveTrack
34 \ingroup TEve
35 Visual representation of a track.
36 
37 If member fDpDs is set, the momentum is reduced on all path-marks that do
38 not fix the momentum according to the distance travelled from the previous
39 pathmark.
40 */
41 
43 
44 ////////////////////////////////////////////////////////////////////////////////
45 /// Default constructor.
46 
48  TEveLine(),
49 
50  fV(),
51  fP(),
52  fPEnd(),
53  fBeta(0),
54  fDpDs(0),
55  fPdg(0),
56  fCharge(0),
57  fLabel(kMinInt),
58  fIndex(kMinInt),
59  fStatus(0),
60  fLockPoints(kFALSE),
61  fPathMarks(),
62  fLastPMIdx(0),
63  fPropagator(0)
64 {
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Constructor from TParticle.
69 
71  TEveLine(),
72 
73  fV(t->Vx(), t->Vy(), t->Vz()),
74  fP(t->Px(), t->Py(), t->Pz()),
75  fPEnd(),
76  fBeta(t->P()/t->Energy()),
77  fDpDs(0),
78  fPdg(0),
79  fCharge(0),
80  fLabel(label),
81  fIndex(kMinInt),
82  fStatus(t->GetStatusCode()),
83  fLockPoints(kFALSE),
84  fPathMarks(),
85  fLastPMIdx(0),
86  fPropagator(0)
87 {
88  SetPropagator(prop);
90 
91  TParticlePDG* pdgp = t->GetPDG();
92  if (pdgp) {
93  fPdg = pdgp->PdgCode();
94  fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
95  }
96 
97  SetName(t->GetName());
98 }
99 
100 ////////////////////////////////////////////////////////////////////////////////
101 
103  TEveLine(),
104 
105  fV(t->Vx(), t->Vy(), t->Vz()),
106  fP(t->Px(), t->Py(), t->Pz()),
107  fPEnd(),
108  fBeta(t->P()/t->Energy()),
109  fDpDs(0),
110  fPdg(0),
111  fCharge(0),
112  fLabel(t->fLabel),
113  fIndex(t->fIndex),
114  fStatus(t->GetStatusCode()),
115  fLockPoints(kFALSE),
116  fPathMarks(),
117  fLastPMIdx(0),
118  fPropagator(0)
119 {
120  // Constructor from TEveUtil Monte Carlo track.
121 
122  SetPropagator(prop);
124 
125  TParticlePDG* pdgp = t->GetPDG();
126  if (pdgp) {
127  fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
128  }
129 
130  SetName(t->GetName());
131 }
132 
133 ////////////////////////////////////////////////////////////////////////////////
134 /// Constructor from TEveRecTrack<double> reconstructed track.
135 
137  TEveLine(),
138 
139  fV(t->fV),
140  fP(t->fP),
141  fPEnd(),
142  fBeta(t->fBeta),
143  fDpDs(0),
144  fPdg(0),
145  fCharge(t->fSign),
146  fLabel(t->fLabel),
147  fIndex(t->fIndex),
148  fStatus(t->fStatus),
149  fLockPoints(kFALSE),
150  fPathMarks(),
151  fLastPMIdx(0),
152  fPropagator(0)
153 {
154  SetPropagator(prop);
156 
157  SetName(t->GetName());
158 }
159 
160 ////////////////////////////////////////////////////////////////////////////////
161 /// Constructor from TEveRecTrack<float> reconstructed track.
162 /// It is recommended to use constructor with TEveRecTrack<double> since
163 /// TEveTrackPropagator operates with double type.
164 
166  TEveLine(),
167 
168  fV(t->fV),
169  fP(t->fP),
170  fPEnd(),
171  fBeta(t->fBeta),
172  fDpDs(0),
173  fPdg(0),
174  fCharge(t->fSign),
175  fLabel(t->fLabel),
176  fIndex(t->fIndex),
177  fStatus(t->fStatus),
178  fLockPoints(kFALSE),
179  fPathMarks(),
180  fLastPMIdx(0),
181  fPropagator(0)
182 {
183  SetPropagator(prop);
185 
186  SetName(t->GetName());
187 }
188 
189 ////////////////////////////////////////////////////////////////////////////////
190 /// Copy constructor. Track parameters are copied but the
191 /// extrapolation is not performed so you should still call
192 /// MakeTrack() to do that.
193 /// If points of 't' are locked, they are cloned.
194 
196  TEveLine(),
197  fV(t.fV),
198  fP(t.fP),
199  fPEnd(),
200  fBeta(t.fBeta),
201  fDpDs(t.fDpDs),
202  fPdg(t.fPdg),
203  fCharge(t.fCharge),
204  fLabel(t.fLabel),
205  fIndex(t.fIndex),
206  fStatus(t.fStatus),
207  fLockPoints(t.fLockPoints),
208  fPathMarks(),
209  fLastPMIdx(t.fLastPMIdx),
210  fPropagator(0)
211 {
212  if (fLockPoints)
213  ClonePoints(t);
214 
215  SetPathMarks(t);
217 
218  CopyVizParams(&t);
219 }
220 
221 ////////////////////////////////////////////////////////////////////////////////
222 /// Destructor.
223 
225 {
226  SetPropagator(0);
227 }
228 
229 
230 ////////////////////////////////////////////////////////////////////////////////
231 /// Returns list-tree icon for TEveTrack.
232 
234 {
235  return fgListTreeIcons[4];
236 }
237 
238 ////////////////////////////////////////////////////////////////////////////////
239 /// Compute the bounding box of the track.
240 
242 {
243  if (Size() > 0 || ! fPathMarks.empty())
244  {
245  BBoxInit();
246  Int_t n = Size();
248  for (Int_t i = 0; i < n; ++i, p += 3)
249  {
250  BBoxCheckPoint(p);
251  }
252  for (vPathMark_ci i = fPathMarks.begin(); i != fPathMarks.end(); ++i)
253  {
254  BBoxCheckPoint(i->fV.fX, i->fV.fY,i->fV.fZ);
255  }
256  }
257  else
258  {
259  BBoxZero();
260  }
261 }
262 
263 ////////////////////////////////////////////////////////////////////////////////
264 /// Set standard track title based on most data-member values.
265 
267 {
268  TString idx(fIndex == kMinInt ? "<undef>" : Form("%d", fIndex));
269  TString lbl(fLabel == kMinInt ? "<undef>" : Form("%d", fLabel));
270  SetTitle(Form("Index=%s, Label=%s\nChg=%d, Pdg=%d\n"
271  "pT=%.3f, pZ=%.3f\nV=(%.3f, %.3f, %.3f)",
272  idx.Data(), lbl.Data(), fCharge, fPdg,
273  fP.Perp(), fP.fZ, fV.fX, fV.fY, fV.fZ));
274 }
275 
276 ////////////////////////////////////////////////////////////////////////////////
277 /// Copy track parameters from t. Track-propagator is set, too.
278 /// PathMarks are cleared - you can copy them via SetPathMarks(t).
279 /// If track 't' is locked, you should probably clone its points
280 /// over - use TEvePointSet::ClonePoints(t);
281 
283 {
284  fV = t.fV;
285  fP = t.fP;
286  fBeta = t.fBeta;
287  fPdg = t.fPdg;
288  fCharge = t.fCharge;
289  fLabel = t.fLabel;
290  fIndex = t.fIndex;
291 
292  fPathMarks.clear();
294 }
295 
296 ////////////////////////////////////////////////////////////////////////////////
297 /// Copy path-marks from t.
298 
300 {
301  std::copy(t.RefPathMarks().begin(), t.RefPathMarks().end(),
302  std::back_insert_iterator<vPathMark_t>(fPathMarks));
303 }
304 
305 ////////////////////////////////////////////////////////////////////////////////
306 /// Set track's render style.
307 /// Reference counts of old and new propagator are updated.
308 
310 {
311  if (fPropagator == prop) return;
312  if (fPropagator) fPropagator->DecRefCount(this);
313  fPropagator = prop;
314  if (fPropagator) fPropagator->IncRefCount(this);
315 }
316 
317 ////////////////////////////////////////////////////////////////////////////////
318 /// Set line and marker attributes from TEveTrackList.
319 
321 {
322  SetRnrLine(tl->GetRnrLine());
323  SetLineColor(tl->GetLineColor());
324  SetLineStyle(tl->GetLineStyle());
325  SetLineWidth(tl->GetLineWidth());
326 
327  SetRnrPoints(tl->GetRnrPoints());
331 }
332 
333 ////////////////////////////////////////////////////////////////////////////////
334 /// Calculate track representation based on track data and current
335 /// settings of the propagator.
336 /// If recurse is true, descend into children.
337 
339 {
340  if (!fLockPoints)
341  {
342  Reset(0);
343  fLastPMIdx = 0;
344 
346 
347  const Double_t maxRsq = rTP.GetMaxR() * rTP.GetMaxR();
348  const Double_t maxZ = rTP.GetMaxZ();
349 
350  if ( ! TEveTrackPropagator::IsOutsideBounds(fV, maxRsq, maxZ))
351  {
352  TEveVectorD currP = fP;
353  Bool_t decay = kFALSE;
354  rTP.InitTrack(fV, fCharge);
355  for (vPathMark_i pm = fPathMarks.begin(); pm != fPathMarks.end(); ++pm, ++fLastPMIdx)
356  {
357  Int_t start_point = rTP.GetCurrentPoint();
358 
359  if (rTP.GetFitReferences() && pm->fType == TEvePathMarkD::kReference)
360  {
361  if (TEveTrackPropagator::IsOutsideBounds(pm->fV, maxRsq, maxZ))
362  break;
363  if (rTP.GoToVertex(pm->fV, currP))
364  {
365  currP.fX = pm->fP.fX; currP.fY = pm->fP.fY; currP.fZ = pm->fP.fZ;
366  }
367  else
368  {
369  break;
370  }
371  }
372  else if (rTP.GetFitDaughters() && pm->fType == TEvePathMarkD::kDaughter)
373  {
374  if (TEveTrackPropagator::IsOutsideBounds(pm->fV, maxRsq, maxZ))
375  break;
376  if (rTP.GoToVertex(pm->fV, currP))
377  {
378  currP.fX -= pm->fP.fX; currP.fY -= pm->fP.fY; currP.fZ -= pm->fP.fZ;
379  if (fDpDs != 0)
380  {
381  Double_t dp = fDpDs * rTP.GetTrackLength(start_point);
382  Double_t p = currP.Mag();
383  if (p > dp) currP *= 1.0 - dp / p;
384  }
385  }
386  else
387  {
388  break;
389  }
390  }
391  else if (rTP.GetFitDecay() && pm->fType == TEvePathMarkD::kDecay)
392  {
393  if (TEveTrackPropagator::IsOutsideBounds(pm->fV, maxRsq, maxZ))
394  break;
395  rTP.GoToVertex(pm->fV, currP);
396  decay = kTRUE;
397  ++fLastPMIdx;
398  break;
399  }
400  else if (rTP.GetFitCluster2Ds() && pm->fType == TEvePathMarkD::kCluster2D)
401  {
402  TEveVectorD itsect;
403  if (rTP.IntersectPlane(currP, pm->fV, pm->fP, itsect))
404  {
405  TEveVectorD delta = itsect - pm->fV;
406  TEveVectorD vtopass = pm->fV + pm->fE*(pm->fE.Dot(delta));
407  if (TEveTrackPropagator::IsOutsideBounds(vtopass, maxRsq, maxZ))
408  break;
409  if ( ! rTP.GoToVertex(vtopass, currP))
410  break;
411 
412  if (fDpDs != 0)
413  {
414  Double_t dp = fDpDs * rTP.GetTrackLength(start_point);
415  Double_t p = currP.Mag();
416  if (p > dp) currP *= 1.0 - dp / p;
417  }
418  }
419  else
420  {
421  Warning("TEveTrack::MakeTrack", "Failed to intersect plane for Cluster2D. Ignoring path-mark.");
422  }
423  }
424  else if (rTP.GetFitLineSegments() && pm->fType == TEvePathMarkD::kLineSegment)
425  {
426  if (TEveTrackPropagator::IsOutsideBounds(pm->fV, maxRsq, maxZ))
427  break;
428 
429  if (rTP.GoToLineSegment(pm->fV, pm->fE, currP))
430  {
431  if (fDpDs != 0)
432  {
433  Double_t dp = fDpDs * rTP.GetTrackLength(start_point);
434  Double_t p = currP.Mag();
435  if (p > dp) currP *= 1.0 - dp / p;
436  }
437  }
438  else
439  {
440  break;
441  }
442  }
443  else
444  {
445  if (TEveTrackPropagator::IsOutsideBounds(pm->fV, maxRsq, maxZ))
446  break;
447  }
448  } // loop path-marks
449 
450  if (!decay)
451  {
452  // printf("%s loop to bounds \n",fName.Data() );
453  rTP.GoToBounds(currP);
454  }
455  fPEnd = currP;
456  // make_polyline:
457  rTP.FillPointSet(this);
458  rTP.ResetTrack();
459  }
460  }
461 
462  if (recurse)
463  {
464  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
465  {
466  TEveTrack* t = dynamic_cast<TEveTrack*>(*i);
467  if (t) t->MakeTrack(recurse);
468  }
469  }
470 }
471 
472 ////////////////////////////////////////////////////////////////////////////////
473 /// Copy visualization parameters from element el.
474 
476 {
477  // No local parameters.
478 
479  // const TEveTrack* t = dynamic_cast<const TEveTrack*>(el);
480  // if (t)
481  // {}
482 
484 }
485 
486 ////////////////////////////////////////////////////////////////////////////////
487 /// Write visualization parameters.
488 
489 void TEveTrack::WriteVizParams(std::ostream& out, const TString& var)
490 {
491  TEveLine::WriteVizParams(out, var);
492 
493  // TString t = " " + var + "->";
494 }
495 
496 ////////////////////////////////////////////////////////////////////////////////
497 /// Virtual from TEveProjectable, return TEveTrackProjected class.
498 
500 {
501  return TEveTrackProjected::Class();
502 }
503 
504 namespace
505 {
506  struct Cmp_pathmark_t
507  {
508  bool operator()(TEvePathMarkD const & a, TEvePathMarkD const & b)
509  { return a.fTime < b.fTime; }
510  };
511 }
512 
513 ////////////////////////////////////////////////////////////////////////////////
514 /// Sort registered pat-marks by time.
515 
517 {
518  std::sort(fPathMarks.begin(), fPathMarks.end(), Cmp_pathmark_t());
519 }
520 
521 ////////////////////////////////////////////////////////////////////////////////
522 /// Print registered path-marks.
523 
525 {
526  static const TEveException eh("TEveTrack::PrintPathMarks ");
527 
528  printf("TEveTrack '%s', number of path marks %d, label %d\n",
529  GetName(), (Int_t)fPathMarks.size(), fLabel);
530 
531  for (vPathMark_i pm = fPathMarks.begin(); pm != fPathMarks.end(); ++pm)
532  {
533  printf(" %-9s p: %8f %8f %8f Vertex: %8e %8e %8e %g Extra:%8f %8f %8f\n",
534  pm->TypeName(),
535  pm->fP.fX, pm->fP.fY, pm->fP.fZ,
536  pm->fV.fX, pm->fV.fY, pm->fV.fZ,
537  pm->fE.fX, pm->fE.fY, pm->fE.fZ,
538  pm->fTime);
539  }
540 }
541 
542 //------------------------------------------------------------------------------
543 
544 ////////////////////////////////////////////////////////////////////////////////
545 /// Emits "SecSelected(TEveTrack*)" signal.
546 /// Called from TEveTrackGL on secondary-selection.
547 
549 {
550  Emit("SecSelected(TEveTrack*)", (Long_t)track);
551 }
552 
553 /** \class TEveTrackList
554 \ingroup TEve
555 A list of tracks supporting change of common attributes and
556 selection based on track parameters.
557 */
558 
560 
561 ////////////////////////////////////////////////////////////////////////////////
562 /// Constructor. If track-propagator argument is 0, a new default
563 /// one is created.
564 
566  TEveElementList(),
567  TAttMarker(1, 20, 1),
568  TAttLine(1,1,1),
569 
570  fPropagator(0),
571  fRecurse(kTRUE),
572  fRnrLine(kTRUE),
573  fRnrPoints(kFALSE),
574 
575  fMinPt (0), fMaxPt (0), fLimPt (0),
576  fMinP (0), fMaxP (0), fLimP (0)
577 {
578 
579  fChildClass = TEveTrack::Class(); // override member from base TEveElementList
580 
582 
583  if (prop == 0) prop = new TEveTrackPropagator;
584  SetPropagator(prop);
585 }
586 
587 ////////////////////////////////////////////////////////////////////////////////
588 /// Constructor. If track-propagator argument is 0, a new default
589 /// one is created.
590 
592  TEveElementList(name),
593  TAttMarker(1, 20, 1),
594  TAttLine(1,1,1),
595 
596  fPropagator(0),
597  fRecurse(kTRUE),
598  fRnrLine(kTRUE),
599  fRnrPoints(kFALSE),
600 
601  fMinPt (0), fMaxPt (0), fLimPt (0),
602  fMinP (0), fMaxP (0), fLimP (0)
603 {
604  fChildClass = TEveTrack::Class(); // override member from base TEveElementList
605 
607 
608  if (prop == 0) prop = new TEveTrackPropagator;
609  SetPropagator(prop);
610 }
611 
612 ////////////////////////////////////////////////////////////////////////////////
613 /// Destructor.
614 
616 {
617  SetPropagator(0);
618 }
619 
620 ////////////////////////////////////////////////////////////////////////////////
621 /// Set default propagator for tracks.
622 /// This is not enforced onto the tracks themselves but this is the
623 /// propagator that is shown in the TEveTrackListEditor.
624 
626 {
627  if (fPropagator == prop) return;
629  fPropagator = prop;
631 }
632 
633 ////////////////////////////////////////////////////////////////////////////////
634 /// Regenerate the visual representations of tracks.
635 /// The momentum limits are rescanned during the same traversal.
636 
638 {
639  fLimPt = fLimP = 0;
640 
641  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
642  {
643  TEveTrack* track = dynamic_cast<TEveTrack*>(*i);
644  if (track)
645  {
646  track->MakeTrack(recurse);
647 
648  fLimPt = TMath::Max(fLimPt, track->fP.Perp());
649  fLimP = TMath::Max(fLimP, track->fP.Mag());
650  }
651  if (recurse)
652  FindMomentumLimits(*i, recurse);
653  }
654 
657 
659 }
660 
661 ////////////////////////////////////////////////////////////////////////////////
662 /// Loop over children and find highest pT and p of contained TEveTracks.
663 /// These are stored in members fLimPt and fLimP.
664 
666 {
667  fLimPt = fLimP = 0;
668 
669  if (HasChildren())
670  {
671  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
672  {
673  TEveTrack* track = dynamic_cast<TEveTrack*>(*i);
674  if (track)
675  {
676  fLimPt = TMath::Max(fLimPt, track->fP.Perp());
677  fLimP = TMath::Max(fLimP, track->fP.Mag());
678  }
679  if (recurse)
680  FindMomentumLimits(*i, recurse);
681  }
682 
685  }
686 
688 }
689 
690 ////////////////////////////////////////////////////////////////////////////////
691 /// Loop over track elements of argument el and find highest pT and p.
692 /// These are stored in members fLimPt and fLimP.
693 
695 {
696  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
697  {
698  TEveTrack* track = dynamic_cast<TEveTrack*>(*i);
699  if (track)
700  {
701  fLimPt = TMath::Max(fLimPt, track->fP.Perp());
702  fLimP = TMath::Max(fLimP, track->fP.Mag());
703  }
704  if (recurse)
705  FindMomentumLimits(*i, recurse);
706  }
707 }
708 
709 ////////////////////////////////////////////////////////////////////////////////
710 /// Round the momentum limit up to a nice value.
711 
713 {
714  using namespace TMath;
715 
716  if (x < 1e-3) return 1e-3;
717 
718  Double_t fac = Power(10, 1 - Floor(Log10(x)));
719  return Ceil(fac*x) / fac;
720 }
721 
722 ////////////////////////////////////////////////////////////////////////////////
723 /// Set Min/Max cuts so that they are within detected limits.
724 
726 {
727  using namespace TMath;
728 
729  fMinPt = Min(fMinPt, fLimPt);
730  fMaxPt = fMaxPt == 0 ? fLimPt : Min(fMaxPt, fLimPt);
731  fMinP = Min(fMinP, fLimP);
732  fMaxP = fMaxP == 0 ? fLimP : Min(fMaxP, fLimP);
733 }
734 
735 ////////////////////////////////////////////////////////////////////////////////
736 /// Set rendering of track as line for the list and the elements.
737 
739 {
740  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
741  {
742  TEveTrack* track = (TEveTrack*)(*i);
743  if (track->GetRnrLine() == fRnrLine)
744  track->SetRnrLine(rnr);
745  if (fRecurse)
746  SetRnrLine(rnr, *i);
747  }
748  fRnrLine = rnr;
749 }
750 
751 ////////////////////////////////////////////////////////////////////////////////
752 /// Set rendering of track as line for children of el.
753 
755 {
756  TEveTrack* track;
757  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
758  {
759  track = dynamic_cast<TEveTrack*>(*i);
760  if (track && (track->GetRnrLine() == fRnrLine))
761  track->SetRnrLine(rnr);
762  if (fRecurse)
763  SetRnrLine(rnr, *i);
764  }
765 }
766 
767 ////////////////////////////////////////////////////////////////////////////////
768 /// Set rendering of track as points for the list and the elements.
769 
771 {
772  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
773  {
774  TEveTrack* track = (TEveTrack*)(*i);
775  if (track->GetRnrPoints() == fRnrPoints)
776  track->SetRnrPoints(rnr);
777  if (fRecurse)
778  SetRnrPoints(rnr, *i);
779  }
780  fRnrPoints = rnr;
781 }
782 
783 ////////////////////////////////////////////////////////////////////////////////
784 /// Set rendering of track as points for children of el.
785 
787 {
788  TEveTrack* track;
789  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
790  {
791  track = dynamic_cast<TEveTrack*>(*i);
792  if (track)
793  if (track->GetRnrPoints() == fRnrPoints)
794  track->SetRnrPoints(rnr);
795  if (fRecurse)
796  SetRnrPoints(rnr, *i);
797  }
798 }
799 
800 ////////////////////////////////////////////////////////////////////////////////
801 /// Set main (line) color for the list and the elements.
802 
804 {
805  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
806  {
807  TEveTrack* track = (TEveTrack*)(*i);
808  if (track->GetLineColor() == fLineColor)
809  track->SetLineColor(col);
810  if (fRecurse)
811  SetLineColor(col, *i);
812  }
814 }
815 
816 ////////////////////////////////////////////////////////////////////////////////
817 /// Set line color for children of el.
818 
820 {
821  TEveTrack* track;
822  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
823  {
824  track = dynamic_cast<TEveTrack*>(*i);
825  if (track && track->GetLineColor() == fLineColor)
826  track->SetLineColor(col);
827  if (fRecurse)
828  SetLineColor(col, *i);
829  }
830 }
831 
832 ////////////////////////////////////////////////////////////////////////////////
833 /// Set line width for the list and the elements.
834 
836 {
837  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
838  {
839  TEveTrack* track = (TEveTrack*)(*i);
840  if (track->GetLineWidth() == fLineWidth)
841  track->SetLineWidth(width);
842  if (fRecurse)
843  SetLineWidth(width, *i);
844  }
845  fLineWidth = width;
846 }
847 
848 ////////////////////////////////////////////////////////////////////////////////
849 /// Set line width for children of el.
850 
852 {
853  TEveTrack* track;
854  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
855  {
856  track = dynamic_cast<TEveTrack*>(*i);
857  if (track && track->GetLineWidth() == fLineWidth)
858  track->SetLineWidth(width);
859  if (fRecurse)
860  SetLineWidth(width, *i);
861  }
862 }
863 
864 ////////////////////////////////////////////////////////////////////////////////
865 /// Set line style for the list and the elements.
866 
868 {
869  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
870  {
871  TEveTrack* track = (TEveTrack*)(*i);
872  if (track->GetLineStyle() == fLineStyle)
873  track->SetLineStyle(style);
874  if (fRecurse)
875  SetLineStyle(style, *i);
876  }
877  fLineStyle = style;
878 }
879 
880 ////////////////////////////////////////////////////////////////////////////////
881 /// Set line style for children of el.
882 
884 {
885  TEveTrack* track;
886  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
887  {
888  track = dynamic_cast<TEveTrack*>(*i);
889  if (track && track->GetLineStyle() == fLineStyle)
890  track->SetLineStyle(style);
891  if (fRecurse)
892  SetLineStyle(style, *i);
893  }
894 }
895 
896 ////////////////////////////////////////////////////////////////////////////////
897 /// Set marker style for the list and the elements.
898 
900 {
901  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
902  {
903  TEveTrack* track = (TEveTrack*)(*i);
904  if (track->GetMarkerStyle() == fMarkerStyle)
905  track->SetMarkerStyle(style);
906  if (fRecurse)
907  SetMarkerStyle(style, *i);
908  }
910 }
911 
912 ////////////////////////////////////////////////////////////////////////////////
913 /// Set marker style for children of el.
914 
916 {
917  TEveTrack* track;
918  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
919  {
920  track = dynamic_cast<TEveTrack*>(*i);
921  if (track && track->GetMarkerStyle() == fMarkerStyle)
922  track->SetMarkerStyle(style);
923  if (fRecurse)
924  SetMarkerStyle(style, *i);
925  }
926 }
927 
928 ////////////////////////////////////////////////////////////////////////////////
929 /// Set marker color for the list and the elements.
930 
932 {
933  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
934  {
935  TEveTrack* track = (TEveTrack*)(*i);
936  if (track->GetMarkerColor() == fMarkerColor)
937  track->SetMarkerColor(col);
938  if (fRecurse)
939  SetMarkerColor(col, *i);
940  }
941  fMarkerColor = col;
942 }
943 
944 ////////////////////////////////////////////////////////////////////////////////
945 /// Set marker color for children of el.
946 
948 {
949  TEveTrack* track;
950  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
951  {
952  track = dynamic_cast<TEveTrack*>(*i);
953  if (track && track->GetMarkerColor() == fMarkerColor)
954  track->SetMarkerColor(col);
955  if (fRecurse)
956  SetMarkerColor(col, *i);
957  }
958 }
959 
960 ////////////////////////////////////////////////////////////////////////////////
961 /// Set marker size for the list and the elements.
962 
964 {
965  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
966  {
967  TEveTrack* track = (TEveTrack*)(*i);
968  if (track->GetMarkerSize() == fMarkerSize)
969  track->SetMarkerSize(size);
970  if (fRecurse)
971  SetMarkerSize(size, *i);
972  }
973  fMarkerSize = size;
974 }
975 
976 ////////////////////////////////////////////////////////////////////////////////
977 /// Set marker size for children of el.
978 
980 {
981  TEveTrack* track;
982  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
983  {
984  track = dynamic_cast<TEveTrack*>(*i);
985  if (track && track->GetMarkerSize() == fMarkerSize)
986  track->SetMarkerSize(size);
987  if (fRecurse)
988  SetMarkerSize(size, *i);
989  }
990 }
991 
992 ////////////////////////////////////////////////////////////////////////////////
993 /// Select visibility of tracks by transverse momentum.
994 /// If data-member fRecurse is set, the selection is applied
995 /// recursively to all children.
996 
998 {
999  fMinPt = min_pt;
1000  fMaxPt = max_pt;
1001 
1002  const Double_t minptsq = min_pt*min_pt;
1003  const Double_t maxptsq = max_pt*max_pt;
1004 
1005  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
1006  {
1007  const Double_t ptsq = ((TEveTrack*)(*i))->fP.Perp2();
1008  Bool_t on = ptsq >= minptsq && ptsq <= maxptsq;
1009  (*i)->SetRnrState(on);
1010  if (on && fRecurse)
1011  SelectByPt(min_pt, max_pt, *i);
1012  }
1013 }
1014 
1015 ////////////////////////////////////////////////////////////////////////////////
1016 /// Select visibility of el's children tracks by transverse momentum.
1017 
1019 {
1020  const Double_t minptsq = min_pt*min_pt;
1021  const Double_t maxptsq = max_pt*max_pt;
1022 
1023  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
1024  {
1025  TEveTrack* track = dynamic_cast<TEveTrack*>(*i);
1026  if (track)
1027  {
1028  const Double_t ptsq = track->fP.Perp2();
1029  Bool_t on = ptsq >= minptsq && ptsq <= maxptsq;
1030  track->SetRnrState(on);
1031  if (on && fRecurse)
1032  SelectByPt(min_pt, max_pt, *i);
1033  }
1034  }
1035 }
1036 
1037 ////////////////////////////////////////////////////////////////////////////////
1038 /// Select visibility of tracks by momentum.
1039 /// If data-member fRecurse is set, the selection is applied
1040 /// recursively to all children.
1041 
1043 {
1044  fMinP = min_p;
1045  fMaxP = max_p;
1046 
1047  const Double_t minpsq = min_p*min_p;
1048  const Double_t maxpsq = max_p*max_p;
1049 
1050  for (List_i i=BeginChildren(); i!=EndChildren(); ++i)
1051  {
1052  const Double_t psq = ((TEveTrack*)(*i))->fP.Mag2();
1053  Bool_t on = psq >= minpsq && psq <= maxpsq;
1054  (*i)->SetRnrState(psq >= minpsq && psq <= maxpsq);
1055  if (on && fRecurse)
1056  SelectByP(min_p, max_p, *i);
1057  }
1058 }
1059 
1060 ////////////////////////////////////////////////////////////////////////////////
1061 /// Select visibility of el's children tracks by momentum.
1062 
1064 {
1065  const Double_t minpsq = min_p*min_p;
1066  const Double_t maxpsq = max_p*max_p;
1067 
1068  for (List_i i=el->BeginChildren(); i!=el->EndChildren(); ++i)
1069  {
1070  TEveTrack* track = dynamic_cast<TEveTrack*>(*i);
1071  if (track)
1072  {
1073  const Double_t psq = ((TEveTrack*)(*i))->fP.Mag2();
1074  Bool_t on = psq >= minpsq && psq <= maxpsq;
1075  track->SetRnrState(on);
1076  if (on && fRecurse)
1077  SelectByP(min_p, max_p, *i);
1078  }
1079  }
1080 }
1081 
1082 ////////////////////////////////////////////////////////////////////////////////
1083 /// Find track by label, select it and display it in the editor.
1084 
1086 {
1087  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1088  {
1089  if (((TEveTrack*)(*i))->GetLabel() == label)
1090  {
1091  TGListTree *lt = gEve->GetLTEFrame()->GetListTree();
1092  TGListTreeItem *mlti = lt->GetSelected();
1093  if (mlti->GetUserData() != this)
1094  mlti = FindListTreeItem(lt);
1095  TGListTreeItem *tlti = (*i)->FindListTreeItem(lt, mlti);
1096  lt->HighlightItem(tlti);
1097  lt->SetSelected(tlti);
1098  gEve->EditElement(*i);
1099  return (TEveTrack*) *i;
1100  }
1101  }
1102  return 0;
1103 }
1104 
1105 ////////////////////////////////////////////////////////////////////////////////
1106 /// Find track by index, select it and display it in the editor.
1107 
1109 {
1110  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1111  {
1112  if (((TEveTrack*)(*i))->GetIndex() == index)
1113  {
1114  TGListTree *lt = gEve->GetLTEFrame()->GetListTree();
1115  TGListTreeItem *mlti = lt->GetSelected();
1116  if (mlti->GetUserData() != this)
1117  mlti = FindListTreeItem(lt);
1118  TGListTreeItem *tlti = (*i)->FindListTreeItem(lt, mlti);
1119  lt->HighlightItem(tlti);
1120  lt->SetSelected(tlti);
1121  gEve->EditElement(*i);
1122  return (TEveTrack*) *i;
1123  }
1124  }
1125  return 0;
1126 }
1127 
1128 ////////////////////////////////////////////////////////////////////////////////
1129 /// Copy visualization parameters from element el.
1130 
1132 {
1133  const TEveTrackList* m = dynamic_cast<const TEveTrackList*>(el);
1134  if (m)
1135  {
1137  TAttLine::operator=(*m);
1138  fRecurse = m->fRecurse;
1139  fRnrLine = m->fRnrLine;
1140  fRnrPoints = m->fRnrPoints;
1141  fMinPt = m->fMinPt;
1142  fMaxPt = m->fMaxPt;
1143  fLimPt = m->fLimPt;
1144  fMinP = m->fMinP;
1145  fMaxP = m->fMaxP;
1146  fLimP = m->fLimP;
1147  }
1148 
1150 }
1151 
1152 ////////////////////////////////////////////////////////////////////////////////
1153 /// Write visualization parameters.
1154 
1155 void TEveTrackList::WriteVizParams(std::ostream& out, const TString& var)
1156 {
1157  TEveElement::WriteVizParams(out, var);
1158 
1159  TString t = " " + var + "->";
1161  TAttLine ::SaveLineAttributes (out, var);
1162  out << t << "SetRecurse(" << ToString(fRecurse) << ");\n";
1163  out << t << "SetRnrLine(" << ToString(fRnrLine) << ");\n";
1164  out << t << "SetRnrPoints(" << ToString(fRnrPoints) << ");\n";
1165  // These setters are not available -- need proper AND/OR mode.
1166  // out << t << "SetMinPt(" << fMinPt << ");\n";
1167  // out << t << "SetMaxPt(" << fMaxPt << ");\n";
1168  // out << t << "SetLimPt(" << fLimPt << ");\n";
1169  // out << t << "SetMinP(" << fMinP << ");\n";
1170  // out << t << "SetMaxP(" << fMaxP << ");\n";
1171  // out << t << "SetLimP(" << fLimP << ");\n";
1172 }
1173 
1174 ////////////////////////////////////////////////////////////////////////////////
1175 /// Virtual from TEveProjectable, returns TEveTrackListProjected class.
1176 
1178 {
1180 }
Double_t fLimP
Definition: TEveTrack.h:160
const Int_t kMinInt
Definition: Rtypes.h:104
Double_t Charge() const
Definition: TParticlePDG.h:72
virtual Style_t GetLineStyle() const
Definition: TAttLine.h:48
virtual void DecRefCount(TEveElement *re)
Decrease reference count and remove re from the list of back-references.
Definition: TEveUtil.cxx:590
List_i EndChildren()
Definition: TEveElement.h:165
Int_t fLastPMIdx
Definition: TEveTrack.h:62
void SanitizeMinMaxCuts()
Set Min/Max cuts so that they are within detected limits.
Definition: TEveTrack.cxx:725
void SetRnrPoints(Bool_t r)
Set rendering of track as points for the list and the elements.
Definition: TEveTrack.cxx:770
virtual void SetTrackParams(const TEveTrack &t)
Copy track parameters from t.
Definition: TEveTrack.cxx:282
Double_t Floor(Double_t x)
Definition: TMath.h:473
virtual void * GetUserData() const =0
short Style_t
Definition: RtypesCore.h:76
Int_t GetCurrentPoint() const
Get index of current point on track.
virtual void SetLineColor(Color_t c)
Definition: TEveTrack.h:183
void EditElement(TEveElement *element)
Show element in default editor.
float Float_t
Definition: RtypesCore.h:53
float Size_t
Definition: RtypesCore.h:83
TClass * fChildClass
Definition: TEveElement.h:468
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition: TEveLine.cxx:144
virtual void SetName(const char *name)
Change (i.e.
Double_t GetMaxZ() const
void SetRnrLine(Bool_t rnr)
Set rendering of track as line for the list and the elements.
Definition: TEveTrack.cxx:738
TEveVectorD fP
Definition: TEveTrack.h:51
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:24
List_t fChildren
Definition: TEveElement.h:79
virtual void SetLineWidth(Width_t w)
Set line width for the list and the elements.
Definition: TEveTrack.cxx:835
TGListTree * GetListTree() const
Definition: TEveBrowser.h:113
Bool_t IntersectPlane(const TEveVectorD &p, const TEveVectorD &point, const TEveVectorD &normal, TEveVectorD &itsect)
Find intersection of currently propagated track with a plane.
virtual Int_t Size() const
Definition: TPolyMarker3D.h:81
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveLine.cxx:260
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:63
TEveTrackList(const TEveTrackList &)
List_t::iterator List_i
Definition: TEveElement.h:70
Size_t fMarkerSize
Definition: TAttMarker.h:37
Bool_t GetRnrPoints() const
Definition: TEveLine.h:53
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
Int_t fLabel
Definition: TEveTrack.h:57
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Basic string class.
Definition: TString.h:137
virtual void ClonePoints(const TEvePointSet &e)
Clone points and all point-related information from point-set 'e'.
Short_t Min(Short_t a, Short_t b)
Definition: TMathBase.h:170
vPathMark_t & RefPathMarks()
Definition: TEveTrack.h:111
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
const Bool_t kFALSE
Definition: Rtypes.h:92
Bool_t GetFitDaughters() const
Bool_t GetRnrLine() const
Definition: TEveLine.h:52
virtual void SetMarkerStyle(Style_t mstyle=1)
Set marker style, propagate to projecteds.
TEveTrackPropagator * fPropagator
Last path-mark index tried in track-propagation.
Definition: TEveTrack.h:64
virtual void SetMarkerColor(Color_t c)
Set marker color for the list and the elements.
Definition: TEveTrack.cxx:931
Double_t GetMaxR() const
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveTrack.cxx:1155
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
ClassImp(TEveTrack)
virtual void SetLineStyle(Style_t lstyle)
Set line-style of the line.
Definition: TEveLine.cxx:86
virtual void SetTitle(const char *t)
Definition: TEvePointSet.h:69
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:501
A list of TEveElements.
Definition: TEveElement.h:459
Definition: math.cpp:60
virtual const char * GetName() const
Returns name of object.
Definition: TPolyMarker3D.h:65
Double_t fMaxP
Definition: TEveTrack.h:159
Marker Attributes class.
Definition: TAttMarker.h:32
const char * Data() const
Definition: TString.h:349
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveTrack.cxx:1131
Double_t fLimPt
Definition: TEveTrack.h:157
Color_t * fMainColorPtr
Definition: TEveElement.h:97
void SelectByP(Double_t min_p, Double_t max_p)
Select visibility of tracks by momentum.
Definition: TEveTrack.cxx:1042
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:60
Bool_t GetFitCluster2Ds() const
Double_t x[n]
Definition: legend1.C:17
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveLine.cxx:277
Double_t fBeta
Definition: TEveTrack.h:53
virtual Bool_t GoToLineSegment(const TEveVectorD &s, const TEveVectorD &r, TEveVectorD &p)
Propagate particle with momentum p to line with start point s and vector r to the second point...
virtual void SetMarkerStyle(Style_t s)
Set marker style for the list and the elements.
Definition: TEveTrack.cxx:899
void Class()
Definition: Class.C:29
Int_t fIndex
Definition: TEveTrack.h:58
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Definition: TAttLine.cxx:257
Bool_t fLockPoints
Definition: TEveTrack.h:60
virtual void MakeTrack(Bool_t recurse=kTRUE)
Calculate track representation based on track data and current settings of the propagator.
Definition: TEveTrack.cxx:338
A list of tracks supporting change of common attributes and selection based on track parameters...
Definition: TEveTrack.h:137
virtual void SetMainColor(Color_t c)
Set main (line) color for the list and the elements.
Definition: TEveTrack.cxx:803
void SetPropagator(TEveTrackPropagator *prop)
Set track's render style.
Definition: TEveTrack.cxx:309
Bool_t GetFitLineSegments() const
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.
Definition: TAttMarker.cxx:226
Base-class for non-linear projections.
Double_t fMinPt
Definition: TEveTrack.h:155
virtual void SetMarkerSize(Size_t msize=1)
Set marker size, propagate to projecteds.
Bool_t GetRnrLine() const
Definition: TEveTrack.h:199
TT Perp() const
Definition: TEveVector.h:72
Double_t fMaxPt
Definition: TEveTrack.h:156
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
void Emit(const char *signal)
Acitvate signal without args.
Definition: TQObject.cxx:559
static Bool_t IsOutsideBounds(const TEveVectorD &point, Double_t maxRsqr, Double_t maxZ)
virtual Bool_t GoToVertex(TEveVectorD &v, TEveVectorD &p)
Propagate particle with momentum p to vertex v.
Style_t fMarkerStyle
Definition: TAttMarker.h:36
void FillPointSet(TEvePointSet *ps) const
Reset ps and populate it with points in propagation cache.
Int_t PdgCode() const
Definition: TParticlePDG.h:70
Bool_t GetFitReferences() const
TEveTrack * FindTrackByIndex(Int_t index)
Find track by index, select it and display it in the editor.
Definition: TEveTrack.cxx:1108
virtual Size_t GetMarkerSize() const
Definition: TAttMarker.h:46
static TEveTrackPropagator fgDefault
virtual void SetLineColor(Color_t col)
Definition: TEveLine.h:48
Style_t fLineStyle
Definition: TAttLine.h:36
Special-point on track:
Definition: TEvePathMark.h:22
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveTrackListProjected class.
Definition: TEveTrack.cxx:1177
Bool_t GetFitDecay() const
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
virtual void SetLineWidth(Width_t lwidth)
Set line-style of the line.
Definition: TEveLine.cxx:106
Color_t fLineColor
Definition: TAttLine.h:35
TParticlePDG * GetPDG(Int_t mode=0) const
returns a pointer to the TParticlePDG object using the pdgcode if mode == 0 (default) always get a fr...
Definition: TParticle.cxx:266
TEveVectorD fPEnd
Definition: TEveTrack.h:52
Bool_t fRnrLine
Definition: TEveTrack.h:152
Width_t fLineWidth
Definition: TAttLine.h:37
TMarker * m
Definition: textangle.C:8
Int_t fPdg
Definition: TEveTrack.h:55
char * Form(const char *fmt,...)
vPathMark_t::const_iterator vPathMark_ci
Definition: TEveTrack.h:44
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).
Definition: TAttBBox.cxx:39
virtual ~TEveTrackList()
Destructor.
Definition: TEveTrack.cxx:615
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
TEveTrack * FindTrackByLabel(Int_t label)
Find track by label, select it and display it in the editor.
Definition: TEveTrack.cxx:1085
virtual void SecSelected(TEveTrack *)
Emits "SecSelected(TEveTrack*)" signal.
Definition: TEveTrack.cxx:548
Double_t GetTrackLength(Int_t start_point=0, Int_t end_point=-1) const
Calculate track length from start_point to end_point.
Holding structure for a number of track rendering parameters.
Bool_t fRnrPoints
Definition: TEveTrack.h:153
Visual representation of a track.
Definition: TEveTrack.h:32
virtual Color_t GetLineColor() const
Definition: TAttLine.h:47
virtual void ComputeBBox()
Compute the bounding box of the track.
Definition: TEveTrack.cxx:241
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SelectByPt(Double_t min_pt, Double_t max_pt)
Select visibility of tracks by transverse momentum.
Definition: TEveTrack.cxx:997
virtual void SetMarkerColor(Color_t col)
Set marker color. Propagate to projected lines.
Definition: TEveLine.cxx:66
TT Mag() const
Definition: TEveVector.h:69
TEveGListTreeEditorFrame * GetLTEFrame() const
Definition: TEveManager.h:138
short Width_t
Definition: RtypesCore.h:78
Int_t fCharge
Definition: TEveTrack.h:56
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition: TEveLine.cxx:125
Double_t fMinP
Definition: TEveTrack.h:158
TGListTreeItem * GetSelected() const
Definition: TGListTree.h:403
long Long_t
Definition: RtypesCore.h:50
TRObject operator()(const T1 &t1) const
void ResetTrack()
Reset cache holding particle trajectory.
MyComplex< T > P(MyComplex< T > z, T c_real, T c_imag)
[MyComplex]
Definition: mandel.cpp:155
virtual const char * GetName() const
return particle name
Definition: TParticle.cxx:250
virtual void SetLineStyle(Style_t s)
Set line style for the list and the elements.
Definition: TEveTrack.cxx:867
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:415
double Double_t
Definition: RtypesCore.h:55
virtual void SetMarkerSize(Size_t s)
Set marker size for the list and the elements.
Definition: TEveTrack.cxx:963
virtual void SetPathMarks(const TEveTrack &t)
Copy path-marks from t.
Definition: TEveTrack.cxx:299
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns list-tree icon for TEveTrack.
Definition: TEveTrack.cxx:233
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
TEveTrackPropagator * fPropagator
Definition: TEveTrack.h:148
TCanvas * style()
Definition: style.C:1
Double_t RoundMomentumLimit(Double_t x)
Round the momentum limit up to a nice value.
Definition: TEveTrack.cxx:712
Double_t fDpDs
Definition: TEveTrack.h:54
vPathMark_t fPathMarks
Definition: TEveTrack.h:61
void Reset(Int_t n_points=0, Int_t n_int_ids=0)
Drop all data and set-up the data structures to recive new data.
#define name(a, b)
Definition: linkTestLib0.cpp:5
Binding & operator=(OUT(*fun)(void))
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, return TEveTrackProjected class.
Definition: TEveTrack.cxx:499
void SetPropagator(TEveTrackPropagator *prop)
Set default propagator for tracks.
Definition: TEveTrack.cxx:625
virtual Color_t GetMarkerColor() const
Definition: TAttMarker.h:44
Bool_t HasChildren() const
Definition: TEveElement.h:169
TEveTrack()
Default constructor.
Definition: TEveTrack.cxx:47
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:202
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
List_i BeginChildren()
Definition: TEveElement.h:164
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveTrack.cxx:475
Double_t Ceil(Double_t x)
Definition: TMath.h:467
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
Definition: TEveTrack.cxx:637
Bool_t GetRnrPoints() const
Definition: TEveTrack.h:203
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
virtual void SetStdTitle()
Set standard track title based on most data-member values.
Definition: TEveTrack.cxx:266
TT Perp2() const
Definition: TEveVector.h:71
virtual ~TEveTrack()
Destructor.
Definition: TEveTrack.cxx:224
virtual TGListTreeItem * FindListTreeItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
void SortPathMarksByTime()
Sort registered pat-marks by time.
Definition: TEveTrack.cxx:516
void SetAttLineAttMarker(TEveTrackList *tl)
Set line and marker attributes from TEveTrackList.
Definition: TEveTrack.cxx:320
void PrintPathMarks()
Print registered path-marks.
Definition: TEveTrack.cxx:524
Float_t * fP
Definition: TPolyMarker3D.h:44
void HighlightItem(TGListTreeItem *item)
Highlight item.
virtual Style_t GetMarkerStyle() const
Definition: TAttMarker.h:45
virtual void IncRefCount(TEveElement *re)
Increase reference count and add re to the list of back-references.
Definition: TEveUtil.cxx:581
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual Width_t GetLineWidth() const
Definition: TAttLine.h:49
Color_t fMarkerColor
Definition: TAttMarker.h:35
TEveVectorD fV
Definition: TEveTrack.h:50
Int_t Nint(T x)
Definition: TMath.h:480
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
const Int_t n
Definition: legend1.C:16
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Line Attributes class.
Definition: TAttLine.h:32
vPathMark_t::iterator vPathMark_i
Definition: TEveTrack.h:43
void InitTrack(const TEveVectorD &v, Int_t charge)
Initialize internal data-members for given particle parameters.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveTrack.cxx:489
virtual void GoToBounds(TEveVectorD &p)
Propagate particle to bounds.
void FindMomentumLimits(TEveElement *el, Bool_t recurse=kTRUE)
Loop over track elements of argument el and find highest pT and p.
Definition: TEveTrack.cxx:694
void SetSelected(TGListTreeItem *item)
Definition: TGListTree.h:374
Bool_t fRecurse
Definition: TEveTrack.h:150
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:904