00001 #ifndef Event_EvtRecVeeVertex_H 00002 #define Event_EvtRecVeeVertex_H 00003 00004 #include "GaudiKernel/ObjectVector.h" 00005 #include "GaudiKernel/ContainedObject.h" 00006 #include "GaudiKernel/SmartRef.h" 00007 #include "GaudiKernel/SmartRefVector.h" 00008 #include "EventModel/EventModel.h" 00009 #include "CLHEP/Matrix/Vector.h" 00010 #include "CLHEP/Matrix/SymMatrix.h" 00011 #include "EvtRecEvent/EvtRecTrack.h" 00012 #include <utility> 00013 00014 using CLHEP::HepVector; 00015 using CLHEP::HepSymMatrix; 00016 using namespace EventModel; 00017 extern const CLID & CLID_EvtRecVeeVertex; 00018 00019 // 00020 // For "V" Type Vertex : Ks, Lambda, gamma conversion 00021 // more than 1 vee vertex for every event 00022 // Author : Kanglin He, Min Xu Date: 2008.11.13 00023 // 00024 class EvtRecVeeVertex : virtual public ContainedObject { 00025 public: 00026 virtual const CLID& clID() const {return EvtRecVeeVertex::classID();} 00027 static const CLID& classID() {return CLID_EvtRecVeeVertex;} 00028 00029 EvtRecVeeVertex(); 00030 ~EvtRecVeeVertex() {;} 00031 00032 EvtRecVeeVertex(const EvtRecVeeVertex&); 00033 EvtRecVeeVertex & operator = (const EvtRecVeeVertex &); 00034 00035 int vertexId() const {return m_vertexId;} 00036 int vertexType() const {return m_vertexType;} 00037 double chi2() const {return m_chi2;} 00038 int ndof() const {return m_ndof;} 00039 double mass() const {return m_mass;} 00040 const HepVector& w() const {return m_w;} 00041 const HepSymMatrix& Ew() const {return m_Ew;} 00042 const std::pair<int, int>& pair() const {return m_pair;} 00043 inline int pair(int i) const; 00044 int nCharge() const {return m_nCharge;} 00045 int nTracks() const {return m_nTracks;} 00046 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> >& pairDaughters() { 00047 return m_daughters; 00048 } 00049 inline SmartRef<EvtRecTrack>& daughter(int i); 00050 00051 void setVertexId(int vtxId) {m_vertexId = vtxId;} 00052 void setVertexType(int vtxType) {m_vertexType = vtxType;} 00053 void setChi2(double chi2) {m_chi2 = chi2;} 00054 void setNdof(int ndof) {m_ndof = ndof;} 00055 void setMass(double mass) {m_mass = mass;} 00056 void setW(const HepVector& w) {m_w = w;} 00057 void setEw(const HepSymMatrix& Ew) {m_Ew = Ew;} 00058 void setPair(const std::pair<int, int>& pair) {m_pair = pair;} 00059 void setNCharge(int nCharge) {m_nCharge = nCharge;} 00060 void setNTracks(int nTracks) {m_nTracks = nTracks;} 00061 inline void addDaughter(const SmartRef<EvtRecTrack>& track, int i); 00062 void setDaughter(const std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> >& p) { 00063 m_daughters = p; 00064 } 00065 00066 private: 00067 int m_vertexId; 00068 int m_vertexType; // 0 : Ks; 1 : Lambda; 2 : gamma conversion 00069 double m_chi2; // chi square of vertex fitting 00070 int m_ndof; // degree of freedom 00071 double m_mass; // mass of "V" type decay particle 00072 HepVector m_w; // (px, py, pz, E, x, y, z) of "V" type decay particle 00073 HepSymMatrix m_Ew; // error matrix 00074 std::pair<int, int> m_pair; // identification of daughter particles 00075 // 1:e 2:mu 3:pion 4:kaon 5:proton 00076 int m_nCharge; // total charges of daughter particles 00077 int m_nTracks; // total tracks of daughter particles 00078 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> > m_daughters; 00079 }; 00080 00081 inline int EvtRecVeeVertex::pair(int i) const { 00082 if (i == 0) { 00083 return m_pair.first; 00084 } 00085 assert(i == 1); 00086 return m_pair.second; 00087 } 00088 00089 inline SmartRef<EvtRecTrack>& EvtRecVeeVertex::daughter(int i) { 00090 if (i == 0) { 00091 return m_daughters.first; 00092 } 00093 assert(i == 1); 00094 return m_daughters.second; 00095 } 00096 00097 inline void EvtRecVeeVertex::addDaughter(const SmartRef<EvtRecTrack>& track, int i) { 00098 if (i == 0) { 00099 m_daughters.first = track; 00100 } else if (i == 1) { 00101 m_daughters.second = track; 00102 } else { 00103 assert(false); 00104 } 00105 } 00106 00107 typedef ObjectVector<EvtRecVeeVertex> EvtRecVeeVertexCol; 00108 #endif 00109