10const char *esd_geom_file_name =
"http://root.cern/files/alice_ESDgeometry.root";
17 auto pev =
gEve->SpawnNewViewer(
"Projections");
20 auto s =
gEve->SpawnNewScene(
"Projected Geom");
23 auto pgv = pev->GetGLViewer();
32 auto p = mng->GetProjection();
33 p->AddPreScaleEntry(0, 0, 4);
34 p->AddPreScaleEntry(0, 45, 1);
35 p->AddPreScaleEntry(0, 310, 0.5);
36 p->SetUsePreScale(
kTRUE);
40 auto p = mng->GetProjection();
42 p->AddPreScaleEntry(0, 0, 4);
43 p->AddPreScaleEntry(1, 0, 4);
45 p->AddPreScaleEntry(0, 45, 1);
46 p->AddPreScaleEntry(1, 110, 1);
48 p->AddPreScaleEntry(0, 310, 0.5);
49 p->AddPreScaleEntry(1, 250, 0.5);
50 p->SetUsePreScale(
kTRUE);
61 auto geom =
TFile::Open(esd_geom_file_name,
"CACHEREAD");
69 gEve->AddGlobalElement(gsre);
70 mng->ImportElements(gsre);
74 for (
Int_t i = 0; i < 160; ++i)
75 line->SetNextPoint(120 *
sin(0.2 * i), 120 *
cos(0.2 * i), 80 - i);
77 mng->ImportElements(
line);
84 auto sev =
gEve->SpawnNewViewer(
"Scaled 3D");
86 auto sp = smng->GetProjection();
87 sp->SetUsePreScale(
kTRUE);
88 sp->AddPreScaleEntry(2, 0, 1);
89 sp->AddPreScaleEntry(2, 100, 0.2);
91 auto ss =
gEve->SpawnNewScene(
"Scaled Geom");
95 smng->ImportElements(gsre);
99 gEve->GetBrowser()->GetTabRight()->SetTab(1);
int Int_t
Signed integer 4 bytes (int).
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=nullptr)
Import a shape extract 'gse' under element 'parent'.
An arbitrary polyline with fixed line and marker attributes.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
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.
Orthographic projection camera.
void SetZoomMinMax(Double_t min, Double_t max)
void projection_prescale(std::string type="RPhi")
RVec< PromoteType< T > > cos(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)