Logo ROOT   6.19/01
Reference Guide
jets.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve7
3 /// This example display only points in web browser
4 ///
5 /// \macro_code
6 ///
7 
8 #include "TRandom.h"
9 #include <ROOT/REveElement.hxx>
10 #include <ROOT/REveScene.hxx>
11 #include <ROOT/REveManager.hxx>
12 #include <ROOT/REveJetCone.hxx>
13 
14 
15 namespace REX = ROOT::Experimental;
16 
17 const Double_t kR_min = 240;
18 const Double_t kR_max = 250;
19 const Double_t kZ_d = 300;
20 
21 void makeJets(int N_Jets, REX::REveElement *jetHolder)
22 {
23  TRandom &r = *gRandom;
24 
25  for (int i = 0; i < N_Jets; i++)
26  {
27  auto jet = new REX::REveJetCone(Form("Jet_%d",i ));
28  jet->SetCylinder(2*kR_max, 2*kZ_d);
29  jet->AddEllipticCone(r.Uniform(-0.5, 0.5), r.Uniform(0, TMath::TwoPi()),
30  0.1, 0.2);
31  jet->SetFillColor(kPink - 8);
32  jet->SetLineColor(kViolet - 7);
33 
34  jetHolder->AddElement(jet);
35  }
36 }
37 
38 void jets()
39 {
41 
42  REX::REveElement *jetHolder = new REX::REveElement("Jets");
43  eveMng->GetEventScene()->AddElement(jetHolder);
44  makeJets(7, jetHolder);
45 
46  eveMng->Show();
47 }
constexpr Double_t TwoPi()
Definition: TMath.h:45
const Double_t kR_min
Definition: jets.C:17
void jets()
Definition: jets.C:38
Definition: Rtypes.h:65
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
REveScene * GetEventScene() const
virtual void AddElement(REveElement *el)
Add el to the list of children.
const Double_t kZ_d
Definition: jets.C:19
void makeJets(int N_Jets, REX::REveElement *jetHolder)
Definition: jets.C:21
ROOT::R::TRInterface & r
Definition: Object.C:4
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
char * Form(const char *fmt,...)
const Double_t kR_max
Definition: jets.C:18
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
double Double_t
Definition: RtypesCore.h:55
Definition: Rtypes.h:65
REX::REveManager * eveMng