42static const char *kAxisFont =
"LiberationSerif-Regular";
55void pa_distortion(
float d)
58 for (
auto mng : {gPaRPhi, gPaRhoZ}) {
61 mng->GetProjection()->SetDistortion(
d);
63 mng->ProjectChildren();
74 b->SetShape(
new TGeoTube(kR_min, kR_max, kZ_d));
76 b->SetMainTransparency(60);
78 holder->AddElement(
b);
81 for (
int i = 0; i < 4; ++i) {
83 jet->SetCylinder(2 * kR_max, 2 * kZ_d);
84 jet->AddEllipticCone(
r.Uniform(-2.5, 2.5),
r.Uniform(0,
TMath::TwoPi()),
r.Uniform(0.05, 0.2),
85 r.Uniform(0.05, 0.25));
86 jet->SetFillColor(
kPink - 8);
88 holder->AddElement(jet);
91 eveMng->GetEventScene()->AddElement(holder);
100 auto scene = eveMng->SpawnNewScene(
Form(
"%s Scene",
name),
name);
102 mng->ImportElements(content, scene);
107 scene->AddElement(mng);
109 auto ovl = eveMng->SpawnNewScene(
Form(
"%s Axis",
name),
name);
110 ovl->SetIsOverlay(
true);
113 axis->SetFontSize(0.022);
114 axis->SetFont(kAxisFont);
115 ovl->AddElement(axis);
121 auto mkbtn = [&](
const char *label,
Float_t x,
const char *mir) {
124 b->SetFont(kAxisFont);
128 b->SetFontSize(0.034);
131 b->SetTextAlign(REveText::kCenterH, REveText::kBottom);
133 b->SetDrawFrame(
true);
135 b->SetFillAlpha(210);
137 b->SetLineAlpha(255);
138 b->SetLineWidth(0.06);
139 b->SetExtraBorder(0.18);
140 b->SetResizable(
false);
142 b->SetClickAction(mir, mng);
149 mkbtn(
"<<<", 0.26f,
"BumpDistortion(-1)");
150 auto val = mkbtn(
"0.0", 0.50f,
nullptr);
151 mkbtn(
">>>", 0.74f,
"BumpDistortion(1)");
153 axis->SetDistortionLabel(val);
156 auto view = eveMng->SpawnNewViewer(
Form(
"%s View",
name),
"");
157 view->SetCameraType(REveViewer::kCameraOrthoXOY);
158 view->AddScene(scene);
162void projection_axes()
164 auto eveMng = REveManager::Create();
165 eveMng->AllowMultipleRemoteConnections(
false,
false);
169 REveText::AssertSdfFont(kAxisFont, rf + kAxisFont +
".ttf");
171 auto content = makeSceneContent(eveMng);
173 makeProjectedView(eveMng, content, REveProjection::kPT_RPhi,
"RPhi", gPaRPhi, gPaAxisRPhi);
174 makeProjectedView(eveMng, content, REveProjection::kPT_RhoZ,
"RhoZ", gPaRhoZ, gPaAxisRhoZ);
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
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 GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Base class for REveUtil visualization elements, providing hierarchy management, rendering control and...
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given.
RAII guard for locking Eve manager (ctor) and processing changes (dtor).
Central application manager for web-based REve.
Scales and tick labels for a projected view, the REve counterpart of TEveProjectionAxes.
Manager class for steering of projections and managing projected objects.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
This is the base class for the ROOT Random number generators.
Namespace for ROOT features in testing.
constexpr Double_t TwoPi()