Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
eveGeoBrowser.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve_7
3///
4/// \macro_code
5///
6/// \author Alja Mrak-Tadel
7
10#include <ROOT/REveManager.hxx>
11
12#include <set>
13#include <vector>
14#include <iostream>
15
16using namespace ROOT::Experimental;
17const Double_t kR_min = 240;
18const Double_t kR_max = 250;
19const Double_t kZ_d = 300;
20
22{
23 TRandom &r = *gRandom;
24
25 for (int i = 0; i < N_Jets; i++) {
26 auto jet = new REveJetCone(Form("Jet_%d", i));
27 jet->SetCylinder(2 * kR_max, 2 * kZ_d);
28 jet->AddEllipticCone(r.Uniform(-0.5, 0.5), r.Uniform(0, TMath::TwoPi()), 0.1, 0.2);
29 jet->SetFillColor(kPink - 8);
30 jet->SetLineColor(kViolet - 7);
31
32 jetHolder->AddElement(jet);
33 }
34}
35
36void eveGeoBrowser()
37{
38 auto eveMng = REveManager::Create();
39 // eveMng->AllowMultipleRemoteConnections(false, false);
40
42
43 // initialize RGeomDesc from TGeoNode
44 auto data = new REveGeoTopNodeData("http://xrd-cache-1.t2.ucsd.edu/alja/mail/geo/cmsSimGeo2026.root");
45 data->InitPath("/tracker:Tracker_1");
46 data->RefDescription().SetVisLevel(2);
47
48 // make geoTable
49 auto scene = eveMng->SpawnNewScene("GeoSceneTable");
50 auto view = eveMng->SpawnNewViewer("GeoTable");
51 view->AddScene(scene);
52 scene->AddElement(data);
53
54 // 3D EveViz representation
55 auto geoViz = new REveGeoTopNodeViz();
56 geoViz->SetGeoData(data);
57 data->AddNiece(geoViz);
58 geoViz->SetPickable(true);
59
60 // add jets for BBox issues
61 eveMng->GetEventScene()->AddElement(geoViz);
62 REveElement *jetHolder = new REveElement("Jets");
63 eveMng->GetEventScene()->AddElement(jetHolder);
65
66 eveMng->Show();
67}
double Double_t
Double 8 bytes.
Definition RtypesCore.h:74
@ kPink
Definition Rtypes.h:68
@ kViolet
Definition Rtypes.h:68
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TRandom * gRandom
Definition TRandom.h:73
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2570
Base class for REveUtil visualization elements, providing hierarchy management, rendering control and...
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given.
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
Definition TFile.cxx:4338
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
Namespace for ROOT features in testing.
Definition TROOT.h:100
constexpr Double_t TwoPi()
Definition TMath.h:47