BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/BesVisLib/BesVisLib/BesPolygon2D.h
Go to the documentation of this file.
1//
2// BesPolygon2D.h
3//
4// $Author: tianhl $
5// 2005/7/16
6// Modified from zevis 2D shape
7
8#ifndef BESPOLYGON2D_H
9#define BESPOLYGON2D_H
10
11#ifndef ROOT_TNamed
12#include <TNamed.h>
13#endif
14#ifndef ROOT_TAttLine
15#include <TAttLine.h>
16#endif
17#ifndef ROOT_TAttFill
18#include <TAttFill.h>
19#endif
20
21class TPad;
22class TString;
23class TView;
24class TGeometry;
25class TPaveText;
26
27class BesPolygon2D : public TNamed, public TAttLine, public TAttFill {
28
29 static int num;
30protected:
31 Double_t *f_xx;
32 Double_t *f_yy;
33 Int_t fN; // No. of points
34 Double_t *fP; // [3*fN] Points in world coordinates
35 Double_t *fPBackUp; // [3*fN] for fP BackUp when rotate;
36 Double_t fCenter [3];
37 Bool_t fRotatable;
38
39 TPaveText *fInfoBox; //! info box
40
41public:
43 BesPolygon2D(const char* name, const char* title, Int_t N, Double_t *P);
44 virtual ~BesPolygon2D();
45
46 virtual void Draw(Option_t *option = "");
47 virtual void Paint(Option_t *option = "");
48 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
49
50 virtual void SetZRSign(Int_t sign);
51 virtual void Resize(Double_t ScaleFactor);
52 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
53 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
54 virtual void SetInfoBox(); //*MENU*
55 virtual void GetCenter(Double_t *Center) const;
56 virtual void RotatePhi(Double_t phi);
57 virtual void Restore();
58 virtual void SetSize(Double_t size);
59
60 inline Bool_t IsRotatable() {
61 return fRotatable;
62 }
63 inline void SetRotatable(Bool_t input) {
64 fRotatable = input;
65 }
66 inline void SetName(const char* name) {
67 TNamed::SetName(name);
68 }
69 inline void SetTitle(const char* name) {
70 TNamed::SetTitle(name);
71 }
72 inline void Delete(Option_t *option) {
73 TObject::Delete(option);
74 }
75 inline void DrawClass() {
76 TObject::DrawClass();
77 }
78 inline void DrawClone(Option_t *option) {
79 TObject::DrawClone(option);
80 }
81 inline void SetDrawOption(Option_t *option) {
82 TObject::SetDrawOption(option);
83 }
84 inline void SetPoints(Double_t *P) {
85 for ( Int_t i = 0; i < fN*3; i++ ) fP[i] = P[i];
86 }
87
88 ClassDef(BesPolygon2D,2) // Polygon in 2D
89};
90
91#endif
double P(RecMdcKalTrack *trk)
virtual ~BesPolygon2D()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual void GetCenter(Double_t *Center) const
virtual void SetSize(Double_t size)
virtual void SetZRSign(Int_t sign)
virtual void RotatePhi(Double_t phi)
BesPolygon2D(const char *name, const char *title, Int_t N, Double_t *P)
virtual void Draw(Option_t *option="")
BesPolygon2D()
info box
virtual void Paint(Option_t *option="")
virtual void Restore()
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void SetInfoBox()
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Resize(Double_t ScaleFactor)