BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
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 void SetZRSign(Int_t sign)
void DrawClass()
Definition: BesPolygon2D.h:75
virtual void SetSize(Double_t size)
Double_t fCenter[3]
Definition: BesPolygon2D.h:36
virtual void Paint(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
TPaveText * fInfoBox
Definition: BesPolygon2D.h:39
void SetRotatable(Bool_t input)
Definition: BesPolygon2D.h:63
Double_t * fP
Definition: BesPolygon2D.h:34
void SetName(const char *name)
Definition: BesPolygon2D.h:66
virtual void SetInfoBox()
void SetPoints(Double_t *P)
Definition: BesPolygon2D.h:84
void SetTitle(const char *name)
Definition: BesPolygon2D.h:69
Double_t * fPBackUp
Definition: BesPolygon2D.h:35
virtual void Resize(Double_t ScaleFactor)
virtual void Restore()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_t fRotatable
Definition: BesPolygon2D.h:37
BesPolygon2D()
info box
void SetDrawOption(Option_t *option)
Definition: BesPolygon2D.h:81
virtual ~BesPolygon2D()
Bool_t IsRotatable()
Definition: BesPolygon2D.h:60
void DrawClone(Option_t *option)
Definition: BesPolygon2D.h:78
void Delete(Option_t *option)
Definition: BesPolygon2D.h:72
Double_t * f_xx
Definition: BesPolygon2D.h:31
Double_t * f_yy
Definition: BesPolygon2D.h:32
virtual void GetCenter(Double_t *Center) const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void RotatePhi(Double_t phi)
c1_1 Draw()