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();
67 for (
auto ax : {gPaAxisRPhi, gPaAxisRhoZ}) {
71 ax->UpdateDistortionLabel();
82 b->SetShape(
new TGeoTube(kR_min, kR_max, kZ_d));
84 b->SetMainTransparency(60);
86 holder->AddElement(
b);
89 for (
int i = 0; i < 4; ++i) {
91 jet->SetCylinder(2 * kR_max, 2 * kZ_d);
92 jet->AddEllipticCone(
r.Uniform(-2.5, 2.5),
r.Uniform(0,
TMath::TwoPi()),
r.Uniform(0.05, 0.2),
93 r.Uniform(0.05, 0.25));
94 jet->SetFillColor(
kPink - 8);
96 holder->AddElement(jet);
99 eveMng->GetEventScene()->AddElement(holder);
108 auto scene = eveMng->SpawnNewScene(
Form(
"%s Scene",
name),
name);
110 mng->ImportElements(content, scene);
115 eveMng->GetWorld()->AddElement(mng);
117 auto ovl = eveMng->SpawnNewScene(
Form(
"%s Axis",
name),
name);
118 ovl->SetIsOverlay(
true);
121 axis->SetFontSize(0.022);
122 axis->SetFont(kAxisFont);
123 ovl->AddElement(axis);
129 auto mkbtn = [&](
const char *label,
Float_t x,
const char *mir) {
132 b->SetFont(kAxisFont);
136 b->SetFontSize(0.034);
139 b->SetTextAlign(REveText::kCenterH, REveText::kBottom);
141 b->SetDrawFrame(
true);
143 b->SetFillAlpha(210);
145 b->SetLineAlpha(255);
146 b->SetLineWidth(0.06);
147 b->SetExtraBorder(0.18);
148 b->SetResizable(
false);
150 b->SetClickAction(mir, mng);
157 mkbtn(
"<<<", 0.26f,
"BumpDistortion(-1)");
158 auto val = mkbtn(
"0.0", 0.50f,
nullptr);
159 mkbtn(
">>>", 0.74f,
"BumpDistortion(1)");
161 axis->SetDistortionLabel(val);
164 auto view = eveMng->SpawnNewViewer(
Form(
"%s View",
name),
"");
165 view->SetCameraType(REveViewer::kCameraOrthoXOY);
166 view->AddScene(scene);
170void projection_axes()
172 auto eveMng = REveManager::Create();
173 eveMng->AllowMultipleRemoteConnections(
false,
false);
177 REveText::AssertSdfFont(kAxisFont, rf + kAxisFont +
".ttf");
179 auto content = makeSceneContent(eveMng);
181 makeProjectedView(eveMng, content, REveProjection::kPT_RPhi,
"RPhi", gPaRPhi, gPaAxisRPhi);
182 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()