Logo ROOT   6.08/07
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 
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 
42  TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
43  TEveVector CalcBaseVec (Float_t eta, Float_t phi) const;
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; }
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  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
TT Theta() const
Definition: TEveVector.h:106
void Set(const Float_t *v)
Definition: TEveVector.h:52
float Float_t
Definition: RtypesCore.h:53
TEveVector fApex
Definition: TEveJetCone.h:34
TEveVector CalcBaseVec(Float_t eta, Float_t phi) const
Returns point on the base of the cone with given eta and phi.
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
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveJetConeProjected class.
Definition: TEveJetCone.cxx:76
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
friend class TEveJetConeProjected
Definition: TEveJetCone.h:25
#define ClassDef(name, id)
Definition: Rtypes.h:254
TEveJetCone(const TEveJetCone &)
TEveJetCone & operator=(const TEveJetCone &)
virtual ~TEveJetCone()
Definition: TEveJetCone.h:49
Int_t GetNDiv() const
Definition: TEveJetCone.h:58
Projection of TEveJetCone.
Definition: TEveJetCone.h:72
Base-class for non-linear projections.
Float_t fPhi
Definition: TEveJetCone.h:38
void SetApex(const TEveVector &a)
Definition: TEveJetCone.h:54
Bool_t IsInTransitionRegion() const
Returns true if the cone is in barrel / endcap transition region.
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.
TRandom2 r(17)
Float_t fThetaC
Definition: TEveJetCone.h:37
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveJetCone.h:95
TEveVector fAxis
Definition: TEveJetCone.h:35
TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const
Fill TEveVector with eta and phi, magnitude 1.
void SetRadius(Float_t r)
Definition: TEveJetCone.h:56
TEveVector fLimits
Definition: TEveJetCone.h:36
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
OpenGL renderer class for TEveJetCone.
Definition: TEveJetConeGL.h:28
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:202
Float_t fDPhi
Definition: TEveJetCone.h:39
char Text_t
Definition: RtypesCore.h:58
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