BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
BesPolygon2D.h
Go to the documentation of this file.
1//
2// BesPolygon2D.h
3//
4// $Author: longpx $
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 //Long Peixun's update: Stretch polygon along (sx, sy, sz)
60 virtual void Stretch(Double_t sx, Double_t sy, Double_t sz, Double_t factor);
61
62 inline Bool_t IsRotatable() {
63 return fRotatable;
64 }
65 inline void SetRotatable(Bool_t input) {
66 fRotatable = input;
67 }
68 inline void SetName(const char* name) {
69 TNamed::SetName(name);
70 }
71 inline void SetTitle(const char* name) {
72 TNamed::SetTitle(name);
73 }
74 inline void Delete(Option_t *option) {
75 TObject::Delete(option);
76 }
77 inline void DrawClass() {
78 TObject::DrawClass();
79 }
80 inline void DrawClone(Option_t *option) {
81 TObject::DrawClone(option);
82 }
83 inline void SetDrawOption(Option_t *option) {
84 TObject::SetDrawOption(option);
85 }
86 inline void SetPoints(Double_t *P) {
87 for ( Int_t i = 0; i < fN*3; i++ ) fP[i] = P[i];
88 }
89
90 ClassDef(BesPolygon2D,2) // Polygon in 2D
91};
92
93#endif
double P(RecMdcKalTrack *trk)
titledef title[20]
virtual void SetZRSign(Int_t sign)
void DrawClass()
Definition: BesPolygon2D.h:77
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:65
Double_t * fP
Definition: BesPolygon2D.h:34
void SetName(const char *name)
Definition: BesPolygon2D.h:68
virtual void SetInfoBox()
void SetPoints(Double_t *P)
Definition: BesPolygon2D.h:86
void SetTitle(const char *name)
Definition: BesPolygon2D.h:71
Double_t * fPBackUp
Definition: BesPolygon2D.h:35
virtual void Stretch(Double_t sx, Double_t sy, Double_t sz, Double_t factor)
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:83
virtual ~BesPolygon2D()
Bool_t IsRotatable()
Definition: BesPolygon2D.h:62
void DrawClone(Option_t *option)
Definition: BesPolygon2D.h:80
void Delete(Option_t *option)
Definition: BesPolygon2D.h:74
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)
legend Draw()