Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TMSelector Class Reference

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

#include <TMSelector.h>

List of all members.

Public Member Functions

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

Private Attributes

double _maxDistance
bool _maxDistanceDefined
double _maxImpact
bool _maxImpactDefined
double _maxSigma
bool _maxSigmaDefined
double _minPt
bool _minPtDefined
unsigned _nLinks
bool _nLinksDefined
unsigned _nLinksStereo
bool _nLinksStereoDefined
unsigned _nSuperLayers
bool _nSuperLayersDefined


Detailed Description

A class to select a TTrackBase object.


Constructor & Destructor Documentation

TMSelector::TMSelector  ) 
 

Constructor.

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.

TMSelector::~TMSelector  )  [virtual]
 

Destructor.

00049                         {
00050 }

TMSelector::TMSelector  ) 
 

Constructor.

TMSelector::TMSelector const TMSelector  ) 
 

Copy constructor.

virtual TMSelector::~TMSelector  )  [virtual]
 

Destructor.


Member Function Documentation

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

dumps debug information.

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

dumps debug information.

double TMSelector::maxDistance double   ) 
 

sets max. distance required for stereo hits.

double TMSelector::maxDistance void   )  const
 

returns max. distance required for stereo hits.

double TMSelector::maxDistance double   )  [inline]
 

sets max. distance required for stereo hits.

00244                                 {
00245     _maxDistanceDefined = true;
00246     return _maxDistance = a;
00247 }

double TMSelector::maxDistance void   )  const [inline]
 

returns max. distance required for stereo hits.

00234                                   {
00235 #ifdef TRKRECO_DEBUG
00236     if (! _maxDistanceDefined)
00237         std::cout << "TMSelector !!! max. distance is not defined" << std::endl;
00238 #endif
00239     return _maxDistance;
00240 }

double TMSelector::maxImpact double   ) 
 

sets max. impact(2D) required.

double TMSelector::maxImpact void   )  const
 

returns max. impact(2D) required.

double TMSelector::maxImpact double   )  [inline]
 

sets max. impact(2D) required.

00193                               {
00194     _maxImpactDefined = true;
00195     return _maxImpact = a;
00196 }

double TMSelector::maxImpact void   )  const [inline]
 

returns max. impact(2D) required.

00183                                 {
00184 #ifdef TRKRECO_DEBUG
00185     if (! _maxImpactDefined)
00186         std::cout << "TMSelector !!! max. impact is not defined" << std::endl;
00187 #endif
00188     return _maxImpact;
00189 }

double TMSelector::maxSigma double   ) 
 

sets max. sigma for each TMLink.

double TMSelector::maxSigma void   )  const
 

returns max. sigma for each TMLink.

double TMSelector::maxSigma double   )  [inline]
 

sets max. sigma for each TMLink.

00210                              {
00211     _maxSigmaDefined = true;
00212     return _maxSigma = a;
00213 }

double TMSelector::maxSigma void   )  const [inline]
 

returns max. sigma for each TMLink.

00200                                {
00201 #ifdef TRKRECO_DEBUG
00202     if (! _maxSigmaDefined)
00203         std::cout << "TMSelector !!! max. sigma is not defined" << std::endl;
00204 #endif
00205     return _maxSigma;
00206 }

double TMSelector::minPt double   ) 
 

sets min. pt required.

double TMSelector::minPt void   )  const
 

returns min. pt required.

double TMSelector::minPt double   )  [inline]
 

sets min. pt required.

00176                           {
00177     _minPtDefined = true;
00178     return _minPt = a;
00179 }

double TMSelector::minPt void   )  const [inline]
 

returns min. pt required.

00166                             {
00167 #ifdef TRKRECO_DEBUG
00168     if (! _minPtDefined)
00169         std::cout << "TMSelector !!! min. pt is not defined" << std::endl;
00170 #endif
00171     return _minPt;
00172 }

unsigned TMSelector::nLinks unsigned   ) 
 

sets # of hits(TMLinks) requried.

unsigned TMSelector::nLinks void   )  const
 

returns min. # of hits(TMLinks) requried.

unsigned TMSelector::nLinks unsigned   )  [inline]
 

sets # of hits(TMLinks) requried.

00142                              {
00143     _nLinksDefined = true;
00144     return _nLinks = a;
00145 }

unsigned TMSelector::nLinks void   )  const [inline]
 

returns min. # of hits(TMLinks) requried.

00132                              {
00133 #ifdef TRKRECO_DEBUG
00134     if (! _nLinksDefined)
00135         std::cout << "TMSelector !!! min. nLinks is not defined" << std::endl;
00136 #endif
00137     return _nLinks;
00138 }

unsigned TMSelector::nLinksStereo unsigned   ) 
 

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

unsigned TMSelector::nLinksStereo void   )  const
 

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

unsigned TMSelector::nLinksStereo unsigned   )  [inline]
 

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

00227                                    {
00228     _nLinksStereoDefined = true;
00229     return _nLinksStereo = a;
00230 }

unsigned TMSelector::nLinksStereo void   )  const [inline]
 

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

00217                                    {
00218 #ifdef TRKRECO_DEBUG
00219     if (! _nLinksStereoDefined)
00220         std::cout << "TMSelector !!! min. nLinksStereo is not defined" << std::endl;
00221 #endif
00222     return _nLinksStereo;
00223 }

unsigned TMSelector::nSuperLayers unsigned   ) 
 

sets # of super layers required.

unsigned TMSelector::nSuperLayers void   )  const
 

returns min. # of super layers required.

unsigned TMSelector::nSuperLayers unsigned   )  [inline]
 

sets # of super layers required.

00159                                    {
00160     _nSuperLayersDefined = true;
00161     return _nSuperLayers = a;
00162 }

unsigned TMSelector::nSuperLayers void   )  const [inline]
 

returns min. # of super layers required.

00149                                    {
00150 #ifdef TRKRECO_DEBUG
00151     if (! _nSuperLayers)
00152         std::cout << "TMSelector !!! min. nSuperLayers is not defined" << std::endl;
00153 #endif
00154     return _nSuperLayers;
00155 }

bool TMSelector::preSelect const TTrackBase  )  const
 

returns true if given track satisfys criteria before fitting.

bool TMSelector::preSelect const TTrackBase  )  const
 

returns true if given track satisfys criteria before fitting.

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.

bool TMSelector::select TTrackBase  )  const
 

returns true if given track satisfys criteria after fitting.

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 }


Member Data Documentation

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]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:55:25 2011 for BOSS6.5.5 by  doxygen 1.3.9.1