CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMcTrack Class Reference

#include <BesMcTrack.h>

+ Inheritance diagram for BesMcTrack:

Public Member Functions

 BesMcTrack ()
 
 BesMcTrack (Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=0, TObject *particle=0)
 
virtual ~BesMcTrack ()
 
virtual void SetCharge (Int_t charge)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
- Public Member Functions inherited from BesGeoTrack
 BesGeoTrack ()
 
 BesGeoTrack (Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=0, TObject *particle=0)
 
virtual ~BesGeoTrack ()
 
virtual void Init ()
 
virtual void AddInfo (TString info)
 
virtual void CloseInfo ()
 
virtual void SetCharge (Int_t charge)
 
virtual void SetTrackType (Int_t type)
 
virtual void AddHit (TObject *obj)
 
virtual void Add3DHit (TObject *obj)
 
virtual void AddCluster (TObject *obj)
 
virtual void SetTrackID (Int_t id)
 
virtual Int_t GetTrackID () const
 
virtual void AddPoint (Double_t x, Double_t y, Double_t z, Double_t t)
 
virtual void SetMarker (Double_t x, Double_t y, Double_t z)
 
virtual void Construct3DLine ()
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void Paint (Option_t *option="")
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 

Additional Inherited Members

- Protected Attributes inherited from BesGeoTrack
TObjArray fHits
 
TObjArray f3DHits
 
TObjArray fClusters
 
Int_t fTrkID
 
std::vector< TString > fInfoCon
 
Int_t fCharge
 
Int_t fType
 
BesPaveTextfTip
 
TPolyLine3D * fPolyLine3D
 
BesMarker2DfMarker
 

Detailed Description

Definition at line 13 of file BesMcTrack.h.

Constructor & Destructor Documentation

◆ BesMcTrack() [1/2]

BesMcTrack::BesMcTrack ( )

◆ BesMcTrack() [2/2]

BesMcTrack::BesMcTrack ( Int_t  id,
Int_t  pdgcode,
TVirtualGeoTrack *  parent = 0,
TObject *  particle = 0 
)

Definition at line 28 of file BesMcTrack.cxx.

29 : BesGeoTrack(id, pdgcode, parent, particle)
30{
31}

◆ ~BesMcTrack()

virtual BesMcTrack::~BesMcTrack ( )
inlinevirtual

Definition at line 19 of file BesMcTrack.h.

19{};

Member Function Documentation

◆ ExecuteEvent()

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

Reimplemented from BesGeoTrack.

Definition at line 33 of file BesMcTrack.cxx.

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}
@ kBesHand
Definition: BesCursor.h:15
@ kBesPick
Definition: BesCursor.h:14
R__EXTERN BesCursor * gBesCursor
Definition: BesCursor.h:40
g1 SetLineColor(2)
gr SetLineWidth(2)
Bool_t GetShowInfo()
Definition: BesCursor.h:35
EBESCursorType GetType()
Definition: BesCursor.h:32
BesPaveText * fTip
Definition: BesGeoTrack.h:57
virtual void SetPos(Int_t px, Int_t py)
Definition: BesPaveText.cxx:86
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition: BesView.cxx:753
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition: BesView.cxx:451

◆ SetCharge()

void BesMcTrack::SetCharge ( Int_t  charge)
virtual

Reimplemented from BesGeoTrack.

Definition at line 78 of file BesMcTrack.cxx.

79{
81 if (charge > 0) this->SetLineColor(kBlue); // +
82 else if (charge < 0) this->SetLineColor(kBlue); // -
83 else this->SetLineColor(kBlue-8); // 0
84}
virtual void SetCharge(Int_t charge)

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