ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
23 class TEveJetCone : public TEveShape
24 {
25  friend class TEveJetConeProjected;
26  friend class TEveJetConeGL;
27  friend class TEveJetConeProjectedGL;
28 
29 private:
30  TEveJetCone(const TEveJetCone&); // Not implemented
31  TEveJetCone& operator=(const TEveJetCone&); // Not implemented
32 
33 protected:
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 
44  TEveVector CalcBaseVec (Float_t alpha) const;
46 
47 public:
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 
63 
64  ClassDef(TEveJetCone, 0); // Short description.
65 };
66 
67 
68 //------------------------------------------------------------------------------
69 // TEveJetConeProjected
70 //------------------------------------------------------------------------------
71 
73  public TEveProjected
74 {
75  friend class TEveJetConeProjectedGL;
76 
77 private:
78  TEveJetConeProjected(const TEveJetConeProjected&); // Not implemented
79  TEveJetConeProjected& operator=(const TEveJetConeProjected&); // Not implemented
80 
81 protected:
82  virtual void SetDepthLocal(Float_t d);
83 
84 public:
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
Abstract base class for classes that hold results of a non-linear projection transformation.
Abstract base-class for 2D/3D shapes.
Definition: TEveShape.h:22
virtual void ComputeBBox()
Compute bounding-box of the data.
Definition: TEveJetCone.cxx:63
void Set(const Float_t *v)
Definition: TEveVector.h:52
float Float_t
Definition: RtypesCore.h:53
TEveJetConeProjected & operator=(const TEveJetConeProjected &)
TEveVector fApex
Definition: TEveJetCone.h:34
ClassDef(TEveJetConeProjected, 0)
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given...
Definition: TEveJetCone.h:23
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0)
Add jet cone.
OpenGL renderer class for TEveJetConeProjected.
Definition: TEveJetConeGL.h:59
virtual void SetDepthLocal(Float_t d)
This is virtual method from base-class TEveProjected.
ClassDef(TEveJetCone, 0)
TEveJetCone(const TEveJetCone &)
TEveJetCone & operator=(const TEveJetCone &)
virtual ~TEveJetCone()
Definition: TEveJetCone.h:49
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveJetConeProjected class.
Definition: TEveJetCone.cxx:76
int d
Definition: tornado.py:11
Projection of TEveJetCone.
Definition: TEveJetCone.h:72
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
Int_t GetNDiv() const
Definition: TEveJetCone.h:58
Base-class for non-linear projections.
Float_t fPhi
Definition: TEveJetCone.h:38
void SetApex(const TEveVector &a)
Definition: TEveJetCone.h:54
Float_t z[5]
Definition: Ifit.C:16
Manager class for steering of projections and managing projected objects.
Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0)
Add jet cone.
Definition: TEveJetCone.cxx:92
Abstract base-class for non-linear projectable objects.
TThread * t[5]
Definition: threadsh1.C:13
TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill TEveVector with eta and phi, magnitude 1.
ROOT::R::TRInterface & r
Definition: Object.C:4
Double_t length(const TVector2 &v)
Definition: CsgOps.cxx:347
TEveJetConeProjected(const TEveJetConeProjected &)
TT Theta() const
Definition: TEveVector.h:106
Float_t fThetaC
Definition: TEveJetCone.h:37
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
Float_t phi
Definition: shapesAnim.C:6
virtual void ComputeBBox()
Compute bounding-box, virtual from TAttBBox.
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveJetCone.h:95
TEveVector fAxis
Definition: TEveJetCone.h:35
void SetRadius(Float_t r)
Definition: TEveJetCone.h:56
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
This is virtual method from base-class TEveProjected.
TEveVector fLimits
Definition: TEveJetCone.h:36
OpenGL renderer class for TEveJetCone.
Definition: TEveJetConeGL.h:28
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:202
virtual void UpdateProjection()
Re-project the jet-cone.
Float_t fDPhi
Definition: TEveJetCone.h:39
char Text_t
Definition: RtypesCore.h:58
virtual ~TEveJetConeProjected()
Destructor.
Float_t fDEta
Definition: TEveJetCone.h:39
Int_t fNDiv
Definition: TEveJetCone.h:40
Float_t fEta
Definition: TEveJetCone.h:38
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
const Int_t n
Definition: legend1.C:16
void SetCylinder(Float_t r, Float_t z)
Definition: TEveJetCone.h:55
void SetNDiv(Int_t n)
Definition: TEveJetCone.h:59
TEveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.