CGEM BOSS
6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMcTrack.cxx
Go to the documentation of this file.
1
#include <TPad.h>
2
#include <TVector3.h>
3
#include <TGeoManager.h>
4
#include "math.h"
5
#include <TMath.h>
6
#include <TStyle.h>
7
8
#include <iostream>
9
10
#include "
BesVisLib/BesMcTrack.h
"
11
#include "
BesVisLib/BesView.h
"
12
#include "
BesVisLib/BesMarker2D.h
"
13
#include "
BesVisLib/Mdc2DWire.h
"
14
#include "
BesVisLib/Muc2DStrip.h
"
15
#include "
BesVisLib/BesCursor.h
"
16
17
using namespace
std
;
18
19
#ifndef __CINT__
20
ClassImp
(
BesMcTrack
)
21
#endif
22
//int BesMcTrack::count = 0;
23
BesMcTrack::BesMcTrack
()
24
:
BesGeoTrack
()
25
{
26
}
27
28
BesMcTrack::BesMcTrack
(Int_t
id
, Int_t pdgcode, TVirtualGeoTrack *parent, TObject *particle)
29
:
BesGeoTrack
(id, pdgcode, parent, particle)
30
{
31
}
32
33
void
BesMcTrack::ExecuteEvent
(Int_t event, Int_t px, Int_t py)
34
{
35
BesView
*view =
dynamic_cast<
BesView
*
>
(gPad->GetView());
36
37
if
(
gBesCursor
->
GetType
() ==
kBesHand
) {
38
if
(view) view->
ExecuteEvent
(event, px, py);
39
}
40
else
if
(
gBesCursor
->
GetType
() ==
kBesPick
){
41
42
if
(gPad) gPad->SetCursor(kPointer);
43
44
Int_t width, color;
45
Int_t normalWidth = 2, hlWidth = 3;
46
47
switch
(event) {
48
case
kMouseEnter:
49
width = this->GetLineWidth();
50
color = this->GetLineColor();
51
this->
SetLineWidth
(hlWidth);
52
this->
SetLineColor
(kRed);
53
54
fTip
->
SetPos
(px, py);
55
view->
UpdateView
(0);
56
57
if
(
gBesCursor
->
GetShowInfo
())
fTip
->Draw(
"TL,SAME"
);
// "BR,ARC,SAME"
58
gPad->Modified();
59
gPad->Update();
60
break
;
61
62
case
kMouseLeave:
63
this->
SetLineWidth
(normalWidth);
64
this->
SetLineColor
(kBlue);
65
66
view->
UpdateView
(0);
67
gPad->Modified();
68
gPad->Update();
69
break
;
70
}
71
72
TGeoTrack::ExecuteEvent(event, px, py);
73
}
74
}
75
76
//_____________________________________________________
77
78
void
BesMcTrack::SetCharge
(Int_t charge)
79
{
80
BesGeoTrack::SetCharge
(charge);
81
if
(charge > 0) this->
SetLineColor
(kBlue);
// +
82
else
if
(charge < 0) this->
SetLineColor
(kBlue);
// -
83
else
this->
SetLineColor
(kBlue-8);
// 0
84
}
85
BesCursor.h
kBesHand
@ kBesHand
Definition
BesCursor.h:15
kBesPick
@ kBesPick
Definition
BesCursor.h:14
gBesCursor
R__EXTERN BesCursor * gBesCursor
Definition
BesCursor.h:40
BesMarker2D.h
ClassImp
ClassImp(BesMcTrack) BesMcTrack
Definition
BesMcTrack.cxx:20
BesMcTrack.h
BesView.h
SetLineColor
g1 SetLineColor(2)
SetLineWidth
gr SetLineWidth(2)
Mdc2DWire.h
Muc2DStrip.h
BesCursor::GetShowInfo
Bool_t GetShowInfo()
Definition
BesCursor.h:35
BesCursor::GetType
EBESCursorType GetType()
Definition
BesCursor.h:32
BesGeoTrack
Definition
BesGeoTrack.h:12
BesGeoTrack::fTip
BesPaveText * fTip
Definition
BesGeoTrack.h:57
BesGeoTrack::SetCharge
virtual void SetCharge(Int_t charge)
Definition
BesGeoTrack.cxx:462
BesMcTrack
Definition
BesMcTrack.h:13
BesMcTrack::BesMcTrack
BesMcTrack()
BesMcTrack::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition
BesMcTrack.cxx:33
BesMcTrack::SetCharge
virtual void SetCharge(Int_t charge)
Definition
BesMcTrack.cxx:78
BesPaveText::SetPos
virtual void SetPos(Int_t px, Int_t py)
Definition
BesPaveText.cxx:86
BesView
Definition
BesView.h:30
BesView::UpdateView
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition
BesView.cxx:753
BesView::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition
BesView.cxx:451
std
Definition
RootEventData_rootcint.cxx:16
6.6.5.h
EventDisplay
BesVisLib
BesVisLib-00-06-12
src
BesMcTrack.cxx
Generated by
1.12.0