BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TMSelector Class Reference

A class to select a TTrackBase object. More...

#include <TMSelector.h>

Public Member Functions

 TMSelector ()
 Constructor.
 TMSelector (const TMSelector &)
 Copy constructor.
virtual ~TMSelector ()
 Destructor.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
unsigned nLinks (void) const
 returns min. # of hits(TMLinks) requried.
unsigned nSuperLayers (void) const
 returns min. # of super layers required.
double minPt (void) const
 returns min. pt required.
double maxImpact (void) const
 returns max. impact(2D) required.
unsigned nLinksStereo (void) const
 returns min. # of stereo hits(TMLinks) requried.
double maxDistance (void) const
 returns max. distance required for stereo hits.
double maxSigma (void) const
 returns max. sigma for each TMLink.
bool select (TTrackBase &) const
 returns true if given track satisfys criteria after fitting.
bool preSelect (const TTrackBase &) const
 returns true if given track satisfys criteria before fitting.
unsigned nLinks (unsigned)
 sets # of hits(TMLinks) requried.
unsigned nSuperLayers (unsigned)
 sets # of super layers required.
double minPt (double)
 sets min. pt required.
double maxImpact (double)
 sets max. impact(2D) required.
unsigned nLinksStereo (unsigned)
 sets min. # of stereo hits(TMLinks) requried.
double maxDistance (double)
 sets max. distance required for stereo hits.
double maxSigma (double)
 sets max. sigma for each TMLink.
 TMSelector ()
 Constructor.
 TMSelector (const TMSelector &)
 Copy constructor.
virtual ~TMSelector ()
 Destructor.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
unsigned nLinks (void) const
 returns min. # of hits(TMLinks) requried.
unsigned nSuperLayers (void) const
 returns min. # of super layers required.
double minPt (void) const
 returns min. pt required.
double maxImpact (void) const
 returns max. impact(2D) required.
unsigned nLinksStereo (void) const
 returns min. # of stereo hits(TMLinks) requried.
double maxDistance (void) const
 returns max. distance required for stereo hits.
double maxSigma (void) const
 returns max. sigma for each TMLink.
bool select (TTrackBase &) const
 returns true if given track satisfys criteria after fitting.
bool preSelect (const TTrackBase &) const
 returns true if given track satisfys criteria before fitting.
unsigned nLinks (unsigned)
 sets # of hits(TMLinks) requried.
unsigned nSuperLayers (unsigned)
 sets # of super layers required.
double minPt (double)
 sets min. pt required.
double maxImpact (double)
 sets max. impact(2D) required.
unsigned nLinksStereo (unsigned)
 sets min. # of stereo hits(TMLinks) requried.
double maxDistance (double)
 sets max. distance required for stereo hits.
double maxSigma (double)
 sets max. sigma for each TMLink.
 TMSelector ()
 Constructor.
 TMSelector (const TMSelector &)
 Copy constructor.
virtual ~TMSelector ()
 Destructor.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
unsigned nLinks (void) const
 returns min. # of hits(TMLinks) requried.
unsigned nSuperLayers (void) const
 returns min. # of super layers required.
double minPt (void) const
 returns min. pt required.
double maxImpact (void) const
 returns max. impact(2D) required.
unsigned nLinksStereo (void) const
 returns min. # of stereo hits(TMLinks) requried.
double maxDistance (void) const
 returns max. distance required for stereo hits.
double maxSigma (void) const
 returns max. sigma for each TMLink.
bool select (TTrackBase &) const
 returns true if given track satisfys criteria after fitting.
bool preSelect (const TTrackBase &) const
 returns true if given track satisfys criteria before fitting.
unsigned nLinks (unsigned)
 sets # of hits(TMLinks) requried.
unsigned nSuperLayers (unsigned)
 sets # of super layers required.
double minPt (double)
 sets min. pt required.
double maxImpact (double)
 sets max. impact(2D) required.
unsigned nLinksStereo (unsigned)
 sets min. # of stereo hits(TMLinks) requried.
double maxDistance (double)
 sets max. distance required for stereo hits.
double maxSigma (double)
 sets max. sigma for each TMLink.

Detailed Description

A class to select a TTrackBase object.

Definition at line 31 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

Constructor & Destructor Documentation

◆ TMSelector() [1/6]

TMSelector::TMSelector ( )

Constructor.

Definition at line 19 of file TMSelector.cxx.

20 : _nLinksDefined( false )
21 , _nLinks( 0 )
22 , _nSuperLayersDefined( false )
23 , _nSuperLayers( 0 )
24 , _minPtDefined( false )
25 , _minPt( 0. )
26 , _maxImpactDefined( false )
27 , _maxImpact( 0. )
28 , _nLinksStereoDefined( false )
29 , _nLinksStereo( 0 )
30 , _maxDistanceDefined( false )
31 , _maxDistance( 0. ) {}

Referenced by TMSelector().

◆ TMSelector() [2/6]

TMSelector::TMSelector ( const TMSelector & a)

Copy constructor.

Definition at line 33 of file TMSelector.cxx.

34 : _nLinksDefined( a._nLinksDefined )
35 , _nLinks( a._nLinks )
36 , _nSuperLayersDefined( a._nSuperLayersDefined )
37 , _nSuperLayers( a._nSuperLayers )
38 , _minPtDefined( a._minPtDefined )
39 , _minPt( a._minPt )
40 , _maxImpactDefined( a._maxImpactDefined )
41 , _maxImpact( a._maxImpact )
42 , _nLinksStereoDefined( a._nLinksStereoDefined )
43 , _nLinksStereo( a._nLinksStereo )
44 , _maxDistanceDefined( a._maxDistanceDefined )
45 , _maxDistance( a._maxDistance ) {}

◆ ~TMSelector() [1/3]

TMSelector::~TMSelector ( )
virtual

Destructor.

Definition at line 47 of file TMSelector.cxx.

47{}

◆ TMSelector() [3/6]

TMSelector::TMSelector ( )

Constructor.

◆ TMSelector() [4/6]

TMSelector::TMSelector ( const TMSelector & )

Copy constructor.

◆ ~TMSelector() [2/3]

virtual TMSelector::~TMSelector ( )
virtual

Destructor.

◆ TMSelector() [5/6]

TMSelector::TMSelector ( )

Constructor.

◆ TMSelector() [6/6]

TMSelector::TMSelector ( const TMSelector & )

Copy constructor.

◆ ~TMSelector() [3/3]

virtual TMSelector::~TMSelector ( )
virtual

Destructor.

Member Function Documentation

◆ dump() [1/3]

void TMSelector::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const

dumps debug information.

◆ dump() [2/3]

void TMSelector::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const

dumps debug information.

◆ dump() [3/3]

void TMSelector::dump ( const std::string & message = std::string(""),
const std::string & prefix = std::string("") ) const

dumps debug information.

◆ maxDistance() [1/6]

double TMSelector::maxDistance ( double a)
inline

sets max. distance required for stereo hits.

Definition at line 213 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

213 {
214 _maxDistanceDefined = true;
215 return _maxDistance = a;
216}

◆ maxDistance() [2/6]

double TMSelector::maxDistance ( double )

sets max. distance required for stereo hits.

◆ maxDistance() [3/6]

double TMSelector::maxDistance ( double )

sets max. distance required for stereo hits.

◆ maxDistance() [4/6]

double TMSelector::maxDistance ( void ) const
inline

returns max. distance required for stereo hits.

Definition at line 205 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

205 {
206# ifdef TRKRECO_DEBUG
207 if ( !_maxDistanceDefined )
208 std::cout << "TMSelector !!! max. distance is not defined" << std::endl;
209# endif
210 return _maxDistance;
211}

Referenced by TBuilder0::trackSelector().

◆ maxDistance() [5/6]

double TMSelector::maxDistance ( void ) const

returns max. distance required for stereo hits.

◆ maxDistance() [6/6]

double TMSelector::maxDistance ( void ) const

returns max. distance required for stereo hits.

◆ maxImpact() [1/6]

double TMSelector::maxImpact ( double a)
inline

sets max. impact(2D) required.

Definition at line 174 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

174 {
175 _maxImpactDefined = true;
176 return _maxImpact = a;
177}

◆ maxImpact() [2/6]

double TMSelector::maxImpact ( double )

sets max. impact(2D) required.

◆ maxImpact() [3/6]

double TMSelector::maxImpact ( double )

sets max. impact(2D) required.

◆ maxImpact() [4/6]

double TMSelector::maxImpact ( void ) const
inline

returns max. impact(2D) required.

Definition at line 166 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

166 {
167# ifdef TRKRECO_DEBUG
168 if ( !_maxImpactDefined )
169 std::cout << "TMSelector !!! max. impact is not defined" << std::endl;
170# endif
171 return _maxImpact;
172}

Referenced by TBuilder0::trackSelector().

◆ maxImpact() [5/6]

double TMSelector::maxImpact ( void ) const

returns max. impact(2D) required.

◆ maxImpact() [6/6]

double TMSelector::maxImpact ( void ) const

returns max. impact(2D) required.

◆ maxSigma() [1/6]

double TMSelector::maxSigma ( double a)
inline

sets max. sigma for each TMLink.

Definition at line 187 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

187 {
188 _maxSigmaDefined = true;
189 return _maxSigma = a;
190}

◆ maxSigma() [2/6]

double TMSelector::maxSigma ( double )

sets max. sigma for each TMLink.

◆ maxSigma() [3/6]

double TMSelector::maxSigma ( double )

sets max. sigma for each TMLink.

◆ maxSigma() [4/6]

double TMSelector::maxSigma ( void ) const
inline

returns max. sigma for each TMLink.

Definition at line 179 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

179 {
180# ifdef TRKRECO_DEBUG
181 if ( !_maxSigmaDefined )
182 std::cout << "TMSelector !!! max. sigma is not defined" << std::endl;
183# endif
184 return _maxSigma;
185}

Referenced by TBuilder0::trackSelector().

◆ maxSigma() [5/6]

double TMSelector::maxSigma ( void ) const

returns max. sigma for each TMLink.

◆ maxSigma() [6/6]

double TMSelector::maxSigma ( void ) const

returns max. sigma for each TMLink.

◆ minPt() [1/6]

double TMSelector::minPt ( double a)
inline

sets min. pt required.

Definition at line 161 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

161 {
162 _minPtDefined = true;
163 return _minPt = a;
164}

◆ minPt() [2/6]

double TMSelector::minPt ( double )

sets min. pt required.

◆ minPt() [3/6]

double TMSelector::minPt ( double )

sets min. pt required.

◆ minPt() [4/6]

double TMSelector::minPt ( void ) const
inline

returns min. pt required.

Definition at line 154 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

154 {
155# ifdef TRKRECO_DEBUG
156 if ( !_minPtDefined ) std::cout << "TMSelector !!! min. pt is not defined" << std::endl;
157# endif
158 return _minPt;
159}

Referenced by TBuilder0::trackSelector().

◆ minPt() [5/6]

double TMSelector::minPt ( void ) const

returns min. pt required.

◆ minPt() [6/6]

double TMSelector::minPt ( void ) const

returns min. pt required.

◆ nLinks() [1/6]

unsigned TMSelector::nLinks ( unsigned a)
inline

sets # of hits(TMLinks) requried.

Definition at line 136 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

136 {
137 _nLinksDefined = true;
138 return _nLinks = a;
139}

◆ nLinks() [2/6]

unsigned TMSelector::nLinks ( unsigned )

sets # of hits(TMLinks) requried.

◆ nLinks() [3/6]

unsigned TMSelector::nLinks ( unsigned )

sets # of hits(TMLinks) requried.

◆ nLinks() [4/6]

unsigned TMSelector::nLinks ( void ) const
inline

returns min. # of hits(TMLinks) requried.

Definition at line 129 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

129 {
130# ifdef TRKRECO_DEBUG
131 if ( !_nLinksDefined ) std::cout << "TMSelector !!! min. nLinks is not defined" << std::endl;
132# endif
133 return _nLinks;
134}

Referenced by TBuilder0::trackSelector().

◆ nLinks() [5/6]

unsigned TMSelector::nLinks ( void ) const

returns min. # of hits(TMLinks) requried.

◆ nLinks() [6/6]

unsigned TMSelector::nLinks ( void ) const

returns min. # of hits(TMLinks) requried.

◆ nLinksStereo() [1/6]

unsigned TMSelector::nLinksStereo ( unsigned a)
inline

sets min. # of stereo hits(TMLinks) requried.

Definition at line 200 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

200 {
201 _nLinksStereoDefined = true;
202 return _nLinksStereo = a;
203}

◆ nLinksStereo() [2/6]

unsigned TMSelector::nLinksStereo ( unsigned )

sets min. # of stereo hits(TMLinks) requried.

◆ nLinksStereo() [3/6]

unsigned TMSelector::nLinksStereo ( unsigned )

sets min. # of stereo hits(TMLinks) requried.

◆ nLinksStereo() [4/6]

unsigned TMSelector::nLinksStereo ( void ) const
inline

returns min. # of stereo hits(TMLinks) requried.

Definition at line 192 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

192 {
193# ifdef TRKRECO_DEBUG
194 if ( !_nLinksStereoDefined )
195 std::cout << "TMSelector !!! min. nLinksStereo is not defined" << std::endl;
196# endif
197 return _nLinksStereo;
198}

Referenced by TBuilder0::trackSelector().

◆ nLinksStereo() [5/6]

unsigned TMSelector::nLinksStereo ( void ) const

returns min. # of stereo hits(TMLinks) requried.

◆ nLinksStereo() [6/6]

unsigned TMSelector::nLinksStereo ( void ) const

returns min. # of stereo hits(TMLinks) requried.

◆ nSuperLayers() [1/6]

unsigned TMSelector::nSuperLayers ( unsigned a)
inline

sets # of super layers required.

Definition at line 149 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

149 {
150 _nSuperLayersDefined = true;
151 return _nSuperLayers = a;
152}

◆ nSuperLayers() [2/6]

unsigned TMSelector::nSuperLayers ( unsigned )

sets # of super layers required.

◆ nSuperLayers() [3/6]

unsigned TMSelector::nSuperLayers ( unsigned )

sets # of super layers required.

◆ nSuperLayers() [4/6]

unsigned TMSelector::nSuperLayers ( void ) const
inline

returns min. # of super layers required.

Definition at line 141 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMSelector.h.

141 {
142# ifdef TRKRECO_DEBUG
143 if ( !_nSuperLayers )
144 std::cout << "TMSelector !!! min. nSuperLayers is not defined" << std::endl;
145# endif
146 return _nSuperLayers;
147}

Referenced by TBuilder0::trackSelector().

◆ nSuperLayers() [5/6]

unsigned TMSelector::nSuperLayers ( void ) const

returns min. # of super layers required.

◆ nSuperLayers() [6/6]

unsigned TMSelector::nSuperLayers ( void ) const

returns min. # of super layers required.

◆ preSelect() [1/3]

bool TMSelector::preSelect ( const TTrackBase & a) const

returns true if given track satisfys criteria before fitting.

Definition at line 127 of file TMSelector.cxx.

127 {
128 if ( _nLinksDefined )
129 {
130 if ( a.nLinks() < _nLinks )
131 {
132#ifdef TRKRECO_DEBUG_DETAIL
133 std::cout << " TSelect ... rejected by nLinks(";
134 std::cout << a.nLinks() << ") < ";
135 std::cout << _nLinks << std::endl;
136#endif
137 return false;
138 }
139 }
140
141 if ( _nSuperLayersDefined )
142 {
143 if ( NSuperLayers( a.links() ) < _nSuperLayers )
144 {
145#ifdef TRKRECO_DEBUG_DETAIL
146 std::cout << " TSelect ... rejected by nSuperLayers(";
147 std::cout << NSuperLayers( a.links() ) << ") < ";
148 std::cout << _nSuperLayers << std::endl;
149#endif
150 return false;
151 }
152 }
153
154#ifdef TRKRECO_DEBUG_DETAIL
155 std::cout << " TSelect::preSelect ... accepted" << std::endl;
156#endif
157 return true;
158}
const AList< TMLink > & links(unsigned mask=0) const
unsigned nLinks(unsigned mask=0) const
returns # of masked TMLinks assigned to this track object.

◆ preSelect() [2/3]

bool TMSelector::preSelect ( const TTrackBase & ) const

returns true if given track satisfys criteria before fitting.

◆ preSelect() [3/3]

bool TMSelector::preSelect ( const TTrackBase & ) const

returns true if given track satisfys criteria before fitting.

◆ select() [1/3]

bool TMSelector::select ( TTrackBase & b) const

returns true if given track satisfys criteria after fitting.

Definition at line 49 of file TMSelector.cxx.

49 {
50
51#ifdef TRKRECO_DEBUG_DETAIL
52 if ( !b.fitted() ) { std::cout << " TSelect::select !!! not fitted yet" << std::endl; }
53#endif
54
55 if ( b.objectType() == Track )
56 {
57 TTrack& a = (TTrack&)b;
58
59 if ( _minPtDefined )
60 {
61 if ( a.pt() < _minPt )
62 {
63#ifdef TRKRECO_DEBUG_DETAIL
64 std::cout << " TSelect ... rejected by min. pt(";
65 std::cout << a.pt() << ") < ";
66 std::cout << _minPt << std::endl;
67#endif
68 return false;
69 }
70 }
71
72 if ( _maxImpactDefined )
73 {
74 if ( fabs( a.impact() ) > _maxImpact )
75 {
76#ifdef TRKRECO_DEBUG_DETAIL
77 std::cout << " TSelect ... rejected by max. impact(";
78 std::cout << a.impact() << ") < ";
79 std::cout << _maxImpact << std::endl;
80#endif
81 return false;
82 }
83 }
84 }
85 else if ( b.objectType() == Circle )
86 {
87 TCircle& a = (TCircle&)b;
88
89 if ( _minPtDefined )
90 {
91 if ( a.pt() < _minPt )
92 {
93#ifdef TRKRECO_DEBUG_DETAIL
94 std::cout << " TSelect ... rejected by min. pt(";
95 std::cout << a.pt() << ") < ";
96 std::cout << _minPt << std::endl;
97#endif
98 return false;
99 }
100 }
101
102 if ( _maxImpactDefined )
103 {
104 if ( fabs( a.impact() ) > _maxImpact )
105 {
106#ifdef TRKRECO_DEBUG_DETAIL
107 std::cout << " TSelect ... rejected by max. impact(";
108 std::cout << a.impact() << ") < ";
109 std::cout << _maxImpact << std::endl;
110#endif
111 return false;
112 }
113 }
114 }
115 else
116 {
117 std::cout << "TMSelector !!! Unknown object type" << std::endl;
118 return false;
119 }
120
121#ifdef TRKRECO_DEBUG_DETAIL
122 std::cout << " TSelect::select ... accepted" << std::endl;
123#endif
124 return true;
125}
double impact(void) const
returns impact parameter to the origin.
bool fitted(void) const
returns true if fitted.
virtual unsigned objectType(void) const
returns object type.
double impact(void) const
returns signed impact parameter to the origin.

◆ select() [2/3]

bool TMSelector::select ( TTrackBase & ) const

returns true if given track satisfys criteria after fitting.

◆ select() [3/3]

bool TMSelector::select ( TTrackBase & ) const

returns true if given track satisfys criteria after fitting.


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