22#include <nlohmann/json.hpp>
60 fLimits(), fThetaC(10),
61 fEta(0), fPhi(0), fDEta(0), fDPhi(0), fNDiv(36)
100 fRenderData = std::make_unique<REveRenderData>(
"makeJet", 3 * NP);
106 for (
Int_t i = 0; i <
fNDiv; ++i, angle += angle_step)
130 return TClass::GetClass<REveJetConeProjected>();
177 using namespace TMath;
179 return REveVector(Cos(phi) / CosH(eta), Sin(phi) / CosH(eta), TanH(eta));
187 using namespace TMath;
197 else if (theta > Pi() -
fThetaC)
218 using namespace TMath;
228 using namespace TMath;
263 static const REveException kEH(
"REveJetConeProjected::BuildRenderData ");
270 fRenderData = std::make_unique<REveRenderData>(
"makeJetProjected", 4);
272 std::vector<REveVector> V;
282 for (
Int_t i = 0; i < 3; ++i)
288 V[1] = C->CalcBaseVec(0);
294 if (tM > C->fThetaC && tm < C->fThetaC) {
297 V.push_back(C->CalcBaseVec(
v.Eta(), C->fPhi));
303 V.push_back(C->CalcBaseVec(
v.Eta(), C->fPhi));
309 std::sort(V.begin() + 1, V.end(), [](
const auto &
a,
const auto &
b) ->
bool { return a.Phi() < b.Phi(); });
317 const Int_t NP = 1 + C->fNDiv;
319 fRenderData = std::make_unique<REveRenderData>(
"makeJet", 3 * NP);
325 for (
Int_t i = 0; i < C->fNDiv; ++i, angle += angle_step) {
326 auto tv = C->CalcBaseVec(angle);
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
REveException Exception-type thrown by Eve classes.
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.
virtual ~REveJetConeProjected()
Destructor.
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.
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.
REveProjectionManager * GetManager() const
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model)
Sets projection manager and reference in the projectable object.
void SetDepthCommon(Float_t d, REveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
REveProjectable * GetProjectable() const
REveProjectable * fProjectable
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection * GetProjection()
REveProjection Base for specific classes that implement non-linear projections.
void ProjectVector(REveVector &v, Float_t d)
Project REveVector.
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
virtual Color_t GetFillColor() const
virtual Color_t GetLineColor() const
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
TClass instances represent classes, structs and namespaces in the ROOT type system.
REveVectorT< Float_t > REveVector
Short_t Max(Short_t a, Short_t b)
constexpr Double_t PiOver2()
constexpr Double_t TwoPi()
basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, adl_serializer, std::vector< std::uint8_t > > json