Logo ROOT   6.21/01
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 
18 namespace ROOT {
19 namespace Experimental {
20 
21 //------------------------------------------------------------------------------
22 // REveJetCone
23 //------------------------------------------------------------------------------
24 
25 class REveJetCone : public REveShape,
26  public REveProjectable
27 {
28  friend class REveJetConeProjected;
29 
30 private:
31  REveJetCone(const REveJetCone &) = delete;
32  REveJetCone &operator=(const REveJetCone &) = delete;
33 
34 protected:
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 
43  REveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
44  REveVector CalcBaseVec(Float_t eta, Float_t phi) const;
45  REveVector CalcBaseVec(Float_t alpha) const;
47 
48 public:
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);
62  fThetaC = fLimits.Theta();
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 {
85 private:
88 
89 protected:
90  void SetDepthLocal(Float_t d) override;
91 
92 public:
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
Returns the available number of logical cores.
Definition: StringConv.hxx:21
float Float_t
Definition: RtypesCore.h:53
void SetNDiv(Int_t n)
Set Number of Divisions.
Definition: REveJetCone.cxx:71
REveJetConeProjected(const REveJetConeProjected &)=delete
REveJetConeProjected & operator=(const REveJetConeProjected &)=delete
REveJetCone & operator=(const REveJetCone &)=delete
void ComputeBBox() override
Compute bounding-box of the data.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void BuildRenderData() override
Crates 3D point array for rendering.
Definition: REveJetCone.cxx:95
void SetApex(const REveVector &a)
Definition: REveJetCone.hxx:58
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
void ComputeBBox() override
Compute bounding-box, virtual from TAttBBox.
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
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 SetDepthLocal(Float_t d) override
This is virtual method from base-class REveProjected.
REveProjection Base for specific classes that implement non-linear projections.
ROOT::R::TRInterface & r
Definition: Object.C:4
auto * a
Definition: textangle.C:12
REveProjectionManager Manager class for steering of projections and managing projected objects...
REveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.
REveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill REveVector with eta and phi, magnitude 1.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
REveJetCone(const REveJetCone &)=delete
#define d(i)
Definition: RSha256.hxx:102
void BuildRenderData() override
Crates 3D point array for rendering.
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
void UpdateProjection() override
Re-project the jet-cone.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveJetConeProjected class.
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual ~REveJetConeProjected()
Destructor.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Definition: REveJetCone.cxx:81
char Text_t
Definition: RtypesCore.h:58
void Set(const Float_t *v)
Definition: REveVector.hxx:80
void SetCylinder(Float_t r, Float_t z)
Definition: REveJetCone.hxx:59
const Int_t n
Definition: legend1.C:16