/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcxReco/MdcxReco-00-01-59/MdcxReco/MdcxTrackFinder.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: MdcxTrackFinder.h,v 1.27 2012/07/20 05:48:16 zhangy Exp $
00004 //
00005 // Description:
00006 //      Class MdcxTrackFinder. This is a simple example of a user module. It
00007 //      just prints out each entrypoint (operation) as it is accessed.
00008 //
00009 // Environment:
00010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00011 //
00012 // Author List:
00013 //      David R. Quarrie                Original Author
00014 //      Zhang Yao(zhangyao@ihep.ac.cn)
00015 //
00016 // Copyright Information:
00017 //      Copyright (C) 1994              Lawrence Berkeley Laboratory
00018 // 
00019 // History:
00020 //      Migration for BESIII MDC
00021 //
00022 //------------------------------------------------------------------------
00023 
00024 #ifndef MDCXTRACKFINDER_H
00025 #define MDCXTRACKFINDER_H
00026 
00027 //----------------------
00028 // Base Class Headers --
00029 //----------------------
00030 #include "GaudiKernel/Algorithm.h"
00031 #include "CLHEP/Alist/AList.h"
00032 #include "GaudiKernel/NTuple.h"
00033 #include "MdcData/MdcHit.h"
00034 #include "MdcxReco/MdcxHits.h"
00035 #include "GaudiKernel/SmartDataPtr.h"
00036 #include "MdcRecEvent/RecMdcTrack.h"
00037 #include "MdcRecEvent/RecMdcHit.h"
00038 #include "MdcCalibFunSvc/MdcCalibFunSvc.h"
00039 #include "RawDataProviderSvc/RawDataProviderSvc.h"
00040 #include "MdcTrkRecon/MdcFlagHold.h"
00041 #include "MagneticField/IMagneticFieldSvc.h"
00042 #include "TrkFitter/TrkContextEv.h"
00043 #include "MdcData/MdcRecoHitOnTrack.h"
00044 #ifdef MDCXTIMEDEBUG
00045 #include "BesTimerSvc/IBesTimerSvc.h"
00046 #include "BesTimerSvc/BesTimerSvc.h"
00047 #endif
00048 
00049 class MdcxHel;
00050 class TrkHitList;
00051 class BField;
00052 class TrkRecoTrk;
00053 class MdcxSeg;
00054 class MdcxFittedHel;
00055 
00056 //---------------------
00057 //-- Class Interface --
00058 //---------------------
00059  
00060 class MdcxTrackFinder : public Algorithm {
00061 
00062 //--------------------
00063 // Instance Members --
00064 //--------------------
00065 
00066 public: 
00067   // Constructors
00068   MdcxTrackFinder(const std::string& name, ISvcLocator* pSvcLocator);
00069 
00070   // Destructor
00071   virtual ~MdcxTrackFinder();
00072 
00073   // Operations
00074   StatusCode initialize();
00075   StatusCode execute();
00076   StatusCode finalize(); 
00077   StatusCode beginRun(); 
00078 
00079 private:
00080   // temp var
00081   int                   haveDigi[43][288];
00082   int                   nTk;
00083   bool                  b_saveEvent;
00084   int                   t_nTdsTk;
00085   int                   t_nDigi;
00086   int                   t_nTkTot;
00087   int                   t_nTkNum[20];
00088 
00089   double                m_bunchT0;
00090   double                m_timing;
00091   int                   m_t0Stat;
00092   double                m_t0Truth;
00093   int                   m_eventNo;   
00094   
00095   // debug and hist flag
00096   int                   m_debug;   
00097   int                   m_hist;   
00098   bool                  m_mcHist;
00099 
00100   //for raw data input
00101   bool                  m_dropUnmatch;
00102   bool                  m_keepBadTdc;
00103   bool                  m_dropHot;
00104   bool                  m_keepUnmatch;
00105   uint32_t              m_getDigiFlag;
00106   int                   m_maxMdcDigi;
00107   int                   m_minMdcDigi;
00108   bool                  m_dropMultiHotInLayer;
00109 
00110   // fit type control
00111   bool                  m_salvageTrk;
00112   bool                  m_lineFit;
00113   //bool                        m_cosmicFit;
00114 
00115   // fix of Hit
00116   bool                  m_countPropTime;
00117   bool                  m_doSag;
00118 
00119   // fit cuts
00120   double                m_cresol;
00121   std::vector<float>    m_dropHitsSigma;
00122   std::vector<float>    m_helixFitCut;   
00123   double                m_dropTrkPt;
00124   double                m_addHitCut;
00125   double                m_minTrkProb;
00126   double                m_csmax4;
00127   double                m_csmax3;
00128   double                m_helixFitSigma;
00129   double                m_maxRcsInAddSeg;
00130   double                m_nSigAddHitTrk;
00131   double                m_maxProca;
00132   double                m_d0Cut;
00133   double                m_z0Cut;
00134 
00135 
00136   BField*               m_bfield;
00137   IMagneticFieldSvc*    m_pIMF;
00138   const MdcCalibFunSvc* m_mdcCalibFunSvc; 
00139   RawDataProviderSvc*   m_rawDataProviderSvc;
00140   std::string           m_pdtFile;
00141   HepAList<MdcHit>*     m_junkHitList;
00142   MdcxHits              m_mdcxHits;
00143 
00144   TrkContextEv*         m_context;
00145   const MdcDetector*    m_gm;
00146   MdcDigiVec mdcDigiVec;
00147 
00148   StatusCode FitMdcxTrack(HepAList<MdcxFittedHel>& trkList, 
00149       const HepAList<MdcxHit>& dchitlist, MdcHitCol* hitCol, 
00150       RecMdcTrackCol* trackList, RecMdcHitCol* hitList);
00151   void MdcxHitsToHots(MdcxHel& mdcxHelix, const HepAList<MdcxHit>& mdcxHits, 
00152       TrkHitList* m_trkHitList, MdcHitCol* hitCol);
00153   void MdcxHitsToHots(TrkHitList* m_trkHitList, HitRefVec& recMdcHits, HitRefVec& skipedHits); 
00154 
00155   void store(TrkRecoTrk* aTrack, RecMdcTrackCol*, RecMdcHitCol* ); 
00156   void printTrack(RecMdcTrack* tk);
00157   void dumpTrackList(const HepAList<MdcxFittedHel>& trackList) const;
00158   void dumpTrack(RecMdcTrackCol* trackList);
00159   void dumpMdcxSegs(const HepAList<MdcxSeg>& segList)const;
00160   void bookNTuple();
00161   void fillMdcxSegs(const HepAList<MdcxSeg>& segList)const;
00162   void fillTrkl(const HepAList<MdcxFittedHel>& firsttrkl) const; 
00163   void fillMcTruth();
00164   void fillTrack(TrkRecoTrk* aTrack);
00165   void fillEvent();
00166   void dropMultiHotInLayer(TrkHitList* list);
00167   void dumpTdsTrack(RecMdcTrackCol* trackList);
00168   void dumpTdsHits(RecMdcHitCol* hitList);
00169   const MdcDigi*        m_digiMap[43][288];
00170 
00171 
00172 #ifdef MDCXTIMEDEBUG
00173   IBesTimerSvc* m_timersvc;
00174   static const int NTIMERS = 5;
00175   BesTimer* m_timer[NTIMERS];
00176 #endif
00177 
00178 };
00179 
00180 #endif

Generated on Tue Nov 29 23:13:36 2016 for BOSS_7.0.2 by  doxygen 1.4.7