Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveJetCone.hxx
Go to the documentation of this file.
1// @(#)root/eve7:$Id$
2// Author: Matevz Tadel, Jochen Thaeder 2009, 2018
3
4/*************************************************************************
5 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT7_REveJetCone
13#define ROOT7_REveJetCone
14
15#include <ROOT/REveShape.hxx>
16#include <ROOT/REveVector.hxx>
17
18namespace ROOT {
19namespace Experimental {
20
21//------------------------------------------------------------------------------
22// REveJetCone
23//------------------------------------------------------------------------------
24
25class REveJetCone : public REveShape,
26 public REveProjectable
27{
29
30private:
31 REveJetCone(const REveJetCone &) = delete;
32 REveJetCone &operator=(const REveJetCone &) = delete;
33
34protected:
35 REveVector fApex; // Apex of the cone.
36 REveVector fAxis; // Axis of the cone.
37 REveVector fLimits; // Border of Barrel/Cylinder to cut the cone.
38 Float_t fThetaC; // Transition theta
42
44 REveVector CalcBaseVec(Float_t eta, Float_t phi) const;
45 REveVector CalcBaseVec(Float_t alpha) const;
47
48public:
49 REveJetCone(const Text_t *n = "REveJetCone", const Text_t *t = "");
50 virtual ~REveJetCone() {}
51
52 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
53 void BuildRenderData() override;
54
55 void ComputeBBox() override;
56 TClass *ProjectedClass(const REveProjection *p) const override;
57
58 void SetApex(const REveVector &a) { fApex = a; }
60 {
61 fLimits.Set(0, r, z);
63 }
65 {
66 fLimits.Set(r, 0, 0);
67 fThetaC = 10;
68 }
69
70 Int_t GetNDiv() const { return fNDiv; }
71 void SetNDiv(Int_t n);
72
73 Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length = 0);
75};
76
77
78//------------------------------------------------------------------------------
79// REveJetConeProjected
80//------------------------------------------------------------------------------
81
83 public REveProjected
84{
85private:
88
89protected:
90 void SetDepthLocal(Float_t d) override;
91
92public:
93 REveJetConeProjected(const std::string &n = "REveJetConeProjected", const std::string& t = "");
94 virtual ~REveJetConeProjected();
95
96 void BuildRenderData() override;
97
98 // For TAttBBox:
99 void ComputeBBox() override;
100
101 // Projected:
102 void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
103 void UpdateProjection() override;
104
105 REveElement *GetProjectedAsElement() override { return this; }
106};
107
108} // namespace Experimental
109} // namespace ROOT
110
111#endif
#define d(i)
Definition RSha256.hxx:102
#define a(i)
Definition RSha256.hxx:99
char Text_t
Definition RtypesCore.h:62
float Float_t
Definition RtypesCore.h:57
winID h TVirtualViewer3D TVirtualGLPainter p
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 length
void SetDepthLocal(Float_t d) override
This is virtual method from base-class REveProjected.
void UpdateProjection() override
Re-project the jet-cone.
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
REveJetConeProjected(const REveJetConeProjected &)=delete
void BuildRenderData() override
Crates 3D point array for rendering.
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
REveJetConeProjected & operator=(const REveJetConeProjected &)=delete
void ComputeBBox() override
Compute bounding-box, virtual from TAttBBox.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveJetConeProjected class.
Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0)
Add jet cone.
Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0)
Add jet cone.
void SetNDiv(Int_t n)
Set Number of Divisions.
REveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
REveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill REveVector with eta and phi, magnitude 1.
void SetApex(const REveVector &a)
REveJetCone & operator=(const REveJetCone &)=delete
void SetCylinder(Float_t r, Float_t z)
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
REveJetCone(const REveJetCone &)=delete
void ComputeBBox() override
Compute bounding-box of the data.
void BuildRenderData() override
Crates 3D point array for rendering.
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection Base for specific classes that implement non-linear projections.
void Set(const Float_t *v)
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
const Int_t n
Definition legend1.C:16
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
basic_json<> json