/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcTrkRecon/MdcTrkRecon-00-03-45/MdcTrkRecon/MdcSeg.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: MdcSeg.h,v 1.11 2011/09/26 01:06:37 zhangy Exp $
00004 //
00005 // Description:
00006 //       class to hold a superlayer track segment 
00007 //  Takes ownership of Hots that it holds.
00008 //
00009 // Environment:
00010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00011 //
00012 // Author(s): 
00013 //      Steve Schaffner
00014 //      Zhang Yao(zhangyao@ihep.ac.cn)  Migrate to BESIII
00015 //
00016 //------------------------------------------------------------------------
00017 // 
00018 // Interface Dependencies ----------------------------------------------
00019 
00020 #ifndef MDCSEG_H
00021 #define MDCSEG_H
00022 #include "MdcTrkRecon/GmsListLink.h"
00023 #include "CLHEP/Alist/AList.h" 
00024 
00025 class MdcSegParams;
00026 class MdcLine;
00027 class MdcSuperLayer;
00028 class MdcHit;
00029 class MdcSegInfo;
00030 template <class K, class V> class MdcMap;
00031 class MdcSegUsage;
00032 class MdcHitUse;
00033 class MdcHitMap;
00034 
00035 // definitions for quality word
00036 const unsigned segFullFlag = 4; // no missing hits
00037 const unsigned segAmbigFlag = 2;
00038 const unsigned segUsedFlag = 1; 
00039 
00040 // Class definition
00041 class MdcSeg : public GmsListLink
00042 {
00043 public:
00044   MdcSeg(double bunchT);
00045   virtual ~MdcSeg();
00046   double phi() const {return _phi;}
00047   double slope() const {return _slope;}
00048   double chisq() const {return _chisq;}
00049   unsigned int quality() const {return _qual;}
00050   const double * errmat() const {return _errmat;}
00051   const MdcSuperLayer *superlayer() const {return _slayer;}
00052   MdcSegInfo *info() const {return _info;}
00053   void setInfo(MdcSegInfo *ptr);
00054   void setAmbig() {_qual |= segAmbigFlag;}
00055   void setUsed() {_qual |= segUsedFlag;}
00056   void setFull() {_qual |= segFullFlag;}
00057   void setPattern(unsigned thePatt) {_pattern = thePatt;}
00058   int segAmbig() {return (_qual & segAmbigFlag);}
00059   int segUsed() {return (_qual & segUsedFlag);}
00060   int segFull() {return (_qual & segFullFlag);}
00061   unsigned segPattern() const {return _pattern;}
00062   double bunchTime() {return _bunchTime;}
00063 
00064   void plotSeg() const;
00065   void plotSegAll() const;
00066 
00067   void setValues(int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, 
00068                  const MdcSuperLayer *slay, int ambig[]);
00069   void setValues(int nInPatt, double inPhi, double inSlope, 
00070                   double chi2, double inError[3], const MdcSuperLayer *slay);
00071   int addHits(MdcLine *span, MdcHit *hits[], const MdcHitMap*, double corr);
00072   void markHits(const MdcMap<const MdcHit*,MdcSegUsage*>& usedHits) const;
00073 
00074   void append(MdcHitUse*);
00075   void remove(MdcHitUse*);
00076   int nHit() const;
00077   MdcHitUse* hit(int i) const {return _theList[i];}
00078 
00079   static MdcSegParams *segPar() {return segParam;}
00080   static void setParam(MdcSegParams *segpar) {segParam = segpar;}
00081   double testCombSeg(const MdcSeg*)const;//yzhang temp
00082   double testCombSegPt()const;//yzhang temp
00083   double testCombSegTheta()const;//yzhang temp
00084   double testCombSegPhi()const;//yzhang temp
00085   double testCombSegAmbig()const;//yzhang temp
00086   // Preempt 
00087   MdcSeg& operator= (const MdcSeg&);
00088   MdcSeg(const MdcSeg &);
00089 
00090 private:
00091   HepAList<MdcHitUse> _theList;
00092   static MdcSegParams *segParam;
00093   const MdcSuperLayer *_slayer;         
00094   double _phi;
00095   double _slope;
00096   double _errmat[3];  // error matrix: sig**2(phi), sig**2(phi-slope), (slope)
00097   double _chisq;
00098   unsigned int _qual;
00099   unsigned int _pattern;
00100   MdcSegInfo *_info;  // ptr to whatever approach-dependent info needed; kludge
00101   double _bunchTime;
00102 
00103   void reset();
00104 };
00105 
00106 #endif
00107 
00108 
00109 
00110 
00111 
00112 
00113 

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