forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEveJetCone.h
100 lines (74 loc) · 3.44 KB
/
TEveJetCone.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// @(#)root/eve:$Id$
// Author: Matevz Tadel, Jochen Thaeder 2009
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEveJetCone
#define ROOT_TEveJetCone
#include "TEveShape.h"
#include "TEveVector.h"
//------------------------------------------------------------------------------
// TEveJetCone
//------------------------------------------------------------------------------
class TEveJetCone : public TEveShape
{
friend class TEveJetConeProjected;
friend class TEveJetConeGL;
friend class TEveJetConeProjectedGL;
private:
TEveJetCone(const TEveJetCone&); // Not implemented
TEveJetCone& operator=(const TEveJetCone&); // Not implemented
protected:
TEveVector fApex; // Apex of the cone.
TEveVector fAxis; // Axis of the cone.
TEveVector fLimits; // Border of Barrel/Cylinder to cut the cone.
Float_t fThetaC; // Transition theta
Float_t fEta, fPhi;
Float_t fDEta, fDPhi;
Int_t fNDiv;
TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
TEveVector CalcBaseVec (Float_t eta, Float_t phi) const;
TEveVector CalcBaseVec (Float_t alpha) const;
Bool_t IsInTransitionRegion() const;
public:
TEveJetCone(const Text_t* n="TEveJetCone", const Text_t* t="");
virtual ~TEveJetCone() {}
virtual void ComputeBBox();
virtual TClass* ProjectedClass(const TEveProjection* p) const;
void SetApex(const TEveVector& a) { fApex = a; }
void SetCylinder(Float_t r, Float_t z) { fLimits.Set(0, r, z); fThetaC = fLimits.Theta(); }
void SetRadius (Float_t r) { fLimits.Set(r, 0, 0); fThetaC = 10; }
Int_t GetNDiv() const { return fNDiv; }
void SetNDiv(Int_t n) { fNDiv = TMath::Max(3, n); }
Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0);
Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0);
ClassDef(TEveJetCone, 0); // Short description.
};
//------------------------------------------------------------------------------
// TEveJetConeProjected
//------------------------------------------------------------------------------
class TEveJetConeProjected : public TEveShape,
public TEveProjected
{
friend class TEveJetConeProjectedGL;
private:
TEveJetConeProjected(const TEveJetConeProjected&); // Not implemented
TEveJetConeProjected& operator=(const TEveJetConeProjected&); // Not implemented
protected:
virtual void SetDepthLocal(Float_t d);
public:
TEveJetConeProjected(const char* n="TEveJetConeProjected", const char* t="");
virtual ~TEveJetConeProjected();
// For TAttBBox:
virtual void ComputeBBox();
// Projected:
virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
virtual void UpdateProjection();
virtual TEveElement* GetProjectedAsElement() { return this; }
ClassDef(TEveJetConeProjected, 0); // Projection of TEveJetCone.
};
#endif