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

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // $Id: TTrackMC.h,v 1.5 2010/03/31 09:58:59 liucy Exp $
00003 //-----------------------------------------------------------------------------
00004 // Filename : TTrackMC.h
00005 // Section  : Tracking
00006 // Owner    : Yoshi Iwasaki
00007 // Email    : yoshihito.iwasaki@kek.jp
00008 //-----------------------------------------------------------------------------
00009 // Description : A class to have MC information of TTrack.
00010 //               See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef TTrackMC_FLAG_
00014 #define TTrackMC_FLAG_
00015 
00016 #define TTrackClassified 1
00017 
00018 #define TTrackGarbage 1
00019 #define TTrackCharge 2
00020 #define TTrackBad 4
00021 #define TTrackGhost 8
00022 #define TTrackGood 16
00023 
00024 #define TTrackHep 65536
00025 #define TTrackWire 131072
00026 #define TTrackPt 524288
00027 #define TTrackPz 1048576
00028 #define TTrackUnique 2097152
00029 #define TTrackMatchingLoose 4194304
00030 #define TTrackMatchingTight 8388608
00031 
00032 #ifdef TRKRECO_DEBUG_DETAIL
00033 #ifndef TRKRECO_DEBUG
00034 #define TRKRECO_DEBUG
00035 #endif
00036 #endif
00037 
00038 #include <string>
00039 
00040 #define HEP_SHORT_NAMES
00041 #include "CLHEP/Alist/AList.h"
00042 #include "CLHEP/Vector/ThreeVector.h"
00043 #include "CLHEP/Vector/LorentzVector.h"
00044 //struct reccdc_mctrk;
00045 class MdcRec_mctrk;
00046 class TrkReco;
00047 class TTrack;
00048 class TTrackHEP;
00049 
00050 using CLHEP::Hep3Vector;
00051 using CLHEP::HepLorentzVector;
00052 
00054 class TTrackMC {
00055 
00056   private:
00058     TTrackMC(const TTrack &);
00059 
00060   public:
00062     virtual ~TTrackMC();
00063 
00064   public:
00066     void dump(const std::string & message = std::string(""),
00067               const std::string & prefix = std::string("")) const;
00068 
00070     int hepId(void) const;
00071 
00073     const TTrackHEP * const hep(void) const;
00074 
00076     bool charge(void) const;
00077 
00079     double wireFraction(void) const;
00080 
00082     double wireFractionHEP(void) const;
00083 
00085     double ptFraction(void) const;
00086 
00088     double pzFraction(void) const;
00089 
00091     const Hep3Vector & residual(void) const;
00092 
00094     double ptResidual(void) const;
00095 
00097     double pzResidual(void) const;
00098 
00100     double ptPull(void) const;
00101 
00103     double pzPull(void) const;
00104 
00106     unsigned state(void) const;
00107 
00109     unsigned quality(void) const;
00110 
00112     std::string qualityString(void) const;
00113 
00114   public:
00116     void update(void);
00117 
00118   private:
00120     void compare(void);
00121 
00123     void classify(void);
00124 
00125   private:
00126     unsigned _state;
00127     unsigned _quality;
00128 
00129     const TTrack & _t;
00130     TTrackHEP * _hep;
00131     int _hepID;
00132     double _wireFraction;
00133     double _wireFractionHEP;
00134     bool _charge;
00135     double _ptFraction;
00136     double _pzFraction;
00137     Hep3Vector _residual;
00138     double _cosOpen;
00139     double _ptResidual;
00140     double _pzResidual;
00141     double _ptPull;
00142     double _pzPull;
00143 
00144   friend class TrkReco;
00145 };
00146 
00147 std::string
00148 TrackMCStatus(const TTrackMC &);
00149 
00150 std::string
00151 TrackMCStatus(const MdcRec_mctrk &);
00152 
00153 std::string
00154 TrackMCQualityString(unsigned quality);
00155 
00156 //-----------------------------------------------------------------------------
00157 
00158 #ifdef TRKRECO_NO_INLINE
00159 #define inline
00160 #else
00161 #undef inline
00162 #define TTrackMC_INLINE_DEFINE_HERE
00163 #endif
00164 
00165 #ifdef TTrackMC_INLINE_DEFINE_HERE
00166 
00167 inline
00168 int
00169 TTrackMC::hepId(void) const {
00170     return _hepID;
00171 }
00172 
00173 inline
00174 const TTrackHEP * const
00175 TTrackMC::hep(void) const {
00176     return _hep;
00177 }
00178 
00179 inline
00180 bool
00181 TTrackMC::charge(void) const {
00182     return _charge;
00183 }
00184 
00185 inline
00186 double
00187 TTrackMC::ptFraction(void) const {
00188     return _ptFraction;
00189 }
00190 
00191 inline
00192 double
00193 TTrackMC::pzFraction(void) const {
00194     return _pzFraction;
00195 }
00196 
00197 inline
00198 double
00199 TTrackMC::wireFraction(void) const {
00200     return _wireFraction;
00201 }
00202 
00203 inline
00204 double
00205 TTrackMC::wireFractionHEP(void) const {
00206     return _wireFractionHEP;
00207 }
00208 
00209 inline
00210 unsigned
00211 TTrackMC::state(void) const {
00212     return _state;
00213 }
00214 
00215 inline 
00216 unsigned 
00217 TTrackMC::quality(void) const { 
00218     return _quality;
00219 } 
00220 
00221 inline
00222 const Hep3Vector &
00223 TTrackMC::residual(void) const {
00224     return _residual;
00225 }
00226 
00227 inline
00228 double
00229 TTrackMC::ptResidual(void) const {
00230     return _ptResidual;
00231 }
00232 
00233 inline
00234 double
00235 TTrackMC::pzResidual(void) const {
00236     return _pzResidual;
00237 }
00238 
00239 inline
00240 double
00241 TTrackMC::ptPull(void) const {
00242     return _ptPull;
00243 }
00244 
00245 inline
00246 double
00247 TTrackMC::pzPull(void) const {
00248     return _pzPull;
00249 }
00250 
00251 #endif
00252 
00253 #undef inline
00254 
00255 #endif /* TTrackMC_FLAG_ */

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