/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Muc/MucRecEvent/MucRecEvent-00-02-52/MucRecEvent/RecMucTrack.h

Go to the documentation of this file.
00001 //$id$
00002 //
00003 //$log$
00004 
00005 /*
00006  *    2004/03/08   Zhengyun You      Peking University
00007  * 
00008  *    2004/09/12   Zhengyun You     Peking University
00009  *                 transplanted to Gaudi framework
00010  */
00011 
00012 #ifndef REC_MUC_TRACK_H
00013 #define REC_MUC_TRACK_H
00014 
00015 #include "GaudiKernel/ContainedObject.h"
00016 #include "GaudiKernel/SmartRef.h" 
00017 #include "GaudiKernel/ObjectVector.h"
00018 #include "EventModel/EventModel.h"
00019 #include "Identifier/Identifier.h"
00020 #include "ExtEvent/RecExtTrack.h"
00021 #include "DstEvent/DstMucTrack.h"
00022 
00023 #include "MucRecEvent/MucRecHit.h"
00024 
00038 extern const  CLID &CLID_RecMucTrack;
00039 
00040 class RecMucTrack : public DstMucTrack
00041 {
00042  public:
00043 
00044   virtual const CLID& clID() const
00045     {
00046       return RecMucTrack::classID();
00047     }
00048 
00049   static const CLID& classID()
00050     {
00051       return CLID_RecMucTrack;
00052     }
00053 
00054 
00056   RecMucTrack();
00057 
00059   RecMucTrack& operator=(const RecMucTrack& orig);
00060   
00062   RecMucTrack(const RecMucTrack& source);
00063 
00065   RecMucTrack& operator=(const DstMucTrack& dstTrack);
00066 
00068   RecMucTrack(const DstMucTrack& dstTrack);
00069   
00071   ~RecMucTrack();
00072 
00073   void SetDefault();
00074   
00076   void setTrackId(const int trackId);
00077 
00079   void SetMdcPos(const float x,
00080                  const float y,
00081                  const float z);
00082 
00084   void SetMdcMomentum(const float px,
00085                       const float py,
00086                       const float pz);
00087 
00089   void SetExtMucPos(const float x,
00090                     const float y,
00091                     const float z);
00092 
00094   void SetExtMucMomentum(const float px,
00095                          const float py,
00096                          const float pz);
00097 
00099   void SetMucPos(const float x,
00100                  const float y,
00101                  const float z);
00102 
00103   void SetMucPosSigma(const float sigmax,
00104       const float sigmay,
00105       const float sigmaz);
00106 
00107   
00109   void SetMucMomentum(const float px,
00110                       const float py,
00111                       const float pz);
00112 
00114   void SetCurrentPos(const float x,
00115                      const float y,
00116                      const float z);
00117 
00119   void SetCurrentDir(const float x,
00120                      const float y,
00121                      const float z);
00122 
00124   void SetCurrentInsct(const float x,
00125                        const float y,
00126                        const float z);
00127 
00129   void SetExtTrack(RecExtTrack* extTrack);
00130   
00132   void SetExtTrackID(int id) { m_ExtTrackID = id; }
00133 
00135   void GetMdcExtTrack(Hep3Vector  mdcStartPos, Hep3Vector  mdcStartMomentum, int charge,
00136                       Hep3Vector& mucStartPos, Hep3Vector& mucStartMomentum);
00137 
00138  
00139   bool IsInsideSuperConductor(Hep3Vector pos);
00140 
00142   //void SetMCTrack(const BesPersTrack* mcTrack);
00143   
00145   void AttachHit(MucRecHit* hit);
00146 
00148   void Project(const int& part, const int& gap,
00149                float& x, float& y, float& z,
00150                int& seg);
00151   
00153   float GetHitDistance(const MucRecHit* hit);
00154 
00156   float GetHitDistance2(const MucRecHit* hit);
00157 
00159   Hep3Vector CalculateInsct(const int part,
00160                             const int seg,
00161                             const int gap);
00162   
00164   void AttachInsct(Hep3Vector insct);
00165   
00167   void AttachDirection(Hep3Vector dir);
00168 
00170   void CorrectDir();
00171   
00173   void CorrectPos();
00174 
00176   //void ProjectToReference(float& x, float& y, float& z);
00177 
00179   //void ProjectToZ(float& x, float& y, float& zplane);
00180 
00182   //void TransformPhiRToXY(const float& vk, const float& vr,
00183   //             const float& k0, const float& r0,
00184   //             float& vx, float& vy, 
00185   //             float& x0, float& y0) const;
00186 
00187 
00189   int getExtTrackID() const { return m_ExtTrackID; }
00190   
00192   Hep3Vector getExtMucPos() const { return m_ExtMucPos/10; }
00193   
00195   Hep3Vector getExtMucMomentum() const { return m_ExtMucMomentum/1000; }
00196   
00198   Hep3Vector getMucPos() const { return m_MucPos/10; }
00199   
00200   Hep3Vector getMucPosSigma() const { return m_MucPosSigma/10; }
00201 
00203   Hep3Vector getMucMomentum() const { return m_MucMomentum/1000; }
00204   
00206   Hep3Vector getMdcMomentum() const { return m_MdcMomentum/1000; }
00207   
00209   Hep3Vector GetCurrentPos() const { return m_CurrentPos/10; }  
00210 
00212   Hep3Vector GetCurrentDir() const { return m_CurrentDir/1000; }  
00213   
00215   Hep3Vector GetCurrentInsct() const { return m_CurrentInsct; } //internal  
00216 
00218   void ComputeLastGap();
00219 
00221   int brFirstLayer() const { return m_brFirstLayer; }
00222   
00224   int ecFirstLayer() const { return m_ecFirstLayer; }
00225 
00226 
00228   void LineFit(int fittingMethod);
00229 
00231   //float GetChi2() const { return m_Chi2; }
00232 
00234   //float GetDof() const { return m_Dof; }
00235 
00237   //float GetRms() const { return m_Rms; }
00238 
00240   void ComputeDepth();
00241 
00243   int ComputeDepth(int method);
00244 
00246   void ComputeDistanceMatch();
00247   
00249   void Extend();
00250 
00252   float GetDepth3() const { return m_depth_3/10; }
00253 
00254   void  SetRecMode(int recmode) {m_recmode = recmode;}
00255   
00256   int   GetRecMode() const {return m_recmode;}
00257   
00259   Hep3Vector  GetExtMucDistance() const { return m_Dist_muc_ext;}
00260 
00261   Hep3Vector  GetMucStripPos() const { return m_StripPhi;}
00262   
00264   void ComputeNGapsWithHits(); 
00265 
00267   int GetNGapsWithHits() const { return m_numLayers; }
00268 
00270   int GetTotalHits() const;
00271 
00273   int GetHitInGap(const int part, const int gap) const;
00274 
00276   int GetHitInSeg(const int part, const int seg) const;
00277 
00279   int GetHitInSegOrient(const int part, const int seg, const int orient) const;
00280 
00282   int FindSegWithMaxHits(int &part, int &seg);
00283 
00285   void ComputeMaxHitsInGap();
00286 
00288   //int GetMaxHitsInGap() const { return m_MaxHitsInLayer; }
00289 
00291   bool HasHit(const int part, const int seg, const int gap, const int strip) const;
00292 
00294   bool HasHitInGap(const int part, const int gap) const;
00295   
00297   int GetNSharedHits(const RecMucTrack* track) const;
00298 
00300   MucRecHit* GetHit(const int part, const int gap) const;
00301 
00303   vector<MucRecHit*> GetHits() const;
00304 
00305   vector<int> getVecHits() const { return  m_vecHits ;}
00306   
00307   vector<MucRecHit*> GetExpectedHits() const;
00308  
00309   vector<int> getExpHits() const { return  m_expHits ;}
00310 
00311   vector<float> getDistHits() const { return  m_distHits ;}
00312  
00313   vector<float> getQuadDistHits() const { return  m_distHits_quad ;}
00314 
00315   vector<float> getExtDistHits() const { return  m_distHits_ext ;} 
00316  
00318   vector<long> GetHitIndices() const;
00319 
00321   //BesPersTrack* GetMCTrack() const { return m_MCTrack; }
00322 
00324   void ComputeTrackInfo(int fittingmethod);
00325   
00327   void PrintHitsInfo() const;
00328 
00330   void OutputUnitChange();
00331 
00333   void setVecHits(vector<MucRecHit*>& pHits);
00334 
00335   void setExpHits(vector<MucRecHit*>& pHits);
00336 
00337   void setVecHits(vector<int>& vechits){ m_vecHits = vechits;}
00338 
00339   void setExpHits(vector<int>& exphits){ m_expHits = exphits;}  
00340 
00341   void setDistHits(vector<float>& disthits){ m_distHits = disthits;}
00342 
00343   void setQuadDistHits(vector<float>& disthits){ m_distHits_quad = disthits;}
00344 
00345   void setExtDistHits(vector<float>& disthits){ m_distHits_ext = disthits;}
00346 
00347   void pushExtDistHits(float dist){m_distHits_ext.push_back(dist);}
00348 private:
00349 
00350   int       m_ExtTrackID;      // identifier of the Ext track used as seed of this track
00351   RecExtTrack *m_ExtTrack;        // pointer to the Ext track as seed of this track
00352 
00353   Hep3Vector m_MdcPos;         // Start position of the ext track in Mdc
00354   Hep3Vector m_MdcMomentum;    // Start Momentum of the ext track in Mdc
00355 
00356   Hep3Vector m_ExtMucPos;      // position of the ext track in Muc
00357   Hep3Vector m_ExtMucMomentum; // Momentum of the ext track in Muc
00358 
00359   Hep3Vector m_MucPos;         // Start position of the track in Muc
00360   Hep3Vector m_MucMomentum;    // Start Momentum of the track in Muc
00361   Hep3Vector m_MucPosSigma;
00362   
00363   Hep3Vector m_CurrentPos;     // track current position
00364   Hep3Vector m_CurrentDir;     // track current direction
00365   Hep3Vector m_CurrentInsct;   // track current intersection
00366   Hep3Vector m_Dist_muc_ext;
00367   Hep3Vector m_StripPhi;       // use to calc phi of strip in first layer
00368 
00369   int   m_brFirstLayer;      // first gap of the track in barrel. 20070604
00370   int   m_ecFirstLayer;      // first gap of the track in endcap. 20070604
00371   int   m_ecPart;          // whic part of endcap
00372 
00373   float m_depth_3;             // compare with m_depth
00374   int   m_recmode;             // 0: mdc ext; 1: emc ext
00375   int   m_Good3DLine;
00376   int   m_Good3DPart;
00377   bool  m_changeUnit;
00378   Hep3Vector m_IntersectionInner[9]; //intersection of this track with inner surface this gap
00379   Hep3Vector m_IntersectionOuter[9]; //intersection of this track with outer surface this gap
00380 
00381   //BesPersTrack *m_MCTrack;   // Pointer to monte carlo track
00382   vector<int> m_vecHits;
00383   vector<int> m_expHits;
00384   vector<float> m_distHits;
00385   vector<float> m_distHits_quad;
00386   vector<float> m_distHits_ext;
00387   vector<MucRecHit*> m_pHits;           // Pointers to attached hits
00388   vector<MucRecHit*> m_pExpectedHits;   // Pointers to expected hits
00389   vector<Hep3Vector> m_Intersections;   // Container of intersection points
00390   vector<Hep3Vector> m_Directions;      // Container of track direction on intersection points
00391   
00392 };
00393 
00394 typedef ObjectVector<RecMucTrack> RecMucTrackCol;
00395 
00396 #endif  /* MUC_TRACK_H */
00397 

Generated on Tue Nov 29 23:12:58 2016 for BOSS_7.0.2 by  doxygen 1.4.7