22#include <nlohmann/json.hpp>
77 fLimits(), fThetaC(10),
78 fEta(0), fPhi(0), fDEta(0), fDPhi(0), fNDiv(36)
115 fRenderData = std::make_unique<REveRenderData>(
"makeJet");
146 return TClass::GetClass<REveJetConeProjected>();
193 using namespace TMath;
195 return REveVector(Cos(phi) / CosH(eta), Sin(phi) / CosH(eta), TanH(eta));
203 using namespace TMath;
213 else if (theta > Pi() -
fThetaC)
234 using namespace TMath;
244 using namespace TMath;
286 static const REveException kEH(
"REveJetConeProjected::BuildRenderData ");
294 std::vector<REveVector> V;
304 for (
Int_t i = 0; i < 3; ++i)
310 V[1] = C->CalcBaseVec(0);
316 if (tM > C->fThetaC && tm < C->fThetaC) {
319 V.push_back(C->CalcBaseVec(
v.Eta(), C->fPhi));
325 V.push_back(C->CalcBaseVec(
v.Eta(), C->fPhi));
331 std::sort(V.begin() + 1, V.end(), [](
const auto &
a,
const auto &
b) ->
bool { return a.Phi() < b.Phi(); });
334 fRenderData = std::make_unique<REveRenderData>(
"makeJetProjected");
339 fRenderData = std::make_unique<REveRenderData>(
"makeJet");
340 auto &pos = NewConeEntry(*
fRenderData, 1 + C->fNDiv);
348 for (
Int_t i = 0; i < C->fNDiv; ++i,
angle += angle_step) {
349 auto tv = C->CalcBaseVec(
angle);
char Text_t
General string (char)
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
Option_t Option_t TPoint TPoint angle
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
void BBoxCheckPoint(const REveVector &v)
std::unique_ptr< REveRenderData > fRenderData
! Render data entries for the client's maker, see REveRenderData.
void BBoxInit()
Start filling the bounding box with BBoxCheckPoint(): min at +infinity, max at -infinity,...
REveException Exception-type thrown by Eve classes.
~REveJetConeProjected() override
Destructor.
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
Write the render data entry pos, see the class description.
void ComputeBBox() override
Fill the bounding box (virtual from REveElement).
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
Write the render data entry pos, see the class description.
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)
Set the depth and stamp el for a rebuild.
REveProjectable * GetProjectable() const
REveProjectable * fProjectable
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection * GetProjection()
const REveTrans * GetModelTrans(REveElement *model, REveTrans &t)
Return the matrix that takes the coordinates of model into the frame of this manager,...
REveProjection Base for specific classes that implement non-linear projections.
void ProjectVector(REveVector &v, Float_t d)
Project REveVector.
Entry & Reserve(size_t n_items)
Reserve storage for n_items items of the item size.
Render data of an element: a client maker name and a list of tagged entries, each a typed array with ...
Entry & NewEntry(std::string_view tag, EType type=EType::kF32, int item_size=1)
Create an entry. The reference stays valid for the life of this object.
Color_t GetLineColor() const
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
Color_t GetFillColor() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
Namespace for ROOT features in testing.
REveVectorT< Float_t > REveVector
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
constexpr Double_t PiOver2()
constexpr Double_t TwoPi()