Logo ROOT  
Reference Guide
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 virtual ~TEveJetCone() {}
50
51 virtual void ComputeBBox();
52 virtual TClass* ProjectedClass(const TEveProjection* p) const;
53
54 void SetApex(const TEveVector& a) { fApex = a; }
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 ClassDef(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 virtual void SetDepthLocal(Float_t d);
83
84public:
85 TEveJetConeProjected(const char* n="TEveJetConeProjected", const char* t="");
86 virtual ~TEveJetConeProjected();
87
88 // For TAttBBox:
89 virtual void ComputeBBox();
90
91 // Projected:
92 virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
93 virtual void UpdateProjection();
94
95 virtual TEveElement* GetProjectedAsElement() { return this; }
96
97 ClassDef(TEveJetConeProjected, 0); // Projection of TEveJetCone.
98};
99
100#endif
ROOT::R::TRInterface & r
Definition: Object.C:4
#define d(i)
Definition: RSha256.hxx:102
int Int_t
Definition: RtypesCore.h:41
char Text_t
Definition: RtypesCore.h:58
bool Bool_t
Definition: RtypesCore.h:59
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:326
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:34
OpenGL renderer class for TEveJetCone.
Definition: TEveJetConeGL.h:29
OpenGL renderer class for TEveJetConeProjected.
Definition: TEveJetConeGL.h:60
Projection of TEveJetCone.
Definition: TEveJetCone.h:74
virtual ~TEveJetConeProjected()
Destructor.
virtual void ComputeBBox()
Compute bounding-box, virtual from TAttBBox.
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
This is virtual method from base-class TEveProjected.
virtual void UpdateProjection()
Re-project the jet-cone.
TEveJetConeProjected(const TEveJetConeProjected &)
TEveJetConeProjected & operator=(const TEveJetConeProjected &)
virtual void SetDepthLocal(Float_t d)
This is virtual method from base-class TEveProjected.
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveJetCone.h:95
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given.
Definition: TEveJetCone.h:24
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
Int_t fNDiv
Definition: TEveJetCone.h:40
virtual void ComputeBBox()
Compute bounding-box of the data.
Definition: TEveJetCone.cxx:63
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.
void SetCylinder(Float_t r, Float_t z)
Definition: TEveJetCone.h:55
void SetRadius(Float_t r)
Definition: TEveJetCone.h:56
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
Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0)
Add jet cone.
Definition: TEveJetCone.cxx:92
virtual ~TEveJetCone()
Definition: TEveJetCone.h:49
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveJetConeProjected class.
Definition: TEveJetCone.cxx:76
TEveJetCone & operator=(const TEveJetCone &)
Float_t fPhi
Definition: TEveJetCone.h:38
Float_t fDPhi
Definition: TEveJetCone.h:39
Abstract base-class for non-linear projectable objects.
Abstract base class for classes that hold results of a non-linear projection transformation.
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
Abstract base-class for 2D/3D shapes.
Definition: TEveShape.h:25
void Set(const Float_t *v)
Definition: TEveVector.h:81
TT Theta() const
Definition: TEveVector.h:135
const Int_t n
Definition: legend1.C:16
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
auto * a
Definition: textangle.C:12