BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkBase::Predicates::hasView Class Reference

#include <TrkPredicates.h>

+ Inheritance diagram for TrkBase::Predicates::hasView:

Public Member Functions

 hasView (TrkEnums::TrkViewInfo view=TrkEnums::bothView)
 
bool operator() (const TrkHitOnTrk &h) const
 
 hasView (TrkEnums::TrkViewInfo view=TrkEnums::bothView)
 
bool operator() (const TrkHitOnTrk &h) const
 

Detailed Description

Constructor & Destructor Documentation

◆ hasView() [1/2]

TrkBase::Predicates::hasView::hasView ( TrkEnums::TrkViewInfo  view = TrkEnums::bothView)
inline

Definition at line 66 of file InstallArea/include/TrkBase/TrkBase/TrkPredicates.h.

66: _view(view) { }

◆ hasView() [2/2]

TrkBase::Predicates::hasView::hasView ( TrkEnums::TrkViewInfo  view = TrkEnums::bothView)
inline

Definition at line 66 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkPredicates.h.

66: _view(view) { }

Member Function Documentation

◆ operator()() [1/2]

bool TrkBase::Predicates::hasView::operator() ( const TrkHitOnTrk h) const
inline

Definition at line 67 of file InstallArea/include/TrkBase/TrkBase/TrkPredicates.h.

68 {
69 if (_view==TrkEnums::bothView) return true;
70 TrkEnums::TrkViewInfo hotview = h.whatView();
71 if (h.svtHitOnTrack() != 0) {
72 return _view == hotview;
73 } else if (h.mdcHitOnTrack() != 0) {
74// unfortunately the Mdc calls stereo hits 'both view': I'm re-interpreting it here
75 return _view == TrkEnums::xyView && hotview == _view ||
76 _view == TrkEnums::zView && hotview == TrkEnums::bothView;
77 }
78 return false;
79 }
virtual const SvtHitOnTrack * svtHitOnTrack() const
Definition: TrkHitOnTrk.cxx:31
virtual const MdcHitOnTrack * mdcHitOnTrack() const
Definition: TrkHitOnTrk.cxx:30
virtual TrkEnums::TrkViewInfo whatView() const =0

◆ operator()() [2/2]

bool TrkBase::Predicates::hasView::operator() ( const TrkHitOnTrk h) const
inline

Definition at line 67 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkPredicates.h.

68 {
69 if (_view==TrkEnums::bothView) return true;
70 TrkEnums::TrkViewInfo hotview = h.whatView();
71 if (h.svtHitOnTrack() != 0) {
72 return _view == hotview;
73 } else if (h.mdcHitOnTrack() != 0) {
74// unfortunately the Mdc calls stereo hits 'both view': I'm re-interpreting it here
75 return _view == TrkEnums::xyView && hotview == _view ||
76 _view == TrkEnums::zView && hotview == TrkEnums::bothView;
77 }
78 return false;
79 }

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