Logo ROOT  
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 }
jets
void jets()
Definition: jets.C:38
Form
char * Form(const char *fmt,...)
kR_max
const Double_t kR_max
Definition: jets.C:18
ROOT::Experimental::REveManager::Create
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
Definition: REveManager.cxx:696
r
ROOT::R::TRInterface & r
Definition: Object.C:4
kViolet
@ kViolet
Definition: Rtypes.h:67
ROOT::Experimental::REveManager::GetEventScene
REveScene * GetEventScene() const
Definition: REveManager.hxx:146
TRandom.h
kPink
@ kPink
Definition: Rtypes.h:67
eveMng
ROOT::Experimental::REveManager * eveMng
Definition: collection_proxies.C:45
ROOT::Experimental::REveElement
Definition: REveElement.hxx:41
ROOT::Experimental::REveJetCone
Definition: REveJetCone.hxx:27
kZ_d
const Double_t kZ_d
Definition: jets.C:19
REveJetCone.hxx
TRandom
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
REveElement.hxx
REveScene.hxx
kR_min
const Double_t kR_min
Definition: jets.C:17
gRandom
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
TMath::TwoPi
constexpr Double_t TwoPi()
Definition: TMath.h:44
makeJets
void makeJets(int N_Jets, REX::REveElement *jetHolder)
Definition: jets.C:21
REveManager.hxx
Double_t
double Double_t
Definition: RtypesCore.h:59
ROOT::Experimental::REveElement::AddElement
virtual void AddElement(REveElement *el)
Add el to the list of children.
Definition: REveElement.cxx:853
ROOT::Experimental::REveManager::Show
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
Definition: REveManager.cxx:961
ROOT::Experimental
Definition: RDirectory.hxx:30