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

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // $Id: TBuilder0.h,v 1.6 2010/03/31 09:58:59 liucy Exp $
00003 //-----------------------------------------------------------------------------
00004 // Filename : TBuilder0.h
00005 // Section  : Tracking
00006 // Owner    : Yoshi Iwasaki
00007 // Email    : yoshihito.iwasaki@kek.jp
00008 //-----------------------------------------------------------------------------
00009 // Description : A class to build a track.
00010 //               See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef TBuilder0_FLAG_
00014 #define TBuilder0_FLAG_
00015 
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021 
00022 #include <string>
00023 
00024 #define HEP_SHORT_NAMES
00025 #include "CLHEP/Alist/AList.h"
00026 #include "TrkReco/TMSelector.h"
00027 #include "TrkReco/THelixFitter.h"
00028 #include "TrkReco/TCosmicFitter.h"
00029 
00030 class TTrack;
00031 class TMLink;
00032 class TSegment;
00033 
00035 class TBuilder0 {
00036 
00037   public:
00039     TBuilder0(const std::string & name);
00040 
00042     TBuilder0(const std::string & name,
00043              float salvageLevel);
00044 
00046     TBuilder0(const std::string & name,
00047              float stereoZ3,
00048              float stereoZ4,
00049              float stereoChisq3,
00050              float stereoChisq4,
00051              float stereoMaxSigma,
00052              unsigned fittingCorrections,
00053              float salvageLevel);
00054 
00056     virtual ~TBuilder0();
00057 
00058   public:// Selectors
00060     const std::string & name(void) const;
00061 
00063     void dump(const std::string & message = std::string(""),
00064               const std::string & prefix = std::string("")) const;
00065 
00067     const TMSelector & trackSelector(void) const;
00068 
00070     TTrack * buildRphi(const AList<TMLink> &) const;
00071 
00073     TTrack * buildStereo0(TTrack & track, const AList<TMLink> &) const;
00074 
00076     virtual TTrack * buildStereo(TTrack & track, const AList<TMLink> &) const;
00077 
00079     void appendClusters(TTrack & track, const AList<TMLink> &) const;
00080 
00082     void salvage(TTrack & track, AList<TMLink> & list) const;
00083 
00085     virtual int fit(TTrackBase &) const;
00086 
00087   public:// Modifiers
00089     virtual const TMSelector & trackSelector(const TMSelector &);
00090 
00091   private://
00092     void selectHits(AList<TMLink> & list) const;
00093     // -50:bad consective, -20:not consective, -1:not in the same layer, 0:consective and chrg<=0, 1:consective and chrg>0
00094     int consectiveHits(TMLink &l, TMLink & s, int ichg) const;
00095     int check2CnHits(TMLink &l, TMLink & s, int ichg) const;
00096     int checkHits(unsigned i, unsigned j, unsigned k) const;
00097     void salvageNormal(TTrack & track, AList<TMLink> & list) const;
00098 
00099   private:
00100     std::string _name;
00101 //    THelixFitter _fitter;
00102     TCosmicFitter _fitter;
00103     double _salvageLevel;
00104 
00105   protected:// for buildRphi
00106     TMSelector _circleSelector;
00107     TMSelector _trackSelector;
00108 
00109   protected:// for buildStereo
00110     TMSelector _lineSelector;
00111     float _stereoZ3;
00112     float _stereoZ4;
00113     float _stereoChisq3;
00114     float _stereoChisq4;
00115     float _stereoMaxSigma;
00116 };
00117 
00118 //-----------------------------------------------------------------------------
00119 
00120 #ifdef TBuilder0_NO_INLINE
00121 #define inline
00122 #else
00123 #undef inline
00124 #define TBuilder0_INLINE_DEFINE_HERE
00125 #endif
00126 
00127 #ifdef TBuilder0_INLINE_DEFINE_HERE
00128 
00129 inline
00130 const TMSelector &
00131 TBuilder0::trackSelector(void) const {
00132     return _trackSelector;
00133 }
00134 
00135 inline
00136 const std::string &
00137 TBuilder0::name(void) const {
00138     return _name;
00139 }
00140 
00141 inline
00142 int
00143 TBuilder0::fit(TTrackBase & a) const {
00144     return _fitter.fit(a);
00145 }
00146 
00147 #endif
00148 
00149 #undef inline
00150 
00151 #endif /* TBuilder0_FLAG_ */

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