Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Detailed Description

#include "TRandom.h"
const Double_t kR_min = 240;
const Double_t kR_max = 250;
const Double_t kZ_d = 300;
using namespace ROOT::Experimental;
{
for (int i = 0; i < N_Jets; i++) {
auto jet = new REveJetCone(Form("Jet_%d", i));
jet->SetCylinder(2 * kR_max, 2 * kZ_d);
jet->AddEllipticCone(r.Uniform(-0.5, 0.5), r.Uniform(0, TMath::TwoPi()), 0.1, 0.2);
jet->SetFillColor(kPink - 8);
jet->SetLineColor(kViolet - 7);
jetHolder->AddElement(jet);
}
}
{
auto eveMng = REveManager::Create();
eveMng->AllowMultipleRemoteConnections(false, false);
// openui5 theme
gEnv->SetValue("WebGui.DarkMode", "yes");
// default viewer, event scene
eveMng->GetDefaultViewer()->SetBlackBackground(true);
eveMng->GetEventScene()->AddElement(jetHolder);
// projected view
auto view = eveMng->SpawnNewViewer("RPhiView", "");
view->SetBlackBackground(true);
view->SetCameraType(REveViewer::kCameraOrthoXOY);
auto eventScene = eveMng->SpawnNewScene("RPZScene");
view->AddScene(eventScene);
view->SetMandatory(false);
auto mngRhoZ = new REveProjectionManager(REveProjection::kPT_RhoZ);
mngRhoZ->ImportElements(jetHolder, eventScene);
auto text = new REveText();
text->SetText("Single View");
text->SetTextColor(kWhite);
text->SetPosition(REveVector(0.02, 0.9, 0.2));
text->SetFontSize(0.05);
text->SetFont("LiberationSerif-Regular");
text->SetFillAlpha(228);
std::string rf_dir = gSystem->ExpandPathName("${ROOTSYS}/fonts/");
text->AssertSdfFont("LiberationSerif-Regular", rf_dir + "LiberationSerif-Regular.ttf");
eventScene->AddElement(text);
// append ?Single=RPhiView"
std::string url = eveMng->GetWebWindow()->GetUrl();
url += "?Single=RPhiView";
std::cout << "Single view URL" << url << "\n";
args.SetUrlOpt("Single=RPhiView");
eveMng->GetWebWindow()->Show();
eveMng->GetWebWindow()->Show(args);
}
double Double_t
Double 8 bytes.
Definition RtypesCore.h:74
@ kPink
Definition Rtypes.h:68
@ kWhite
Definition Rtypes.h:66
@ kViolet
Definition Rtypes.h:68
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TEnv * gEnv
Definition TEnv.h:126
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
Option_t Option_t TPoint TPoint const char text
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
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
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.
Manager class for steering of projections and managing projected objects.
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
RWebDisplayArgs & SetUrlOpt(const std::string &opt)
set window url options
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Definition TEnv.cxx:752
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Definition TSystem.cxx:1289
Namespace for ROOT features in testing.
Definition TROOT.h:100
constexpr Double_t TwoPi()
Definition TMath.h:47
Author
Alja Mrak-Tadel

Definition in file single_dark.C.