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