BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
BesView Class Reference

#include <BesView.h>

+ Inheritance diagram for BesView:

Public Member Functions

 BesView ()
 
virtual ~BesView ()
 
virtual void SetViewType (EBESViewType ViewType, Bool_t resetview=kFALSE)
 
virtual void SetViewTypeBare (EBESViewType ViewType, Bool_t resetview=kFALSE)
 
virtual void DefaultRange ()
 
virtual void ClearPad ()
 
virtual void DrawLabel ()
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual Int_t GetRSign (Float_t Phi)
 
virtual void UpdateView (Bool_t resetview=kFALSE)
 
virtual void WCtoNDC (const Float_t *pw, Float_t *pn)
 
virtual void WCtoNDC (const Double_t *pw, Double_t *pn)
 
virtual void NDCtoWC (const Float_t *pn, Float_t *pw)
 
virtual void NDCtoWC (const Double_t *pn, Double_t *pw)
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
void SetZoomRatio (Double_t ratio)
 
Double_t GetZoomRatio ()
 
EBESViewType GetViewType ()
 
Float_t GetMarkerSize ()
 
void View3D ()
 
void ViewXY ()
 
void ViewZR ()
 
void ZoomIn ()
 
void ZoomOut ()
 
void Center ()
 
void Move (Int_t px, Int_t py)
 
void Front3D ()
 
void Side3D ()
 
void Top3D ()
 
void SetPhiRange (Float_t PhiMin=0, Float_t PhiMax=180)
 
void Reset ()
 
void SetMarkerSize (Float_t size)
 
Bool_t GetVisMdcGlobal ()
 
Bool_t GetVisMdcTubes ()
 
Bool_t GetVisMdcWires ()
 
void SetVisMdcGlobal (Bool_t input)
 
void SetVisMdcTubes (Bool_t input)
 
void SetVisMdcWires (Bool_t input)
 
Bool_t GetVisTofGlobal ()
 
Bool_t GetVisTofEast ()
 
Bool_t GetVisTofBarrel ()
 
Bool_t GetVisTofWest ()
 
Float_t GetVisZoom ()
 
void SetVisTofGlobal (Bool_t input)
 
void SetVisTofEast (Bool_t input)
 
void SetVisTofBarrel (Bool_t input)
 
void SetVisTofWest (Bool_t input)
 
void SetVisZoom (Float_t input)
 
Bool_t GetVisEmcGlobal ()
 
Bool_t GetVisEmcEast ()
 
Bool_t GetVisEmcBarrel ()
 
Bool_t GetVisEmcWest ()
 
Bool_t GetVisEmcSide ()
 
void SetVisEmcGlobal (Bool_t input)
 
void SetVisEmcEast (Bool_t input)
 
void SetVisEmcBarrel (Bool_t input)
 
void SetVisEmcWest (Bool_t input)
 
void SetVisEmcSide (Bool_t input)
 
Bool_t GetVisMucGlobal ()
 
Bool_t GetVisMucEast ()
 
Bool_t GetVisMucBarrel ()
 
Bool_t GetVisMucWest ()
 
Bool_t GetVisMucStrips ()
 
void SetVisMucGlobal (Bool_t input)
 
void SetVisMucEast (Bool_t input)
 
void SetVisMucBarrel (Bool_t input)
 
void SetVisMucWest (Bool_t input)
 
void SetVisMucStrips (Bool_t input)
 
Bool_t GetVisFull3DMdc ()
 
Bool_t GetVisFull3DTof ()
 
Bool_t GetVisFull3DEmc ()
 
Bool_t GetVisFull3DMuc ()
 
void SetVisFull3DMdc (Bool_t input)
 
void SetVisFull3DTof (Bool_t input)
 
void SetVisFull3DEmc (Bool_t input)
 
void SetVisFull3DMuc (Bool_t input)
 
Bool_t GetVisBeamPipe ()
 
Bool_t GetVisZRPlaneOnXY ()
 
Bool_t GetVisAxis ()
 
void SetVisBeamPipe (Bool_t input)
 
void SetVisZRPlaneOnXY (Bool_t input)
 
void SetVisAxis (Bool_t input)
 
Bool_t GetVisMdcHitsGlobal ()
 
Bool_t GetVisMdcHits ()
 
void SetVisMdcHitsGlobal (Bool_t input)
 
void SetVisMdcHits (Bool_t input)
 
Bool_t GetVisTofHitsGlobal ()
 
Bool_t GetVisTofHitsEast ()
 
Bool_t GetVisTofHitsBarrel ()
 
Bool_t GetVisTofHitsWest ()
 
void SetVisTofHitsGlobal (Bool_t input)
 
void SetVisTofHitsEast (Bool_t input)
 
void SetVisTofHitsBarrel (Bool_t input)
 
void SetVisTofHitsWest (Bool_t input)
 
Bool_t GetVisEmcHitsGlobal ()
 
Bool_t GetVisEmcHitsEast ()
 
Bool_t GetVisEmcHitsBarrel ()
 
Bool_t GetVisEmcHitsWest ()
 
Bool_t GetVisEmcHitsSide ()
 
void SetVisEmcHitsGlobal (Bool_t input)
 
void SetVisEmcHitsEast (Bool_t input)
 
void SetVisEmcHitsBarrel (Bool_t input)
 
void SetVisEmcHitsWest (Bool_t input)
 
void SetVisEmcHitsSide (Bool_t input)
 
Bool_t GetVisMucHitsGlobal ()
 
Bool_t GetVisMucHitsEast ()
 
Bool_t GetVisMucHitsBarrel ()
 
Bool_t GetVisMucHitsWest ()
 
void SetVisMucHitsGlobal (Bool_t input)
 
void SetVisMucHitsEast (Bool_t input)
 
void SetVisMucHitsBarrel (Bool_t input)
 
void SetVisMucHitsWest (Bool_t input)
 
Bool_t GetVisTracksGlobal ()
 
Bool_t GetVisTracksMdc ()
 
Bool_t GetVisTracksTof ()
 
Bool_t GetVisTracksEmc ()
 
Bool_t GetVisTracksMuc ()
 
Bool_t GetVisTracksExt ()
 
void SetVisTracksGlobal (Bool_t input)
 
void SetVisTracksMdc (Bool_t input)
 
void SetVisTracksTof (Bool_t input)
 
void SetVisTracksEmc (Bool_t input)
 
void SetVisTracksMuc (Bool_t input)
 
void SetVisTracksExt (Bool_t input)
 
Bool_t GetFishEyeStatus ()
 
Bool_t GetFishEye ()
 
void SetFishEye (Bool_t input=0)
 
void PrintCurrent ()
 
virtual void Centered ()
 
virtual void Front ()
 
virtual void Side ()
 
virtual void Top ()
 
virtual void ZoomMove ()
 
virtual void AdjustScales (TVirtualPad *pad=0)
 
virtual void Delete (Option_t *option)
 
virtual void DrawClass ()
 
virtual TObject * DrawClone (Option_t *option)
 
virtual void Dump ()
 
virtual void Inspect ()
 
virtual void SetDrawOption (Option_t *option)
 
virtual void SetLineAttributes ()
 
virtual void SetZoomFactor (Double_t factor)
 
virtual Double_t GetZoomFactor ()
 
BesStatusGetStatusCurrent ()
 
BesStatusGetStatus3D ()
 
BesStatusGetStatusXY ()
 
BesStatusGetStatusZR ()
 
- Public Member Functions inherited from BesTView
 BesTView ()
 
 BesTView (Int_t system)
 
 BesTView (const Float_t *rmin, const Float_t *rmax, Int_t system=1)
 
 BesTView (const Double_t *rmin, const Double_t *rmax, Int_t system=1)
 
virtual ~BesTView ()
 
virtual void AxisVertex (Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2)
 
virtual void DefinePerspectiveView ()
 
virtual void DefineViewDirection (const Double_t *s, const Double_t *c, Double_t cosphi, Double_t sinphi, Double_t costhe, Double_t sinthe, Double_t cospsi, Double_t sinpsi, Double_t *tnorm, Double_t *tback)
 
virtual void DrawOutlineCube (TList *outline, Double_t *rmin, Double_t *rmax)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void ExecuteRotateView (Int_t event, Int_t px, Int_t py)
 
virtual void FindScope (Double_t *scale, Double_t *center, Int_t &irep)
 
virtual Int_t GetDistancetoAxis (Int_t axis, Int_t px, Int_t py, Double_t &ratio)
 
Double_t GetDview () const
 
Double_t GetDproj () const
 
Double_t GetExtent () const
 
Bool_t GetAutoRange ()
 
Double_t GetLatitude ()
 
Double_t GetLongitude ()
 
Double_t GetPsi ()
 
virtual void GetRange (Float_t *min, Float_t *max)
 
virtual void GetRange (Double_t *min, Double_t *max)
 
Double_t * GetRmax ()
 
Double_t * GetRmin ()
 
TSeqCollection * GetOutline ()
 
Double_t * GetTback ()
 
Double_t * GetTN ()
 
Double_t * GetTnorm ()
 
Int_t GetSystem ()
 
void GetWindow (Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const
 
Double_t GetWindowWidth () const
 
Double_t GetWindowHeight () const
 
virtual void FindNormal (Double_t x, Double_t y, Double_t z, Double_t &zn)
 
virtual void FindPhiSectors (Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2)
 
virtual void FindThetaSectors (Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2)
 
Bool_t IsClippedNDC (Double_t *p) const
 
Bool_t IsPerspective () const
 
Bool_t IsViewChanged () const
 
virtual void NDCtoWC (const Float_t *pn, Float_t *pw)
 
virtual void NDCtoWC (const Double_t *pn, Double_t *pw)
 
virtual void NormalWCtoNDC (const Float_t *pw, Float_t *pn)
 
virtual void NormalWCtoNDC (const Double_t *pw, Double_t *pn)
 
virtual void PadRange (Int_t rback)
 
void ResizePad ()
 
virtual void SetAutoRange (Bool_t autorange=kTRUE)
 
virtual void SetAxisNDC (const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2)
 
void SetDefaultWindow ()
 
void SetDview (Double_t dview)
 
void SetDproj (Double_t dproj)
 
void SetLatitude (Double_t latitude)
 
void SetLongitude (Double_t longitude)
 
void SetPsi (Double_t psi)
 
virtual void SetOutlineToCube ()
 
virtual void SetParallel ()
 
virtual void SetPerspective ()
 
virtual void SetRange (const Double_t *min, const Double_t *max)
 
virtual void SetRange (Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag=0)
 
virtual void SetSystem (Int_t system)
 
virtual void SetView (Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
 
void SetViewChanged (Bool_t flag=kTRUE)
 
void SetWindow (Double_t u0, Double_t v0, Double_t du, Double_t dv)
 
virtual void WCtoNDC (const Float_t *pw, Float_t *pn)
 
virtual void WCtoNDC (const Double_t *pw, Double_t *pn)
 
void MoveFocus (Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)
 
virtual void MoveViewCommand (Char_t chCode, Int_t count=1)
 
void MoveWindow (Char_t option)
 
virtual void AdjustScales (TVirtualPad *pad=0)
 
virtual void Centered3DImages (TVirtualPad *pad=0)
 
virtual void Centered ()
 
virtual void FrontView (TVirtualPad *pad=0)
 
virtual void Front ()
 
virtual void ZoomIn ()
 
virtual void ZoomOut ()
 
virtual void ZoomView (TVirtualPad *pad=0, Double_t zoomFactor=1.25)
 
virtual void UnzoomView (TVirtualPad *pad=0, Double_t unZoomFactor=1.25)
 
virtual void RotateView (Double_t phi, Double_t theta, TVirtualPad *pad=0)
 
virtual void SideView (TVirtualPad *pad=0)
 
virtual void Side ()
 
virtual void TopView (TVirtualPad *pad=0)
 
virtual void Top ()
 
virtual void ToggleRulers (TVirtualPad *pad=0)
 
virtual void ShowAxis ()
 
virtual void ToggleZoom (TVirtualPad *pad=0)
 
virtual void ZoomMove ()
 
virtual void Zoom ()
 
virtual void UnZoom ()
 
 ClassDef (BesTView, 2)
 

Additional Inherited Members

- Public Types inherited from BesTView
enum  { kPerspective = BIT(6) }
 
- Static Public Member Functions inherited from BesTView
static void AdjustPad (TVirtualPad *pad=0)
 
- Protected Member Functions inherited from BesTView
 BesTView (const BesTView &)
 Set to TRUE after ExecuteRotateView.
 
BesTViewoperator= (const BesTView &)
 
void ResetView (Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
 
- Protected Attributes inherited from BesTView
Double_t fLatitude
 
Double_t fLongitude
 
Double_t fPsi
 
Double_t fDview
 
Double_t fDproj
 
Double_t fUpix
 
Double_t fVpix
 
Double_t fTN [16]
 
Double_t fTB [16]
 
Double_t fRmax [3]
 
Double_t fRmin [3]
 
Double_t fUVcoord [4]
 
Double_t fTnorm [16]
 
Double_t fTback [16]
 
Double_t fX1 [3]
 
Double_t fX2 [3]
 
Double_t fY1 [3]
 
Double_t fY2 [3]
 
Double_t fZ1 [3]
 
Double_t fZ2 [3]
 
Int_t fSystem
 
TSeqCollection * fOutline
 
Bool_t fDefaultOutline
 
Bool_t fAutoRange
 
Bool_t fChanged
 

Detailed Description

Definition at line 26 of file BesView.h.

Constructor & Destructor Documentation

◆ BesView()

BesView::BesView ( )

◆ ~BesView()

BesView::~BesView ( )
virtual

Definition at line 71 of file BesView.cxx.

71 {
72 //
73 // BesView default destructor
74 if ( gDebug ) cout << "BesView default dtor called" << endl;
75
76 delete fLabel;
77
78 delete fStatus3D;
79 delete fStatusXY;
80 delete fStatusZR;
81 delete fStatusCurrent;
82
83}

Member Function Documentation

◆ AdjustScales()

virtual void BesView::AdjustScales ( TVirtualPad *  pad = 0)
inlinevirtual

Reimplemented from BesTView.

Definition at line 240 of file BesView.h.

virtual void AdjustScales(TVirtualPad *pad=0)
Definition: BesTView.cxx:1736

◆ Center()

void BesView::Center ( )

Definition at line 466 of file BesView.cxx.

466 {
467 //
468 // Center view
469 //if ( fViewType & k3DView ){
470 //this->Centered();
471 //} else {
472 Double_t xrange, yrange;
473 xrange = gPad->GetX2() - gPad->GetX1();
474 yrange = gPad->GetY2() - gPad->GetY1();
475 gPad->Range(-xrange/2, -yrange/2, xrange/2, yrange/2);
476 gPad->Modified();
477 //}
478}

Referenced by BesClient::HandleButtons(), and SetViewType().

◆ Centered()

virtual void BesView::Centered ( )
inlinevirtual

Reimplemented from BesTView.

Definition at line 234 of file BesView.h.

virtual void Centered()
Definition: BesTView.h:176

◆ ClearPad()

void BesView::ClearPad ( )
virtual

Definition at line 353 of file BesView.cxx.

353 {
354 //
355 // Clear current without deleting this view
356 //
357 // Probably this doesn't work for the postscript output
358 // Look at TPad::Clear() for more details
359 if ( gDebug ) cout << "BesView::ClearPad called" << endl;
360 if ( gPad->GetListOfPrimitives() ) gPad->GetListOfPrimitives()->Clear();
361}

Referenced by SetViewType().

◆ DefaultRange()

void BesView::DefaultRange ( )
virtual

Definition at line 87 of file BesView.cxx.

88{
89 SetRange(-1.0*m_BesR, -1.0*m_BesR, -0.5*m_BesZ, m_BesR, m_BesR, 0.5*m_BesZ);
90}
virtual void SetRange(const Double_t *min, const Double_t *max)
Definition: BesTView.cxx:1453

Referenced by SetViewType(), and SetZoomRatio().

◆ Delete()

virtual void BesView::Delete ( Option_t *  option)
inlinevirtual

Definition at line 241 of file BesView.h.

241{ BesTView::Delete(option); }

◆ DrawClass()

virtual void BesView::DrawClass ( )
inlinevirtual

Definition at line 242 of file BesView.h.

242{ BesTView::DrawClass(); }

◆ DrawClone()

virtual TObject * BesView::DrawClone ( Option_t *  option)
inlinevirtual

Definition at line 243 of file BesView.h.

243{ return BesTView::DrawClone(option); }

◆ DrawLabel()

void BesView::DrawLabel ( )
virtual

Definition at line 618 of file BesView.cxx.

618 {
619 //
620 // Draw label for current view
621
622 fLabel->SetX1(-0.9);
623 fLabel->SetX2(-0.6);
624 fLabel->SetY1(-0.9);
625 fLabel->SetY2(-0.78);
626
627 switch (fViewType) {
628 case k3DView:
629 fLabel->SetLabel("3D View");
630 break;
631 case kXYView:
632 fLabel->SetLabel("XY View");
633 break;
634 case kZRView:
635 fLabel->SetLabel("ZR View");
636 break;
637 }
638 fLabel->Draw("BR,NDC,SAME");
639
640
641 /*
642 switch (fViewType) {
643 case k3DView:
644 fLabel->DrawPaveLabel(0.02,0.02,0.17,0.09, "3D View", "BR,NDC,SAME");
645 break;
646 case kXYView:
647 //fLabel->SetLabel("XY View");
648 fLabel->DrawPaveLabel(0.02,0.02,0.17,0.09, "XY View", "BR,NDC,SAME");
649 break;
650 case kZRView:
651 fLabel->DrawPaveLabel(0.02,0.02,0.17,0.09, "ZR View", "BR,NDC,SAME");
652 break;
653 }
654 */
655}
@ kXYView
Definition: BesStatus.h:15
@ k3DView
Definition: BesStatus.h:14
@ kZRView
Definition: BesStatus.h:16

Referenced by SetViewType().

◆ Dump()

virtual void BesView::Dump ( )
inlinevirtual

Definition at line 246 of file BesView.h.

246{ BesTView::Dump(); }

◆ ExecuteEvent()

void BesView::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
)
virtual

Reimplemented from BesTView.

Definition at line 365 of file BesView.cxx.

365 {
366 //
367 // Execute mouse events
368 if ( gDebug ) cout << "BesView::ExecuteEvent called" << endl;
369
370 // Editor mode
371 if (gROOT->GetEditorMode()) {
372 gPad->ExecuteEvent(event,px,py);
373 return;
374 }
375
376 if (gBesCursor->GetType() == kBesHand) {
377
378 gPad->SetCursor(kMove);
379 static Double_t xmin, ymin, xmax, ymax, x0, y0;
380 Double_t dx, dy, x, y;
381 switch (event) {
382
383 case kButton1Down:
384 // Remember position of pointer
385 xmin = gPad->GetX1();
386 ymin = gPad->GetY1();
387 xmax = gPad->GetX2();
388 ymax = gPad->GetY2();
389 x0 = gPad->AbsPixeltoX(px);
390 y0 = gPad->AbsPixeltoY(py);
391 break;
392
393 case kButton1Motion:
394 gPad->SetCursor(kMove);
395
396 case kButton1Up:
397 // Set new pad range
398 x = gPad->AbsPixeltoX(px);
399 y = gPad->AbsPixeltoY(py);
400 dx = -(x - x0);
401 dy = -(y - y0);
402 //((ZPad*)gPad)->SetNoAspect(kTRUE);
403 gPad->Range(xmin+dx, ymin+dy, xmax+dx, ymax+dy);
404 //((ZPad*)gPad)->SetNoAspect(kFALSE);
405 gPad->Modified();
406 break;
407
408 default:
409 gPad->SetCursor(kMove);
410 }
411 }
412 else if (gBesCursor->GetType() == kBesPick){
413
414 gPad->SetCursor(kPointer);
415
416 if ( fViewType & k3DView ) {
417 ExecuteRotateView(event, px, py);
418 }
419 }
420}
@ kBesHand
Definition: BesCursor.h:15
@ kBesPick
Definition: BesCursor.h:14
R__EXTERN BesCursor * gBesCursor
Definition: BesCursor.h:40
Double_t x[10]
EBESCursorType GetType()
Definition: BesCursor.h:32
virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py)
Definition: BesTView.cxx:745

Referenced by BesCircle2D::ExecuteEvent(), BesGeoTrack::ExecuteEvent(), BesPolygon2D::ExecuteEvent(), Emc2DCrystal::ExecuteEvent(), Mdc2DWire::ExecuteEvent(), Muc2DStrip::ExecuteEvent(), and Tof2DScin::ExecuteEvent().

◆ Front()

virtual void BesView::Front ( )
inlinevirtual

Reimplemented from BesTView.

Definition at line 235 of file BesView.h.

235{ BesTView::Top(); }
virtual void Top()
Definition: BesTView.h:180

Referenced by Front3D(), BesClient::HandleButtons(), and SetViewType().

◆ Front3D()

void BesView::Front3D ( )
inline

Definition at line 76 of file BesView.h.

76 {
77 this->View3D();
78 this->Front(); } // *MENU*
virtual void Front()
Definition: BesView.h:235
void View3D()
Definition: BesView.h:69

◆ GetFishEye()

Bool_t BesView::GetFishEye ( )
inline

Definition at line 220 of file BesView.h.

220{ return fFishEye; }

Referenced by BesClient::HandleButtons(), and BesClient::UpdateStatus().

◆ GetFishEyeStatus()

Bool_t BesView::GetFishEyeStatus ( )
inline

Definition at line 219 of file BesView.h.

219{ return fStatusCurrent->fFishEye; }
Bool_t fFishEye
visibility flag for Ext Tracks
Definition: BesStatus.h:109

Referenced by BesClient::UpdateStatus().

◆ GetMarkerSize()

Float_t BesView::GetMarkerSize ( )
inline

Definition at line 66 of file BesView.h.

66{ return fMarkerSize;}

Referenced by BesMarker2D::Paint().

◆ GetObjectInfo()

char * BesView::GetObjectInfo ( Int_t  px,
Int_t  py 
) const
virtual

Definition at line 800 of file BesView.cxx.

800 {
801 //
802 // Returns string containing info about the object at position (px,py).
803 Double_t pw[3];
804 Double_t Pndc[3] = { gPad->AbsPixeltoX(px), gPad->AbsPixeltoY(py), 0};
805 ((BesView*)gPad->GetView())->NDCtoWC(Pndc, pw);
806 //cout << gPad->GetName() << endl;
807
808 //
809 // Converts from pixel coordinates to world
810 // coordinates of according view
811
812 static char info[64];
813 if ( fViewType & kZRView ) {
814 sprintf(info, "z=%-.3fmm, r=%-.3fmm", pw[2], pw[1]);
815 return info;
816 } else {
817 sprintf(info, "x=%-.3fmm, y=%-.3fmm", pw[0], pw[1]);
818 return info;
819 }
820}
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)
Definition: BesView.cxx:725

Referenced by BesClient::ExecuteEvent(), BesCircle2D::GetObjectInfo(), BesGeoTrack::GetObjectInfo(), BesMarker2D::GetObjectInfo(), BesPolygon2D::GetObjectInfo(), Emc2DCrystal::GetObjectInfo(), Mdc2DWire::GetObjectInfo(), Muc2DStrip::GetObjectInfo(), and Tof2DScin::GetObjectInfo().

◆ GetRSign()

Int_t BesView::GetRSign ( Float_t  Phi)
virtual

Definition at line 562 of file BesView.cxx.

562 {
563 //
564 // Get sign of the R coordinate (ZR view)
565 // for a given phi (in radians)
566 Int_t Sign;
567
568 // Convert to deg, because phi range is given in degrees
569 Float_t Phi2 = (Phi - 2*TMath::Pi()*Int_t(Phi/(2*TMath::Pi())))
570 * 180./TMath::Pi();
571 if ( Phi2 < 0 ) Phi2 += 360;
572 if ( Phi2 >= fStatusCurrent->fPhiRangeMin && Phi2 < fStatusCurrent->fPhiRangeMax ) {
573 Sign = 1;
574 } else {
575 Sign = -1;
576 }
577 return Sign;
578}
double Phi(RecMdcKalTrack *trk)
Float_t fPhiRangeMin
flags for fish eye view
Definition: BesStatus.h:113

Referenced by ZHelix::SetPoints().

◆ GetStatus3D()

BesStatus * BesView::GetStatus3D ( )
inline

Definition at line 256 of file BesView.h.

256{ return fStatus3D; };

Referenced by BesClient::SaveMyConfig().

◆ GetStatusCurrent()

BesStatus * BesView::GetStatusCurrent ( )
inline

Definition at line 255 of file BesView.h.

255{ return fStatusCurrent; };

Referenced by BesClient::LoadMyConfig(), and BesClient::UpdateStatus().

◆ GetStatusXY()

BesStatus * BesView::GetStatusXY ( )
inline

Definition at line 257 of file BesView.h.

257{ return fStatusXY; };

Referenced by BesClient::SaveMyConfig().

◆ GetStatusZR()

BesStatus * BesView::GetStatusZR ( )
inline

Definition at line 258 of file BesView.h.

258{ return fStatusZR; };

Referenced by BesClient::SaveMyConfig().

◆ GetViewType()

◆ GetVisAxis()

Bool_t BesView::GetVisAxis ( )
inline

Definition at line 155 of file BesView.h.

155{ return fStatusCurrent->fAxis; }
Bool_t fAxis
visibility flag for ZRPlaneOnXY
Definition: BesStatus.h:70

Referenced by BesGeometry::Draw2DXY(), BesGeometry::Draw2DZR(), BesClient::HandleButtons(), and BesClient::UpdateStatus().

◆ GetVisBeamPipe()

Bool_t BesView::GetVisBeamPipe ( )
inline

Definition at line 153 of file BesView.h.

153{ return fStatusCurrent->fBeamPipe; }
Bool_t fBeamPipe
visivility flag for full 3D Muc
Definition: BesStatus.h:68

Referenced by BesGeometry::Draw2DXY(), BesGeometry::Draw2DZR(), and BesClient::UpdateStatus().

◆ GetVisEmcBarrel()

Bool_t BesView::GetVisEmcBarrel ( )
inline

Definition at line 118 of file BesView.h.

118{ return fStatusCurrent->fEmcBarrel; }
Bool_t fEmcBarrel
visivility flag for Emc east EC
Definition: BesStatus.h:47

Referenced by EmcROOTGeo::Draw(), EmcROOTGeo::SetVisEmcDetector(), and BesClient::UpdateStatus().

◆ GetVisEmcEast()

Bool_t BesView::GetVisEmcEast ( )
inline

Definition at line 117 of file BesView.h.

117{ return fStatusCurrent->fEmcEast; }
Bool_t fEmcEast
visivility flag for global Emc
Definition: BesStatus.h:46

Referenced by EmcROOTGeo::Draw(), EmcROOTGeo::SetVisEmcDetector(), and BesClient::UpdateStatus().

◆ GetVisEmcGlobal()

Bool_t BesView::GetVisEmcGlobal ( )
inline

Definition at line 116 of file BesView.h.

116{ return fStatusCurrent->fEmcGlobal; }
Bool_t fEmcGlobal
visibility flag for Tof west EC
Definition: BesStatus.h:45

Referenced by EmcROOTGeo::Draw(), EmcROOTGeo::SetVisEmcDetector(), and BesClient::UpdateStatus().

◆ GetVisEmcHitsBarrel()

Bool_t BesView::GetVisEmcHitsBarrel ( )
inline

Definition at line 182 of file BesView.h.

182{ return fStatusCurrent->fEmcHitsBarrel; }
Bool_t fEmcHitsBarrel
visibility flag for Emc Hits East
Definition: BesStatus.h:87

Referenced by EmcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Emc2DCrystal::Paint(), EmcROOTGeo::SetVisEmcHits(), and BesClient::UpdateStatus().

◆ GetVisEmcHitsEast()

Bool_t BesView::GetVisEmcHitsEast ( )
inline

Definition at line 181 of file BesView.h.

181{ return fStatusCurrent->fEmcHitsEast; }
Bool_t fEmcHitsEast
visibility flag for global Emc Hits
Definition: BesStatus.h:86

Referenced by EmcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Emc2DCrystal::Paint(), EmcROOTGeo::SetVisEmcHits(), and BesClient::UpdateStatus().

◆ GetVisEmcHitsGlobal()

Bool_t BesView::GetVisEmcHitsGlobal ( )
inline

Definition at line 180 of file BesView.h.

180{ return fStatusCurrent->fEmcHitsGlobal; }
Bool_t fEmcHitsGlobal
visibility flag for Tof Hits West
Definition: BesStatus.h:85

Referenced by EmcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Emc2DCrystal::Paint(), EmcROOTGeo::SetVisEmcHits(), and BesClient::UpdateStatus().

◆ GetVisEmcHitsSide()

Bool_t BesView::GetVisEmcHitsSide ( )
inline

Definition at line 184 of file BesView.h.

184{ return fStatusCurrent->fEmcHitsSide; }
Bool_t fEmcHitsSide
visibility flag for Emc Hits West
Definition: BesStatus.h:89

Referenced by Emc2DCrystal::DistancetoPrimitive(), Emc2DCrystal::Paint(), and BesClient::UpdateStatus().

◆ GetVisEmcHitsWest()

Bool_t BesView::GetVisEmcHitsWest ( )
inline

Definition at line 183 of file BesView.h.

183{ return fStatusCurrent->fEmcHitsWest; }
Bool_t fEmcHitsWest
visibility flag for Emc Hits Barrel
Definition: BesStatus.h:88

Referenced by EmcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Emc2DCrystal::Paint(), EmcROOTGeo::SetVisEmcHits(), and BesClient::UpdateStatus().

◆ GetVisEmcSide()

Bool_t BesView::GetVisEmcSide ( )
inline

Definition at line 120 of file BesView.h.

120{ return fStatusCurrent->fEmcSide; }
Bool_t fEmcSide
visivility flag for Emc west EC
Definition: BesStatus.h:49

Referenced by Emc2DCrystal::DistancetoPrimitive(), Emc2DCrystal::Paint(), and BesClient::UpdateStatus().

◆ GetVisEmcWest()

Bool_t BesView::GetVisEmcWest ( )
inline

Definition at line 119 of file BesView.h.

119{ return fStatusCurrent->fEmcWest; }
Bool_t fEmcWest
visivility flag for Emc barrel
Definition: BesStatus.h:48

Referenced by EmcROOTGeo::Draw(), EmcROOTGeo::SetVisEmcDetector(), and BesClient::UpdateStatus().

◆ GetVisFull3DEmc()

Bool_t BesView::GetVisFull3DEmc ( )
inline

Definition at line 144 of file BesView.h.

144{ return fStatusCurrent->fFull3DEmc; }
Bool_t fFull3DEmc
visivility flag for full 3D Tof
Definition: BesStatus.h:63

Referenced by EmcROOTGeo::SetDetector(), and BesClient::UpdateStatus().

◆ GetVisFull3DMdc()

Bool_t BesView::GetVisFull3DMdc ( )
inline

Definition at line 142 of file BesView.h.

142{ return fStatusCurrent->fFull3DMdc; }
Bool_t fFull3DMdc
visivility flag for Muc strips
Definition: BesStatus.h:61

Referenced by MdcROOTGeo::SetDetector(), and BesClient::UpdateStatus().

◆ GetVisFull3DMuc()

Bool_t BesView::GetVisFull3DMuc ( )
inline

Definition at line 145 of file BesView.h.

145{ return fStatusCurrent->fFull3DMuc; }
Bool_t fFull3DMuc
visivility flag for full 3D Emc
Definition: BesStatus.h:64

Referenced by MucROOTGeo::SetDetector(), and BesClient::UpdateStatus().

◆ GetVisFull3DTof()

Bool_t BesView::GetVisFull3DTof ( )
inline

Definition at line 143 of file BesView.h.

143{ return fStatusCurrent->fFull3DTof; }
Bool_t fFull3DTof
visivility flag for full 3D Mdc
Definition: BesStatus.h:62

Referenced by TofROOTGeo::SetDetector(), and BesClient::UpdateStatus().

◆ GetVisMdcGlobal()

Bool_t BesView::GetVisMdcGlobal ( )
inline

Definition at line 94 of file BesView.h.

94{ return fStatusCurrent->fMdcGlobal; }
Bool_t fMdcGlobal
Definition: BesStatus.h:32

Referenced by MdcROOTGeo::Draw(), MdcROOTGeo::SetVisMdcDetector(), and BesClient::UpdateStatus().

◆ GetVisMdcHits()

Bool_t BesView::GetVisMdcHits ( )
inline

Definition at line 163 of file BesView.h.

163{ return fStatusCurrent->fMdcHits; }
Bool_t fMdcHits
visibility flag for global Mdc Hits
Definition: BesStatus.h:74

Referenced by MdcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), and BesClient::UpdateStatus().

◆ GetVisMdcHitsGlobal()

Bool_t BesView::GetVisMdcHitsGlobal ( )
inline

Definition at line 162 of file BesView.h.

162{ return fStatusCurrent->fMdcHitsGlobal; }
Bool_t fMdcHitsGlobal
visibility flag for axis
Definition: BesStatus.h:73

Referenced by MdcROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), MdcROOTGeo::SetVisMdcHits(), and BesClient::UpdateStatus().

◆ GetVisMdcTubes()

Bool_t BesView::GetVisMdcTubes ( )
inline

Definition at line 95 of file BesView.h.

95{ return fStatusCurrent->fMdcTubes; }
Bool_t fMdcTubes
visibility flag for global Mdc
Definition: BesStatus.h:33

Referenced by MdcROOTGeo::Draw(), MdcROOTGeo::DrawHits(), and BesClient::UpdateStatus().

◆ GetVisMdcWires()

Bool_t BesView::GetVisMdcWires ( )
inline

Definition at line 96 of file BesView.h.

96{ return fStatusCurrent->fMdcWires; }
Bool_t fMdcWires
visibility flag for Mdc main tubes
Definition: BesStatus.h:34

Referenced by MdcROOTGeo::Draw(), Mdc2DWire::ExecuteEvent(), and BesClient::UpdateStatus().

◆ GetVisMucBarrel()

Bool_t BesView::GetVisMucBarrel ( )
inline

Definition at line 131 of file BesView.h.

131{ return fStatusCurrent->fMucBarrel; }
Bool_t fMucBarrel
visivility flag for Muc east EC
Definition: BesStatus.h:55

Referenced by MucROOTGeo::Draw(), MucROOTGeo::SetVisMucDetector(), and BesClient::UpdateStatus().

◆ GetVisMucEast()

Bool_t BesView::GetVisMucEast ( )
inline

Definition at line 130 of file BesView.h.

130{ return fStatusCurrent->fMucEast; }
Bool_t fMucEast
visivility flag for global Muc
Definition: BesStatus.h:54

Referenced by MucROOTGeo::Draw(), MucROOTGeo::SetVisMucDetector(), and BesClient::UpdateStatus().

◆ GetVisMucGlobal()

Bool_t BesView::GetVisMucGlobal ( )
inline

Definition at line 129 of file BesView.h.

129{ return fStatusCurrent->fMucGlobal; }
Bool_t fMucGlobal
visivility flag for Emc side
Definition: BesStatus.h:53

Referenced by MucROOTGeo::Draw(), MucROOTGeo::SetVisMucDetector(), and BesClient::UpdateStatus().

◆ GetVisMucHitsBarrel()

Bool_t BesView::GetVisMucHitsBarrel ( )
inline

Definition at line 195 of file BesView.h.

195{ return fStatusCurrent->fMucHitsBarrel; }
Bool_t fMucHitsBarrel
visibility flag for Muc Hits East
Definition: BesStatus.h:95

Referenced by MucROOTGeo::DrawHits(), Muc2DStrip::Paint(), MucROOTGeo::SetVisMucHits(), and BesClient::UpdateStatus().

◆ GetVisMucHitsEast()

Bool_t BesView::GetVisMucHitsEast ( )
inline

Definition at line 194 of file BesView.h.

194{ return fStatusCurrent->fMucHitsEast; }
Bool_t fMucHitsEast
visibility flag for global Muc Hits
Definition: BesStatus.h:94

Referenced by MucROOTGeo::DrawHits(), Muc2DStrip::Paint(), MucROOTGeo::SetVisMucHits(), and BesClient::UpdateStatus().

◆ GetVisMucHitsGlobal()

Bool_t BesView::GetVisMucHitsGlobal ( )
inline

Definition at line 193 of file BesView.h.

193{ return fStatusCurrent->fMucHitsGlobal; }
Bool_t fMucHitsGlobal
visibility flag for Emc Hits Side
Definition: BesStatus.h:93

Referenced by Muc2DStrip::DistancetoPrimitive(), MucROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Muc2DStrip::Paint(), MucROOTGeo::SetVisMucHits(), and BesClient::UpdateStatus().

◆ GetVisMucHitsWest()

Bool_t BesView::GetVisMucHitsWest ( )
inline

Definition at line 196 of file BesView.h.

196{ return fStatusCurrent->fMucHitsWest; }
Bool_t fMucHitsWest
visibility flag for Muc Hits Barrel
Definition: BesStatus.h:96

Referenced by MucROOTGeo::DrawHits(), Muc2DStrip::Paint(), MucROOTGeo::SetVisMucHits(), and BesClient::UpdateStatus().

◆ GetVisMucStrips()

Bool_t BesView::GetVisMucStrips ( )
inline

Definition at line 133 of file BesView.h.

133{ return fStatusCurrent->fMucStrips; }
Bool_t fMucStrips
visivility flag for Muc west EC
Definition: BesStatus.h:57

Referenced by Muc2DStrip::DistancetoPrimitive(), Muc2DStrip::Paint(), and BesClient::UpdateStatus().

◆ GetVisMucWest()

Bool_t BesView::GetVisMucWest ( )
inline

Definition at line 132 of file BesView.h.

132{ return fStatusCurrent->fMucWest; }
Bool_t fMucWest
visivility flag for Muc barrel
Definition: BesStatus.h:56

Referenced by MucROOTGeo::Draw(), MucROOTGeo::SetVisMucDetector(), and BesClient::UpdateStatus().

◆ GetVisTofBarrel()

Bool_t BesView::GetVisTofBarrel ( )
inline

Definition at line 105 of file BesView.h.

105{ return fStatusCurrent->fTofBarrel; }
Bool_t fTofBarrel
visibility flag for Tof east EC
Definition: BesStatus.h:40

Referenced by TofROOTGeo::Draw(), TofROOTGeo::SetVisTofDetector(), and BesClient::UpdateStatus().

◆ GetVisTofEast()

Bool_t BesView::GetVisTofEast ( )
inline

Definition at line 104 of file BesView.h.

104{ return fStatusCurrent->fTofEast; }
Bool_t fTofEast
visibility flag for global Tof
Definition: BesStatus.h:39

Referenced by TofROOTGeo::Draw(), TofROOTGeo::SetVisTofDetector(), and BesClient::UpdateStatus().

◆ GetVisTofGlobal()

Bool_t BesView::GetVisTofGlobal ( )
inline

Definition at line 103 of file BesView.h.

103{ return fStatusCurrent->fTofGlobal; }
Bool_t fTofGlobal
visibility flag for Mdc wires
Definition: BesStatus.h:38

Referenced by TofROOTGeo::Draw(), TofROOTGeo::SetVisTofDetector(), and BesClient::UpdateStatus().

◆ GetVisTofHitsBarrel()

Bool_t BesView::GetVisTofHitsBarrel ( )
inline

Definition at line 171 of file BesView.h.

171{ return fStatusCurrent->fTofHitsBarrel; }
Bool_t fTofHitsBarrel
visibility flag for Tof Hits East
Definition: BesStatus.h:80

Referenced by TofROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Tof2DScin::Paint(), TofROOTGeo::SetVisTofHits(), and BesClient::UpdateStatus().

◆ GetVisTofHitsEast()

Bool_t BesView::GetVisTofHitsEast ( )
inline

Definition at line 170 of file BesView.h.

170{ return fStatusCurrent->fTofHitsEast; }
Bool_t fTofHitsEast
visibility flag for global Tof Hits
Definition: BesStatus.h:79

Referenced by TofROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Tof2DScin::Paint(), TofROOTGeo::SetVisTofHits(), and BesClient::UpdateStatus().

◆ GetVisTofHitsGlobal()

Bool_t BesView::GetVisTofHitsGlobal ( )
inline

Definition at line 169 of file BesView.h.

169{ return fStatusCurrent->fTofHitsGlobal; }
Bool_t fTofHitsGlobal
visibility flag for Mdc Hits
Definition: BesStatus.h:78

Referenced by TofROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Tof2DScin::Paint(), TofROOTGeo::SetVisTofHits(), and BesClient::UpdateStatus().

◆ GetVisTofHitsWest()

Bool_t BesView::GetVisTofHitsWest ( )
inline

Definition at line 172 of file BesView.h.

172{ return fStatusCurrent->fTofHitsWest; }
Bool_t fTofHitsWest
visibility flag for Tof Hits Barrel
Definition: BesStatus.h:81

Referenced by TofROOTGeo::DrawHits(), BesGeoTrack::ExecuteEvent(), Tof2DScin::Paint(), TofROOTGeo::SetVisTofHits(), and BesClient::UpdateStatus().

◆ GetVisTofWest()

Bool_t BesView::GetVisTofWest ( )
inline

Definition at line 106 of file BesView.h.

106{ return fStatusCurrent->fTofWest; }
Bool_t fTofWest
visibility flag for Tof barrel
Definition: BesStatus.h:41

Referenced by TofROOTGeo::Draw(), TofROOTGeo::SetVisTofDetector(), and BesClient::UpdateStatus().

◆ GetVisTracksEmc()

Bool_t BesView::GetVisTracksEmc ( )
inline

Definition at line 207 of file BesView.h.

207{ return fStatusCurrent->fTracksEmc; }
Bool_t fTracksEmc
visibility flag for Tof Tracks
Definition: BesStatus.h:103

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisTracksExt()

Bool_t BesView::GetVisTracksExt ( )
inline

Definition at line 209 of file BesView.h.

209{ return fStatusCurrent->fTracksExt; }
Bool_t fTracksExt
visibility flag for Muc Tracks
Definition: BesStatus.h:105

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisTracksGlobal()

Bool_t BesView::GetVisTracksGlobal ( )
inline

Definition at line 204 of file BesView.h.

204{ return fStatusCurrent->fTracksGlobal; }
Bool_t fTracksGlobal
visibility flag for Muc Hits West
Definition: BesStatus.h:100

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisTracksMdc()

Bool_t BesView::GetVisTracksMdc ( )
inline

Definition at line 205 of file BesView.h.

205{ return fStatusCurrent->fTracksMdc; }
Bool_t fTracksMdc
visibility flag for global Tracks
Definition: BesStatus.h:101

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisTracksMuc()

Bool_t BesView::GetVisTracksMuc ( )
inline

Definition at line 208 of file BesView.h.

208{ return fStatusCurrent->fTracksMuc; }
Bool_t fTracksMuc
visibility flag for Emc Tracks
Definition: BesStatus.h:104

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisTracksTof()

Bool_t BesView::GetVisTracksTof ( )
inline

Definition at line 206 of file BesView.h.

206{ return fStatusCurrent->fTracksTof; }
Bool_t fTracksTof
visibility flag for Mdc Tracks
Definition: BesStatus.h:102

Referenced by BesEvent::DrawTracks(), and BesClient::UpdateStatus().

◆ GetVisZoom()

Float_t BesView::GetVisZoom ( )
inline

Definition at line 107 of file BesView.h.

107{ return fStatusCurrent->fZoom; }
Float_t fZoom
Definition: BesStatus.h:117

◆ GetVisZRPlaneOnXY()

Bool_t BesView::GetVisZRPlaneOnXY ( )
inline

Definition at line 154 of file BesView.h.

154{ return fStatusCurrent->fZRPlaneOnXY; }
Bool_t fZRPlaneOnXY
visibility flag for beam pipe
Definition: BesStatus.h:69

Referenced by BesGeometry::Draw2DXY(), and BesClient::UpdateStatus().

◆ GetZoomFactor()

virtual Double_t BesView::GetZoomFactor ( )
inlinevirtual

Definition at line 254 of file BesView.h.

254{ return fZoomFactor; }

◆ GetZoomRatio()

Double_t BesView::GetZoomRatio ( )
inline

Definition at line 64 of file BesView.h.

64{ return fExtentDefault/GetExtent(); }
Double_t GetExtent() const
Definition: BesTView.cxx:1123

Referenced by BesClient::UpdateBesInputFields(), ZoomIn(), and ZoomOut().

◆ Inspect()

virtual void BesView::Inspect ( )
inlinevirtual

Definition at line 247 of file BesView.h.

247{ BesTView::Inspect(); }

◆ Move()

void BesView::Move ( Int_t  px,
Int_t  py 
)

Definition at line 424 of file BesView.cxx.

424 {
425
426 /*
427 Double_t p[3], pw[3];
428 for (Int_t i = 0; i < 3; i++) {
429 pw[i] = 0.5*(fRmin[i]+fRmax[i]);
430 }
431 cout << "pw " << pw[0] << " " << pw[1] << " " << pw[2] << endl;
432 WCtoNDC(pw, p);
433 cout << "p " << p[0] << " " << p[1] << " " << p[2] << endl;
434
435 p[0] += (gPad->PixeltoX(0) - gPad->PixeltoX(px));
436 p[1] += (gPad->PixeltoY(0) - gPad->PixeltoY(py));
437 cout << "p " << p[0] << " " << p[1] << " " << p[2] << endl;
438 NDCtoWC(p, pw);
439 cout << "pw " << pw[0] << " " << pw[1] << " " << pw[2] << endl;
440
441 MoveFocus(&pw[0], fRmax[0]-fRmin[0], fRmax[1]-fRmin[1], fRmax[2]-fRmin[2]);
442 gPad->Modified();
443 gPad->Update();
444 */
445
446 //
447 // Move (px, py in pixel coordinates)
448 Double_t x1, y1, x2, y2, dx, dy, x, y, x0, y0;
449 x1 = gPad->GetX1();
450 y1 = gPad->GetY1();
451 x2 = gPad->GetX2();
452 y2 = gPad->GetY2();
453 x0 = gPad->PixeltoX(0);
454 y0 = gPad->PixeltoY(0);
455 x = gPad->PixeltoX(px);
456 y = gPad->PixeltoY(py);
457 dx = -(x - x0);
458 dy = -(y - y0);
459
460 gPad->Range(x1+dx, y1+dy, x2+dx, y2+dy);
461 gPad->Modified();
462}

Referenced by BesClient::ExecuteEvent(), and BesClient::HandleButtons().

◆ NDCtoWC() [1/2]

void BesView::NDCtoWC ( const Double_t *  pn,
Double_t *  pw 
)
virtual

Reimplemented from BesTView.

Definition at line 757 of file BesView.cxx.

757 {
758 //
759 // Transform back from NDCs
760 Double_t p[3];
761 p[0] = pn[0];
762 p[1] = pn[1];
763 p[2] = pn[2];
764
765 if ( fStatusCurrent->fFishEye == kTRUE ) {
766 Double_t r;
767 if ( fViewType & kZRView ) {
768 Double_t pvWC[3], pvNDC[3];
769 pvWC[0] = +4;
770 pvWC[1] = 0;
771 pvWC[2] = 0;
772 BesTView::WCtoNDC(pvWC, pvNDC);
773 p[0] = TMath::Sign((pn[0] - pvNDC[0])*(pn[0] - pvNDC[0]),
774 pn[0] - pvNDC[0]) + pvNDC[0];
775 p[1] = TMath::Sign((pn[1] - pvNDC[1])*(pn[1] - pvNDC[1]),
776 pn[1] - pvNDC[1]) + pvNDC[1];
777 } else {
778 r = TMath::Sqrt(TMath::Power(p[0],2)
779 +TMath::Power(p[1],2));
780 p[0] *= r;
781 p[1] *= r;
782 }
783 }
784 BesTView::NDCtoWC(p, pw);
785}
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)
Definition: BesTView.cxx:1606
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)
Definition: BesTView.cxx:1176

◆ NDCtoWC() [2/2]

void BesView::NDCtoWC ( const Float_t *  pn,
Float_t *  pw 
)
virtual

Reimplemented from BesTView.

Definition at line 725 of file BesView.cxx.

725 {
726 //
727 // Transform back from NDCs
728 Float_t p[3];
729 p[0] = pn[0];
730 p[1] = pn[1];
731 p[2] = pn[2];
732
733 if ( fStatusCurrent->fFishEye == kTRUE ) {
734 Float_t r;
735 if ( fViewType & kZRView ) {
736 Float_t pvWC[3], pvNDC[3];
737 pvWC[0] = +4;
738 pvWC[1] = 0;
739 pvWC[2] = 0;
740 BesTView::WCtoNDC(pvWC, pvNDC);
741 p[0] = TMath::Sign((pn[0] - pvNDC[0])*(pn[0] - pvNDC[0]),
742 pn[0] - pvNDC[0]) + pvNDC[0];
743 p[1] = TMath::Sign((pn[1] - pvNDC[1])*(pn[1] - pvNDC[1]),
744 pn[1] - pvNDC[1]) + pvNDC[1];
745 } else {
746 r = TMath::Sqrt(TMath::Power(p[0],2)
747 +TMath::Power(p[1],2));
748 p[0] *= r;
749 p[1] *= r;
750 }
751 }
752 BesTView::NDCtoWC(p, pw);
753}

Referenced by BesCircle2D::DistancetoPrimitive(), and GetObjectInfo().

◆ PrintCurrent()

void BesView::PrintCurrent ( )
inline

Definition at line 231 of file BesView.h.

231{ fStatusCurrent->Print(); }

◆ Reset()

void BesView::Reset ( )

Definition at line 824 of file BesView.cxx.

824 {
825 //
826 // reset view to default values
827
828 // reset status instances of views
829 fStatus3D->Default(k3DView);
830 fStatusXY->Default(kXYView);
831 fStatusZR->Default(kZRView);
832 fZoomFactor = 1.2;
833
834 // reset current status instance tp fViewType
835 fStatusCurrent->Default(fViewType);
836
837 // reset phirange
838 // this->SetPhiRange(0,180);
839 this->UpdateView(1);
840 gPad->Update();
841}
void Default(EBESViewType type)
Definition: BesStatus.cxx:38
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition: BesView.cxx:598

Referenced by BesClient::HandleButtons().

◆ SetDrawOption()

virtual void BesView::SetDrawOption ( Option_t *  option)
inlinevirtual

Definition at line 250 of file BesView.h.

250{ BesTView::SetDrawOption(option); }

◆ SetFishEye()

void BesView::SetFishEye ( Bool_t  input = 0)
inline

Definition at line 221 of file BesView.h.

221 {
222 if ( fViewType & k3DView ) {
223 fFishEye = 0;
224 fStatusCurrent->fFishEye = 0;
225 } else {
226 fFishEye = input;
227 fStatusCurrent->fFishEye = input;
228 }
229 } // *TOGGLE*

Referenced by BesClient::HandleButtons(), and BesClient::UpdateStatus().

◆ SetLineAttributes()

virtual void BesView::SetLineAttributes ( )
inlinevirtual

Definition at line 251 of file BesView.h.

251{ BesTView::SetLineAttributes(); }

◆ SetMarkerSize()

void BesView::SetMarkerSize ( Float_t  size)
inline

Definition at line 90 of file BesView.h.

90{ fMarkerSize = size; }

◆ SetPhiRange()

void BesView::SetPhiRange ( Float_t  PhiMin = 0,
Float_t  PhiMax = 180 
)

Definition at line 582 of file BesView.cxx.

582 {
583 //
584 // Set phi range for ZR view
585 if ( gDebug ) cout << "BesView::SetPhiRange called" << endl;
586
587 fStatusCurrent->fPhiRangeMin = PhiMin;
588 fStatusCurrent->fPhiRangeMax = PhiMax;
589
590 // Update view
591 if ( !gBesGeometry ) return;
592 //gEvent->AddBACPadTowerZR();
593 UpdateView(0);
594}
R__EXTERN BesGeometry * gBesGeometry
Definition: BesGeometry.h:103
#define PhiMax
#define PhiMin
Float_t fPhiRangeMax
Definition: BesStatus.h:114

◆ SetViewType()

void BesView::SetViewType ( EBESViewType  ViewType,
Bool_t  resetview = kFALSE 
)
virtual

Definition at line 94 of file BesView.cxx.

94 {
95 //
96 // Set type of view
97
98 // check the state of the component before change and copy current status to respective status
99 if ( fViewType & k3DView ){
100
101 fStatus3D->Transfer(fStatusCurrent,0);
102
103 } else if ( fViewType & kXYView ) {
104
105 fStatusXY->Transfer(fStatusCurrent,0);
106
107 } else if ( fViewType & kZRView ) {
108
109 fStatusZR->Transfer(fStatusCurrent,0);
110
111 }
112
113 fViewType = ViewType;
114 ClearPad();
115
116 // Set view direction properly
117 Int_t iret;
118 if ( fViewType & k3DView ) {
119 //cout << "SetViewType 3D" << endl;
120 //
121 // 3D view
122
123 // remember my previous state, set parallel first anyway, then choose perspective or not
124 Int_t iPerspective = 0;
125
126 if (IsPerspective()) iPerspective = 1;
127
128 // copy 3D status to current status
129 fStatusCurrent->Transfer(fStatus3D,1);
130
131 // Geometry exist ?
132 if ( !gBesGeometry ) return;
133
134 // set view
135 if ( resetview ) {
136 //SetView(0, 90, 270, iret);
137 this->Front();
138 this->Center();
139
140 DefaultRange();
141 for (int i = 0; i < 2; i++) this->ZoomView(gPad, fZoomFactor);
142
143 // reset marker size
144 fMarkerSize = 0.1;
145 }
146
147 // Draw geometry
148
149 cout << "is there any problem after update from root's version 4.03 to 4.04" << endl;
150 gBesGeometry->Draw("3D,SAME");
151 //this->SetParralel(); //comment out 2007.5.1 try to use ROOT-5.10.00
152 this->SetParallel();
153 //old version 4.0.3 have a spell mistake BesTView::SetParralel()=>SetParallel()
154 //changed by tianhl at Mon Aug 20 2007
155 if (iPerspective == 1) this->SetPerspective();
156
157 // Draw tracks
158 if ( gEvent ) gEvent->DrawTracks("");
159 //else cout << "3D gEvent does not exist " << endl;
160
161 } else if ( fViewType & kXYView ) {
162 //cout << "SetViewType XY" << endl;
163 //
164 // XY view
165 // =======
166
167 // copy XY status to current status
168 fStatusCurrent->Transfer(fStatusXY,1);
169
170 // Geometry exist ?
171 if ( !gBesGeometry ) return;
172
173 // set view
174 if ( resetview ) {
175 SetView(0, 0, 270, iret);
176 this->Center();
177
178 DefaultRange();
179 DefaultRange();
180 for (int i = 0; i < 2; i++) this->ZoomView(gPad, fZoomFactor);
181
182 // reset marker size
183 fMarkerSize = 0.1;
184
185 }
186
187 /*
188 // Draw event
189 if ( gEvent ) gEvent->SetHits("XY");
190 else cout << "XY : gEvent does not exist " << endl;
191 */
192
193 // Draw geometry
194 gBesGeometry->Draw("XY,SAME");
195
196 // Draw 2D hits and tracks
197 if ( gEvent ) {
198 gEvent->DrawHits("");
199 gEvent->DrawTracks("");
200 }
201 //else cout << "XY : gEvent does not exist " << endl;
202
203 } else if ( fViewType & kZRView ) {
204 //cout << "SetViewType ZR" << endl;
205 //
206 // ZR view
207 // =======
208
209 // copy ZR status to current status
210 fStatusCurrent->Transfer(fStatusZR,1);
211
212 // Geometry exist ?
213 if ( !gBesGeometry ) return;
214
215 // set view
216 if ( resetview ) {
217 SetView(180,90,90,iret);
218 this->Center();
219
220 DefaultRange();
221 DefaultRange();
222 for (int i = 0; i < 2; i++) this->ZoomView(gPad, fZoomFactor);
223
224 // reset marker size
225 fMarkerSize = 0.1;
226
227 }
228
229 /*
230 // Draw event
231 if ( gEvent ) gEvent->SetHits("ZR");
232 else cout << "ZR : gEvent does not exist " << endl;
233 */
234
235 // Draw geometry
236 gBesGeometry->Draw("ZR,SAME");
237
238 // Draw hits and tracks
239 if ( gEvent ) {
240 gEvent->DrawHits("");
241 gEvent->DrawTracks("");
242 }
243 //else cout << "ZR : gEvent does not exist " << endl;
244
245 }
246
247 // Draw label
248 DrawLabel();
249}
R__EXTERN BesEvent * gEvent
Definition: BesEvent.h:278
virtual void DrawHits(Option_t *option)
Definition: BesEvent.cxx:1034
virtual void DrawTracks(Option_t *option)
Definition: BesEvent.cxx:1045
virtual void Draw(Option_t *option="3D")
void Transfer(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:243
virtual void ZoomView(TVirtualPad *pad=0, Double_t zoomFactor=1.25)
Definition: BesTView.cxx:1777
Bool_t IsPerspective() const
Definition: BesTView.h:113
virtual void SetParallel()
Definition: BesTView.cxx:1432
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
Definition: BesTView.cxx:1525
virtual void SetPerspective()
Definition: BesTView.cxx:1442
virtual void ClearPad()
Definition: BesView.cxx:353
void Center()
Definition: BesView.cxx:466
virtual void DefaultRange()
Definition: BesView.cxx:87
virtual void DrawLabel()
Definition: BesView.cxx:618

Referenced by Side3D(), UpdateView(), View3D(), ViewXY(), and ViewZR().

◆ SetViewTypeBare()

void BesView::SetViewTypeBare ( EBESViewType  ViewType,
Bool_t  resetview = kFALSE 
)
virtual

Definition at line 251 of file BesView.cxx.

251 {
252 /*
253 //
254 // Set type of view
255
256 cout << "setviewtypeBare: start..." << endl;
257 // check the state of the component before change and copy current status to respective status
258 if ( fViewType & k3DView ){
259
260 fStatus3D->Transfer(fStatusCurrent,0);
261
262 } else if ( fViewType & kXYView ) {
263
264 fStatusXY->Transfer(fStatusCurrent,0);
265
266 } else if ( fViewType & kZRView ) {
267
268
269 fStatusZR->Transfer(fStatusCurrent,0);
270
271 }
272
273 fViewType = ViewType;
274 ClearPad();
275
276 // Set view direction properly
277 Int_t iret;
278 cout << "fViewType=" << fViewType << endl;
279 if ( fViewType & k3DView ) {
280 //
281 // 3D view
282
283 // copy 3D status to current status
284 fStatusCurrent->Transfer(fStatus3D,1);
285 // Geometry exist ?
286 if ( !gGeometry ) return;
287
288 // set view
289 if ( resetview ) {
290 SetView(0, 90, 270, iret);
291 SetRange(-600,-600,-400,600,600,800);
292
293 // reset marker size
294 fMarkerSize = 0.1;
295
296 }
297
298 } else if ( fViewType & kXYView ) {
299 //
300 // XY view
301 // =======
302
303 // copy XY status to current status
304 fStatusCurrent->Transfer(fStatusXY,1);
305
306 // Geometry exist ?
307 if ( !gGeometry ) return;
308
309 // set view
310 if ( resetview ) {
311 SetView(270, 0, 0, iret);
312 // SetRange(-200,-200,-200,200,200,200);
313 SetRange(-310,-310,-310,310,310,310);
314 // reset marker size
315 fMarkerSize = 0.1;
316
317 }
318
319 } else if ( fViewType & kZRView ) {
320
321 //
322 // ZR view
323 // =======
324
325 // copy ZR status to current status
326 cout << "fViewType & kZRView: before transfer..." << endl;
327 fStatusCurrent->Transfer(fStatusZR,1);
328 cout << "fViewType & kZRView: after transfer..." << endl;
329
330 // Geometry exist ?
331 if ( !gGeometry ) return;
332
333 // set view
334 if ( resetview ) {
335 SetView(90, 180, 0, iret);
336 // SetRange(-130,-200,-200,270,200,200);
337 SetRange(-160,-400,-400,740,400,400);
338 // reset marker size
339 fMarkerSize = 0.1;
340
341 }
342
343 }
344
345 // Draw label
346 cout << "SetViewTypeBare: no drawlabel" << endl;
347 //DrawLabel();
348 */
349}

◆ SetVisAxis()

void BesView::SetVisAxis ( Bool_t  input)
inline

Definition at line 159 of file BesView.h.

159{ fStatusCurrent->fAxis = input; }

Referenced by BesClient::HandleButtons(), BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisBeamPipe()

void BesView::SetVisBeamPipe ( Bool_t  input)
inline

Definition at line 157 of file BesView.h.

157{ fStatusCurrent->fBeamPipe = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcBarrel()

void BesView::SetVisEmcBarrel ( Bool_t  input)
inline

Definition at line 124 of file BesView.h.

124{ fStatusCurrent->fEmcBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcEast()

void BesView::SetVisEmcEast ( Bool_t  input)
inline

Definition at line 123 of file BesView.h.

123{ fStatusCurrent->fEmcEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcGlobal()

void BesView::SetVisEmcGlobal ( Bool_t  input)
inline

Definition at line 122 of file BesView.h.

122{ fStatusCurrent->fEmcGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcHitsBarrel()

void BesView::SetVisEmcHitsBarrel ( Bool_t  input)
inline

Definition at line 188 of file BesView.h.

188{ fStatusCurrent->fEmcHitsBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcHitsEast()

void BesView::SetVisEmcHitsEast ( Bool_t  input)
inline

Definition at line 187 of file BesView.h.

187{ fStatusCurrent->fEmcHitsEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcHitsGlobal()

void BesView::SetVisEmcHitsGlobal ( Bool_t  input)
inline

Definition at line 186 of file BesView.h.

186{ fStatusCurrent->fEmcHitsGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcHitsSide()

void BesView::SetVisEmcHitsSide ( Bool_t  input)
inline

Definition at line 190 of file BesView.h.

190{ fStatusCurrent->fEmcHitsSide = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcHitsWest()

void BesView::SetVisEmcHitsWest ( Bool_t  input)
inline

Definition at line 189 of file BesView.h.

189{ fStatusCurrent->fEmcHitsWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcSide()

void BesView::SetVisEmcSide ( Bool_t  input)
inline

Definition at line 126 of file BesView.h.

126{ fStatusCurrent->fEmcSide = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisEmcWest()

void BesView::SetVisEmcWest ( Bool_t  input)
inline

Definition at line 125 of file BesView.h.

125{ fStatusCurrent->fEmcWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisFull3DEmc()

void BesView::SetVisFull3DEmc ( Bool_t  input)
inline

Definition at line 149 of file BesView.h.

149{ fStatusCurrent->fFull3DEmc = input; }

Referenced by BesClient::HandleViewOptionMenu().

◆ SetVisFull3DMdc()

void BesView::SetVisFull3DMdc ( Bool_t  input)
inline

Definition at line 147 of file BesView.h.

147{ fStatusCurrent->fFull3DMdc = input; }

Referenced by BesClient::HandleViewOptionMenu().

◆ SetVisFull3DMuc()

void BesView::SetVisFull3DMuc ( Bool_t  input)
inline

Definition at line 150 of file BesView.h.

150{ fStatusCurrent->fFull3DMuc = input; }

Referenced by BesClient::HandleViewOptionMenu().

◆ SetVisFull3DTof()

void BesView::SetVisFull3DTof ( Bool_t  input)
inline

Definition at line 148 of file BesView.h.

148{ fStatusCurrent->fFull3DTof = input; }

Referenced by BesClient::HandleViewOptionMenu().

◆ SetVisMdcGlobal()

void BesView::SetVisMdcGlobal ( Bool_t  input)
inline

Definition at line 98 of file BesView.h.

98{ fStatusCurrent->fMdcGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMdcHits()

void BesView::SetVisMdcHits ( Bool_t  input)
inline

Definition at line 166 of file BesView.h.

166{ fStatusCurrent->fMdcHits = input; }

Referenced by BesClient::HandleViewOptionMenu().

◆ SetVisMdcHitsGlobal()

void BesView::SetVisMdcHitsGlobal ( Bool_t  input)
inline

Definition at line 165 of file BesView.h.

165{ fStatusCurrent->fMdcHitsGlobal = input; }

Referenced by BesClient::SetState().

◆ SetVisMdcTubes()

void BesView::SetVisMdcTubes ( Bool_t  input)
inline

Definition at line 99 of file BesView.h.

99{ fStatusCurrent->fMdcTubes = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMdcWires()

void BesView::SetVisMdcWires ( Bool_t  input)
inline

Definition at line 100 of file BesView.h.

100{ fStatusCurrent->fMdcWires = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucBarrel()

void BesView::SetVisMucBarrel ( Bool_t  input)
inline

Definition at line 137 of file BesView.h.

137{ fStatusCurrent->fMucBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucEast()

void BesView::SetVisMucEast ( Bool_t  input)
inline

Definition at line 136 of file BesView.h.

136{ fStatusCurrent->fMucEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucGlobal()

void BesView::SetVisMucGlobal ( Bool_t  input)
inline

Definition at line 135 of file BesView.h.

135{ fStatusCurrent->fMucGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucHitsBarrel()

void BesView::SetVisMucHitsBarrel ( Bool_t  input)
inline

Definition at line 200 of file BesView.h.

200{ fStatusCurrent->fMucHitsBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucHitsEast()

void BesView::SetVisMucHitsEast ( Bool_t  input)
inline

Definition at line 199 of file BesView.h.

199{ fStatusCurrent->fMucHitsEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucHitsGlobal()

void BesView::SetVisMucHitsGlobal ( Bool_t  input)
inline

Definition at line 198 of file BesView.h.

198{ fStatusCurrent->fMucHitsGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucHitsWest()

void BesView::SetVisMucHitsWest ( Bool_t  input)
inline

Definition at line 201 of file BesView.h.

201{ fStatusCurrent->fMucHitsWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucStrips()

void BesView::SetVisMucStrips ( Bool_t  input)
inline

Definition at line 139 of file BesView.h.

139{ fStatusCurrent->fMucStrips = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisMucWest()

void BesView::SetVisMucWest ( Bool_t  input)
inline

Definition at line 138 of file BesView.h.

138{ fStatusCurrent->fMucWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofBarrel()

void BesView::SetVisTofBarrel ( Bool_t  input)
inline

Definition at line 111 of file BesView.h.

111{ fStatusCurrent->fTofBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofEast()

void BesView::SetVisTofEast ( Bool_t  input)
inline

Definition at line 110 of file BesView.h.

110{ fStatusCurrent->fTofEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofGlobal()

void BesView::SetVisTofGlobal ( Bool_t  input)
inline

Definition at line 109 of file BesView.h.

109{ fStatusCurrent->fTofGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofHitsBarrel()

void BesView::SetVisTofHitsBarrel ( Bool_t  input)
inline

Definition at line 176 of file BesView.h.

176{ fStatusCurrent->fTofHitsBarrel = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofHitsEast()

void BesView::SetVisTofHitsEast ( Bool_t  input)
inline

Definition at line 175 of file BesView.h.

175{ fStatusCurrent->fTofHitsEast = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofHitsGlobal()

void BesView::SetVisTofHitsGlobal ( Bool_t  input)
inline

Definition at line 174 of file BesView.h.

174{ fStatusCurrent->fTofHitsGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofHitsWest()

void BesView::SetVisTofHitsWest ( Bool_t  input)
inline

Definition at line 177 of file BesView.h.

177{ fStatusCurrent->fTofHitsWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTofWest()

void BesView::SetVisTofWest ( Bool_t  input)
inline

Definition at line 112 of file BesView.h.

112{ fStatusCurrent->fTofWest = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksEmc()

void BesView::SetVisTracksEmc ( Bool_t  input)
inline

Definition at line 214 of file BesView.h.

214{ fStatusCurrent->fTracksEmc = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksExt()

void BesView::SetVisTracksExt ( Bool_t  input)
inline

Definition at line 216 of file BesView.h.

216{ fStatusCurrent->fTracksExt = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksGlobal()

void BesView::SetVisTracksGlobal ( Bool_t  input)
inline

Definition at line 211 of file BesView.h.

211{ fStatusCurrent->fTracksGlobal = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksMdc()

void BesView::SetVisTracksMdc ( Bool_t  input)
inline

Definition at line 212 of file BesView.h.

212{ fStatusCurrent->fTracksMdc = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksMuc()

void BesView::SetVisTracksMuc ( Bool_t  input)
inline

Definition at line 215 of file BesView.h.

215{ fStatusCurrent->fTracksMuc = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisTracksTof()

void BesView::SetVisTracksTof ( Bool_t  input)
inline

Definition at line 213 of file BesView.h.

213{ fStatusCurrent->fTracksTof = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetVisZoom()

void BesView::SetVisZoom ( Float_t  input)
inline

Definition at line 113 of file BesView.h.

113{ fStatusCurrent->fZoom = input; }

◆ SetVisZRPlaneOnXY()

void BesView::SetVisZRPlaneOnXY ( Bool_t  input)
inline

Definition at line 158 of file BesView.h.

158{ fStatusCurrent->fZRPlaneOnXY = input; }

Referenced by BesClient::HandleViewOptionMenu(), and BesClient::SetState().

◆ SetZoomFactor()

virtual void BesView::SetZoomFactor ( Double_t  factor)
inlinevirtual

Definition at line 253 of file BesView.h.

253{ fZoomFactor = factor; };

◆ SetZoomRatio()

void BesView::SetZoomRatio ( Double_t  ratio)

Definition at line 482 of file BesView.cxx.

483{
484 DefaultRange();
485 ZoomView(gPad, ratio);
486
487 //yzhang TEMP FIXME
488 fStatusCurrent->fZoom = ratio;
489 fStatusXY->fZoom = ratio;
490 fStatusZR->fZoom = ratio;
491}

Referenced by BesClient::ExecuteReturn(), and BesClient::UpdateStatus().

◆ Side()

virtual void BesView::Side ( )
inlinevirtual

Reimplemented from BesTView.

Definition at line 236 of file BesView.h.

236{ BesTView::Side(); }
virtual void Side()
Definition: BesTView.h:179

◆ Side3D()

void BesView::Side3D ( )

Definition at line 789 of file BesView.cxx.

789 {
790 //
791 // set side view for 3D
792
793 this->SetViewType(k3DView,1);
794 Int_t iret;
795 this->SetView(0,90,270,iret);
796}
virtual void SetViewType(EBESViewType ViewType, Bool_t resetview=kFALSE)
Definition: BesView.cxx:94

◆ Top()

virtual void BesView::Top ( )
inlinevirtual

Reimplemented from BesTView.

Definition at line 237 of file BesView.h.

237{ BesTView::Front(); }
virtual void Front()
Definition: BesTView.h:177

◆ Top3D()

void BesView::Top3D ( )
inline

Definition at line 80 of file BesView.h.

80 {
81 this->View3D();
82 Int_t iret;
83 this->SetView(-90,90,270,iret);
84
85 // this->Top();
86 } // *MENU*

◆ UpdateView()

void BesView::UpdateView ( Bool_t  resetview = kFALSE)
virtual

◆ View3D()

void BesView::View3D ( )
inline

Definition at line 69 of file BesView.h.

69{ SetViewType(k3DView,1); } // *MENU*

Referenced by BesVisDisplay::Draw3D(), Front3D(), and Top3D().

◆ ViewXY()

void BesView::ViewXY ( )
inline

Definition at line 70 of file BesView.h.

70{ SetViewType(kXYView,1); } // *MENU*

Referenced by BesVisDisplay::Draw2DXY().

◆ ViewZR()

void BesView::ViewZR ( )
inline

Definition at line 71 of file BesView.h.

71{ SetViewType(kZRView,1); } // *MENU*

Referenced by BesVisDisplay::Draw2DZR().

◆ WCtoNDC() [1/2]

void BesView::WCtoNDC ( const Double_t *  pw,
Double_t *  pn 
)
virtual

Reimplemented from BesTView.

Definition at line 692 of file BesView.cxx.

692 {
693 //
694 // Transform world coordinates to
695 // normalised device coordinates.
696 // This method was taken from BesTView
697 // and extended by FishEye view
698 BesTView::WCtoNDC(pw, pn);
699
700 if ( fStatusCurrent->fFishEye == kTRUE ) {
701 Double_t r, s;
702 if ( fViewType & kZRView ) {
703 Double_t pvWC[3], pvNDC[3];
704 pvWC[0] = +4;
705 pvWC[1] = 0;
706 pvWC[2] = 0;
707 BesTView::WCtoNDC(pvWC, pvNDC);
708 pn[0] = TMath::Sign(TMath::Sqrt(TMath::Abs(pn[0] - pvNDC[0])),
709 pn[0] - pvNDC[0]) + pvNDC[0];
710 pn[1] = TMath::Sign(TMath::Sqrt(TMath::Abs(pn[1] - pvNDC[1])),
711 pn[1] - pvNDC[1]) + pvNDC[1];
712 } else {
713
714 r = TMath::Sqrt(TMath::Power(pn[0],2)
715 +TMath::Power(pn[1],2));
716 s = TMath::Sqrt(r)/r;
717 pn[0] *= s;
718 pn[1] *= s;
719 }
720 }
721}
XmlRpcServer s
Definition: HelloServer.cpp:11

◆ WCtoNDC() [2/2]

void BesView::WCtoNDC ( const Float_t *  pw,
Float_t *  pn 
)
virtual

Reimplemented from BesTView.

Definition at line 659 of file BesView.cxx.

659 {
660 //
661 // Transform world coordinates to
662 // normalised device coordinates.
663 // This method was taken from BesTView
664 // and extended by FishEye view
665 BesTView::WCtoNDC(pw, pn);
666 //cout << "fFishEye " << fFishEye << endl;
667
668 if ( fStatusCurrent->fFishEye == kTRUE ) {
669 Float_t r, s;
670 if ( fViewType & kZRView ) {
671 Float_t pvWC[3], pvNDC[3];
672 pvWC[0] = +4;
673 pvWC[1] = 0;
674 pvWC[2] = 0;
675 BesTView::WCtoNDC(pvWC, pvNDC);
676 pn[0] = TMath::Sign(Double_t(TMath::Sqrt(TMath::Abs(pn[0] - pvNDC[0]))),
677 Double_t(pn[0] - pvNDC[0])) + pvNDC[0];
678 pn[1] = TMath::Sign(Double_t(TMath::Sqrt(TMath::Abs(pn[1] - pvNDC[1]))),
679 Double_t(pn[1] - pvNDC[1])) + pvNDC[1];
680 } else {
681 r = TMath::Sqrt(TMath::Power(pn[0],2)
682 +TMath::Power(pn[1],2));
683 s = TMath::Sqrt(r)/r;
684 pn[0] *= s;
685 pn[1] *= s;
686 }
687 }
688}

Referenced by BesPolygon2D::DistancetoPrimitive(), BesCircle2D::Paint(), BesMarker2D::Paint(), BesPolygon2D::Paint(), and Mdc2DWire::Paint().

◆ ZoomIn()

void BesView::ZoomIn ( )
virtual

Reimplemented from BesTView.

Definition at line 495 of file BesView.cxx.

495 {
496 //
497 // Magnify
498 fMarkerSize = fMarkerSize * fZoomFactor;
499 ZoomView(gPad, fZoomFactor); // dont use ZoomView as it is not base on center
500
501
502 fStatusCurrent->fZoom = this->GetZoomRatio();
503 fStatusXY->fZoom = this->GetZoomRatio();
504 fStatusZR->fZoom = this->GetZoomRatio();
505 //Double_t scale[3], center[3];
506 //Int_t irep;
507 //FindScope(&scale[0], &center[0], irep);
508 //cout << "scale " << scale[0] << " " << scale[1] << " " << scale[2] << endl;
509 //cout << "center " << center[0] << " " << center[1] << " " << center[2] << endl;
510
511 //Double_t extent = GetExtent();
512 //cout << extent << endl;
513 //cout << GetZoomRatio() << endl;
514
515 /*
516 Double_t x1, y1, x2, y2;
517 x1 = gPad->GetX1();
518 y1 = gPad->GetY1();
519 x2 = gPad->GetX2();
520 y2 = gPad->GetY2();
521
522 Double_t dx = (gPad->GetX2() - gPad->GetX1())*(1-1/fZoomFactor);
523 Double_t dy = (gPad->GetY2() - gPad->GetY1())*(1-1/fZoomFactor);
524
525 gPad->Range(x1+dx/2, y1+dy/2, x2-dx/2, y2-dy/2);
526 gPad->Modified();
527 */
528}
Double_t GetZoomRatio()
Definition: BesView.h:64

Referenced by BesClient::ExecuteEvent(), and BesClient::HandleButtons().

◆ ZoomMove()

virtual void BesView::ZoomMove ( )
inlinevirtual

Reimplemented from BesTView.

Definition at line 239 of file BesView.h.

virtual void ZoomMove()
Definition: BesTView.h:181

◆ ZoomOut()

void BesView::ZoomOut ( )
virtual

Reimplemented from BesTView.

Definition at line 532 of file BesView.cxx.

532 {
533 //
534 // Demagnify
535 fMarkerSize = fMarkerSize / fZoomFactor;
536 UnzoomView(gPad, fZoomFactor); // dont use ZoomView as it is not base on center
537
538 fStatusCurrent->fZoom = this->GetZoomRatio();
539 fStatusXY->fZoom = this->GetZoomRatio();
540 fStatusZR->fZoom = this->GetZoomRatio();
541 //Double_t extent = GetExtent();
542 //cout << extent << endl;
543 //cout << GetZoomRatio() << endl;
544
545 /*
546 Double_t x1, y1, x2, y2;
547 x1 = gPad->GetX1();
548 y1 = gPad->GetY1();
549 x2 = gPad->GetX2();
550 y2 = gPad->GetY2();
551
552 Double_t dx = (gPad->GetX2() - gPad->GetX1())*(fZoomFactor-1);
553 Double_t dy = (gPad->GetY2() - gPad->GetY1())*(fZoomFactor-1);
554
555 gPad->Range(x1-dx/2, y1-dy/2, x2+dx/2, y2+dy/2);
556 gPad->Modified();
557 */
558}
virtual void UnzoomView(TVirtualPad *pad=0, Double_t unZoomFactor=1.25)
Definition: BesTView.cxx:1769

Referenced by BesClient::ExecuteEvent(), and BesClient::HandleButtons().


The documentation for this class was generated from the following files: