BOSS 7.0.1
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.
 

Detailed Description

A class to select a TTrackBase object.

Definition at line 32 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

Constructor & Destructor Documentation

◆ TMSelector() [1/4]

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.) {
32}

◆ TMSelector() [2/4]

TMSelector::TMSelector ( const TMSelector a)

Copy constructor.

Definition at line 34 of file TMSelector.cxx.

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

◆ ~TMSelector() [1/2]

TMSelector::~TMSelector ( )
virtual

Destructor.

Definition at line 49 of file TMSelector.cxx.

49 {
50}

◆ TMSelector() [3/4]

TMSelector::TMSelector ( )

Constructor.

◆ TMSelector() [4/4]

TMSelector::TMSelector ( const TMSelector )

Copy constructor.

◆ ~TMSelector() [2/2]

virtual TMSelector::~TMSelector ( )
virtual

Destructor.

Member Function Documentation

◆ dump() [1/2]

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

dumps debug information.

◆ dump() [2/2]

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

dumps debug information.

◆ maxDistance() [1/4]

double TMSelector::maxDistance ( double  a)
inline

sets max. distance required for stereo hits.

Definition at line 245 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

245 {
246 _maxDistanceDefined = true;
247 return _maxDistance = a;
248}

◆ maxDistance() [2/4]

double TMSelector::maxDistance ( double  )

sets max. distance required for stereo hits.

◆ maxDistance() [3/4]

double TMSelector::maxDistance ( void  ) const
inline

returns max. distance required for stereo hits.

Definition at line 235 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

235 {
236#ifdef TRKRECO_DEBUG
237 if (! _maxDistanceDefined)
238 std::cout << "TMSelector !!! max. distance is not defined" << std::endl;
239#endif
240 return _maxDistance;
241}

Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ maxDistance() [4/4]

double TMSelector::maxDistance ( void  ) const

returns max. distance required for stereo hits.

◆ maxImpact() [1/4]

double TMSelector::maxImpact ( double  a)
inline

sets max. impact(2D) required.

Definition at line 194 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

194 {
195 _maxImpactDefined = true;
196 return _maxImpact = a;
197}

◆ maxImpact() [2/4]

double TMSelector::maxImpact ( double  )

sets max. impact(2D) required.

◆ maxImpact() [3/4]

double TMSelector::maxImpact ( void  ) const
inline

returns max. impact(2D) required.

Definition at line 184 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

184 {
185#ifdef TRKRECO_DEBUG
186 if (! _maxImpactDefined)
187 std::cout << "TMSelector !!! max. impact is not defined" << std::endl;
188#endif
189 return _maxImpact;
190}

Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ maxImpact() [4/4]

double TMSelector::maxImpact ( void  ) const

returns max. impact(2D) required.

◆ maxSigma() [1/4]

double TMSelector::maxSigma ( double  a)
inline

sets max. sigma for each TMLink.

Definition at line 211 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

211 {
212 _maxSigmaDefined = true;
213 return _maxSigma = a;
214}

◆ maxSigma() [2/4]

double TMSelector::maxSigma ( double  )

sets max. sigma for each TMLink.

◆ maxSigma() [3/4]

double TMSelector::maxSigma ( void  ) const
inline

returns max. sigma for each TMLink.

Definition at line 201 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

201 {
202#ifdef TRKRECO_DEBUG
203 if (! _maxSigmaDefined)
204 std::cout << "TMSelector !!! max. sigma is not defined" << std::endl;
205#endif
206 return _maxSigma;
207}

Referenced by TBuilder0::appendClusters(), TBuilder0::buildRphi(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ maxSigma() [4/4]

double TMSelector::maxSigma ( void  ) const

returns max. sigma for each TMLink.

◆ minPt() [1/4]

double TMSelector::minPt ( double  a)
inline

sets min. pt required.

Definition at line 177 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

177 {
178 _minPtDefined = true;
179 return _minPt = a;
180}

◆ minPt() [2/4]

double TMSelector::minPt ( double  )

sets min. pt required.

◆ minPt() [3/4]

double TMSelector::minPt ( void  ) const
inline

returns min. pt required.

Definition at line 167 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

167 {
168#ifdef TRKRECO_DEBUG
169 if (! _minPtDefined)
170 std::cout << "TMSelector !!! min. pt is not defined" << std::endl;
171#endif
172 return _minPt;
173}

Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ minPt() [4/4]

double TMSelector::minPt ( void  ) const

returns min. pt required.

◆ nLinks() [1/4]

unsigned TMSelector::nLinks ( unsigned  a)
inline

sets # of hits(TMLinks) requried.

Definition at line 143 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

143 {
144 _nLinksDefined = true;
145 return _nLinks = a;
146}

◆ nLinks() [2/4]

unsigned TMSelector::nLinks ( unsigned  )

sets # of hits(TMLinks) requried.

◆ nLinks() [3/4]

unsigned TMSelector::nLinks ( void  ) const
inline

returns min. # of hits(TMLinks) requried.

Definition at line 133 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

133 {
134#ifdef TRKRECO_DEBUG
135 if (! _nLinksDefined)
136 std::cout << "TMSelector !!! min. nLinks is not defined" << std::endl;
137#endif
138 return _nLinks;
139}

Referenced by TBuilder0::buildRphi(), TBuilder0::buildStereo(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ nLinks() [4/4]

unsigned TMSelector::nLinks ( void  ) const

returns min. # of hits(TMLinks) requried.

◆ nLinksStereo() [1/4]

unsigned TMSelector::nLinksStereo ( unsigned  a)
inline

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

Definition at line 228 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

228 {
229 _nLinksStereoDefined = true;
230 return _nLinksStereo = a;
231}

◆ nLinksStereo() [2/4]

unsigned TMSelector::nLinksStereo ( unsigned  )

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

◆ nLinksStereo() [3/4]

unsigned TMSelector::nLinksStereo ( void  ) const
inline

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

Definition at line 218 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

218 {
219#ifdef TRKRECO_DEBUG
220 if (! _nLinksStereoDefined)
221 std::cout << "TMSelector !!! min. nLinksStereo is not defined" << std::endl;
222#endif
223 return _nLinksStereo;
224}

Referenced by TBuilder0::buildStereo(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ nLinksStereo() [4/4]

unsigned TMSelector::nLinksStereo ( void  ) const

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

◆ nSuperLayers() [1/4]

unsigned TMSelector::nSuperLayers ( unsigned  a)
inline

sets # of super layers required.

Definition at line 160 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

160 {
161 _nSuperLayersDefined = true;
162 return _nSuperLayers = a;
163}

◆ nSuperLayers() [2/4]

unsigned TMSelector::nSuperLayers ( unsigned  )

sets # of super layers required.

◆ nSuperLayers() [3/4]

unsigned TMSelector::nSuperLayers ( void  ) const
inline

returns min. # of super layers required.

Definition at line 150 of file InstallArea/include/TrkReco/TrkReco/TMSelector.h.

150 {
151#ifdef TRKRECO_DEBUG
152 if (! _nSuperLayers)
153 std::cout << "TMSelector !!! min. nSuperLayers is not defined" << std::endl;
154#endif
155 return _nSuperLayers;
156}

Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().

◆ nSuperLayers() [4/4]

unsigned TMSelector::nSuperLayers ( void  ) const

returns min. # of super layers required.

◆ preSelect() [1/2]

bool TMSelector::preSelect ( const TTrackBase a) const

returns true if given track satisfys criteria before fitting.

Definition at line 123 of file TMSelector.cxx.

123 {
124 if (_nLinksDefined) {
125 if (a.nLinks() < _nLinks) {
126#ifdef TRKRECO_DEBUG_DETAIL
127 std::cout << " TSelect ... rejected by nLinks(";
128 std::cout << a.nLinks() << ") < ";
129 std::cout << _nLinks << std::endl;
130#endif
131 return false;
132 }
133 }
134
135 if (_nSuperLayersDefined) {
136 if (NSuperLayers(a.links()) < _nSuperLayers) {
137#ifdef TRKRECO_DEBUG_DETAIL
138 std::cout << " TSelect ... rejected by nSuperLayers(";
139 std::cout << NSuperLayers(a.links()) << ") < ";
140 std::cout << _nSuperLayers << std::endl;
141#endif
142 return false;
143 }
144 }
145
146#ifdef TRKRECO_DEBUG_DETAIL
147 std::cout << " TSelect::preSelect ... accepted" << std::endl;
148#endif
149 return true;
150}
const AList< TMLink > & links(unsigned mask=0) const
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.
Definition: TTrackBase.cxx:297
unsigned nLinks(unsigned mask=0) const
returns # of masked TMLinks assigned to this track object.
Definition: TTrackBase.cxx:305

Referenced by TBuilder0::buildRphi().

◆ preSelect() [2/2]

bool TMSelector::preSelect ( const TTrackBase ) const

returns true if given track satisfys criteria before fitting.

◆ select() [1/2]

bool TMSelector::select ( TTrackBase b) const

returns true if given track satisfys criteria after fitting.

Definition at line 53 of file TMSelector.cxx.

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

Referenced by TBuilder0::buildRphi(), TBuilder0::buildStereo(), TBuilderCosmic::buildStereo(), and TBuilder0::buildStereo0().

◆ select() [2/2]

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: