BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesView.h
Go to the documentation of this file.
1//
2// BesView.h
3//
4
5#ifndef BES_BESVIEW
6#define BES_BESVIEW
7
8#include "BesTView.h"
9#include <TPad.h>
10#include <TCanvas.h>
11#include <TPaveLabel.h>
12
13#include "BesStatus.h"
14#include "BesGeometry.h"
15
16#ifndef BES_EBESViewType
17#define BES_EBESViewType
18
19enum EBESViewType {
20 k3DView = BIT(0),
21 kXYView = BIT(1),
22 kZRView = BIT(2)
23};
24#endif
25
26class BesView : public BesTView {
27
28 private:
29 Bool_t fFishEye; // variable needed for toggle in menu
30 EBESViewType fViewType; // View type
31 Float_t fPhiRangeMin; // Minimum of phi range for Z-R projection (in degrees)
32 Float_t fPhiRangeMax; // Maximum of phi range for Z-R projection (in degrees)
33 TPaveLabel *fLabel; // Label
34 Float_t fMarkerSize; // size for marker
35 BesStatus *fStatus3D; // 3D view status flags
36 BesStatus *fStatusXY; // XY view status flags
37 BesStatus *fStatusZR; // ZR view status flags
38 BesStatus *fStatusCurrent; // current view status flags
39 Double_t fZoomFactor; // zoom factor
40 Double_t fExtentDefault;
41 Float_t m_BesR;
42 Float_t m_BesZ;
43
44 public:
46 virtual ~BesView();
47
48 virtual void SetViewType(EBESViewType ViewType, Bool_t resetview = kFALSE);
49 virtual void SetViewTypeBare(EBESViewType ViewType, Bool_t resetview = kFALSE);
50 virtual void DefaultRange();
51 virtual void ClearPad();
52 virtual void DrawLabel();
53 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
54
55 virtual Int_t GetRSign(Float_t Phi);
56 virtual void UpdateView(Bool_t resetview = kFALSE );
57 virtual void WCtoNDC(const Float_t *pw, Float_t *pn);
58 virtual void WCtoNDC(const Double_t *pw, Double_t *pn);
59 virtual void NDCtoWC(const Float_t* pn, Float_t* pw);
60 virtual void NDCtoWC(const Double_t* pn, Double_t* pw);
61 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
62
63 void SetZoomRatio(Double_t ratio);
64 inline Double_t GetZoomRatio() { return fExtentDefault/GetExtent(); }
65 inline EBESViewType GetViewType() { return fViewType; }
66 inline Float_t GetMarkerSize() { return fMarkerSize;}
67
68 // menu
69 inline void View3D() { SetViewType(k3DView,1); } // *MENU*
70 inline void ViewXY() { SetViewType(kXYView,1); } // *MENU*
71 inline void ViewZR() { SetViewType(kZRView,1); } // *MENU*
72 void ZoomIn(); // *MENU*
73 void ZoomOut(); // *MENU*
74 void Center(); // *MENU*
75 void Move(Int_t px, Int_t py);
76 inline void Front3D() {
77 this->View3D();
78 this->Front(); } // *MENU*
79 void Side3D(); // *MENU*
80 inline void Top3D() {
81 this->View3D();
82 Int_t iret;
83 this->SetView(-90,90,270,iret);
84
85 // this->Top();
86 } // *MENU*
87 void SetPhiRange(Float_t PhiMin = 0, Float_t PhiMax = 180);
88 void Reset(); // *MENU*
89
90 inline void SetMarkerSize(Float_t size) { fMarkerSize = size; }
91
92
93 //access functions for Mdc visibility
94 inline Bool_t GetVisMdcGlobal() { return fStatusCurrent->fMdcGlobal; }
95 inline Bool_t GetVisMdcTubes() { return fStatusCurrent->fMdcTubes; }
96 inline Bool_t GetVisMdcWires() { return fStatusCurrent->fMdcWires; }
97
98 inline void SetVisMdcGlobal (Bool_t input) { fStatusCurrent->fMdcGlobal = input; }
99 inline void SetVisMdcTubes(Bool_t input) { fStatusCurrent->fMdcTubes = input; }
100 inline void SetVisMdcWires(Bool_t input) { fStatusCurrent->fMdcWires = input; }
101
102 //access functions for Tof visibility
103 inline Bool_t GetVisTofGlobal() { return fStatusCurrent->fTofGlobal; }
104 inline Bool_t GetVisTofEast() { return fStatusCurrent->fTofEast; }
105 inline Bool_t GetVisTofBarrel() { return fStatusCurrent->fTofBarrel; }
106 inline Bool_t GetVisTofWest() { return fStatusCurrent->fTofWest; }
107 inline Float_t GetVisZoom() { return fStatusCurrent->fZoom; }
108
109 inline void SetVisTofGlobal(Bool_t input) { fStatusCurrent->fTofGlobal = input; }
110 inline void SetVisTofEast(Bool_t input) { fStatusCurrent->fTofEast = input; }
111 inline void SetVisTofBarrel(Bool_t input) { fStatusCurrent->fTofBarrel = input; }
112 inline void SetVisTofWest(Bool_t input) { fStatusCurrent->fTofWest = input; }
113 inline void SetVisZoom(Float_t input) { fStatusCurrent->fZoom = input; }
114
115 //access functions for Emc visibility
116 inline Bool_t GetVisEmcGlobal() { return fStatusCurrent->fEmcGlobal; }
117 inline Bool_t GetVisEmcEast() { return fStatusCurrent->fEmcEast; }
118 inline Bool_t GetVisEmcBarrel() { return fStatusCurrent->fEmcBarrel; }
119 inline Bool_t GetVisEmcWest() { return fStatusCurrent->fEmcWest; }
120 inline Bool_t GetVisEmcSide() { return fStatusCurrent->fEmcSide; }
121
122 inline void SetVisEmcGlobal(Bool_t input) { fStatusCurrent->fEmcGlobal = input; }
123 inline void SetVisEmcEast(Bool_t input) { fStatusCurrent->fEmcEast = input; }
124 inline void SetVisEmcBarrel(Bool_t input) { fStatusCurrent->fEmcBarrel = input; }
125 inline void SetVisEmcWest(Bool_t input) { fStatusCurrent->fEmcWest = input; }
126 inline void SetVisEmcSide(Bool_t input) { fStatusCurrent->fEmcSide = input; }
127
128 //access functions for Muc visibility
129 inline Bool_t GetVisMucGlobal() { return fStatusCurrent->fMucGlobal; }
130 inline Bool_t GetVisMucEast() { return fStatusCurrent->fMucEast; }
131 inline Bool_t GetVisMucBarrel() { return fStatusCurrent->fMucBarrel; }
132 inline Bool_t GetVisMucWest() { return fStatusCurrent->fMucWest; }
133 inline Bool_t GetVisMucStrips() { return fStatusCurrent->fMucStrips; }
134
135 inline void SetVisMucGlobal(Bool_t input) { fStatusCurrent->fMucGlobal = input; }
136 inline void SetVisMucEast(Bool_t input) { fStatusCurrent->fMucEast = input; }
137 inline void SetVisMucBarrel(Bool_t input) { fStatusCurrent->fMucBarrel = input; }
138 inline void SetVisMucWest(Bool_t input) { fStatusCurrent->fMucWest = input; }
139 inline void SetVisMucStrips(Bool_t input) { fStatusCurrent->fMucStrips = input; }
140
141 //access functions for Full3D visibility
142 inline Bool_t GetVisFull3DMdc() { return fStatusCurrent->fFull3DMdc; }
143 inline Bool_t GetVisFull3DTof() { return fStatusCurrent->fFull3DTof; }
144 inline Bool_t GetVisFull3DEmc() { return fStatusCurrent->fFull3DEmc; }
145 inline Bool_t GetVisFull3DMuc() { return fStatusCurrent->fFull3DMuc; }
146
147 inline void SetVisFull3DMdc(Bool_t input) { fStatusCurrent->fFull3DMdc = input; }
148 inline void SetVisFull3DTof(Bool_t input) { fStatusCurrent->fFull3DTof = input; }
149 inline void SetVisFull3DEmc(Bool_t input) { fStatusCurrent->fFull3DEmc = input; }
150 inline void SetVisFull3DMuc(Bool_t input) { fStatusCurrent->fFull3DMuc = input; }
151
152 //access functions for other parts visibility
153 inline Bool_t GetVisBeamPipe() { return fStatusCurrent->fBeamPipe; }
154 inline Bool_t GetVisZRPlaneOnXY() { return fStatusCurrent->fZRPlaneOnXY; }
155 inline Bool_t GetVisAxis() { return fStatusCurrent->fAxis; }
156
157 inline void SetVisBeamPipe(Bool_t input) { fStatusCurrent->fBeamPipe = input; }
158 inline void SetVisZRPlaneOnXY(Bool_t input) { fStatusCurrent->fZRPlaneOnXY = input; }
159 inline void SetVisAxis(Bool_t input) { fStatusCurrent->fAxis = input; }
160
161 // access functions for Mdc hits
162 inline Bool_t GetVisMdcHitsGlobal() { return fStatusCurrent->fMdcHitsGlobal; }
163 inline Bool_t GetVisMdcHits() { return fStatusCurrent->fMdcHits; }
164
165 inline void SetVisMdcHitsGlobal (Bool_t input) { fStatusCurrent->fMdcHitsGlobal = input; }
166 inline void SetVisMdcHits(Bool_t input) { fStatusCurrent->fMdcHits = input; }
167
168 // access functions for Tof hits
169 inline Bool_t GetVisTofHitsGlobal() { return fStatusCurrent->fTofHitsGlobal; }
170 inline Bool_t GetVisTofHitsEast() { return fStatusCurrent->fTofHitsEast; }
171 inline Bool_t GetVisTofHitsBarrel() { return fStatusCurrent->fTofHitsBarrel; }
172 inline Bool_t GetVisTofHitsWest() { return fStatusCurrent->fTofHitsWest; }
173
174 inline void SetVisTofHitsGlobal (Bool_t input) { fStatusCurrent->fTofHitsGlobal = input; }
175 inline void SetVisTofHitsEast(Bool_t input) { fStatusCurrent->fTofHitsEast = input; }
176 inline void SetVisTofHitsBarrel(Bool_t input) { fStatusCurrent->fTofHitsBarrel = input; }
177 inline void SetVisTofHitsWest(Bool_t input) { fStatusCurrent->fTofHitsWest = input; }
178
179 // access functions for Emc hits
180 inline Bool_t GetVisEmcHitsGlobal() { return fStatusCurrent->fEmcHitsGlobal; }
181 inline Bool_t GetVisEmcHitsEast() { return fStatusCurrent->fEmcHitsEast; }
182 inline Bool_t GetVisEmcHitsBarrel() { return fStatusCurrent->fEmcHitsBarrel; }
183 inline Bool_t GetVisEmcHitsWest() { return fStatusCurrent->fEmcHitsWest; }
184 inline Bool_t GetVisEmcHitsSide() { return fStatusCurrent->fEmcHitsSide; }
185
186 inline void SetVisEmcHitsGlobal (Bool_t input) { fStatusCurrent->fEmcHitsGlobal = input; }
187 inline void SetVisEmcHitsEast(Bool_t input) { fStatusCurrent->fEmcHitsEast = input; }
188 inline void SetVisEmcHitsBarrel(Bool_t input) { fStatusCurrent->fEmcHitsBarrel = input; }
189 inline void SetVisEmcHitsWest(Bool_t input) { fStatusCurrent->fEmcHitsWest = input; }
190 inline void SetVisEmcHitsSide(Bool_t input) { fStatusCurrent->fEmcHitsSide = input; }
191
192 // access functions for Muc hits
193 inline Bool_t GetVisMucHitsGlobal() { return fStatusCurrent->fMucHitsGlobal; }
194 inline Bool_t GetVisMucHitsEast() { return fStatusCurrent->fMucHitsEast; }
195 inline Bool_t GetVisMucHitsBarrel() { return fStatusCurrent->fMucHitsBarrel; }
196 inline Bool_t GetVisMucHitsWest() { return fStatusCurrent->fMucHitsWest; }
197
198 inline void SetVisMucHitsGlobal (Bool_t input) { fStatusCurrent->fMucHitsGlobal = input; }
199 inline void SetVisMucHitsEast(Bool_t input) { fStatusCurrent->fMucHitsEast = input; }
200 inline void SetVisMucHitsBarrel(Bool_t input) { fStatusCurrent->fMucHitsBarrel = input; }
201 inline void SetVisMucHitsWest(Bool_t input) { fStatusCurrent->fMucHitsWest = input; }
202
203 // access functions for tracks
204 inline Bool_t GetVisTracksGlobal() { return fStatusCurrent->fTracksGlobal; }
205 inline Bool_t GetVisTracksMdc() { return fStatusCurrent->fTracksMdc; }
206 inline Bool_t GetVisTracksTof() { return fStatusCurrent->fTracksTof; }
207 inline Bool_t GetVisTracksEmc() { return fStatusCurrent->fTracksEmc; }
208 inline Bool_t GetVisTracksMuc() { return fStatusCurrent->fTracksMuc; }
209 inline Bool_t GetVisTracksExt() { return fStatusCurrent->fTracksExt; }
210
211 inline void SetVisTracksGlobal(Bool_t input) { fStatusCurrent->fTracksGlobal = input; }
212 inline void SetVisTracksMdc(Bool_t input) { fStatusCurrent->fTracksMdc = input; }
213 inline void SetVisTracksTof(Bool_t input) { fStatusCurrent->fTracksTof = input; }
214 inline void SetVisTracksEmc(Bool_t input) { fStatusCurrent->fTracksEmc = input; }
215 inline void SetVisTracksMuc(Bool_t input) { fStatusCurrent->fTracksMuc = input; }
216 inline void SetVisTracksExt(Bool_t input) { fStatusCurrent->fTracksExt = input; }
217
218 // access functions for fish eye
219 inline Bool_t GetFishEyeStatus() { return fStatusCurrent->fFishEye; }
220 inline Bool_t GetFishEye() { return fFishEye; }
221 inline void SetFishEye(Bool_t input = 0) {
222 if ( fViewType & k3DView ) {
223 fFishEye = 0;
224 fStatusCurrent->fFishEye = 0;
225 } else {
226 fFishEye = input;
227 fStatusCurrent->fFishEye = input;
228 }
229 } // *TOGGLE*
230
231 inline void PrintCurrent() { fStatusCurrent->Print(); }
232
233 // clean up right mouse button menu
234 inline virtual void Centered() { BesTView::Centered(); }
235 inline virtual void Front() { BesTView::Top(); }
236 inline virtual void Side() { BesTView::Side(); }
237 inline virtual void Top() { BesTView::Front(); }
238 // inline virtual void ShowAxis() { BesTView::ShowAxis(); }
239 inline virtual void ZoomMove() { BesTView::ZoomMove(); }
240 inline virtual void AdjustScales(TVirtualPad* pad = 0) { BesTView::AdjustScales(pad); }
241 inline virtual void Delete(Option_t* option) { BesTView::Delete(option); }
242 inline virtual void DrawClass() { BesTView::DrawClass(); }
243 inline virtual TObject* DrawClone(Option_t* option) { return BesTView::DrawClone(option); }
244
245#ifndef CL__DEBUG
246 inline virtual void Dump() { BesTView::Dump(); }
247 inline virtual void Inspect() { BesTView::Inspect(); }
248#endif
249
250 inline virtual void SetDrawOption(Option_t* option) { BesTView::SetDrawOption(option); }
251 inline virtual void SetLineAttributes() { BesTView::SetLineAttributes(); }
252
253 inline virtual void SetZoomFactor(Double_t factor) { fZoomFactor = factor; };
254 inline virtual Double_t GetZoomFactor() { return fZoomFactor; }
255 inline BesStatus* GetStatusCurrent() { return fStatusCurrent; };
256 inline BesStatus* GetStatus3D() { return fStatus3D; };
257 inline BesStatus* GetStatusXY() { return fStatusXY; };
258 inline BesStatus* GetStatusZR() { return fStatusZR; };
259
260 ClassDef(BesView,0) // BesVis View
261};
262
263#endif
double Phi(RecMdcKalTrack *trk)
Bool_t fTracksEmc
visibility flag for Tof Tracks
Bool_t fMucHitsEast
visibility flag for global Muc Hits
Bool_t fTofHitsEast
visibility flag for global Tof Hits
Bool_t fMucBarrel
visivility flag for Muc east EC
Bool_t fFull3DMdc
visivility flag for Muc strips
Bool_t fTracksMdc
visibility flag for global Tracks
Bool_t fTofBarrel
visibility flag for Tof east EC
Bool_t fTracksExt
visibility flag for Muc Tracks
Bool_t fMucStrips
visivility flag for Muc west EC
Bool_t fAxis
visibility flag for ZRPlaneOnXY
Bool_t fEmcHitsGlobal
visibility flag for Tof Hits West
Bool_t fMucHitsWest
visibility flag for Muc Hits Barrel
Bool_t fZRPlaneOnXY
visibility flag for beam pipe
Bool_t fMucWest
visivility flag for Muc barrel
Bool_t fMucEast
visivility flag for global Muc
Bool_t fMdcWires
visibility flag for Mdc main tubes
Bool_t fFull3DMuc
visivility flag for full 3D Emc
Bool_t fEmcGlobal
visibility flag for Tof west EC
Bool_t fTofHitsWest
visibility flag for Tof Hits Barrel
Bool_t fFull3DEmc
visivility flag for full 3D Tof
Bool_t fTofHitsBarrel
visibility flag for Tof Hits East
Bool_t fEmcWest
visivility flag for Emc barrel
Bool_t fTofWest
visibility flag for Tof barrel
Bool_t fTofEast
visibility flag for global Tof
Bool_t fTofHitsGlobal
visibility flag for Mdc Hits
Bool_t fEmcHitsBarrel
visibility flag for Emc Hits East
Bool_t fEmcEast
visivility flag for global Emc
Bool_t fMdcHits
visibility flag for global Mdc Hits
Bool_t fMdcTubes
visibility flag for global Mdc
Bool_t fEmcHitsSide
visibility flag for Emc Hits West
Bool_t fEmcHitsWest
visibility flag for Emc Hits Barrel
Bool_t fEmcSide
visivility flag for Emc west EC
Bool_t fFull3DTof
visivility flag for full 3D Mdc
Bool_t fTracksMuc
visibility flag for Emc Tracks
Bool_t fTofGlobal
visibility flag for Mdc wires
Bool_t fBeamPipe
visivility flag for full 3D Muc
Bool_t fMucHitsBarrel
visibility flag for Muc Hits East
Bool_t fEmcHitsEast
visibility flag for global Emc Hits
Bool_t fTracksTof
visibility flag for Mdc Tracks
Bool_t fEmcBarrel
visivility flag for Emc east EC
Bool_t fMucHitsGlobal
visibility flag for Emc Hits Side
Bool_t fTracksGlobal
visibility flag for Muc Hits West
ClassDef(BesTView, 2)
virtual void AdjustScales(TVirtualPad *pad=0)
Definition: BesTView.cxx:1736
Double_t GetExtent() const
Definition: BesTView.cxx:1123
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
Definition: BesTView.cxx:1525
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)
Definition: BesView.cxx:659
void ZoomIn()
Definition: BesView.cxx:495
virtual TObject * DrawClone(Option_t *option)
virtual ~BesView()
Definition: BesView.cxx:71
virtual Int_t GetRSign(Float_t Phi)
Definition: BesView.cxx:562
void Move(Int_t px, Int_t py)
Definition: BesView.cxx:424
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition: BesView.cxx:598
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Definition: BesView.cxx:800
virtual void ClearPad()
Definition: BesView.cxx:353
void Center()
Definition: BesView.cxx:466
void SetPhiRange(Float_t PhiMin=0, Float_t PhiMax=180)
Definition: BesView.cxx:582
virtual void SetViewTypeBare(EBESViewType ViewType, Bool_t resetview=kFALSE)
Definition: BesView.cxx:251
void Side3D()
Definition: BesView.cxx:789
void ZoomOut()
Definition: BesView.cxx:532
virtual void SetViewType(EBESViewType ViewType, Bool_t resetview=kFALSE)
Definition: BesView.cxx:94
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition: BesView.cxx:365
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)
Definition: BesView.cxx:725
virtual void DefaultRange()
Definition: BesView.cxx:87
void SetZoomRatio(Double_t ratio)
Definition: BesView.cxx:482
void Reset()
Definition: BesView.cxx:824
virtual void DrawLabel()
Definition: BesView.cxx:618