Logo ROOT  
Reference Guide
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 &); // Not implemented
32 REveJetCone &operator=(const REveJetCone &); // Not implemented
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);
74 Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length = 0);
75};
76
77
78//------------------------------------------------------------------------------
79// REveJetConeProjected
80//------------------------------------------------------------------------------
81
83 public REveProjected
84{
85private:
86 REveJetConeProjected(const REveJetConeProjected &); // Not implemented
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
ROOT::R::TRInterface & r
Definition: Object.C:4
#define d(i)
Definition: RSha256.hxx:102
int Int_t
Definition: RtypesCore.h:41
char Text_t
Definition: RtypesCore.h:58
bool Bool_t
Definition: RtypesCore.h:59
float Float_t
Definition: RtypesCore.h:53
void SetDepthLocal(Float_t d) override
This is virtual method from base-class REveProjected.
void UpdateProjection() override
Re-project the jet-cone.
REveJetConeProjected & operator=(const REveJetConeProjected &)
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
void BuildRenderData() override
Crates 3D point array for rendering.
REveJetConeProjected(const REveJetConeProjected &)
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
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.
Definition: REveJetCone.cxx:71
REveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.
REveJetCone(const REveJetCone &)
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Definition: REveJetCone.cxx:81
REveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill REveVector with eta and phi, magnitude 1.
void SetApex(const REveVector &a)
Definition: REveJetCone.hxx:58
void SetCylinder(Float_t r, Float_t z)
Definition: REveJetCone.hxx:59
REveJetCone & operator=(const REveJetCone &)
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
void ComputeBBox() override
Compute bounding-box of the data.
void BuildRenderData() override
Crates 3D point array for rendering.
Definition: REveJetCone.cxx:95
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)
Definition: REveVector.hxx:80
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
const Int_t n
Definition: legend1.C:16
VSD Structures.
Definition: StringConv.hxx:21
auto * a
Definition: textangle.C:12