/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/TrkReco/TMSelector.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // $Id: TMSelector.h,v 1.7 2012/05/28 05:16:29 maoh Exp $
00003 //-----------------------------------------------------------------------------
00004 // Filename : TMSelector.h
00005 // Section  : Tracking
00006 // Owner    : Yoshi Iwasaki
00007 // Email    : yoshihito.iwasaki@kek.jp
00008 //-----------------------------------------------------------------------------
00009 // Description : A class to select a TTrackBase object.
00010 //               See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef TMSelector_FLAG_
00014 #define TMSelector_FLAG_
00015 
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021 
00022 #include <string>
00023 #include <iostream>
00024 
00025 #define HEP_SHORT_NAMES
00026 
00027 
00028 class TTrackBase;
00029 class TCircle;
00030 
00032 class TMSelector {
00033 
00034   public:
00036     TMSelector();
00037 
00039     TMSelector(const TMSelector &);
00040 
00042     virtual ~TMSelector();
00043 
00044   public:// Selectors
00046     void dump(const std::string & message = std::string(""),
00047               const std::string & prefix = std::string("")) const;
00048 
00050     unsigned nLinks(void) const;
00051 
00053     unsigned nSuperLayers(void) const;
00054 
00056     double minPt(void) const;
00057 
00059     double maxImpact(void) const;
00060 
00062     unsigned nLinksStereo(void) const;
00063 
00065     double maxDistance(void) const;
00066 
00068     double maxSigma(void) const;
00069 
00071     bool select(TTrackBase &) const;
00072 
00074     bool preSelect(const TTrackBase &) const;
00075 
00076   public:// Modifiers
00078     unsigned nLinks(unsigned);
00079 
00081     unsigned nSuperLayers(unsigned);
00082 
00084     double minPt(double);
00085 
00087     double maxImpact(double);
00088 
00090     unsigned nLinksStereo(unsigned);
00091 
00093     double maxDistance(double);
00094 
00096     double maxSigma(double);
00097 
00098   private:
00099 
00100   private:
00101     bool _nLinksDefined;
00102     bool _nSuperLayersDefined;
00103     bool _minPtDefined;
00104     bool _maxImpactDefined;
00105     bool _maxSigmaDefined;
00106 
00107     unsigned _nLinks;
00108     unsigned _nSuperLayers;
00109     double _minPt;
00110     double _maxImpact;
00111     double _maxSigma;
00112 
00113     bool _nLinksStereoDefined;
00114     bool _maxDistanceDefined;
00115 
00116     unsigned _nLinksStereo;
00117     double _maxDistance;
00118 };
00119 
00120 //-----------------------------------------------------------------------------
00121 
00122 #ifdef TMSelector_NO_INLINE
00123 #define inline
00124 #else
00125 #undef inline
00126 #define TMSelector_INLINE_DEFINE_HERE
00127 #endif
00128 
00129 #ifdef TMSelector_INLINE_DEFINE_HERE
00130 
00131 inline
00132 unsigned
00133 TMSelector::nLinks(void) const {
00134 #ifdef TRKRECO_DEBUG
00135     if (! _nLinksDefined)
00136         std::cout << "TMSelector !!! min. nLinks is not defined" << std::endl;
00137 #endif
00138     return _nLinks;
00139 }
00140 
00141 inline
00142 unsigned
00143 TMSelector::nLinks(unsigned a) {
00144     _nLinksDefined = true;
00145     return _nLinks = a;
00146 }
00147 
00148 inline
00149 unsigned
00150 TMSelector::nSuperLayers(void) const {
00151 #ifdef TRKRECO_DEBUG
00152     if (! _nSuperLayers)
00153         std::cout << "TMSelector !!! min. nSuperLayers is not defined" << std::endl;
00154 #endif
00155     return _nSuperLayers;
00156 }
00157 
00158 inline
00159 unsigned
00160 TMSelector::nSuperLayers(unsigned a) {
00161     _nSuperLayersDefined = true;
00162     return _nSuperLayers = a;
00163 }
00164 
00165 inline
00166 double
00167 TMSelector::minPt(void) const {
00168 #ifdef TRKRECO_DEBUG
00169     if (! _minPtDefined)
00170         std::cout << "TMSelector !!! min. pt is not defined" << std::endl;
00171 #endif
00172     return _minPt;
00173 }
00174 
00175 inline
00176 double
00177 TMSelector::minPt(double a) {
00178     _minPtDefined = true;
00179     return _minPt = a;
00180 }
00181 
00182 inline
00183 double
00184 TMSelector::maxImpact(void) const {
00185 #ifdef TRKRECO_DEBUG
00186     if (! _maxImpactDefined)
00187         std::cout << "TMSelector !!! max. impact is not defined" << std::endl;
00188 #endif
00189     return _maxImpact;
00190 }
00191 
00192 inline
00193 double
00194 TMSelector::maxImpact(double a) {
00195     _maxImpactDefined = true;
00196     return _maxImpact = a;
00197 }
00198 
00199 inline
00200 double
00201 TMSelector::maxSigma(void) const {
00202 #ifdef TRKRECO_DEBUG
00203     if (! _maxSigmaDefined)
00204         std::cout << "TMSelector !!! max. sigma is not defined" << std::endl;
00205 #endif
00206     return _maxSigma;
00207 }
00208 
00209 inline
00210 double
00211 TMSelector::maxSigma(double a) {
00212     _maxSigmaDefined = true;
00213     return _maxSigma = a;
00214 }
00215 
00216 inline
00217 unsigned
00218 TMSelector::nLinksStereo(void) const {
00219 #ifdef TRKRECO_DEBUG
00220     if (! _nLinksStereoDefined)
00221         std::cout << "TMSelector !!! min. nLinksStereo is not defined" << std::endl;
00222 #endif
00223     return _nLinksStereo;
00224 }
00225 
00226 inline
00227 unsigned
00228 TMSelector::nLinksStereo(unsigned a) {
00229     _nLinksStereoDefined = true;
00230     return _nLinksStereo = a;
00231 }
00232 
00233 inline
00234 double
00235 TMSelector::maxDistance(void) const {
00236 #ifdef TRKRECO_DEBUG
00237     if (! _maxDistanceDefined)
00238         std::cout << "TMSelector !!! max. distance is not defined" << std::endl;
00239 #endif
00240     return _maxDistance;
00241 }
00242 
00243 inline
00244 double
00245 TMSelector::maxDistance(double a) {
00246     _maxDistanceDefined = true;
00247     return _maxDistance = a;
00248 }
00249 
00250 #endif
00251 
00252 #undef inline
00253 
00254 #endif /* TMSelector_FLAG_ */

Generated on Tue Nov 29 23:14:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7