Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TEveJetCone.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Author: Matevz Tadel, Jochen Thaeder 2009
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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 ROOT_TEveJetCone
13#define ROOT_TEveJetCone
14
15#include "TEveShape.h"
16#include "TEveVector.h"
17
18
19//------------------------------------------------------------------------------
20// TEveJetCone
21//------------------------------------------------------------------------------
22
23class TEveJetCone : public TEveShape
24{
26 friend class TEveJetConeGL;
28
29private:
30 TEveJetCone(const TEveJetCone&); // Not implemented
31 TEveJetCone& operator=(const TEveJetCone&); // Not implemented
32
33protected:
34 TEveVector fApex; // Apex of the cone.
35 TEveVector fAxis; // Axis of the cone.
36 TEveVector fLimits; // Border of Barrel/Cylinder to cut the cone.
37 Float_t fThetaC; // Transition theta
41
43 TEveVector CalcBaseVec (Float_t eta, Float_t phi) const;
44 TEveVector CalcBaseVec (Float_t alpha) const;
46
47public:
48 TEveJetCone(const Text_t* n="TEveJetCone", const Text_t* t="");
49 ~TEveJetCone() override {}
50
51 void ComputeBBox() override;
52 TClass* ProjectedClass(const TEveProjection* p) const override;
53
54 void SetApex(const TEveVector& a) { fApex = a; }
55 void SetCylinder(Float_t r, Float_t z) { fLimits.Set(0, r, z); fThetaC = fLimits.Theta(); }
56 void SetRadius (Float_t r) { fLimits.Set(r, 0, 0); fThetaC = 10; }
57
58 Int_t GetNDiv() const { return fNDiv; }
59 void SetNDiv(Int_t n) { fNDiv = TMath::Max(3, n); }
60
61 Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0);
62 Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0);
63
64 ClassDefOverride(TEveJetCone, 0); // Short description.
65};
66
67
68//------------------------------------------------------------------------------
69// TEveJetConeProjected
70//------------------------------------------------------------------------------
71
73 public TEveProjected
74{
76
77private:
78 TEveJetConeProjected(const TEveJetConeProjected&); // Not implemented
80
81protected:
82 void SetDepthLocal(Float_t d) override;
83
84public:
85 TEveJetConeProjected(const char* n="TEveJetConeProjected", const char* t="");
86 ~TEveJetConeProjected() override;
87
88 // For TAttBBox:
89 void ComputeBBox() override;
90
91 // Projected:
92 void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
93 void UpdateProjection() override;
94
95 TEveElement* GetProjectedAsElement() override { return this; }
96
97 ClassDefOverride(TEveJetConeProjected, 0); // Projection of TEveJetCone.
98};
99
100#endif
ROOT::R::TRInterface & r
Definition Object.C:4
#define d(i)
Definition RSha256.hxx:102
#define a(i)
Definition RSha256.hxx:99
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
char Text_t
General string (char).
Definition RtypesCore.h:76
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
TEveVectorT< Float_t > TEveVector
Definition TEveVector.h:123
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
TEveElement()
Default constructor.
void UpdateProjection() override
Re-project the jet-cone.
TEveJetConeProjected(const TEveJetConeProjected &)
void SetProjection(TEveProjectionManager *mng, TEveProjectable *model) override
This is virtual method from base-class TEveProjected.
void ComputeBBox() override
Compute bounding-box, virtual from TAttBBox.
TEveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to TEveElement.
Definition TEveJetCone.h:95
TEveJetConeProjected & operator=(const TEveJetConeProjected &)
void SetDepthLocal(Float_t d) override
This is virtual method from base-class TEveProjected.
~TEveJetConeProjected() override
Destructor.
friend class TEveJetConeProjectedGL
Definition TEveJetCone.h:75
Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0)
Add jet cone.
TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill TEveVector with eta and phi, magnitude 1.
TEveVector fApex
Definition TEveJetCone.h:34
friend class TEveJetConeProjected
Definition TEveJetCone.h:25
void SetNDiv(Int_t n)
Definition TEveJetCone.h:59
Int_t GetNDiv() const
Definition TEveJetCone.h:58
Float_t fEta
Definition TEveJetCone.h:38
TEveJetCone(const TEveJetCone &)
TEveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.
~TEveJetCone() override
Definition TEveJetCone.h:49
void SetCylinder(Float_t r, Float_t z)
Definition TEveJetCone.h:55
void SetRadius(Float_t r)
Definition TEveJetCone.h:56
void ComputeBBox() override
Compute bounding-box of the data.
TEveVector fAxis
Definition TEveJetCone.h:35
Float_t fDEta
Definition TEveJetCone.h:39
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
TEveVector fLimits
Definition TEveJetCone.h:36
Float_t fThetaC
Definition TEveJetCone.h:37
void SetApex(const TEveVector &a)
Definition TEveJetCone.h:54
friend class TEveJetConeProjectedGL
Definition TEveJetCone.h:27
Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0)
Add jet cone.
TEveJetCone & operator=(const TEveJetCone &)
Float_t fPhi
Definition TEveJetCone.h:38
TClass * ProjectedClass(const TEveProjection *p) const override
Virtual from TEveProjectable, returns TEveJetConeProjected class.
Float_t fDPhi
Definition TEveJetCone.h:39
friend class TEveJetConeGL
Definition TEveJetCone.h:26
TEveProjectable(const TEveProjectable &)
TEveProjected(const TEveProjected &)
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
TEveShape(const TEveShape &)=delete
const Int_t n
Definition legend1.C:16
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:249