CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGeoTrack Class Reference

#include <BesGeoTrack.h>

+ Inheritance diagram for BesGeoTrack:

Public Member Functions

 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
 
 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
 

Protected Attributes

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

Constructor & Destructor Documentation

◆ BesGeoTrack() [1/4]

BesGeoTrack::BesGeoTrack ( )

◆ BesGeoTrack() [2/4]

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

Definition at line 29 of file BesGeoTrack.cxx.

30 : TGeoTrack(id, pdgcode, parent, particle)
31{
32// std::cout << "co BesGeoTrack: " << ++count << std::endl;
33 Init();
34}
virtual void Init()
Definition: BesGeoTrack.cxx:45

◆ ~BesGeoTrack() [1/2]

BesGeoTrack::~BesGeoTrack ( )
virtual

Definition at line 36 of file BesGeoTrack.cxx.

37{
38// std::cout << "de BesGeoTrack: " << --count << std::endl;
39 //Long Peixun's update: remove "if"
40 delete fTip;
41 delete fPolyLine3D;
42 delete fMarker;
43}

◆ BesGeoTrack() [3/4]

BesGeoTrack::BesGeoTrack ( )

◆ BesGeoTrack() [4/4]

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

◆ ~BesGeoTrack() [2/2]

virtual BesGeoTrack::~BesGeoTrack ( )
virtual

Member Function Documentation

◆ Add3DHit() [1/2]

virtual void BesGeoTrack::Add3DHit ( TObject *  obj)
inlinevirtual

◆ Add3DHit() [2/2]

virtual void BesGeoTrack::Add3DHit ( TObject *  obj)
inlinevirtual

Definition at line 27 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

27{ f3DHits.Add(obj); } //Long Peixun's update: for 3D track display

◆ AddCluster() [1/2]

virtual void BesGeoTrack::AddCluster ( TObject *  obj)
inlinevirtual

Definition at line 28 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesGeoTrack.h.

28{ fClusters.Add(obj); } //Long Peixun's update: for CGEM clusters

Referenced by BesEvent::ConstructMdcTrackFromRec().

◆ AddCluster() [2/2]

virtual void BesGeoTrack::AddCluster ( TObject *  obj)
inlinevirtual

Definition at line 28 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

28{ fClusters.Add(obj); } //Long Peixun's update: for CGEM clusters

◆ AddHit() [1/2]

◆ AddHit() [2/2]

virtual void BesGeoTrack::AddHit ( TObject *  obj)
inlinevirtual

Definition at line 26 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

26{ fHits.Add(obj); }

◆ AddInfo() [1/2]

◆ AddInfo() [2/2]

virtual void BesGeoTrack::AddInfo ( TString  info)
inlinevirtual

Definition at line 21 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

21{ fInfoCon.push_back(info); }

◆ AddPoint() [1/2]

void BesGeoTrack::AddPoint ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t 
)
virtual

Definition at line 65 of file BesGeoTrack.cxx.

66{
67 TGeoTrack::AddPoint(x,y,z,t);
68}
int t()
Definition: t.c:1

Referenced by BesEvent::ConstructMcTrack(), BesEvent::ConstructMdcTrackFromRec(), and BesEvent::ConstructMucTrackFromRec().

◆ AddPoint() [2/2]

virtual void BesGeoTrack::AddPoint ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t 
)
virtual

◆ CloseInfo() [1/2]

void BesGeoTrack::CloseInfo ( )
virtual

Definition at line 56 of file BesGeoTrack.cxx.

57{
58 if (fTip) {
60 }
61 else
62 cout << "BesGeoTrack::CloseInfo, not initialized" << endl;
63}
virtual void SetText(std::vector< TString > infoCon)

Referenced by BesEvent::ConstructEmcTrackFromRec(), BesEvent::ConstructMcTrack(), BesEvent::ConstructMdcTrackFromRec(), BesEvent::ConstructMucTrackFromRec(), BesEvent::ConstructTofTrackFromRec(), and BesEvent::SetCgemClusters().

◆ CloseInfo() [2/2]

virtual void BesGeoTrack::CloseInfo ( )
virtual

◆ Construct3DLine() [1/2]

void BesGeoTrack::Construct3DLine ( )
virtual

Definition at line 338 of file BesGeoTrack.cxx.

339{
340 Double_t x,y,z,t;
341 fPolyLine3D = new TPolyLine3D(GetNpoints());
342 fPolyLine3D->SetBit(kCanDelete);
343 for (Int_t i = 0; i < GetNpoints(); i++)
344 {
345 GetPoint(i,x,y,z,t);
346 fPolyLine3D->SetPoint(i,x,y,z);
347 }
348 if (fType == 8) //Long Peixun's update: Change the color of MC truth tracks
349 {
350 fPolyLine3D->SetLineWidth(7);
351 fPolyLine3D->SetLineColor(kBlue);
352 }
353 else
354 {
355 fPolyLine3D->SetLineWidth(7); //Long Peixun's update: more wider
356 fPolyLine3D->SetLineColor(923); //Long Peixun's update: Red -> Black
357 }
358}
Double_t x[10]

Referenced by Draw(), BesEvent::DrawMcParticles(), and BesEvent::DrawTracks().

◆ Construct3DLine() [2/2]

virtual void BesGeoTrack::Construct3DLine ( )
virtual

◆ DistancetoPrimitive() [1/2]

Int_t BesGeoTrack::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
virtual

Definition at line 98 of file BesGeoTrack.cxx.

99{
100 Int_t dist = 9999;
101 Int_t cx, cy;
102 Double_t edge = 4.0; // edge width of track
103 Double_t markSizeRatio = 4.0; // 4.0 is approximate size.
104
105 if (fType == 1 || fType == 2 || fType == 6 || fType == 7) { // tof or emc or cgem
106 if (!fMarker) return dist;
107 fMarker->GetCenterPixel(cx, cy);
108 if (fType == 1) { // tof
109 Double_t r = sqrt( Double_t((px-cx)*(px-cx) + (py-cy)*(py-cy)) );
110 Double_t markerR = markSizeRatio*fMarker->GetMarkerSize();
111 if (markerR > 50) markerR = 50;
112 // if the size of a marker with type of circle is too large > 50 pixel, it could not be enlarged.
113 if ( fabs(r-markerR) < edge ) dist = 0;
114 }
115 //Long Peixun's update: consider cluster in CGEM view
116 else if (fType == 2 || fType == 6 || fType == 7) { // emc
117 Double_t dx = abs(px-cx), dy = abs(py-cy);
118 if ( fabs(dx) < edge && fabs(dy) < markSizeRatio*fMarker->GetMarkerSize() ||
119 fabs(dy) < edge && fabs(dx) < markSizeRatio*fMarker->GetMarkerSize() )
120 dist = 0;
121 }
122
123 return dist;
124 }
125 else return TGeoTrack::DistancetoPrimitive(px, py);
126}
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
virtual void GetCenterPixel(Int_t &px, Int_t &py)
Definition: BesMarker2D.cxx:81

◆ DistancetoPrimitive() [2/2]

virtual Int_t BesGeoTrack::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
virtual

◆ Draw() [1/2]

void BesGeoTrack::Draw ( Option_t *  option = "")
virtual

Definition at line 360 of file BesGeoTrack.cxx.

361{
362 // Draw Polyline3D for OpenGL and X3d
363 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
364 if (view && view->GetViewType() & k3DView) {
365 //Long Peixun's update: Move these code to Construct3DLine()
367 fPolyLine3D->Draw(option);
368 }
369
370 //Long Peixun's update: The color of components in the track should be Red
371 for (Int_t i = 0; i < f3DHits.GetEntries(); ++i)
372 {
373 TGeoPhysicalNode* pHit = (TGeoPhysicalNode*)f3DHits.At(i);
374 if (pHit) pHit->SetLineColor(kRed);
375
376 }
377
378 if (!gPad) gGeoManager->GetMasterVolume()->Draw();
379 char *opt1 = Compress(option); // we will have to delete this ?
380 TString opt(opt1);
381 Bool_t is_default = kTRUE;
382 Bool_t is_onelevel = kFALSE;
383 Bool_t is_all = kFALSE;
384 Bool_t is_type = kFALSE;
385 if (opt.Contains("/D")) {
386 is_onelevel = kTRUE;
387 is_default = kFALSE;
388 }
389 if (opt.Contains("/*")) {
390 is_all = kTRUE;
391 is_default = kFALSE;
392 }
393 if (opt.Contains("/N")) {
394 is_type = kTRUE;
395 Int_t ist = opt.Index("/N")+2;
396 Int_t ilast = opt.Index("/",ist);
397 if (ilast<0) ilast=opt.Length();
398 TString type = opt(ist, ilast-ist);
399 gGeoManager->SetParticleName(type.Data());
400 }
401 SetBits(is_default, is_onelevel, is_all, is_type);
402 AppendPad("SAME");
403
404 delete [] opt1;
405 return;
406}
virtual void Construct3DLine()

Referenced by BesEvent::DrawCgemClusters(), BesEvent::DrawCgemUFClusters(), BesEvent::DrawMcParticles(), and BesEvent::DrawTracks().

◆ Draw() [2/2]

virtual void BesGeoTrack::Draw ( Option_t *  option = "")
virtual

◆ ExecuteEvent() [1/2]

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

Reimplemented in BesMcTrack, and BesMcTrack.

Definition at line 128 of file BesGeoTrack.cxx.

129{
130 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
131
132 Int_t width, color;
133 Int_t normalWidth = 2, hlWidth = 3;
134
135 if (gBesCursor->GetType() == kBesHand) {
136 if (view) view->ExecuteEvent(event, px, py);
137 }
138 else if (gBesCursor->GetType() == kBesPick){
139
140 if (gPad) gPad->SetCursor(kPointer);
141
142 switch (event) {
143 case kMouseEnter:
144 if (fType == 0)
145 {
146 if (view->GetVisMdcHitsGlobal())
147 {
148 for (Int_t i = 0; i < fHits.GetEntries(); i++)
149 {
150 Mdc2DWire *aHit = (Mdc2DWire*)fHits.At(i);
151 if (aHit != 0) {
152 if (view->GetVisMdcHits()) {
153 aHit->SetHighlighted(true);
154 }
155 }
156 }
157 }
158
159 //Long Peixun's update: Highlight associated CGEM clusters
160 if (view->GetVisCgemHitsGlobal() && view->GetVisCgemHitsClusters())
161 {
162 for (Int_t i = 0; i < fClusters.GetEntries(); ++i)
163 {
164 BesGeoTrack* aCluster = (BesGeoTrack*)fClusters.At(i);
165 if (aCluster)
166 {
167 aCluster->fMarker->SetMarkerColor(kViolet);
168 aCluster->fMarker->SetMarkerStyle(8);
169 }
170 }
171 }
172 }
173
174 else if (fType == 1) {
175 if (view->GetVisTofHitsGlobal()) {
176 for (Int_t i = 0; i < fHits.GetEntries(); i++) {
177 Tof2DScin *aHit = (Tof2DScin*)fHits.At(i);
178 if (aHit != 0) {
179 if ( aHit->GetPart() == 0 && view->GetVisTofHitsEast() ||
180 aHit->GetPart() == 1 && view->GetVisTofHitsBarrel() ||
181 aHit->GetPart() == 2 && view->GetVisTofHitsWest() ) {
182 aHit->SetHighlighted(true);
183 }
184 }
185 }
186 }
187 }
188 else if (fType == 2) {
189 if (view->GetVisEmcHitsGlobal()) {
190 for (Int_t i = 0; i < fHits.GetEntries(); i++) {
191 Emc2DCrystal *aHit = (Emc2DCrystal*)fHits.At(i);
192 if (aHit != 0) {
193 if ( aHit->GetPart() == 0 && view->GetVisEmcHitsEast() ||
194 aHit->GetPart() == 1 && view->GetVisEmcHitsBarrel() ||
195 aHit->GetPart() == 2 && view->GetVisEmcHitsWest() ) {
196 aHit->SetHighlighted(true);
197 }
198 }
199 }
200 }
201 }
202 else if (fType == 3) {
203 if (view->GetVisMucHitsGlobal()) {
204 for (Int_t i = 0; i < fHits.GetEntries(); i++) {
205 Muc2DStrip *aHit = (Muc2DStrip*)fHits.At(i);
206 if (aHit != 0) {
207 if (view->GetVisMucHitsGlobal()) {
208 aHit->SetHighlighted(true);
209 }
210 }
211 }
212 }
213 }
214
215
216 if (fType == 0) {
217 width = this->GetLineWidth();
218 color = this->GetLineColor();
219 this->SetLineWidth(hlWidth);
220 this->SetLineColor(kRed);
221 }
222 else if (fType == 1) {
223 fMarker->SetMarkerColor(kMagenta);
224 }
225 else if (fType == 2) {
226 fMarker->SetMarkerColor(kMagenta);
227 }
228 else if (fType == 3) {
229 width = this->GetLineWidth();
230 color = this->GetLineColor();
231 this->SetLineWidth(hlWidth);
232 this->SetLineColor(kRed);
233 }
234 else if (fType == 4) {
235 this->SetLineWidth(hlWidth);
236 this->SetLineColor(kBlue);
237 }
238 else if (fType == 6 || fType == 7) //Long Peixun's update: for clusters in CGEM
239 {
240 fMarker->SetMarkerColor(kViolet);
241 fMarker->SetMarkerStyle(8);
242 }
243
244 fTip->SetPos(px, py);
245 view->UpdateView(0);
246
247 //yzhang 2011-11-15 TEMP
248 //drawHeader(fTip->GetText);
249 if (gBesCursor->GetShowInfo()) fTip->Draw("TL,SAME"); // "BR,ARC,SAME"
250 gPad->Modified();
251 gPad->Update();
252 break;
253
254 case kMouseLeave:
255 if (fType == 0) {
256 for (Int_t i = 0; i < (Int_t)fHits.GetEntries(); i++) {
257 Mdc2DWire *aHit = (Mdc2DWire*)fHits.At(i);
258 if (aHit != 0 && aHit->IsHighlighted()) {
259 aHit->SetHighlighted(false);
260 }
261 }
262
263 //Long Peixun's update: Dehighlight associated CGEM clusters
264 if (view->GetVisCgemHitsGlobal() && view->GetVisCgemHitsClusters())
265 {
266 for (Int_t i = 0; i < fClusters.GetEntries(); ++i)
267 {
268 BesGeoTrack* aCluster = (BesGeoTrack*)fClusters.At(i);
269 if (aCluster)
270 {
271 aCluster->fMarker->SetMarkerColor(kBlack);
272 aCluster->fMarker->SetMarkerStyle(4);
273 }
274 }
275 }
276 }
277 else if (fType == 1) {
278 for (Int_t i = 0; i < fHits.GetEntries(); i++) {
279 Tof2DScin *aHit = (Tof2DScin*)fHits.At(i);
280 if (aHit != 0 && aHit->IsHighlighted()) {
281 aHit->SetHighlighted(false);
282 }
283 }
284 }
285 else if (fType == 2) {
286 for (Int_t i = 0; i < fHits.GetEntries(); i++) {
287 Emc2DCrystal *aHit = (Emc2DCrystal*)fHits.At(i);
288 if (aHit != 0 && aHit->IsHighlighted()) {
289 aHit->SetHighlighted(false);
290 }
291 }
292 }
293 else if (fType == 3) {
294 for (Int_t i = 0; i < (Int_t)fHits.GetEntries(); i++) {
295 Muc2DStrip *aHit = (Muc2DStrip*)fHits.At(i);
296 if (aHit != 0 && aHit->IsHighlighted()) {
297 aHit->SetHighlighted(false);
298 }
299 }
300 }
301
302
303 if (fType == 0) {
304 this->SetLineWidth(normalWidth);
305 this->SetLineColor(kBlack);
306 }
307 else if (fType == 1) {
308 fMarker->SetMarkerColor(kBlack);
309 }
310 else if (fType == 2) {
311 fMarker->SetMarkerColor(kBlack);
312 }
313 else if (fType == 3) {
314 this->SetLineWidth(normalWidth);
315 this->SetLineColor(kBlack);
316 }
317 else if (fType == 4) {
318 this->SetLineWidth(normalWidth);
319 this->SetLineColor(kBlack);
320 }
321 else if (fType == 6 || fType == 7) //Long Peixun's update: for clusters in CGEM
322 {
323 fMarker->SetMarkerColor(kBlack);
324 fMarker->SetMarkerStyle(4);
325 }
326
327 view->UpdateView(0);
328 gPad->Modified();
329 gPad->Update();
330 break;
331 }
332
333 TGeoTrack::ExecuteEvent(event, px, py);
334 }
335}
g1 SetLineColor(2)
gr SetLineWidth(2)
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

◆ ExecuteEvent() [2/2]

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

Reimplemented in BesMcTrack, and BesMcTrack.

◆ GetObjectInfo() [1/2]

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

Definition at line 446 of file BesGeoTrack.cxx.

446 {
447
448 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
449 if (view) return view->GetObjectInfo(px, py);
450 else return TObject::GetObjectInfo(px, py);
451}
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Definition: BesView.cxx:965

◆ GetObjectInfo() [2/2]

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

◆ GetTrackID() [1/2]

virtual Int_t BesGeoTrack::GetTrackID ( ) const
inlinevirtual

◆ GetTrackID() [2/2]

virtual Int_t BesGeoTrack::GetTrackID ( ) const
inlinevirtual

Definition at line 30 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

30{ return fTrkID; } //...

◆ Init() [1/2]

void BesGeoTrack::Init ( )
virtual

Definition at line 45 of file BesGeoTrack.cxx.

46{
47 fTip = new BesPaveText(0, 0, 0.1, 0.1, "TL");
48 fPolyLine3D = 0; //Long Peixun's update: Initialize trackID and fPolyLine3D
49 fTrkID = 0; //...
50 fMarker = 0;
51
52 this->SetLineWidth(2);
53 //fHits.Clear("C");
54}

Referenced by BesGeoTrack().

◆ Init() [2/2]

virtual void BesGeoTrack::Init ( )
virtual

◆ Paint() [1/2]

void BesGeoTrack::Paint ( Option_t *  option = "")
virtual

Definition at line 408 of file BesGeoTrack.cxx.

409{
410 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
411 Double_t viewPhi = view->GetLongitude();
412 TVector3 viewVec(cos(viewPhi*TMath::DegToRad()), sin(viewPhi*TMath::DegToRad()), 0);
413 Double_t x, y, z, t;
414 Double_t x1=0.0, y1=0.0, z1=0.0;
415 Double_t dot, dotMin = 1e+20, dotTolerance = 0.01;
416 for (Int_t i = 1; i < GetNpoints(); i++) {
417 GetPoint(i, x, y, z, t);
418 TVector3 vec(x,y,0);
419 if (vec.Mag() > 5.0) {
420 vec.SetMag(1.0);
421 dot = fabs(vec.Dot(viewVec));
422 if ( dot < dotTolerance && dot < dotMin ) {
423 x1 = x;
424 y1 = y;
425 z1 = z;
426 dotMin = dot;
427 }
428 }
429 }
430
431 if (dotMin < 1e+20) {
432 BesMarker2D sectionPhi("trackPhi", "trackPhi", x1, y1, z1);
433 sectionPhi.SetMarkerStyle(28);
434 sectionPhi.SetMarkerColor(1);
435 sectionPhi.SetMarkerSize(2);
436 sectionPhi.Paint();
437 //sectionPhi paint the marker in origin point of MdcTrack!!!
438 }
439
440 if (fMarker) fMarker->Paint(option);
441 TGeoTrack::Paint(option);
442}
double sin(const BesAngle a)
double cos(const BesAngle a)
virtual void Paint(Option_t *option="")
dble_vec_t vec[12]
Definition: ranlxd.c:372

◆ Paint() [2/2]

virtual void BesGeoTrack::Paint ( Option_t *  option = "")
virtual

◆ SetCharge() [1/2]

void BesGeoTrack::SetCharge ( Int_t  charge)
virtual

Reimplemented in BesMcTrack, and BesMcTrack.

Definition at line 453 of file BesGeoTrack.cxx.

454{
455 fCharge = charge;
456 if (fCharge > 0) this->SetLineColor(kBlack); // +
457 else if (fCharge < 0) this->SetLineColor(kBlack); // -
458 else this->SetLineColor(kGreen); // 0
459}

Referenced by BesEvent::ConstructMdcTrackFromRec(), BesEvent::ConstructMucTrackFromRec(), and BesMcTrack::SetCharge().

◆ SetCharge() [2/2]

virtual void BesGeoTrack::SetCharge ( Int_t  charge)
virtual

Reimplemented in BesMcTrack, and BesMcTrack.

◆ SetMarker() [1/2]

void BesGeoTrack::SetMarker ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtual

Definition at line 70 of file BesGeoTrack.cxx.

71{
72 fMarker = new BesMarker2D("RecMarker", "RecMarker", x, y, z);
73
74 if (fType == 1) { // tof
75 fMarker->SetMarkerSizeMultiple(15); //Long Peixun's update: 20 -> 15
76 fMarker->SetMarkerStyle(5);
77 fMarker->SetMarkerColor(kBlack);
78 }
79 else if (fType == 2) { // emc
80 fMarker->SetMarkerSizeMultiple(15); //Long Peixun's update: 20 -> 15
81 fMarker->SetMarkerStyle(2);
82 fMarker->SetMarkerColor(kBlack);
83 }
84 else if (fType == 6) //Long Peixun's update: cluster in CGEM view
85 {
87 fMarker->SetMarkerStyle(4);
88 fMarker->SetMarkerColor(kBlack);
89 }
90 else if (fType == 7) //Long Peixun's update: cluster in CGEM UF view
91 {
93 fMarker->SetMarkerStyle(4);
94 fMarker->SetMarkerColor(kBlack);
95 }
96}

Referenced by BesEvent::ConstructEmcTrackFromRec(), BesEvent::ConstructTofTrackFromRec(), and BesEvent::SetCgemClusters().

◆ SetMarker() [2/2]

virtual void BesGeoTrack::SetMarker ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtual

◆ SetTrackID() [1/2]

virtual void BesGeoTrack::SetTrackID ( Int_t  id)
inlinevirtual

◆ SetTrackID() [2/2]

virtual void BesGeoTrack::SetTrackID ( Int_t  id)
inlinevirtual

Definition at line 29 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

29{ fTrkID = id; } //Long Peixun's update: Set and Get TrackID

◆ SetTrackType() [1/2]

◆ SetTrackType() [2/2]

virtual void BesGeoTrack::SetTrackType ( Int_t  type)
inlinevirtual

Definition at line 24 of file InstallArea/include/BesVisLib/BesVisLib/BesGeoTrack.h.

24{ fType = type; }

Member Data Documentation

◆ f3DHits

TObjArray BesGeoTrack::f3DHits
protected

◆ fCharge

Int_t BesGeoTrack::fCharge
protected

◆ fClusters

TObjArray BesGeoTrack::fClusters
protected

◆ fHits

TObjArray BesGeoTrack::fHits
protected

◆ fInfoCon

std::vector< TString > BesGeoTrack::fInfoCon
protected

◆ fMarker

◆ fPolyLine3D

TPolyLine3D * BesGeoTrack::fPolyLine3D
protected

◆ fTip

◆ fTrkID

Int_t BesGeoTrack::fTrkID
protected

◆ fType


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