File indexing completed on 2025-01-18 10:10:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT7_REveJetCone
0013 #define ROOT7_REveJetCone
0014
0015 #include <ROOT/REveShape.hxx>
0016 #include <ROOT/REveVector.hxx>
0017
0018 namespace ROOT {
0019 namespace Experimental {
0020
0021
0022
0023
0024
0025 class REveJetCone : public REveShape,
0026 public REveProjectable
0027 {
0028 friend class REveJetConeProjected;
0029
0030 private:
0031 REveJetCone(const REveJetCone &) = delete;
0032 REveJetCone &operator=(const REveJetCone &) = delete;
0033
0034 protected:
0035 REveVector fApex;
0036 REveVector fAxis;
0037 REveVector fLimits;
0038 Float_t fThetaC;
0039 Float_t fEta, fPhi;
0040 Float_t fDEta, fDPhi;
0041 Int_t fNDiv;
0042
0043 REveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
0044 REveVector CalcBaseVec(Float_t eta, Float_t phi) const;
0045 REveVector CalcBaseVec(Float_t alpha) const;
0046 Bool_t IsInTransitionRegion() const;
0047
0048 public:
0049 REveJetCone(const Text_t *n = "REveJetCone", const Text_t *t = "");
0050 ~REveJetCone() override {}
0051
0052 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
0053 void BuildRenderData() override;
0054
0055 void ComputeBBox() override;
0056 TClass *ProjectedClass(const REveProjection *p) const override;
0057
0058 void SetApex(const REveVector &a) { fApex = a; }
0059 void SetCylinder(Float_t r, Float_t z)
0060 {
0061 fLimits.Set(0, r, z);
0062 fThetaC = fLimits.Theta();
0063 }
0064 void SetRadius(Float_t r)
0065 {
0066 fLimits.Set(r, 0, 0);
0067 fThetaC = 10;
0068 }
0069
0070 Int_t GetNDiv() const { return fNDiv; }
0071 void SetNDiv(Int_t n);
0072
0073 Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length = 0);
0074 Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length = 0);
0075 };
0076
0077
0078
0079
0080
0081
0082 class REveJetConeProjected : public REveShape,
0083 public REveProjected
0084 {
0085 private:
0086 REveJetConeProjected(const REveJetConeProjected &) = delete;
0087 REveJetConeProjected &operator=(const REveJetConeProjected &) = delete;
0088
0089 protected:
0090 void SetDepthLocal(Float_t d) override;
0091
0092 public:
0093 REveJetConeProjected(const std::string &n = "REveJetConeProjected", const std::string& t = "");
0094 ~REveJetConeProjected() override;
0095
0096 void BuildRenderData() override;
0097
0098
0099 void ComputeBBox() override;
0100
0101
0102 void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
0103 void UpdateProjection() override;
0104
0105 REveElement *GetProjectedAsElement() override { return this; }
0106 };
0107
0108 }
0109 }
0110
0111 #endif