Logo ROOT  
Reference Guide
collection_proxies.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve7
3 /// This example display collection of ??? in web browser
4 ///
5 /// \macro_code
6 ///
7 
8 
9 #include "ROOT/REveDataTable.hxx"
11 #include "ROOT/REveManager.hxx"
13 #include "ROOT/REveViewContext.hxx"
14 #include <ROOT/REveGeoShape.hxx>
15 #include <ROOT/REveJetCone.hxx>
16 #include <ROOT/REvePointSet.hxx>
19 #include <ROOT/REveScene.hxx>
21 #include <ROOT/REveTableInfo.hxx>
22 #include <ROOT/REveTrack.hxx>
24 #include <ROOT/REveViewer.hxx>
25 #include <ROOT/REveViewContext.hxx>
26 #include <ROOT/REveBoxSet.hxx>
27 #include <ROOT/REveSelection.hxx>
28 #include <ROOT/REveCalo.hxx>
29 
30 #include "TGeoTube.h"
31 #include "TROOT.h"
32 #include "TList.h"
33 #include "TParticle.h"
34 #include "TRandom.h"
35 #include "TApplication.h"
36 #include "TFile.h"
37 #include "TH2F.h"
38 #include <iostream>
39 
40 
41 const Double_t kR_min = 300;
42 const Double_t kR_max = 299;
43 const Double_t kZ_d = 300;
44 
45 
46 namespace fw3dlego {
47  const int xbins_n = 83;
48  const double xbins[xbins_n] = {
49  -5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853,
50  -2.650, -2.500, -2.322, -2.172, -2.043, -1.930, -1.830, -1.740, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218,
51  -1.131, -1.044, -0.957, -0.870, -0.783, -0.696, -0.609, -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, 0.000,
52  0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218,
53  1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853,
54  2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
55 } // namespace fw3dlego
56 
57 
60 using namespace ROOT::Experimental;
61 
62 //==============================================================================
63 //============== EMULATE FRAMEWORK CLASSES =====================================
64 //==============================================================================
65 
66 
67 // a demo class, can be provided from experiment framework
68 class Jet : public TParticle
69 {
70 public:
71  float fEtaSize{0};
72  float fPhiSize{0};
73 
74  float GetEtaSize() const { return fEtaSize; }
75  float GetPhiSize() const { return fPhiSize; }
76  void SetEtaSize(float iEtaSize) { fEtaSize = iEtaSize; }
77  void SetPhiSize(float iPhiSize) { fPhiSize = iPhiSize; }
78 
79  Jet(Int_t pdg, Int_t status, Int_t mother1, Int_t mother2, Int_t daughter1, Int_t daughter2,
80  Double_t px, Double_t py, Double_t pz, Double_t etot) :
81  TParticle(pdg, status, mother1, mother2, daughter1, daughter2, px, py, pz, etot, 0, 0, 0, 0)
82  {}
83 
84  ClassDef(Jet, 1);
85 };
86 
87 class RecHit : public TObject
88 {
89 public:
90  float fX{0};
91  float fY{0};
92  float fZ{0};
93  float fPt{0};
94 
95  RecHit(float pt, float x, float y, float z): fPt(pt), fX(x), fY(y), fZ(z) {}
96  ClassDef(RecHit, 1);
97 };
98 
99 class CaloTower : public TObject
100 {
101 public:
102  float fEta{0};
103  float fPhi{0};
104  float fEt{0};
105 
106  CaloTower(float eta, float phi, float et): fEta(eta), fPhi(phi), fEt(et) {}
107  ClassDef(CaloTower, 1);
108 };
109 
110 class REveCaloTowerSliceSelector : public REveCaloDataSliceSelector
111 {
112 private:
113  REveDataCollection* fCollection{nullptr};
114  REveCaloDataHist* fCaloData{nullptr};
115 
116 public:
117  REveCaloTowerSliceSelector(int s, REveDataCollection* c, REveCaloDataHist* h):REveCaloDataSliceSelector(s), fCollection(c), fCaloData(h) {}
118 
120  void ProcessSelection(REveCaloData::vCellId_t& sel_cells, UInt_t selectionId, Bool_t multi) override
121  {
122  std::set<int> item_set;
124  for (auto &cellId : sel_cells)
125  {
126  fCaloData->GetCellData(cellId, cd);
127 
128  // loop over enire collection and check its eta/phi range
129  for (int t = 0; t < fCollection->GetNItems(); ++t)
130  {
131  CaloTower* tower = (CaloTower*) fCollection->GetDataPtr(t);
132  if (tower->fEta > cd.fEtaMin && tower->fEta < cd.fEtaMax &&
133  tower->fPhi > cd.fPhiMin && tower->fPhi < cd.fPhiMax)
134  item_set.insert(t);
135  }
136  }
137  REveSelection* sel = (REveSelection*)eveMng->FindElementById(selectionId);
138  sel->NewElementPicked(fCollection->GetItemList()->GetElementId(), multi, true, item_set);
139  }
140 
142  void GetCellsFromSecondaryIndices(const std::set<int>& idcs, REveCaloData::vCellId_t& out) override
143  {
144  TH2F* hist = fCaloData->GetHist(GetSliceIndex());
145  std::set<int> cbins;
146  float total = 0;
147  for( auto &i : idcs ) {
148  CaloTower* tower = (CaloTower*)fCollection->GetDataPtr(i);
149  int bin = hist->FindBin(tower->fEta, tower->fPhi);
150  float frac = tower->fEt/hist->GetBinContent(bin);
151  bool ex = false;
152  for (size_t ci = 0; ci < out.size(); ++ci)
153  {
154  if (out[ci].fTower == bin && out[ci].fSlice == GetSliceIndex())
155  {
156  float oldv = out[ci].fFraction;
157  out[ci].fFraction = oldv + frac;
158  ex = true;
159  break;
160  }
161  }
162  if (!ex) {
163  out.push_back(REveCaloData::CellId_t(bin, GetSliceIndex(), frac));
164  }
165  }
166  }
167 };
168 
169 class Event
170 {
171 public:
172  int eventId{0};
173  int N_tracks{0};
174  int N_jets{0};
175  std::vector<TList*> fListData;
176 
177  REveCaloDataHist* fCaloData{nullptr};
178 
179  Event()
180  {
181  auto baseHist = new TH2F("dummy", "dummy", fw3dlego::xbins_n - 1, fw3dlego::xbins, 72, -TMath::Pi(), TMath::Pi());
182  fCaloData = new REveCaloDataHist();
183  fCaloData->AddHistogram(baseHist);
184 
185  auto selector = new REveCaloDataSelector();
186  fCaloData->SetSelector(selector);
187 
188  eveMng->GetEventScene()->AddElement(fCaloData);
189  }
190 
191  void MakeJets(int N)
192  {
193  TRandom &r = *gRandom;
194  r.SetSeed(0);
195  TList* list = new TList();
196  list->SetName("Jets");
197  for (int i = 1; i <= N; ++i)
198  {
199  double pt = r.Uniform(0.5, 10);
200  double eta = r.Uniform(-2.55, 2.55);
201  double phi = r.Uniform(-TMath::Pi(), TMath::Pi());
202 
203  double px = pt * std::cos(phi);
204  double py = pt * std::sin(phi);
205  double pz = pt * (1. / (std::tan(2*std::atan(std::exp(-eta)))));
206 
207  auto jet = new Jet(0, 0, 0, 0, 0, 0, px, py, pz, std::sqrt(px*px + py*py + pz*pz + 80*80));
208  jet->SetEtaSize(r.Uniform(0.02, 0.2));
209  jet->SetPhiSize(r.Uniform(0.01, 0.3));
210  list->Add(jet);
211  }
212  fListData.push_back(list);
213  }
214 
215  void MakeParticles(int N)
216  {
217  TRandom &r = *gRandom;
218  r.SetSeed(0);
219  TList* list = new TList();
220  list->SetName("Tracks");
221  for (int i = 1; i <= N; ++i)
222  {
223  double pt = r.Uniform(0.5, 10);
224  double eta = r.Uniform(-2.55, 2.55);
225  double phi = r.Uniform(0, TMath::TwoPi());
226 
227  double px = pt * std::cos(phi);
228  double py = pt * std::sin(phi);
229  double pz = pt * (1. / (std::tan(2*std::atan(std::exp(-eta)))));
230 
231  // printf("Event::MakeParticles %2d: pt=%.2f, eta=%.2f, phi=%.2f\n", i, pt, eta, phi);
232  auto particle = new TParticle(0, 0, 0, 0, 0, 0,
233  px, py, pz, std::sqrt(px*px + py*py + pz*pz + 80*80),
234  0, 0, 0, 0 );
235 
236  int pdg = 11 * (r.Integer(2) > 0 ? 1 : -1);
237  particle->SetPdgCode(pdg);
238 
239  list->Add(particle);
240  }
241  fListData.push_back(list);
242  }
243 
244  void MakeRecHits(int N)
245  {
246  TRandom &r = *gRandom;
247  r.SetSeed(0);
248  TList* list = new TList();
249  list->SetName("RecHits");
250 
251  for (int i = 1; i <= N; ++i)
252  {
253  float pt = r.Uniform(0.5, 10);
254  float x = r.Uniform(-200, 200);
255  float y = r.Uniform(-200, 200);
256  float z = r.Uniform(-500, 500);
257  auto rechit = new RecHit(pt, x, y, z);
258  list->Add(rechit);
259  }
260  fListData.push_back(list);
261  }
262 
263  void Clear()
264  {
265  for (auto &l : fListData)
266  delete l;
267  fListData.clear();
268  }
269 
270  void Create()
271  {
272  Clear();
273  MakeJets(4);
274  MakeParticles(100);
275  MakeRecHits(20);
276 
277  // refill calo data from jet list
278  TList* jlist = fListData[0];
279  TList* elist = new TList();
280  elist->SetName("ECAL");
281  fListData.push_back(elist);
282  TList* hlist = new TList();
283  hlist->SetName("HCAL");
284  fListData.push_back(hlist);
285  for (int i = 0; i <= jlist->GetLast(); ++i) {
286  const Jet* j = (Jet*)jlist->At(i);
287  float offX = j->Eta();
288  float offY = j->Phi() > TMath::Pi() ? j->Phi() - TMath::TwoPi() : j->Phi();
289  for (int k=0; k<20; ++k) {
290  double x, y, v;
291  x = gRandom->Uniform(-j->GetEtaSize(), j->GetEtaSize());
292  y = gRandom->Uniform(-j->GetPhiSize(),j->GetPhiSize());
293  v = j->Pt();
294  auto etower = new CaloTower(offX + x, offY + y, v + gRandom->Uniform(2,3));
295  elist->Add(etower);
296  auto htower = new CaloTower(offX + x, offY + y, v + gRandom->Uniform(1,2));
297  hlist->Add(htower);
298  }
299  }
300  fCaloData->DataChanged();
301  eventId++;
302  }
303 };
304 
305 
306 //==============================================================================
307 //== PROXY BUILDERS ============================================================
308 //==============================================================================
309 
310 class JetProxyBuilder: public REveDataSimpleProxyBuilderTemplate<Jet>
311 {
312  bool HaveSingleProduct() const override { return false; }
313 
315 
316  void BuildViewType(const Jet& dj, int idx, REveElement* iItemHolder,
317  std::string viewType, const REveViewContext* context) override
318  {
319  auto jet = new REveJetCone();
320  jet->SetCylinder(context->GetMaxR(), context->GetMaxZ());
321  jet->AddEllipticCone(dj.Eta(), dj.Phi(), dj.GetEtaSize(), dj.GetPhiSize());
322  SetupAddElement(jet, iItemHolder, true);
323  jet->SetLineColor(jet->GetMainColor());
324 
325  float size = 50.f * dj.Pt(); // values are saved in scale
326  double theta = dj.Theta();
327  // printf("%s jet theta = %f, phi = %f \n", iItemHolder->GetCName(), theta, dj.Phi());
328  double phi = dj.Phi();
329 
330 
331  if (viewType == "Projected" )
332  {
333  static const float_t offr = 6;
334  float r_ecal = context->GetMaxR() + offr;
335  float z_ecal = context->GetMaxZ() + offr;
336 
337  float transAngle = abs(atan(r_ecal/z_ecal));
338  double r = 0;
339  bool debug = false;
340  if (theta < transAngle || 3.14-theta < transAngle)
341  {
342  z_ecal = context->GetMaxZ() + offr/transAngle;
343  r = z_ecal/fabs(cos(theta));
344  }
345  else
346  {
347  debug = true;
348  r = r_ecal/sin(theta);
349  }
350 
351  REveVector p1(0, (phi<TMath::Pi() ? r*fabs(sin(theta)) : -r*fabs(sin(theta))), r*cos(theta));
352  REveVector p2(0, (phi<TMath::Pi() ? (r+size)*fabs(sin(theta)) : -(r+size)*fabs(sin(theta))), (r+size)*cos(theta));
353 
354  auto marker = new REveScalableStraightLineSet("jetline");
355  marker->SetScaleCenter(p1.fX, p1.fY, p1.fZ);
356  marker->AddLine(p1, p2);
357  marker->SetLineWidth(4);
358  if (debug)
359  marker->AddMarker(0, 0.9);
360 
361  SetupAddElement(marker, iItemHolder, true);
362  marker->SetName(Form("line %s %d", Collection()->GetCName(), idx));
363  }
364  }
365 
366 
368 
369  void LocalModelChanges(int idx, REveElement* el, const REveViewContext* ctx) override
370  {
371  // printf("LocalModelChanges jet %s ( %s )\n", el->GetCName(), el->FirstChild()->GetCName());
372  REveJetCone* cone = dynamic_cast<REveJetCone*>(el->FirstChild());
373  cone->SetLineColor(cone->GetMainColor());
374  }
375 };
376 
377 
378 class TParticleProxyBuilder : public REveDataSimpleProxyBuilderTemplate<TParticle>
379 {
381 
382  void Build(const TParticle& p, int idx, REveElement* iItemHolder, const REveViewContext* context) override
383  {
384  const TParticle *x = &p;
385  auto track = new REveTrack((TParticle*)(x), 1, context->GetPropagator());
386  track->MakeTrack();
387  SetupAddElement(track, iItemHolder, true);
388  }
389 };
390 
391 class RecHitProxyBuilder: public REveDataProxyBuilderBase
392 {
393 private:
394  void buildBoxSet(REveBoxSet* boxset) {
395  auto collection = Collection();
396  boxset->SetMainColor(collection->GetMainColor());
397  boxset->Reset(REveBoxSet::kBT_FreeBox, true, collection->GetNItems());
398  TRandom r(0);
399 #define RND_BOX(x) (Float_t)r.Uniform(-(x), (x))
400  for (int h = 0; h < collection->GetNItems(); ++h)
401  {
402  RecHit* hit = (RecHit*)collection->GetDataPtr(h);
403  const REveDataItem* item = Collection()->GetDataItem(h);
404 
405  if (!item->GetVisible())
406  continue;
407  Float_t x = hit->fX;
408  Float_t y = hit->fY;
409  Float_t z = hit->fZ;
410  Float_t a = hit->fPt;
411  Float_t d = 0.05;
412  Float_t verts[24] = {
413  x - a + RND_BOX(d), y - a + RND_BOX(d), z - a + RND_BOX(d),
414  x - a + RND_BOX(d), y + a + RND_BOX(d), z - a + RND_BOX(d),
415  x + a + RND_BOX(d), y + a + RND_BOX(d), z - a + RND_BOX(d),
416  x + a + RND_BOX(d), y - a + RND_BOX(d), z - a + RND_BOX(d),
417  x - a + RND_BOX(d), y - a + RND_BOX(d), z + a + RND_BOX(d),
418  x - a + RND_BOX(d), y + a + RND_BOX(d), z + a + RND_BOX(d),
419  x + a + RND_BOX(d), y + a + RND_BOX(d), z + a + RND_BOX(d),
420  x + a + RND_BOX(d), y - a + RND_BOX(d), z + a + RND_BOX(d) };
421  boxset->AddBox(verts);
422  boxset->DigitId(h);
423  boxset->DigitColor(item->GetVisible() ? collection->GetMainColor() : 0); // set color on the last one
424  }
425  boxset->GetPlex()->Refit();
426  boxset->StampObjProps();
427  }
428 
429 public:
431  void Build(const REveDataCollection* collection, REveElement* product, const REveViewContext*)override
432  {
433  // printf("-------------------------FBOXSET proxy builder %d \n", collection->GetNItems());
434  auto boxset = new REveBoxSet();
435  boxset->SetName(collection->GetCName());
436  boxset->SetAlwaysSecSelect(1);
437  boxset->SetDetIdsAsSecondaryIndices(true);
438  boxset->SetSelectionMaster(((REveDataCollection*)collection)->GetItemList());
439  buildBoxSet(boxset);
440  product->AddElement(boxset);
441  }
442 
444  void FillImpliedSelected(REveElement::Set_t& impSet, Product* p) override
445  {
446  // printf("RecHit fill implioed ----------------- !!!%zu\n", Collection()->GetItemList()->RefSelectedSet().size());
447  impSet.insert(p->m_elements->FirstChild());
448  }
449 
451  void ModelChanges(const REveDataCollection::Ids_t& ids, Product* product) override
452  {
453  // We know there is only one element in this product
454  // printf("RecHitProxyBuilder::model changes %zu\n", ids.size());
455  buildBoxSet((REveBoxSet*)product->m_elements->FirstChild());
456  }
457 }; // RecHitProxyBuilder
458 
459 
460 class CaloTowerProxyBuilder: public REveDataProxyBuilderBase
461 {
462 private:
463  REveCaloDataHist* fCaloData {nullptr};
464  TH2F* fHist {nullptr};
465  int fSliceIndex {-1};
466 
467  void assertSlice() {
468  if (!fHist) {
469  Bool_t status = TH1::AddDirectoryStatus();
470 
471  TH1::AddDirectory(kFALSE); //Keeps histogram from going into memory
472  fHist = new TH2F("caloHist", "caloHist", fw3dlego::xbins_n - 1, fw3dlego::xbins, 72, -M_PI, M_PI);
473  TH1::AddDirectory(status);
474  fSliceIndex = fCaloData->AddHistogram(fHist);
475 
476  fCaloData->RefSliceInfo(fSliceIndex)
477  .Setup(Collection()->GetCName(),
478  0.,
479  Collection()->GetMainColor(),
480  Collection()->GetMainTransparency());
481 
482  fCaloData->GetSelector()->AddSliceSelector(std::unique_ptr<REveCaloDataSliceSelector>
483  (new REveCaloTowerSliceSelector(fSliceIndex, Collection(), fCaloData)));
484  }
485  }
486 
487 public:
488  CaloTowerProxyBuilder(REveCaloDataHist* cd) : fCaloData(cd) {}
489 
491  void Build(const REveDataCollection* collection, REveElement* product, const REveViewContext*)override
492  {
493  assertSlice();
494  fHist->Reset();
495  if (collection->GetRnrSelf())
496  {
497  fCaloData->RefSliceInfo(fSliceIndex)
498  .Setup(Collection()->GetCName(),
499  0.,
500  Collection()->GetMainColor(),
501  Collection()->GetMainTransparency());
502 
503 
504  for (int h = 0; h < collection->GetNItems(); ++h)
505  {
506  CaloTower* tower = (CaloTower*)collection->GetDataPtr(h);
507  const REveDataItem* item = Collection()->GetDataItem(h);
508 
509  if (!item->GetVisible())
510  continue;
511  fHist->Fill(tower->fEta, tower->fPhi, tower->fEt);
512  }
513  }
514  fCaloData->DataChanged();
515  }
516 
518  void FillImpliedSelected(REveElement::Set_t& impSet, Product*) override
519  {
520  fCaloData->GetSelector()->SetActiveSlice(fSliceIndex);
521  impSet.insert(fCaloData);
522  fCaloData->FillImpliedSelectedSet(impSet);
523  }
524 
526  void ModelChanges(const REveDataCollection::Ids_t& ids, Product* product) override
527  {
528  Build();
529  }
530 
531 }; // CaloTowerProxyBuilder
532 
533 //==============================================================================
534 //== COLLECTION MANGER ================================================================
535 //==============================================================================
536 
537 class CollectionManager
538 {
539 private:
540  Event *fEvent{nullptr};
541 
542  std::vector<REveScene *> m_scenes;
543  REveViewContext *m_viewContext {nullptr};
544 
545  std::vector<REveDataProxyBuilderBase *> m_builders;
546 
547  REveScene *m_collections {nullptr};
548  bool m_inEventLoading {false};
549 
550 public:
551  CollectionManager(Event* event) : fEvent(event)
552  {
553  //view context
554  float r = 300;
555  float z = 300;
556  auto prop = new REveTrackPropagator();
557  prop->SetMagFieldObj(new REveMagFieldDuo(350, 3.5, -2.0));
558  prop->SetMaxR(r);
559  prop->SetMaxZ(z);
560  prop->SetMaxOrbs(6);
561  prop->IncRefCount();
562 
563  m_viewContext = new REveViewContext();
564  m_viewContext->SetBarrel(r, z);
565  m_viewContext->SetTrackPropagator(prop);
566 
567  // table specs
568  auto tableInfo = new REveTableViewInfo();
569 
570  tableInfo->table("TParticle").
571  column("pt", 1, "i.Pt()").
572  column("eta", 3, "i.Eta()").
573  column("phi", 3, "i.Phi()");
574 
575  tableInfo->table("Jet").
576  column("eta", 1, "i.Eta()").
577  column("phi", 1, "i.Phi()").
578  column("etasize", 2, "i.GetEtaSize()").
579  column("phisize", 2, "i.GetPhiSize()");
580 
581  tableInfo->table("RecHit").
582  column("pt", 1, "i.fPt");
583 
584  tableInfo->table("CaloTower").
585  column("eta", 3, "i.fEta").
586  column("phi", 3, "i.fPhi").
587  column("Et", 3, "i.fEt");
588 
589  m_viewContext->SetTableViewInfo(tableInfo);
590 
591  for (auto &c : eveMng->GetScenes()->RefChildren()) {
592  if (c != eveMng->GetGlobalScene() && strncmp(c->GetCName(), "Geometry", 8) )
593  {
594  m_scenes.push_back((REveScene*)c);
595  }
596  if (!strncmp(c->GetCName(),"Table", 5))
597  c->AddElement(m_viewContext->GetTableViewInfo());
598 
599  }
600 
601  m_collections = eveMng->SpawnNewScene("Collections", "Collections");
602  }
603 
604  void SetDataItemsFromEvent(REveDataCollection* collection)
605  {
606  for (auto &l : fEvent->fListData) {
607  TIter next(l);
608  if (collection->GetName() == std::string(l->GetName()))
609  {
610  collection->ClearItems();
611 
612  for (int i = 0; i <= l->GetLast(); ++i)
613  {
614  std::string cname = collection->GetName();
615  auto len = cname.size();
616  char end = cname[len-1];
617  if (end == 's') {
618  cname = cname.substr(0, len-1);
619  }
620  TString pname(Form("%s %2d", cname.c_str(), i));
621  collection->AddItem(l->At(i), pname.Data(), "");
622  }
623  }
624  collection->ApplyFilter();
625  }
626  }
627 
628  void LoadEvent()
629  {
630  m_inEventLoading = true;
631 
632  for (auto &el: m_collections->RefChildren())
633  {
634  auto c = dynamic_cast<REveDataCollection *>(el);
635  SetDataItemsFromEvent(c);
636  }
637 
638  for (auto proxy : m_builders)
639  {
640  proxy->Build();
641  }
642 
643  fEvent->fCaloData->DataChanged();
644  m_inEventLoading = false;
645  }
646 
647  void addCollection(REveDataCollection* collection, REveDataProxyBuilderBase* glBuilder, bool showInTable = false)
648  {
649  m_collections->AddElement(collection);
650 
651  // load data
652  SetDataItemsFromEvent(collection);
653  glBuilder->SetCollection(collection);
654  glBuilder->SetHaveAWindow(true);
655  for (auto scene : m_scenes)
656  {
657  REveElement *product = glBuilder->CreateProduct(scene->GetTitle(), m_viewContext);
658 
659  if (strncmp(scene->GetCName(), "Tables", 5) == 0) continue;
660 
661  if (!strncmp(scene->GetCTitle(), "Projected", 8))
662  {
663  g_projMng->ImportElements(product, scene);
664  }
665  else
666  {
667  scene->AddElement(product);
668  }
669  }
670  m_builders.push_back(glBuilder);
671  glBuilder->Build();
672 
673  // Tables
674  auto tableBuilder = new REveTableProxyBuilder();
675  tableBuilder->SetHaveAWindow(true);
676  tableBuilder->SetCollection(collection);
677  REveElement* tablep = tableBuilder->CreateProduct("table-type", m_viewContext);
678  auto tableMng = m_viewContext->GetTableViewInfo();
679  if (showInTable)
680  {
681  tableMng->SetDisplayedCollection(collection->GetElementId());
682  }
683 
684  for (auto s : m_scenes)
685  {
686  if (strncmp(s->GetCTitle(), "Table", 5) == 0)
687  {
688  s->AddElement(tablep);
689  tableBuilder->Build(collection, tablep, m_viewContext );
690  }
691  }
692  tableMng->AddDelegate([=]() { tableBuilder->ConfigChanged(); });
693  m_builders.push_back(tableBuilder);
694 
695 
696  // set tooltip expression for items
697  auto tableEntries = tableMng->RefTableEntries(collection->GetItemClass()->GetName());
698  int N = TMath::Min(int(tableEntries.size()), 3);
699  for (int t = 0; t < N; t++) {
700  auto te = tableEntries[t];
701  collection->GetItemList()->AddTooltipExpression(te.fName, te.fExpression);
702  }
703 
704  collection->GetItemList()->SetItemsChangeDelegate([&] (REveDataItemList* collection, const REveDataCollection::Ids_t& ids)
705  {
706  this->ModelChanged( collection, ids );
707  });
708  collection->GetItemList()->SetFillImpliedSelectedDelegate([&] (REveDataItemList* collection, REveElement::Set_t& impSelSet)
709  {
710  this->FillImpliedSelected( collection, impSelSet);
711  });
712  }
713 
714  void finishViewCreate()
715  {
716  auto mngTable = m_viewContext->GetTableViewInfo();
717  if (mngTable)
718  {
719  for (auto &el : m_collections->RefChildren())
720  {
721  if (el->GetName() == "Tracks")
722  mngTable->SetDisplayedCollection(el->GetElementId());
723  }
724  }
725  }
726 
727 
728  void ModelChanged(REveDataItemList* itemList, const REveDataCollection::Ids_t& ids)
729  {
730  if (m_inEventLoading) return;
731 
732  for (auto proxy : m_builders)
733  {
734  if (proxy->Collection()->GetItemList() == itemList)
735  {
736  // printf("Model changes check proxy %s: \n", proxy->Type().c_str());
737  proxy->ModelChanges(ids);
738  }
739  }
740  }
741 
742  void FillImpliedSelected(REveDataItemList* itemList, REveElement::Set_t& impSelSet)
743  {
744  if (m_inEventLoading) return;
745 
746  for (auto proxy : m_builders)
747  {
748  if (proxy->Collection()->GetItemList() == itemList)
749  {
750  proxy->FillImpliedSelected(impSelSet);
751  }
752  }
753  }
754 
755 };
756 
757 
758 //==============================================================================
759 //== Event Manager =============================================================
760 //==============================================================================
761 
762 class EventManager : public REveElement
763 {
764 private:
765  Event* fEvent;
766  CollectionManager* fCMng;
767 
768 public:
769  EventManager(Event* e, CollectionManager* m): fEvent(e), fCMng(m) {}
770 
771  virtual ~EventManager() {}
772 
773  virtual void NextEvent()
774  {
778  fEvent->Create();
779  fCMng->LoadEvent();
780  eveMng->EnableRedraw();
781  }
782 };
783 
784 
785 //==============================================================================
786 //== main() ====================================================================
787 //==============================================================================
788 
789 void collection_proxies(bool proj=true)
790 {
792  auto event = new Event();
793  event->Create();
794 
795  // create scenes and views
796  REveScene* rhoZEventScene = nullptr;
797 
798  auto b1 = new REveGeoShape("Barrel 1");
799  b1->SetShape(new TGeoTube(kR_min, kR_max, kZ_d));
800  b1->SetMainColor(kCyan);
802 
803  rhoZEventScene = eveMng->SpawnNewScene("RhoZ Scene","Projected");
805  g_projMng->SetImportEmpty(true);
806 
807  auto rhoZView = eveMng->SpawnNewViewer("RhoZ View");
809  auto pgeoScene = eveMng->SpawnNewScene("Geometry projected");
810  rhoZView->AddScene(pgeoScene);
811  g_projMng->ImportElements(b1, pgeoScene);
812 
813  auto tableScene = eveMng->SpawnNewScene ("Tables", "Tables");
814  auto tableView = eveMng->SpawnNewViewer("Table", "Table View");
815  tableView->AddScene(tableScene);
816 
817  // create event data from list
818  auto collectionMng = new CollectionManager(event);
819 
820  REveDataCollection* trackCollection = new REveDataCollection("Tracks");
821  trackCollection->SetItemClass(TParticle::Class());
822  trackCollection->SetMainColor(kGreen);
823  trackCollection->SetFilterExpr("i.Pt() > 4.1 && std::abs(i.Eta()) < 1");
824  collectionMng->addCollection(trackCollection, new TParticleProxyBuilder(), true);
825 
826  REveDataCollection* jetCollection = new REveDataCollection("Jets");
827  jetCollection->SetItemClass(Jet::Class());
828  jetCollection->SetMainColor(kYellow);
829  collectionMng->addCollection(jetCollection, new JetProxyBuilder());
830 
831  REveDataCollection* hitCollection = new REveDataCollection("RecHits");
832  hitCollection->SetItemClass(RecHit::Class());
833  hitCollection->SetMainColor(kOrange + 7);
834  hitCollection->SetFilterExpr("i.fPt > 5");
835  collectionMng->addCollection(hitCollection, new RecHitProxyBuilder());
836 
837  // add calorimeters
838  auto calo3d = new REveCalo3D(event->fCaloData);
839  calo3d->SetBarrelRadius(kR_max);
840  calo3d->SetEndCapPos(kZ_d);
841  calo3d->SetMaxTowerH(300);
842  eveMng->GetEventScene()->AddElement(calo3d);
844 
845  REveDataCollection* ecalCollection = new REveDataCollection("ECAL");
846  ecalCollection->SetItemClass(CaloTower::Class());
847  ecalCollection->SetMainColor(kRed);
848  collectionMng->addCollection(ecalCollection, new CaloTowerProxyBuilder(event->fCaloData));
849 
850  REveDataCollection* hcalCollection = new REveDataCollection("HCAL");
851  hcalCollection->SetItemClass(CaloTower::Class());
852  hcalCollection->SetMainColor(kBlue);
853  collectionMng->addCollection(hcalCollection, new CaloTowerProxyBuilder(event->fCaloData));
854 
855  // event navigation
856  auto eventMng = new EventManager(event, collectionMng);
857  eventMng->SetName("EventManager");
858  eveMng->GetWorld()->AddElement(eventMng);
859 
860  eveMng->GetWorld()->AddCommand("NextEvent", "sap-icon://step", eventMng, "NextEvent()");
861 
862  eveMng->Show();
863 }
ROOT::Experimental::REveViewContext
Definition: REveViewContext.hxx:21
c
#define c(i)
Definition: RSha256.hxx:101
l
auto * l
Definition: textangle.C:4
m
auto * m
Definition: textangle.C:8
ex
Double_t ex[n]
Definition: legend1.C:17
ROOT::Experimental::REveDataProxyBuilderBase::ModelChanges
void ModelChanges(const REveDataCollection::Ids_t &)
Definition: REveDataProxyBuilderBase.cxx:232
ROOT::Experimental::REveDigitSet::DigitId
void DigitId(Int_t n)
Set external id for the last added digit.
Definition: REveDigitSet.cxx:316
ROOT::Experimental::REveDataCollection
Definition: REveDataCollection.hxx:109
ROOT::Experimental::REveDataCollection::Ids_t
std::vector< int > Ids_t
Definition: REveDataCollection.hxx:114
ROOT::Experimental::REveDataItem::GetVisible
Bool_t GetVisible() const
Definition: REveDataCollection.hxx:46
ROOT::Experimental::REveDataItemList
Definition: REveDataCollection.hxx:58
ROOT::Experimental::REveSelection::NewElementPicked
void NewElementPicked(ElementId_t id, bool multi, bool secondary, const std::set< int > &secondary_idcs={})
Definition: REveSelection.cxx:476
e
#define e(i)
Definition: RSha256.hxx:103
ROOT::Experimental::REveDataItemList::AddTooltipExpression
void AddTooltipExpression(const std::string &title, const std::string &expr)
Definition: REveDataCollection.cxx:174
ROOT::Experimental::REveManager::SpawnNewScene
REveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
Definition: REveManager.cxx:210
REveDataTable.hxx
ROOT::Experimental::REveCaloData::CellGeom_t::fPhiMax
Float_t fPhiMax
Definition: REveCaloData.hxx:81
ROOT::Experimental::REveGeoShape
Definition: REveGeoShape.hxx:35
ROOT::Experimental::REveDigitSet::GetPlex
REveChunkManager * GetPlex()
Definition: REveDigitSet.hxx:141
ROOT::Experimental::REveDataCollection::GetItemClass
TClass * GetItemClass() const
Definition: REveDataCollection.hxx:133
TParticle
Description of the dynamic properties of a particle.
Definition: TParticle.h:26
ROOT::Experimental::REveDataCollection::GetDataPtr
void * GetDataPtr(Int_t i) const
Definition: REveDataCollection.hxx:142
ROOT::Experimental::REveBoxSet::AddBox
void AddBox(const Float_t *verts)
Create a new box from a set of 8 vertices.
Definition: REveBoxSet.cxx:114
ROOT::Experimental::REveManager::GetScenes
REveSceneList * GetScenes() const
Definition: REveManager.hxx:142
kGreen
@ kGreen
Definition: Rtypes.h:66
TH2::GetBinContent
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH2.h:88
tan
double tan(double)
TH2F
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
ROOT::Experimental::REveManager::GetHighlight
REveSelection * GetHighlight() const
Definition: REveManager.hxx:140
REveProjectionBases.hxx
ROOT::Experimental::REveDataCollection::ApplyFilter
void ApplyFilter()
Definition: REveDataCollection.cxx:230
ROOT::Experimental::REveSelection::ClearSelection
void ClearSelection()
Clear selection if not empty.
Definition: REveSelection.cxx:619
Form
char * Form(const char *fmt,...)
ROOT::Experimental::REveManager::Create
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
Definition: REveManager.cxx:665
r
ROOT::R::TRInterface & r
Definition: Object.C:4
REveScalableStraightLineSet.hxx
ROOT::Experimental::REveManager::GetEventScene
REveScene * GetEventScene() const
Definition: REveManager.hxx:146
ROOT::Experimental::REveCalo3D
Definition: REveCalo.hxx:156
REveTableInfo.hxx
exp
double exp(double)
TRandom.h
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
ROOT::Experimental::REveCaloData::CellId_t
Definition: REveCaloData.hxx:61
ROOT::Experimental::REveProjectionManager::ImportElements
virtual REveElement * ImportElements(REveElement *el, REveElement *ext_list=nullptr)
Recursively import elements and apply projection to the newly imported objects.
Definition: REveProjectionManager.cxx:251
ROOT::Experimental::REveBoxSet::Reset
void Reset(EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize)
TRandom::Uniform
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition: TRandom.cxx:672
N
#define N
fw3dlego::xbins_n
const int xbins_n
Definition: collection_proxies.C:47
ROOT::Experimental::REveDataProxyBuilderBase::LocalModelChanges
virtual void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx)
Definition: REveDataProxyBuilderBase.cxx:213
kOrange
@ kOrange
Definition: Rtypes.h:67
ROOT::Experimental::REveDigitSet::SetDetIdsAsSecondaryIndices
void SetDetIdsAsSecondaryIndices(Bool_t o)
Definition: REveDigitSet.hxx:124
sin
double sin(double)
x
Double_t x[n]
Definition: legend1.C:17
cos
double cos(double)
TList.h
ROOT::Experimental::REveShape::SetLineColor
virtual void SetLineColor(Color_t c)
Definition: REveShape.hxx:65
ROOT::Experimental::REveViewContext::GetMaxR
float GetMaxR() const
Definition: REveViewContext.hxx:37
REvePointSet.hxx
eveMng
ROOT::Experimental::REveManager * eveMng
Definition: collection_proxies.C:58
TString
Basic string class.
Definition: TString.h:136
ROOT::Experimental::REveElement
Definition: REveElement.hxx:41
ROOT::Experimental::REveCaloDataHist
Definition: REveCaloData.hxx:296
ROOT::Experimental::REveVectorT< Float_t >
ROOT::Experimental::REveElement::SetSelectionMaster
void SetSelectionMaster(REveElement *el)
Definition: REveElement.hxx:294
v
@ v
Definition: rootcling_impl.cxx:3635
TFile.h
ROOT::Experimental::REveElement::GetMainColor
virtual Color_t GetMainColor() const
Definition: REveElement.hxx:229
ROOT::Experimental::REveJetCone
Definition: REveJetCone.hxx:27
bool
ROOT::Experimental::REveTrack
REveTrack Track with given vertex, momentum and optional referece-points (path-marks) along its path.
Definition: REveTrack.hxx:40
ROOT::Experimental::REveDataProxyBuilderBase::FillImpliedSelected
void FillImpliedSelected(REveElement::Set_t &impSet)
Definition: REveDataProxyBuilderBase.cxx:221
ROOT::Experimental::REveScene::AddCommand
void AddCommand(const std::string &name, const std::string &icon, const REveElement *element, const std::string &action)
Definition: REveScene.hxx:121
TROOT.h
ROOT::Experimental::REveElement::FirstChild
REveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Definition: REveElement.cxx:1124
REveDataSimpleProxyBuilderTemplate.hxx
ROOT::Experimental::REveDigitSet::DigitColor
void DigitColor(Color_t ci)
Set color for the last digit added.
Definition: REveDigitSet.cxx:281
TApplication.h
ROOT::Experimental::REveDataProxyBuilderBase::CreateProduct
REveElement * CreateProduct(std::string viewType, const REveViewContext *)
Definition: REveDataProxyBuilderBase.cxx:182
total
static unsigned int total
Definition: TGWin32ProxyDefs.h:40
ROOT::Experimental::REveCaloData::vCellId_t
std::vector< CellId_t > vCellId_t
Definition: REveCaloData.hxx:150
REveJetCone.hxx
ROOT::Experimental::REveCaloData::CellGeom_t::fPhiMin
Float_t fPhiMin
Definition: REveCaloData.hxx:80
TList::At
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Definition: TList.cxx:357
ROOT::Math::fabs
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
Definition: UnaryOperators.h:131
TMath::Pi
constexpr Double_t Pi()
Definition: TMath.h:37
g_projMng
ROOT::Experimental::REveProjectionManager * g_projMng
Definition: collection_proxies.C:59
kCyan
@ kCyan
Definition: Rtypes.h:66
ROOT::Experimental::REveDataProxyBuilderBase::SetHaveAWindow
void SetHaveAWindow(bool)
Definition: REveDataProxyBuilderBase.cxx:324
ROOT::Experimental::REveCaloData::CellData_t
Definition: REveCaloData.hxx:119
ROOT::Experimental::REveMagFieldDuo
REveMagFieldDuo Interface to magnetic field with two different values depending on radius.
Definition: REveTrackPropagator.hxx:80
ROOT::Experimental::REveDataSimpleProxyBuilderTemplate
Definition: REveDataSimpleProxyBuilderTemplate.hxx:22
TRandom
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
ROOT::Experimental::REveElement::GetCName
const char * GetCName() const
Definition: REveElement.hxx:114
ROOT::Experimental::REveScene
Definition: REveScene.hxx:34
ROOT::Experimental::REveDataProxyBuilderBase::Build
void Build()
Definition: REveDataProxyBuilderBase.cxx:68
kZ_d
const Double_t kZ_d
Definition: collection_proxies.C:43
h
#define h(i)
Definition: RSha256.hxx:106
REveTrackPropagator.hxx
ROOT::Experimental::REveBoxSet::kBT_FreeBox
@ kBT_FreeBox
Definition: REveBoxSet.hxx:33
REveScene.hxx
a
auto * a
Definition: textangle.C:12
RND_BOX
#define RND_BOX(x)
REveCalo.hxx
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
ROOT::Experimental::REveDataCollection::SetMainColor
void SetMainColor(Color_t) override
Set main color of the element.
Definition: REveDataCollection.cxx:313
TH1::AddDirectory
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition: TH1.cxx:1277
ROOT::Experimental::REveManager::SpawnNewViewer
REveViewer * SpawnNewViewer(const char *name, const char *title="")
Create a new GL viewer.
Definition: REveManager.cxx:200
ROOT::Experimental::REveSelection
REveSelection Container for selected and highlighted elements.
Definition: REveSelection.hxx:29
REveSelection.hxx
ROOT::Experimental::REveDigitSet::SetMainColor
virtual void SetMainColor(Color_t color) override
Override from REveElement, forward to Frame.
Definition: REveDigitSet.cxx:158
ROOT::Experimental::REveDataItemList::SetFillImpliedSelectedDelegate
void SetFillImpliedSelectedDelegate(std::function< void(REveDataItemList *, Set_t &impSelSet)> handler_func)
Definition: REveDataCollection.hxx:90
gRandom
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
ROOT::Experimental::REveElement::GetRnrSelf
virtual Bool_t GetRnrSelf() const
Definition: REveElement.hxx:211
ROOT::Experimental::REveScalableStraightLineSet
Definition: REveScalableStraightLineSet.hxx:21
ROOT::Experimental::REveDataCollection::SetFilterExpr
void SetFilterExpr(const TString &filter)
Definition: REveDataCollection.cxx:206
kR_min
const Double_t kR_min
Definition: collection_proxies.C:41
ROOT::Experimental::REveChunkManager::Refit
void Refit()
Refit the container so that all current data fits into a single chunk.
Definition: REveChunkManager.cxx:79
TGeoTube
Cylindrical tube class.
Definition: TGeoTube.h:18
REveTrack.hxx
kR_max
const Double_t kR_max
Definition: collection_proxies.C:42
REveTableProxyBuilder.hxx
ROOT::Experimental::REveCaloDataSliceSelector
Definition: REveCaloData.hxx:330
y
Double_t y[n]
Definition: legend1.C:17
REveBoxSet.hxx
sqrt
double sqrt(double)
ROOT::Experimental::REveDataCollection::SetItemClass
void SetItemClass(TClass *cls)
Definition: REveDataCollection.hxx:134
ROOT::Experimental::REveSecondarySelectable::SetAlwaysSecSelect
void SetAlwaysSecSelect(Bool_t f)
Definition: REveSecondarySelectable.hxx:47
ROOT::Experimental::REveProjectionManager::SetImportEmpty
void SetImportEmpty(Bool_t ie)
Definition: REveProjectionManager.hxx:67
ROOT::Experimental::REveElement::RefChildren
List_t & RefChildren()
Definition: REveElement.hxx:162
kRed
@ kRed
Definition: Rtypes.h:66
ROOT::Experimental::REveElement::Set_t
std::set< REveElement * > Set_t
Definition: REveElement.hxx:50
TH2F.h
rhoZView
REX::REveViewer * rhoZView
Definition: event_demo.C:47
ROOT::Experimental::REveDataProxyBuilderBase
Definition: REveDataProxyBuilderBase.hxx:26
TMath::Min
Short_t Min(Short_t a, Short_t b)
Definition: TMathBase.h:180
ROOT::Experimental::REveElement::GetElementId
ElementId_t GetElementId() const
Definition: REveElement.hxx:107
unsigned int
REveGeoShape.hxx
TMath::TwoPi
constexpr Double_t TwoPi()
Definition: TMath.h:44
ROOT::Experimental::REveManager::GetSelection
REveSelection * GetSelection() const
Definition: REveManager.hxx:139
ROOT::Experimental::REveViewContext::GetPropagator
REveTrackPropagator * GetPropagator() const
Definition: REveViewContext.hxx:39
ROOT::Experimental::REveBoxSet
Definition: REveBoxSet.hxx:24
ROOT::Experimental::REveCaloDataSliceSelector::GetCellsFromSecondaryIndices
virtual void GetCellsFromSecondaryIndices(const std::set< int > &idcs, REveCaloData::vCellId_t &out)=0
REveProjectionManager.hxx
ROOT::Experimental::REveDataCollection::AddItem
void AddItem(void *data_ptr, const std::string &n, const std::string &t)
Definition: REveDataCollection.cxx:198
ROOT::Experimental::REveManager::EnableRedraw
void EnableRedraw()
Definition: REveManager.hxx:157
ROOT::Experimental::REveTableProxyBuilder
Definition: REveTableProxyBuilder.hxx:24
ROOT::Experimental::REveTableViewInfo
REveTableViewInfo.
Definition: REveTableInfo.hxx:88
REveManager.hxx
ROOT::Experimental::REveProjection::kPT_RhoZ
@ kPT_RhoZ
Definition: REveProjections.hxx:32
ROOT::Experimental::REveDataCollection::GetItemList
REveDataItemList * GetItemList()
Definition: REveDataCollection.hxx:136
ROOT::Experimental::REveTrackPropagator
REveTrackPropagator Calculates path of a particle taking into account special path-marks and imposed ...
Definition: REveTrackPropagator.hxx:113
ROOT::Experimental::REveElement::StampObjProps
void StampObjProps()
Definition: REveElement.hxx:341
ROOT::Experimental::REveElement::SetName
void SetName(const std::string &name)
Set name of an element.
Definition: REveElement.cxx:222
Double_t
double Double_t
Definition: RtypesCore.h:59
ROOT::Experimental::REveElement::AddElement
virtual void AddElement(REveElement *el)
Add el to the list of children.
Definition: REveElement.cxx:853
ROOT::Experimental::REveCalo2D
Definition: REveCalo.hxx:205
ROOT::Experimental::REveManager::DisableRedraw
void DisableRedraw()
Definition: REveManager.hxx:156
Product
static Double_t Product(const Double_t *x, const Float_t *y)
Product.
Definition: TCTUB.cxx:101
TH1::FindBin
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Definition: TH1.cxx:3676
REveViewContext.hxx
ROOT::Experimental::REveElement::GetName
const std::string & GetName() const
Definition: REveElement.hxx:113
TCollection::SetName
void SetName(const char *name)
Definition: TCollection.h:204
ROOT::Experimental::REveCaloDataSelector
Definition: REveCaloData.hxx:345
ROOT::Experimental::REveDataCollection::GetNItems
Int_t GetNItems() const
Definition: REveDataCollection.hxx:141
M_PI
#define M_PI
Definition: Rotated.cxx:105
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
ROOT::Experimental::REveViewer::AddScene
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
Definition: REveViewer.cxx:56
ROOT::Experimental::REveManager::GetWorld
REveScene * GetWorld() const
Definition: REveManager.hxx:148
ROOT::Experimental::REveManager::Show
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
Definition: REveManager.cxx:924
ROOT::Experimental::REveManager::GetGlobalScene
REveScene * GetGlobalScene() const
Definition: REveManager.hxx:145
kBlue
@ kBlue
Definition: Rtypes.h:66
d
#define d(i)
Definition: RSha256.hxx:102
ROOT::Experimental::REveManager
Definition: REveManager.hxx:44
ROOT::Experimental::REveDataItemList::SetItemsChangeDelegate
void SetItemsChangeDelegate(std::function< void(REveDataItemList *, const std::vector< int > &)> handler_func)
Definition: REveDataCollection.hxx:86
atan
double atan(double)
TIter
Definition: TCollection.h:233
ROOT::Experimental
Definition: RDirectory.hxx:30
fw3dlego
Definition: collection_proxies.C:46
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TH1::AddDirectoryStatus
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
Definition: TH1.cxx:745
TGeoTube.h
Float_t
pt
TPaveText * pt
Definition: entrylist_figure1.C:7
ROOT::Experimental::REveCaloData::CellGeom_t::fEtaMin
Float_t fEtaMin
Definition: REveCaloData.hxx:82
Class
void Class()
Definition: Class.C:29
TSeqCollection::GetLast
virtual Int_t GetLast() const
Returns index of last object in collection.
Definition: TSeqCollection.cxx:47
ROOT::Experimental::REveProjectionManager
REveProjectionManager Manager class for steering of projections and managing projected objects.
Definition: REveProjectionManager.hxx:30
rhoZEventScene
REX::REveScene * rhoZEventScene
Definition: event_demo.C:45
ROOT::Experimental::REveDataProxyBuilderBase::SetCollection
virtual void SetCollection(REveDataCollection *)
Definition: REveDataProxyBuilderBase.cxx:61
REveViewer.hxx
kYellow
@ kYellow
Definition: Rtypes.h:66
ROOT::Experimental::REveCaloData::CellGeom_t::fEtaMax
Float_t fEtaMax
Definition: REveCaloData.hxx:83
ROOT::Experimental::REveDataCollection::ClearItems
void ClearItems()
Definition: REveDataCollection.hxx:127
ROOT::Experimental::REveDataItem
Definition: REveDataCollection.hxx:32
ROOT::Experimental::REveViewContext::GetMaxZ
float GetMaxZ() const
Definition: REveViewContext.hxx:38
ROOT::Experimental::REveManager::FindElementById
REveElement * FindElementById(ElementId_t id) const
Lookup ElementId in element map and return corresponding REveElement*.
Definition: REveManager.cxx:318
TList
A doubly linked list.
Definition: TList.h:44
ROOT::Experimental::REveCaloDataSliceSelector::ProcessSelection
virtual void ProcessSelection(REveCaloData::vCellId_t &sel_cells, UInt_t selectionId, bool multi)=0
fw3dlego::xbins
const double xbins[xbins_n]
Definition: collection_proxies.C:48
TParticle.h
int
collection_proxies
void collection_proxies(bool proj=true)
Definition: collection_proxies.C:789