00001 //$id$ 00002 // 00003 //$log$ 00004 00005 /* 00006 * 2003/12/12 Zhengyun You Peking University 00007 * 00008 * 2004/09/12 Zhengyun You Peking University 00009 * transplanted to Gaudi framework 00010 */ 00011 00012 #ifndef MUC_REC_HIT_H 00013 #define MUC_REC_HIT_H 00014 00015 #include <CLHEP/Vector/ThreeVector.h> 00016 #include <CLHEP/Geometry/Point3D.h> 00017 00018 #include "GaudiKernel/ContainedObject.h" 00019 #include "GaudiKernel/ObjectVector.h" 00020 #include "GaudiKernel/SmartRef.h" 00021 #include "EventModel/EventModel.h" 00022 #include "Identifier/Identifier.h" 00023 #include "MucGeomSvc/MucGeomSvc.h" 00024 00025 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00026 typedef HepGeom::Point3D<double> HepPoint3D; 00027 #endif 00028 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00029 typedef HepGeom::Vector3D<double> HepVector3D; 00030 #endif 00031 00032 using namespace std; 00033 using namespace CLHEP; 00034 00035 extern const CLID &CLID_MucRecHit; 00036 00037 class MucRecHit : virtual public ContainedObject 00038 { 00039 public: 00040 00042 MucRecHit() {;} 00043 00045 MucRecHit(const Identifier& id); 00046 00048 MucRecHit(const int part = -1, 00049 const int seg = -1, 00050 const int gap = -1, 00051 const int strip = -1); 00052 00054 MucRecHit(const MucRecHit& source); 00055 00057 MucRecHit& operator=(const MucRecHit& orig); 00058 00060 ~MucRecHit(); 00061 00062 virtual const CLID& clID() const { return MucRecHit::classID(); } 00063 static const CLID& classID() { return CLID_MucRecHit; } 00064 00065 public: 00066 00068 Identifier GetID() const { return m_MucID; } 00069 00071 int Part() const { return MucID::part(m_MucID); } 00072 00074 int Seg() const { return MucID::seg(m_MucID); } 00075 00077 int Gap() const { return MucID::gap(m_MucID); } 00078 00080 int Strip() const { return MucID::strip(m_MucID); } 00081 00083 MucGeoGap *GetGap() const { return m_pMucGeoGap; } 00084 00086 MucGeoStrip *GetStrip() const { return m_pMucGeoStrip; } 00087 00089 Hep3Vector GetCenterPos() const; 00090 00092 Hep3Vector GetCenterSigma() const; 00093 00094 void SetHitMode(int recmode){ m_recmode = recmode;} 00095 00096 int GetHitMode() const {return m_recmode;} 00097 00098 void SetHitSeed(int seed ){m_IsSeed = seed;} 00099 00100 int HitIsSeed() const {return m_IsSeed;} 00101 00102 void SetPadID(int padID){m_padID = padID;} 00103 void SetIntersectX(float x){m_intersect_x = x;} 00104 void SetIntersectY(float y){m_intersect_y = y;} 00105 void SetIntersectZ(float z){m_intersect_z = z;} 00106 00107 int GetPadID() const {return m_padID;} 00108 float GetIntersectX() const{return m_intersect_x;} 00109 float GetIntersectY() const{return m_intersect_y;} 00110 float GetIntersectZ() const{return m_intersect_z;} 00111 00112 private: 00113 00114 Identifier m_MucID; 00115 int m_padID; // Which pad is expected, Only used in expected hit, 00116 float m_intersect_x; // intersection position of expected hit 00117 float m_intersect_y; 00118 float m_intersect_z; 00119 MucGeoGap *m_pMucGeoGap; 00120 MucGeoStrip *m_pMucGeoStrip; 00121 HepPoint3D m_CenterPos; // Position of strip which was hit. 00122 HepPoint3D m_CenterSigma; // Uncert. in position of strip. 00123 int m_recmode; // 1: mdc ext ; 2 emc ext 00124 int m_IsSeed; 00125 }; 00126 00127 typedef ObjectVector<MucRecHit> MucRecHitCol; 00128 00129 #endif /* MUC_REC_HIT_H */