#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. | |
Private Attributes | |
bool | _nLinksDefined |
bool | _nSuperLayersDefined |
bool | _minPtDefined |
bool | _maxImpactDefined |
bool | _maxSigmaDefined |
unsigned | _nLinks |
unsigned | _nSuperLayers |
double | _minPt |
double | _maxImpact |
double | _maxSigma |
bool | _nLinksStereoDefined |
bool | _maxDistanceDefined |
unsigned | _nLinksStereo |
double | _maxDistance |
Definition at line 32 of file TMSelector.h.
TMSelector::TMSelector | ( | ) |
Constructor.
Definition at line 19 of file TMSelector.cxx.
00020 : _nLinksDefined(false), 00021 _nLinks(0), 00022 _nSuperLayersDefined(false), 00023 _nSuperLayers(0), 00024 _minPtDefined(false), 00025 _minPt(0.), 00026 _maxImpactDefined(false), 00027 _maxImpact(0.), 00028 _nLinksStereoDefined(false), 00029 _nLinksStereo(0), 00030 _maxDistanceDefined(false), 00031 _maxDistance(0.) { 00032 }
TMSelector::TMSelector | ( | const TMSelector & | ) |
Copy constructor.
Definition at line 34 of file TMSelector.cxx.
00035 : _nLinksDefined(a._nLinksDefined), 00036 _nLinks(a._nLinks), 00037 _nSuperLayersDefined(a._nSuperLayersDefined), 00038 _nSuperLayers(a._nSuperLayers), 00039 _minPtDefined(a._minPtDefined), 00040 _minPt(a._minPt), 00041 _maxImpactDefined(a._maxImpactDefined), 00042 _maxImpact(a._maxImpact), 00043 _nLinksStereoDefined(a._nLinksStereoDefined), 00044 _nLinksStereo(a._nLinksStereo), 00045 _maxDistanceDefined(a._maxDistanceDefined), 00046 _maxDistance(a._maxDistance) { 00047 }
TMSelector::~TMSelector | ( | ) | [virtual] |
void TMSelector::dump | ( | const std::string & | message = std::string("") , |
|
const std::string & | prefix = std::string("") | |||
) | const |
dumps debug information.
double TMSelector::maxDistance | ( | double | ) | [inline] |
sets max. distance required for stereo hits.
Definition at line 245 of file TMSelector.h.
References _maxDistance, and _maxDistanceDefined.
00245 { 00246 _maxDistanceDefined = true; 00247 return _maxDistance = a; 00248 }
double TMSelector::maxDistance | ( | void | ) | const [inline] |
returns max. distance required for stereo hits.
Definition at line 235 of file TMSelector.h.
References _maxDistance, and _maxDistanceDefined.
Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00235 { 00236 #ifdef TRKRECO_DEBUG 00237 if (! _maxDistanceDefined) 00238 std::cout << "TMSelector !!! max. distance is not defined" << std::endl; 00239 #endif 00240 return _maxDistance; 00241 }
double TMSelector::maxImpact | ( | double | ) | [inline] |
sets max. impact(2D) required.
Definition at line 194 of file TMSelector.h.
References _maxImpact, and _maxImpactDefined.
00194 { 00195 _maxImpactDefined = true; 00196 return _maxImpact = a; 00197 }
double TMSelector::maxImpact | ( | void | ) | const [inline] |
returns max. impact(2D) required.
Definition at line 184 of file TMSelector.h.
References _maxImpact, and _maxImpactDefined.
Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00184 { 00185 #ifdef TRKRECO_DEBUG 00186 if (! _maxImpactDefined) 00187 std::cout << "TMSelector !!! max. impact is not defined" << std::endl; 00188 #endif 00189 return _maxImpact; 00190 }
double TMSelector::maxSigma | ( | double | ) | [inline] |
sets max. sigma for each TMLink.
Definition at line 211 of file TMSelector.h.
References _maxSigma, and _maxSigmaDefined.
00211 { 00212 _maxSigmaDefined = true; 00213 return _maxSigma = a; 00214 }
double TMSelector::maxSigma | ( | void | ) | const [inline] |
returns max. sigma for each TMLink.
Definition at line 201 of file TMSelector.h.
References _maxSigma, and _maxSigmaDefined.
Referenced by TConformalFinder0::appendCluster(), TBuilder0::appendClusters(), TBuilder0::buildRphi(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00201 { 00202 #ifdef TRKRECO_DEBUG 00203 if (! _maxSigmaDefined) 00204 std::cout << "TMSelector !!! max. sigma is not defined" << std::endl; 00205 #endif 00206 return _maxSigma; 00207 }
double TMSelector::minPt | ( | double | ) | [inline] |
sets min. pt required.
Definition at line 177 of file TMSelector.h.
References _minPt, and _minPtDefined.
00177 { 00178 _minPtDefined = true; 00179 return _minPt = a; 00180 }
double TMSelector::minPt | ( | void | ) | const [inline] |
returns min. pt required.
Definition at line 167 of file TMSelector.h.
References _minPt, and _minPtDefined.
Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00167 { 00168 #ifdef TRKRECO_DEBUG 00169 if (! _minPtDefined) 00170 std::cout << "TMSelector !!! min. pt is not defined" << std::endl; 00171 #endif 00172 return _minPt; 00173 }
unsigned TMSelector::nLinks | ( | unsigned | ) | [inline] |
sets # of hits(TMLinks) requried.
Definition at line 143 of file TMSelector.h.
References _nLinks, and _nLinksDefined.
00143 { 00144 _nLinksDefined = true; 00145 return _nLinks = a; 00146 }
unsigned TMSelector::nLinks | ( | void | ) | const [inline] |
returns min. # of hits(TMLinks) requried.
Definition at line 133 of file TMSelector.h.
References _nLinks, and _nLinksDefined.
Referenced by TBuilder0::buildRphi(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00133 { 00134 #ifdef TRKRECO_DEBUG 00135 if (! _nLinksDefined) 00136 std::cout << "TMSelector !!! min. nLinks is not defined" << std::endl; 00137 #endif 00138 return _nLinks; 00139 }
unsigned TMSelector::nLinksStereo | ( | unsigned | ) | [inline] |
sets min. # of stereo hits(TMLinks) requried.
Definition at line 228 of file TMSelector.h.
References _nLinksStereo, and _nLinksStereoDefined.
00228 { 00229 _nLinksStereoDefined = true; 00230 return _nLinksStereo = a; 00231 }
unsigned TMSelector::nLinksStereo | ( | void | ) | const [inline] |
returns min. # of stereo hits(TMLinks) requried.
Definition at line 218 of file TMSelector.h.
References _nLinksStereo, and _nLinksStereoDefined.
Referenced by TBuilderCosmic::buildStereo(), TBuilder0::buildStereo(), TBuilder0::buildStereo0(), TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00218 { 00219 #ifdef TRKRECO_DEBUG 00220 if (! _nLinksStereoDefined) 00221 std::cout << "TMSelector !!! min. nLinksStereo is not defined" << std::endl; 00222 #endif 00223 return _nLinksStereo; 00224 }
unsigned TMSelector::nSuperLayers | ( | unsigned | ) | [inline] |
sets # of super layers required.
Definition at line 160 of file TMSelector.h.
References _nSuperLayers, and _nSuperLayersDefined.
00160 { 00161 _nSuperLayersDefined = true; 00162 return _nSuperLayers = a; 00163 }
unsigned TMSelector::nSuperLayers | ( | void | ) | const [inline] |
returns min. # of super layers required.
Definition at line 150 of file TMSelector.h.
References _nSuperLayers.
Referenced by TConformalFinder0::TConformalFinder0(), TFastFinder::TFastFinder(), and TBuilder0::trackSelector().
00150 { 00151 #ifdef TRKRECO_DEBUG 00152 if (! _nSuperLayers) 00153 std::cout << "TMSelector !!! min. nSuperLayers is not defined" << std::endl; 00154 #endif 00155 return _nSuperLayers; 00156 }
bool TMSelector::preSelect | ( | const TTrackBase & | ) | const |
returns true if given track satisfys criteria before fitting.
Definition at line 123 of file TMSelector.cxx.
References _nLinks, _nLinksDefined, _nSuperLayers, _nSuperLayersDefined, TTrackBase::links(), TTrackBase::nLinks(), and NSuperLayers().
Referenced by TBuilder0::buildRphi().
00123 { 00124 if (_nLinksDefined) { 00125 if (a.nLinks() < _nLinks) { 00126 #ifdef TRKRECO_DEBUG_DETAIL 00127 std::cout << " TSelect ... rejected by nLinks("; 00128 std::cout << a.nLinks() << ") < "; 00129 std::cout << _nLinks << std::endl; 00130 #endif 00131 return false; 00132 } 00133 } 00134 00135 if (_nSuperLayersDefined) { 00136 if (NSuperLayers(a.links()) < _nSuperLayers) { 00137 #ifdef TRKRECO_DEBUG_DETAIL 00138 std::cout << " TSelect ... rejected by nSuperLayers("; 00139 std::cout << NSuperLayers(a.links()) << ") < "; 00140 std::cout << _nSuperLayers << std::endl; 00141 #endif 00142 return false; 00143 } 00144 } 00145 00146 #ifdef TRKRECO_DEBUG_DETAIL 00147 std::cout << " TSelect::preSelect ... accepted" << std::endl; 00148 #endif 00149 return true; 00150 }
bool TMSelector::select | ( | TTrackBase & | ) | const |
returns true if given track satisfys criteria after fitting.
Definition at line 53 of file TMSelector.cxx.
References _maxImpact, _maxImpactDefined, _minPt, _minPtDefined, Circle, TTrackBase::fitted(), TTrackBase::objectType(), and Track.
Referenced by TBuilder0::buildRphi(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo(), and TBuilder0::buildStereo0().
00053 { 00054 00055 #ifdef TRKRECO_DEBUG_DETAIL 00056 if (! b.fitted()) { 00057 std::cout << " TSelect::select !!! not fitted yet" << std::endl; 00058 } 00059 #endif 00060 00061 if (b.objectType() == Track) { 00062 TTrack & a = (TTrack &) b; 00063 00064 if (_minPtDefined) { 00065 if (a.pt() < _minPt) { 00066 #ifdef TRKRECO_DEBUG_DETAIL 00067 std::cout << " TSelect ... rejected by min. pt("; 00068 std::cout << a.pt() << ") < "; 00069 std::cout << _minPt << std::endl; 00070 #endif 00071 return false; 00072 } 00073 } 00074 00075 if (_maxImpactDefined) { 00076 if (fabs(a.impact()) > _maxImpact) { 00077 #ifdef TRKRECO_DEBUG_DETAIL 00078 std::cout << " TSelect ... rejected by max. impact("; 00079 std::cout << a.impact() << ") < "; 00080 std::cout << _maxImpact << std::endl; 00081 #endif 00082 return false; 00083 } 00084 } 00085 } 00086 else if (b.objectType() == Circle) { 00087 TCircle & a = (TCircle &) b; 00088 00089 if (_minPtDefined) { 00090 if (a.pt() < _minPt) { 00091 #ifdef TRKRECO_DEBUG_DETAIL 00092 std::cout << " TSelect ... rejected by min. pt("; 00093 std::cout << a.pt() << ") < "; 00094 std::cout << _minPt << std::endl; 00095 #endif 00096 return false; 00097 } 00098 } 00099 00100 if (_maxImpactDefined) { 00101 if (fabs(a.impact()) > _maxImpact) { 00102 #ifdef TRKRECO_DEBUG_DETAIL 00103 std::cout << " TSelect ... rejected by max. impact("; 00104 std::cout << a.impact() << ") < "; 00105 std::cout << _maxImpact << std::endl; 00106 #endif 00107 return false; 00108 } 00109 } 00110 } 00111 else { 00112 std::cout << "TMSelector !!! Unknown object type" << std::endl; 00113 return false; 00114 } 00115 00116 #ifdef TRKRECO_DEBUG_DETAIL 00117 std::cout << " TSelect::select ... accepted" << std::endl; 00118 #endif 00119 return true; 00120 }
double TMSelector::_maxDistance [private] |
bool TMSelector::_maxDistanceDefined [private] |
double TMSelector::_maxImpact [private] |
bool TMSelector::_maxImpactDefined [private] |
double TMSelector::_maxSigma [private] |
bool TMSelector::_maxSigmaDefined [private] |
double TMSelector::_minPt [private] |
bool TMSelector::_minPtDefined [private] |
unsigned TMSelector::_nLinks [private] |
bool TMSelector::_nLinksDefined [private] |
unsigned TMSelector::_nLinksStereo [private] |
bool TMSelector::_nLinksStereoDefined [private] |
unsigned TMSelector::_nSuperLayers [private] |
bool TMSelector::_nSuperLayersDefined [private] |