Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
jets.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve_7
3/// This example display only points in web browser
4///
5/// \macro_code
6///
7/// \author Alja Mrak-Tadel
8
9#include "TRandom.h"
10#include <ROOT/REveElement.hxx>
11#include <ROOT/REveScene.hxx>
12#include <ROOT/REveManager.hxx>
13#include <ROOT/REveJetCone.hxx>
14
15namespace REX = ROOT::Experimental;
16
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 REX::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 jets()
37{
38 auto eveMng = REX::REveManager::Create();
39
41 eveMng->GetEventScene()->AddElement(jetHolder);
43
44 eveMng->Show();
45}
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 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
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