Logo ROOT  
Reference Guide
TEvePointSet.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 "TEvePointSet.h"
13 
14 #include "TEveManager.h"
15 #include "TEveProjectionManager.h"
16 #include "TEveTrans.h"
17 
18 #include "TTree.h"
19 #include "TTreePlayer.h"
20 #include "TF3.h"
21 
22 /** \class TEvePointSet
23 \ingroup TEve
24 TEvePointSet is a render-element holding a collection of 3D points with
25 optional per-point TRef and an arbitrary number of integer ids (to
26 be used for signal, volume-id, track-id, etc).
27 
28 3D point representation is implemented in base-class TPolyMarker3D.
29 Per-point TRef is implemented in base-class TPointSet3D.
30 
31 By using the TEvePointSelector the points and integer ids can be
32 filled directly from a TTree holding the source data.
33 Setting of per-point TRef's is not supported.
34 
35 TEvePointSet is a TEveProjectable: it can be projected by using the
36 TEveProjectionManager class.
37 */
38 
40 
41 ////////////////////////////////////////////////////////////////////////////////
42 /// Constructor.
43 
45  TEveElement(),
46  TPointSet3D(n_points),
49  TQObject(),
50 
51  fTitle (),
52  fIntIds (0),
53  fIntIdsPerPoint (0)
54 {
55  fMarkerStyle = 20;
57 
58  // Override from TEveElement.
59  fPickable = kTRUE;
60 }
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 /// Constructor.
64 
65 TEvePointSet::TEvePointSet(const char* name, Int_t n_points, ETreeVarType_e tv_type) :
66  TEveElement(),
67  TPointSet3D(n_points),
70  TQObject(),
71 
72  fTitle (),
73  fIntIds (0),
74  fIntIdsPerPoint (0)
75 {
76  fMarkerStyle = 20;
77  SetName(name);
79 
80  // Override from TEveElement.
81  fPickable = kTRUE;
82 }
83 
84 ////////////////////////////////////////////////////////////////////////////////
85 /// Copy constructor.
86 
88  TEveElement(e),
89  TPointSet3D(e),
92  TQObject(),
93 
94  fTitle (e.fTitle),
95  fIntIds (e.fIntIds ? new TArrayI(*e.fIntIds) : 0),
96  fIntIdsPerPoint (e.fIntIdsPerPoint)
97 {
98 }
99 
100 ////////////////////////////////////////////////////////////////////////////////
101 /// Destructor.
102 
104 {
105  delete fIntIds;
106 }
107 
108 ////////////////////////////////////////////////////////////////////////////////
109 /// Clone points and all point-related information from point-set 'e'.
110 
112 {
113  // TPolyMarker3D
114  delete [] fP;
115  fN = e.fN;
116  if (fN > 0)
117  {
118  const Int_t nn = 3 * e.fN;
119  fP = new Float_t [nn];
120  for (Int_t i = 0; i < nn; i++) fP[i] = e.fP[i];
121  } else {
122  fP = 0;
123  }
124  fLastPoint = e.fLastPoint;
125 
126  // TPointSet3D
127  CopyIds(e);
128 
129  // TEvePointSet
130  delete fIntIds;
131  fIntIds = e.fIntIds ? new TArrayI(*e.fIntIds) : 0;
132  fIntIdsPerPoint = e.fIntIdsPerPoint;
133 }
134 
135 ////////////////////////////////////////////////////////////////////////////////
136 /// Return pointset icon.
137 
139 {
141 }
142 
143 ////////////////////////////////////////////////////////////////////////////////
144 /// Drop all data and set-up the data structures to recive new data.
145 /// n_points specifies the initial size of the arrays.
146 /// n_int_ids specifies the number of integer ids per point.
147 
148 void TEvePointSet::Reset(Int_t n_points, Int_t n_int_ids)
149 {
150  delete [] fP; fP = 0;
151  fN = n_points;
152  if (fN) {
153  fP = new Float_t [3*fN];
154  memset(fP, 0, 3*fN*sizeof(Float_t));
155  }
156  fLastPoint = -1;
157  ClearIds();
158  delete fIntIds; fIntIds = 0;
159  fIntIdsPerPoint = n_int_ids;
161  ResetBBox();
162 }
163 
164 ////////////////////////////////////////////////////////////////////////////////
165 /// Resizes internal array to allow additional n_points to be stored.
166 /// Returns the old size which is also the location where one can
167 /// start storing new data.
168 /// The caller is *obliged* to fill the new point slots.
169 
171 {
172  Int_t old_size = Size();
173  Int_t new_size = old_size + n_points;
174  SetPoint(new_size - 1, 0, 0, 0);
175  if (fIntIds)
176  fIntIds->Set(fIntIdsPerPoint * new_size);
177  return old_size;
178 }
179 
180 ////////////////////////////////////////////////////////////////////////////////
181 /// Assert that size of IntId array is compatible with the size of
182 /// the point array.
183 
185 {
186  Int_t exp_size = GetN()*fIntIdsPerPoint;
187  if (fIntIds->GetSize() < exp_size)
188  fIntIds->Set(exp_size);
189 }
190 
191 ////////////////////////////////////////////////////////////////////////////////
192 /// Return a pointer to integer ids of point with index p.
193 /// Existence of integer id array is checked, 0 is returned if it
194 /// does not exist.
195 /// Validity of p is *not* checked.
196 
198 {
199  if (fIntIds)
200  return fIntIds->GetArray() + p*fIntIdsPerPoint;
201  return 0;
202 }
203 
204 ////////////////////////////////////////////////////////////////////////////////
205 /// Return i-th integer id of point with index p.
206 /// Existence of integer id array is checked, kMinInt is returned if
207 /// it does not exist.
208 /// Validity of p and i is *not* checked.
209 
211 {
212  if (fIntIds)
213  return * (fIntIds->GetArray() + p*fIntIdsPerPoint + i);
214  return kMinInt;
215 }
216 
217 ////////////////////////////////////////////////////////////////////////////////
218 /// Set integer ids for the last point that was registered (most
219 /// probably via TPolyMarker3D::SetNextPoint(x,y,z)).
220 
222 {
224 }
225 
226 ////////////////////////////////////////////////////////////////////////////////
227 /// Set integer ids for point with index n.
228 
230 {
231  if (!fIntIds) return;
234  for (Int_t i=0; i<fIntIdsPerPoint; ++i)
235  x[i] = ids[i];
236 }
237 
238 ////////////////////////////////////////////////////////////////////////////////
239 /// Set marker style, propagate to projecteds.
240 
242 {
243  static const TEveException eh("TEvePointSet::SetMarkerStyle ");
244 
245  std::list<TEveProjected*>::iterator pi = fProjectedList.begin();
246  while (pi != fProjectedList.end())
247  {
248  TEvePointSet* pt = dynamic_cast<TEvePointSet*>(*pi);
249  if (pt)
250  {
251  pt->SetMarkerStyle(mstyle);
252  pt->StampObjProps();
253  }
254  ++pi;
255  }
257 }
258 
259 ////////////////////////////////////////////////////////////////////////////////
260 /// Set marker size, propagate to projecteds.
261 
263 {
264  static const TEveException eh("TEvePointSet::SetMarkerSize ");
265 
266  std::list<TEveProjected*>::iterator pi = fProjectedList.begin();
267  while (pi != fProjectedList.end())
268  {
269  TEvePointSet* pt = dynamic_cast<TEvePointSet*>(*pi);
270  if (pt)
271  {
272  pt->SetMarkerSize(msize);
273  pt->StampObjProps();
274  }
275  ++pi;
276  }
278 }
279 
280 ////////////////////////////////////////////////////////////////////////////////
281 /// Paint point-set.
282 
284 {
285  PaintStandard(this);
286 }
287 
288 ////////////////////////////////////////////////////////////////////////////////
289 /// Initialize point-set for new filling.
290 /// subIdNum gives the number of integer ids that can be assigned to
291 /// each point.
292 
294 {
295  if (subIdNum > 0) {
296  fIntIdsPerPoint = subIdNum;
297  if (!fIntIds)
299  else
301  } else {
302  delete fIntIds; fIntIds = 0;
303  fIntIdsPerPoint = 0;
304  }
305 }
306 
307 ////////////////////////////////////////////////////////////////////////////////
308 /// Called from TEvePointSelector when internal arrays of the tree-selector
309 /// are filled up and need to be processed.
310 /// Virtual from TEvePointSelectorConsumer.
311 
313 {
314  static const TEveException eh("TEvePointSet::TakeAction ");
315 
316  if(sel == 0)
317  throw(eh + "selector is <null>.");
318 
319  Int_t n = sel->GetNfill();
320  Int_t beg = GrowFor(n);
321 
322  // printf("TEvePointSet::TakeAction beg=%d n=%d size=%d nsubid=%d dim=%d\n",
323  // beg, n, Size(), sel->GetSubIdNum(), sel->GetDimension());
324 
325  Double_t *vx = sel->GetV1(), *vy = sel->GetV2(), *vz = sel->GetV3();
326  Float_t *p = fP + 3*beg;
327 
328  switch(fSourceCS) {
329  case kTVT_XYZ:
330  while(n-- > 0) {
331  p[0] = *vx; p[1] = *vy; p[2] = *vz;
332  p += 3;
333  ++vx; ++vy; ++vz;
334  }
335  break;
336  case kTVT_RPhiZ:
337  while(n-- > 0) {
338  p[0] = *vx * TMath::Cos(*vy); p[1] = *vx * TMath::Sin(*vy); p[2] = *vz;
339  p += 3;
340  ++vx; ++vy; ++vz;
341  }
342  break;
343  default:
344  throw(eh + "unknown tree variable type.");
345  }
346 
347  if (fIntIds) {
348  Double_t** subarr = new Double_t* [fIntIdsPerPoint];
349  for (Int_t i=0; i<fIntIdsPerPoint; ++i) {
350  subarr[i] = sel->GetVal(sel->GetDimension() - fIntIdsPerPoint + i);
351  if (subarr[i] == 0) {
352  delete[] subarr;
353  throw(eh + "sub-id array not available.");
354  }
355  }
356  Int_t* ids = fIntIds->GetArray() + fIntIdsPerPoint*beg;
357  n = sel->GetNfill();
358  while (n-- > 0) {
359  for (Int_t i=0; i<fIntIdsPerPoint; ++i) {
360  ids[i] = TMath::Nint(*subarr[i]);
361  ++subarr[i];
362  }
363  ids += fIntIdsPerPoint;
364  }
365  delete [] subarr;
366  }
367 }
368 
369 ////////////////////////////////////////////////////////////////////////////////
370 /// Copy visualization parameters from element el.
371 
373 {
374  const TEvePointSet* m = dynamic_cast<const TEvePointSet*>(el);
375  if (m)
376  {
378  fOption = m->fOption;
379  }
380 
382 }
383 
384 ////////////////////////////////////////////////////////////////////////////////
385 /// Write visualization parameters.
386 
387 void TEvePointSet::WriteVizParams(std::ostream& out, const TString& var)
388 {
389  TEveElement::WriteVizParams(out, var);
390 
392 }
393 
394 ////////////////////////////////////////////////////////////////////////////////
395 /// Virtual from TEveProjectable, returns TEvePointSetProjected class.
396 
398 {
400 }
401 
402 ////////////////////////////////////////////////////////////////////////////////
403 /// Virtual method of base class TPointSet3D. The function call is
404 /// invoked with secondary selection in TPointSet3DGL.
405 
407 {
408  Emit("PointSelected(Int_t)", id);
410 }
411 
412 //==============================================================================
413 /** \class TEvePointSetArray
414 \ingroup TEve
415 An array of point-sets with each point-set playing a role of a bin
416 in a histogram. When a new point is added to a TEvePointSetArray,
417 an additional separating quantity needs to be specified: it
418 determines into which TEvePointSet (bin) the point will actually be
419 stored. Underflow and overflow bins are automatically created but
420 they are not drawn by default.
421 
422 By using the TEvePointSelector the points and the separating
423 quantities can be filled directly from a TTree holding the source
424 data.
425 Setting of per-point TRef's is not supported.
426 
427 After the filling, the range of separating variable can be
428 controlled with a slider to choose a sub-set of PointSets that are
429 actually shown.
430 */
431 
433 
434 ////////////////////////////////////////////////////////////////////////////////
435 /// Constructor.
436 
438  const char* title) :
439  TEveElement(),
440  TNamed(name, title),
441 
442  fBins(0), fDefPointSetCapacity(128), fNBins(0), fLastBin(-1),
443  fMin(0), fCurMin(0), fMax(0), fCurMax(0),
444  fBinWidth(0),
445  fQuantName()
446 {
447 
449 }
450 
451 ////////////////////////////////////////////////////////////////////////////////
452 /// Destructor: deletes the fBins array. Actual removal of
453 /// elements done by TEveElement.
454 
456 {
457  // printf("TEvePointSetArray::~TEvePointSetArray()\n");
458  delete [] fBins; fBins = 0;
459 }
460 
461 ////////////////////////////////////////////////////////////////////////////////
462 /// Virtual from TEveElement, provide bin management.
463 
465 {
466  for (Int_t i=0; i<fNBins; ++i) {
467  if (fBins[i] == el) {
468  fBins[i] = 0;
469  break;
470  }
471  }
472 }
473 
474 ////////////////////////////////////////////////////////////////////////////////
475 /// Virtual from TEveElement, provide bin management.
476 
478 {
479  delete [] fBins; fBins = 0; fLastBin = -1;
480 }
481 
482 ////////////////////////////////////////////////////////////////////////////////
483 /// Set marker color, propagate to children.
484 
486 {
487  static const TEveException eh("TEvePointSetArray::SetMarkerColor ");
488 
489  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
490  TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject(eh));
491  if (m && m->GetMarkerColor() == fMarkerColor)
492  m->SetMarkerColor(tcolor);
493  }
495 }
496 
497 ////////////////////////////////////////////////////////////////////////////////
498 /// Set marker style, propagate to children.
499 
501 {
502  static const TEveException eh("TEvePointSetArray::SetMarkerStyle ");
503 
504  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
505  TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject(eh));
506  if (m && m->GetMarkerStyle() == fMarkerStyle)
507  m->SetMarkerStyle(mstyle);
508  }
510 }
511 
512 ////////////////////////////////////////////////////////////////////////////////
513 /// Set marker size, propagate to children.
514 
516 {
517  static const TEveException eh("TEvePointSetArray::SetMarkerSize ");
518 
519  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
520  TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject(eh));
521  if (m && m->GetMarkerSize() == fMarkerSize)
522  m->SetMarkerSize(msize);
523  }
525 }
526 
527 ////////////////////////////////////////////////////////////////////////////////
528 /// Called from TEvePointSelector when internal arrays of the tree-selector
529 /// are filled up and need to be processed.
530 /// Virtual from TEvePointSelectorConsumer.
531 
533 {
534  static const TEveException eh("TEvePointSetArray::TakeAction ");
535 
536  if (sel == 0)
537  throw eh + "selector is <null>.";
538 
539  Int_t n = sel->GetNfill();
540 
541  // printf("TEvePointSetArray::TakeAction n=%d\n", n);
542 
543  Double_t *vx = sel->GetV1(), *vy = sel->GetV2(), *vz = sel->GetV3();
544  Double_t *qq = sel->GetV4();
545 
546  if (qq == 0)
547  throw eh + "requires 4-d varexp.";
548 
549  switch (fSourceCS)
550  {
551  case kTVT_XYZ:
552  {
553  while (n-- > 0)
554  {
555  Fill(*vx, *vy, *vz, *qq);
556  ++vx; ++vy; ++vz; ++qq;
557  }
558  break;
559  }
560  case kTVT_RPhiZ:
561  {
562  while (n-- > 0)
563  {
564  Fill(*vx * TMath::Cos(*vy), *vx * TMath::Sin(*vy), *vz, *qq);
565  ++vx; ++vy; ++vz; ++qq;
566  }
567  break;
568  }
569  default:
570  {
571  throw eh + "unknown tree variable type.";
572  }
573  }
574 }
575 
576 ////////////////////////////////////////////////////////////////////////////////
577 /// Get the total number of filled points.
578 /// 'under' and 'over' flags specify if under/overflow channels
579 /// should be added to the sum.
580 
582 {
583  Int_t size = 0;
584  const Int_t min = under ? 0 : 1;
585  const Int_t max = over ? fNBins : fNBins - 1;
586  for (Int_t i = min; i < max; ++i)
587  {
588  if (fBins[i])
589  size += fBins[i]->Size();
590  }
591  return size;
592 }
593 
594 ////////////////////////////////////////////////////////////////////////////////
595 /// Initialize internal point-sets with given binning parameters.
596 /// The actual number of bins is nbins+2, bin 0 corresponding to
597 /// underflow and bin nbin+1 to owerflow pointset.
598 
599 void TEvePointSetArray::InitBins(const char* quant_name,
600  Int_t nbins, Double_t min, Double_t max)
601 {
602  static const TEveException eh("TEvePointSetArray::InitBins ");
603 
604  if (nbins < 1) throw eh + "nbins < 1.";
605  if (min > max) throw eh + "min > max.";
606 
607  RemoveElements();
608 
609  fQuantName = quant_name;
610  fNBins = nbins + 2; // under/overflow
611  fLastBin = -1;
612  fMin = fCurMin = min;
613  fMax = fCurMax = max;
614  fBinWidth = (fMax - fMin)/(fNBins - 2);
615 
616  fBins = new TEvePointSet* [fNBins];
617 
618  for (Int_t i = 0; i < fNBins; ++i)
619  {
620  fBins[i] = new TEvePointSet
621  (Form("Slice %d [%4.3lf, %4.3lf]", i, fMin + (i-1)*fBinWidth, fMin + i*fBinWidth),
626  AddElement(fBins[i]);
627  }
628 
629  fBins[0]->SetName("Underflow");
630  fBins[0]->SetRnrSelf(kFALSE);
631 
632  fBins[fNBins-1]->SetName("Overflow");
634 }
635 
636 ////////////////////////////////////////////////////////////////////////////////
637 /// Add a new point. Appropriate point-set will be chosen based on
638 /// the value of the separating quantity 'quant'.
639 /// If the selected bin does not have an associated TEvePointSet
640 /// the point is discarded and false is returned.
641 
643 {
644  fLastBin = TMath::FloorNint((quant - fMin)/fBinWidth) + 1;
645 
646  if (fLastBin < 0)
647  {
648  fLastBin = 0;
649  }
650  else if (fLastBin > fNBins - 1)
651  {
652  fLastBin = fNBins - 1;
653  }
654 
655  if (fBins[fLastBin] != 0)
656  {
657  fBins[fLastBin]->SetNextPoint(x, y, z);
658  return kTRUE;
659  }
660  else
661  {
662  return kFALSE;
663  }
664 }
665 
666 ////////////////////////////////////////////////////////////////////////////////
667 /// Set external object id of the last added point.
668 
670 {
671  if (fLastBin >= 0)
672  fBins[fLastBin]->SetPointId(id);
673 }
674 
675 ////////////////////////////////////////////////////////////////////////////////
676 /// Call this after all the points have been filled.
677 /// At this point we can calculate bounding-boxes of individual
678 /// point-sets.
679 
681 {
682  for (Int_t i=0; i<fNBins; ++i)
683  {
684  if (fBins[i] != 0)
685  {
686  fBins[i]->SetTitle(Form("N=%d", fBins[i]->Size()));
687  fBins[i]->ComputeBBox();
688  }
689  }
690  fLastBin = -1;
691 }
692 
693 ////////////////////////////////////////////////////////////////////////////////
694 /// Propagate id-object ownership to children.
695 
697 {
698  for (Int_t i=0; i<fNBins; ++i)
699  {
700  if (fBins[i] != 0)
701  fBins[i]->SetOwnIds(o);
702  }
703 }
704 
705 ////////////////////////////////////////////////////////////////////////////////
706 /// Set active range of the separating quantity.
707 /// Appropriate point-sets are tagged for rendering.
708 /// Over/underflow point-sets are left as they were.
709 
711 {
712  using namespace TMath;
713 
714  fCurMin = min; fCurMax = max;
715  Int_t low_b = Max(0, FloorNint((min-fMin)/fBinWidth)) + 1;
716  Int_t high_b = Min(fNBins-2, CeilNint ((max-fMin)/fBinWidth));
717 
718  for (Int_t i = 1; i < fNBins - 1; ++i)
719  {
720  if (fBins[i] != 0)
721  fBins[i]->SetRnrSelf(i>=low_b && i<=high_b);
722  }
723 }
724 
725 /** \class TEvePointSetProjected
726 \ingroup TEve
727 Projected copy of a TEvePointSet.
728 */
730 
731 ////////////////////////////////////////////////////////////////////////////////
732 /// Default contructor.
733 
735  TEvePointSet (),
736  TEveProjected ()
737 {
738 }
739 
740 ////////////////////////////////////////////////////////////////////////////////
741 /// Set projection manager and projection model.
742 /// Virtual from TEveProjected.
743 
746 {
748  CopyVizParams(dynamic_cast<TEveElement*>(model));
749 }
750 
751 ////////////////////////////////////////////////////////////////////////////////
752 /// Set depth (z-coordinate) of the projected points.
753 
755 {
756  SetDepthCommon(d, this, fBBox);
757 
758  Int_t n = Size();
759  Float_t *p = GetP() + 2;
760  for (Int_t i = 0; i < n; ++i, p+=3)
761  *p = fDepth;
762 }
763 
764 ////////////////////////////////////////////////////////////////////////////////
765 /// Re-apply the projection.
766 /// Virtual from TEveProjected.
767 
769 {
771  TEvePointSet &ps = * dynamic_cast<TEvePointSet*>(fProjectable);
772  TEveTrans *tr = ps.PtrMainTrans(kFALSE);
773 
774  Int_t n = ps.Size();
775  Reset(n);
776  fLastPoint = n - 1;
777  Float_t *o = ps.GetP(), *p = GetP();
778  for (Int_t i = 0; i < n; ++i, o+=3, p+=3)
779  {
780  proj.ProjectPointfv(tr, o, p, fDepth);
781  }
782 }
783 
784 ////////////////////////////////////////////////////////////////////////////////
785 /// Virtual method of base class TPointSet3D.
786 /// Forward to projectable.
787 
789 {
790  TEvePointSet *ps = dynamic_cast<TEvePointSet*>(fProjectable);
791  ps->PointSelected(id);
792 }
TEvePointSetArray::InitBins
void InitBins(const char *quant_name, Int_t nbins, Double_t min, Double_t max)
Initialize internal point-sets with given binning parameters.
Definition: TEvePointSet.cxx:599
TPolyMarker3D::Size
virtual Int_t Size() const
Definition: TPolyMarker3D.h:73
m
auto * m
Definition: textangle.C:8
SetMarkerStyle
m SetMarkerStyle(20)
n
const Int_t n
Definition: legend1.C:16
TSelectorDraw::GetV1
virtual Double_t * GetV1() const
Definition: TSelectorDraw.h:102
TPointSet3D::ClearIds
void ClearIds()
Clears the id-array. If ids are owned the TObjects are deleted.
Definition: TPointSet3D.cxx:126
TEveElement::PaintStandard
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Definition: TEveElement.cxx:1034
TEvePointSetArray::~TEvePointSetArray
virtual ~TEvePointSetArray()
Destructor: deletes the fBins array.
Definition: TEvePointSet.cxx:455
TPolyMarker3D::SetName
virtual void SetName(const char *name)
Change (i.e.
Definition: TPolyMarker3D.cxx:536
TPolyMarker3D::fP
Float_t * fP
Definition: TPolyMarker3D.h:36
TEveElement
Definition: TEveElement.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TTreePlayer.h
TEveTrans
Definition: TEveTrans.h:26
e
#define e(i)
Definition: RSha256.hxx:121
Style_t
short Style_t
Definition: RtypesCore.h:80
SetMarkerColor
m SetMarkerColor(kBlue)
TEvePointSet.h
TEveElement::fPickable
Bool_t fPickable
Definition: TEveElement.h:312
TEvePointSetArray::SetRange
void SetRange(Double_t min, Double_t max)
Set active range of the separating quantity.
Definition: TEvePointSet.cxx:710
TGPicture
Definition: TGPicture.h:36
TEvePointSetArray::fNBins
Int_t fNBins
Definition: TEvePointSet.h:120
TMath::Max
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
TEveProjected::SetProjection
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
Definition: TEveProjectionBases.cxx:193
TMath::Cos
Double_t Cos(Double_t)
Definition: TMath.h:643
TEvePointSet::SetTitle
virtual void SetTitle(const char *t)
Definition: TEvePointSet.h:69
TEvePointSetArray::fCurMax
Double_t fCurMax
Definition: TEvePointSet.h:123
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
TEveElement::CopyVizParams
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveElement.cxx:462
TEveProjection
Definition: TEveProjections.h:26
TEvePointSet::GrowFor
Int_t GrowFor(Int_t n_points)
Resizes internal array to allow additional n_points to be stored.
Definition: TEvePointSet.cxx:170
TEvePointSet::TakeAction
virtual void TakeAction(TEvePointSelector *)
Called from TEvePointSelector when internal arrays of the tree-selector are filled up and need to be ...
Definition: TEvePointSet.cxx:312
TEvePointSet::fIntIds
TArrayI * fIntIds
Definition: TEvePointSet.h:44
TMath::CeilNint
Int_t CeilNint(Double_t x)
Definition: TMath.h:699
TEvePointSetArray::fDefPointSetCapacity
Int_t fDefPointSetCapacity
Definition: TEvePointSet.h:119
TEvePointSet::AssertIntIdsSize
void AssertIntIdsSize()
Assert that size of IntId array is compatible with the size of the point array.
Definition: TEvePointSet.cxx:184
operator=
Binding & operator=(OUT(*fun)(void))
Definition: TRInterface_Binding.h:11
Float_t
float Float_t
Definition: RtypesCore.h:57
TEvePointSet::GetListTreeIcon
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return pointset icon.
Definition: TEvePointSet.cxx:138
TEvePointSet::SetPointIntIds
void SetPointIntIds(Int_t *ids)
Set integer ids for the last point that was registered (most probably via TPolyMarker3D::SetNextPoint...
Definition: TEvePointSet.cxx:221
TEveElement::fgListTreeIcons
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:65
TEveProjected::fProjectable
TEveProjectable * fProjectable
Definition: TEveProjectionBases.h:91
TEvePointSet::SetMarkerSize
virtual void SetMarkerSize(Size_t msize=1)
Set marker size, propagate to projecteds.
Definition: TEvePointSet.cxx:262
kMinInt
const Int_t kMinInt
Definition: RtypesCore.h:104
TEvePointSetArray::fMax
Double_t fMax
Definition: TEvePointSet.h:123
TEveElement::SetMainColorPtr
void SetMainColorPtr(Color_t *color)
Definition: TEveElement.h:269
TGeant4Unit::ps
static constexpr double ps
Definition: TGeant4SystemOfUnits.h:171
TSelectorDraw::GetNfill
virtual Int_t GetNfill() const
Definition: TSelectorDraw.h:86
x
Double_t x[n]
Definition: legend1.C:17
TEvePointSet::TEvePointSet
TEvePointSet(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ)
Constructor.
Definition: TEvePointSet.cxx:44
TArrayI::GetArray
const Int_t * GetArray() const
Definition: TArrayI.h:49
TEveProjectable::fProjectedList
ProjList_t fProjectedList
Definition: TEveProjectionBases.h:45
TEveElement::fChildren
List_t fChildren
Definition: TEveElement.h:81
TEvePointSetProjected
Definition: TEvePointSet.h:170
TEvePointSetArray::fQuantName
TString fQuantName
Definition: TEvePointSet.h:125
TEvePointSetArray::TEvePointSetArray
TEvePointSetArray(const TEvePointSetArray &)
TEvePointSet::InitFill
virtual void InitFill(Int_t subIdNum)
Initialize point-set for new filling.
Definition: TEvePointSet.cxx:293
TTree.h
TPolyMarker3D::fLastPoint
Int_t fLastPoint
Definition: TPolyMarker3D.h:38
TString
Definition: TString.h:136
TEveElement::List_i
List_t::iterator List_i
Definition: TEveElement.h:72
TEvePointSet::SetMarkerStyle
virtual void SetMarkerStyle(Style_t mstyle=1)
Set marker style, propagate to projecteds.
Definition: TEvePointSet.cxx:241
TEvePointSetArray::SetMarkerColor
virtual void SetMarkerColor(Color_t tcolor=1)
Set marker color, propagate to children.
Definition: TEvePointSet.cxx:485
TEvePointSet::fIntIdsPerPoint
Int_t fIntIdsPerPoint
Definition: TEvePointSet.h:45
Color_t
short Color_t
Definition: RtypesCore.h:83
TAttBBox::fBBox
Float_t * fBBox
Definition: TAttBBox.h:26
TEvePointSetArray::Size
virtual Int_t Size(Bool_t under=kFALSE, Bool_t over=kFALSE) const
Get the total number of filled points.
Definition: TEvePointSet.cxx:581
bool
TEvePointSetArray::SetOwnIds
void SetOwnIds(Bool_t o)
Propagate id-object ownership to children.
Definition: TEvePointSet.cxx:696
TEvePointSet
Definition: TEvePointSet.h:31
TPointSet3D
Definition: TPointSet3D.h:21
TEvePointSetArray::fBinWidth
Double_t fBinWidth
Definition: TEvePointSet.h:124
TEvePointSetArray::RemoveElementsLocal
virtual void RemoveElementsLocal()
Virtual from TEveElement, provide bin management.
Definition: TEvePointSet.cxx:477
TEvePointSetArray::Fill
Bool_t Fill(Double_t x, Double_t y, Double_t z, Double_t quant)
Add a new point.
Definition: TEvePointSet.cxx:642
TEvePointSetProjected::UpdateProjection
virtual void UpdateProjection()
Re-apply the projection.
Definition: TEvePointSet.cxx:768
TMath::FloorNint
Int_t FloorNint(Double_t x)
Definition: TMath.h:707
TPolyMarker3D::fOption
TString fOption
Definition: TPolyMarker3D.h:37
TEvePointSelectorConsumer::fSourceCS
ETreeVarType_e fSourceCS
Definition: TEveTreeTools.h:51
TAttMarker::SaveMarkerAttributes
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:339
TEveProjectable
Definition: TEveProjectionBases.h:34
TEveElement::SetRnrSelf
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
Definition: TEveElement.cxx:1061
TQObject
Definition: TQObject.h:48
TEvePointSet::GetPointIntId
Int_t GetPointIntId(Int_t p, Int_t i) const
Return i-th integer id of point with index p.
Definition: TEvePointSet.cxx:210
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TEveProjectionManager.h
TEvePointSetProjected::SetProjection
virtual void SetProjection(TEveProjectionManager *proj, TEveProjectable *model)
Set projection manager and projection model.
Definition: TEvePointSet.cxx:744
TPointSet3D::ComputeBBox
virtual void ComputeBBox()
Compute the bounding box of this points set.
Definition: TPointSet3D.cxx:90
TMath::Nint
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Definition: TMath.h:713
TPointSet3D::SetOwnIds
void SetOwnIds(Bool_t o)
Definition: TPointSet3D.h:58
TF3.h
TEveProjectionManager
Definition: TEveProjectionManager.h:20
TPointSet3D::SetPointId
void SetPointId(TObject *id)
Set id of last point.
Definition: TPointSet3D.cxx:107
SetMarkerSize
gr SetMarkerSize(1.3)
TEveProjected::fManager
TEveProjectionManager * fManager
Definition: TEveProjectionBases.h:90
TEvePointSet::WriteVizParams
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEvePointSet.cxx:387
TAttBBox::ResetBBox
void ResetBBox()
Definition: TAttBBox.h:52
TNamed
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TArrayI::Set
void Set(Int_t n)
Set size of this array to n ints.
Definition: TArrayI.cxx:105
TEveElement::AddElement
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Definition: TEveElement.cxx:1324
TAttMarker
Definition: TAttMarker.h:19
TEvePointSetProjected::TEvePointSetProjected
TEvePointSetProjected()
Default contructor.
Definition: TEvePointSet.cxx:734
TEvePointSetArray::RemoveElementLocal
virtual void RemoveElementLocal(TEveElement *el)
Virtual from TEveElement, provide bin management.
Definition: TEvePointSet.cxx:464
TPointSet3D::CopyIds
void CopyIds(const TPointSet3D &t)
Copy id objects from point-set 't'.
Definition: TPointSet3D.cxx:61
TEvePointSelectorConsumer::ETreeVarType_e
ETreeVarType_e
Definition: TEveTreeTools.h:48
TEvePointSelectorConsumer::kTVT_XYZ
@ kTVT_XYZ
Definition: TEveTreeTools.h:48
TMath::Sin
Double_t Sin(Double_t)
Definition: TMath.h:639
y
Double_t y[n]
Definition: legend1.C:17
TPolyMarker3D::SetNextPoint
virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
Set point following LastPoint to x, y, z.
Definition: TPolyMarker3D.cxx:546
TPolyMarker3D::GetP
virtual Float_t * GetP() const
Definition: TPolyMarker3D.h:59
TEvePointSetArray::SetMarkerSize
virtual void SetMarkerSize(Size_t msize=1)
Set marker size, propagate to children.
Definition: TEvePointSet.cxx:515
TEvePointSetArray::TakeAction
virtual void TakeAction(TEvePointSelector *)
Called from TEvePointSelector when internal arrays of the tree-selector are filled up and need to be ...
Definition: TEvePointSet.cxx:532
TEveTrans.h
TEvePointSelectorConsumer::kTVT_RPhiZ
@ kTVT_RPhiZ
Definition: TEveTreeTools.h:48
TPolyMarker3D::SetPoint
void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
Definition: TPolyMarker3D.cxx:558
TEvePointSetArray::CloseBins
void CloseBins()
Call this after all the points have been filled.
Definition: TEvePointSet.cxx:680
TPointSet3D::PointSelected
virtual void PointSelected(Int_t n)
This virtual method is called from TPointSet3DGL when a point is selected.
Definition: TPointSet3D.cxx:145
TMath::Min
Short_t Min(Short_t a, Short_t b)
Definition: TMathBase.h:180
TEvePointSetProjected::PointSelected
virtual void PointSelected(Int_t id)
Virtual method of base class TPointSet3D.
Definition: TEvePointSet.cxx:788
TEvePointSelector
Definition: TEveTreeTools.h:66
TEvePointSet::ClonePoints
virtual void ClonePoints(const TEvePointSet &e)
Clone points and all point-related information from point-set 'e'.
Definition: TEvePointSet.cxx:111
TEveElement::RemoveElements
virtual void RemoveElements()
Remove all elements.
Definition: TEveElement.cxx:1389
TEvePointSet::GetPointIntIds
Int_t * GetPointIntIds(Int_t p) const
Return a pointer to integer ids of point with index p.
Definition: TEvePointSet.cxx:197
TEvePointSet::CopyVizParams
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEvePointSet.cxx:372
TEvePointSetArray::fLastBin
Int_t fLastBin
Definition: TEvePointSet.h:121
TEveManager.h
TEvePointSetArray::SetPointId
void SetPointId(TObject *id)
Set external object id of the last added point.
Definition: TEvePointSet.cxx:669
Double_t
double Double_t
Definition: RtypesCore.h:59
TPolyMarker3D::fN
Int_t fN
Definition: TPolyMarker3D.h:35
TEvePointSelectorConsumer
Definition: TEveTreeTools.h:45
TEveException
Definition: TEveUtil.h:101
TEveProjected
Definition: TEveProjectionBases.h:83
TGeant4Unit::pi
static constexpr double pi
Definition: TGeant4SystemOfUnits.h:73
TSelectorDraw::GetVal
virtual Double_t * GetVal(Int_t i) const
Return the last values corresponding to the i-th component of the formula being processed (where the ...
Definition: TSelectorDraw.cxx:1069
TClass
Definition: TClass.h:80
TSelectorDraw::GetV2
virtual Double_t * GetV2() const
Definition: TSelectorDraw.h:104
TEveProjected::fDepth
Float_t fDepth
Definition: TEveProjectionBases.h:92
TSelectorDraw::GetV4
virtual Double_t * GetV4() const
Definition: TSelectorDraw.h:108
TObject
Definition: TObject.h:37
TEveElement::WriteVizParams
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
Definition: TEveElement.cxx:521
TAttMarker::fMarkerColor
Color_t fMarkerColor
Marker color.
Definition: TAttMarker.h:28
TEvePointSet::ProjectedClass
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEvePointSetProjected class.
Definition: TEvePointSet.cxx:397
name
char name[80]
Definition: TGX11.cxx:110
TEveProjection::ProjectPointfv
void ProjectPointfv(Float_t *v, Float_t d)
Project float array.
Definition: TEveProjections.cxx:55
TEvePointSetArray::fBins
TEvePointSet ** fBins
Definition: TEvePointSet.h:118
TEvePointSetProjected::SetDepthLocal
virtual void SetDepthLocal(Float_t d)
Set depth (z-coordinate) of the projected points.
Definition: TEvePointSet.cxx:754
TAttMarker::fMarkerStyle
Style_t fMarkerStyle
Marker style.
Definition: TAttMarker.h:29
d
#define d(i)
Definition: RSha256.hxx:120
TSelectorDraw::GetV3
virtual Double_t * GetV3() const
Definition: TSelectorDraw.h:106
TEvePointSet::SetMarkerColor
virtual void SetMarkerColor(Color_t col)
Definition: TEvePointSet.h:81
make_cnn_model.model
model
Definition: make_cnn_model.py:6
TEvePointSet::PointSelected
virtual void PointSelected(Int_t id)
Virtual method of base class TPointSet3D.
Definition: TEvePointSet.cxx:406
TEveProjectionManager::GetProjection
TEveProjection * GetProjection()
Definition: TEveProjectionManager.h:55
TEveProjected::SetDepthCommon
void SetDepthCommon(Float_t d, TEveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
Definition: TEveProjectionBases.cxx:236
TEvePointSet::Paint
virtual void Paint(Option_t *option="")
Paint point-set.
Definition: TEvePointSet.cxx:283
Float_t
pt
TPaveText * pt
Definition: entrylist_figure1.C:7
Class
void Class()
Definition: Class.C:29
TPolyMarker3D::GetN
virtual Int_t GetN() const
Definition: TPolyMarker3D.h:58
TAttMarker::fMarkerSize
Size_t fMarkerSize
Marker size.
Definition: TAttMarker.h:30
TEvePointSet::Reset
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.
Definition: TEvePointSet.cxx:148
TEvePointSetArray::fMin
Double_t fMin
Index of the last filled TEvePointSet.
Definition: TEvePointSet.h:122
TEvePointSet::~TEvePointSet
virtual ~TEvePointSet()
Destructor.
Definition: TEvePointSet.cxx:103
TSelectorDraw::GetDimension
virtual Int_t GetDimension() const
Definition: TSelectorDraw.h:82
TMath
TMath.
Definition: TMathBase.h:35
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
TArray::GetSize
Int_t GetSize() const
Definition: TArray.h:47
TArrayI
Definition: TArrayI.h:27
TEvePointSetArray::fCurMin
Double_t fCurMin
Definition: TEvePointSet.h:122
int
TEvePointSetArray
Definition: TEvePointSet.h:107
TEvePointSetArray::SetMarkerStyle
virtual void SetMarkerStyle(Style_t mstyle=1)
Set marker style, propagate to children.
Definition: TEvePointSet.cxx:500
Size_t
float Size_t
Definition: RtypesCore.h:87