00001 /* 00002 * @class : MdcDedx 00003 * 00004 * this class models "dE/dx" used in Mdc Reconstruction 00005 * 00006 * @author: wangdy 00007 * 00008 * ********************************************************/ 00009 00010 #ifndef RECMDCDEDX_H 00011 #define RECMDCDEDX_H 00012 #include "GaudiKernel/ContainedObject.h" 00013 #include "GaudiKernel/SmartRef.h" 00014 #include "GaudiKernel/SmartRefVector.h" 00015 #include "GaudiKernel/ObjectVector.h" 00016 #include "EventModel/EventModel.h" 00017 #include "RecMdcTrack.h" 00018 #include "RecMdcKalTrack.h" 00019 #include "RecMdcDedxHit.h" 00020 00021 00022 //#include "Identifier/Identifier.h" 00023 //#include "ExtEvent/ExtTrack.h" 00024 #include "DstEvent/DstMdcDedx.h" 00025 00026 extern const CLID& CLID_RecMdcDedx; 00027 typedef SmartRefVector<RecMdcDedxHit> DedxHitRefVec; 00028 00029 class RecMdcDedx : virtual public DstMdcDedx { 00030 00031 public: 00032 virtual const CLID& clID() const { 00033 return RecMdcDedx::classID(); 00034 } 00035 00036 static const CLID& classID() { 00037 return CLID_RecMdcDedx; 00038 } 00039 00040 00041 //ctor and dector 00042 RecMdcDedx(); 00043 RecMdcDedx(const RecMdcDedx& dedxtrk); 00044 RecMdcDedx(const DstMdcDedx& dedxtrk); 00045 RecMdcDedx& operator=(const RecMdcDedx&); 00046 RecMdcDedx& operator=(const DstMdcDedx&); 00047 00048 ~RecMdcDedx(); 00049 //extractors 00050 // int getId(void) const { return m_id; } 00051 // int getPid(void) const { return m_pid; } 00052 // int getStat(void) const { return m_stat; } 00053 // int getNHits(void) const { return m_nhits; } 00054 // float getDedx(void) const { return m_dedx; } 00055 // float getDedxStd(void) const { return m_dedx_std; } 00056 // int getBitrunc(void) const { return m_bitrunc; } 00057 00058 bool isMdcTrackValid(void) {return (m_mdcTrack!=0);} 00059 bool isMdcKalTrackValid(void) {return (m_mdcKalTrack!=0);} 00060 00061 DedxHitRefVec getVecDedxHits() const {return m_vecdedxhit;} 00062 00063 double getDedxHit(void) {return m_dedx_hit; } 00064 double getDedxEsat(void) {return m_dedx_esat; } 00065 double getDedxNoRun(void) {return m_dedx_norun; } 00066 double getDedxMoment(void) {return m_dedx_momentum; } 00067 00068 double getDedxExpect(int pid) const { return m_dedx_exp[pid]; } 00069 double getSigmaDedx(int pid) const { return m_sigma_dedx[pid]; } 00070 double getPidProb(int pid) const { return m_pid_prob[pid]; } 00071 // double getChi(int pid) const { return m_chi[pid]; } 00072 RecMdcTrack* getMdcTrack(void) { return m_mdcTrack; } 00073 RecMdcKalTrack* getMdcKalTrack(void) {return m_mdcKalTrack; } 00074 00075 //modifiers 00076 void setVecDedxHits(const DedxHitRefVec& vecdedxhit) {m_vecdedxhit = vecdedxhit;} 00077 00078 void setDedxHit(double dedx_hit) { m_dedx_hit = dedx_hit; } 00079 void setDedxEsat(double dedx_esat) { m_dedx_esat = dedx_esat; } 00080 void setDedxNoRun(double dedx_norun) { m_dedx_norun = dedx_norun; } 00081 void setDedxMoment(double dedx_momentum){ m_dedx_momentum = dedx_momentum; } 00082 // void setId(int id) { m_id = id; } 00083 // void setPid(int pid) { m_pid = pid; } 00084 // void setStat(int stat) { m_stat = stat; } 00085 // void setNHits(int nhits) { m_nhits = nhits; } 00086 // void setDedx(float dedx) { m_dedx = dedx; } 00087 // void setDedxStd(float dedx_std) { m_dedx_std = dedx_std; } 00088 // void setBitrunc(int bitrunc) { m_bitrunc = bitrunc; } 00089 00090 void setDedxExpect(double* dedx_exp) { 00091 for(int i = 0; i < 5; i++) 00092 m_dedx_exp[i] = dedx_exp[i] ; 00093 } 00094 void setSigmaDedx(double* sigma_dedx) { 00095 for(int i = 0; i < 5; i++) 00096 m_sigma_dedx[i] = sigma_dedx[i] ; 00097 } 00098 void setPidProb(double* pid_prob) { 00099 for(int i = 0; i < 5; i++) 00100 m_pid_prob[i] = pid_prob[i] ; 00101 } 00102 /* void setChi(double* chi) { 00103 for(int i = 0; i < 5; i++) 00104 m_chi[i] = chi[i] ; 00105 } 00106 */ 00107 void setMdcTrack(RecMdcTrack* trk) {m_mdcTrack = trk; } 00108 void setMdcKalTrack(RecMdcKalTrack* trk) {m_mdcKalTrack = trk;} 00109 00110 private: 00111 DedxHitRefVec m_vecdedxhit; 00112 00113 double m_dedx_hit; //double trucation mean of hit-level calib 00114 double m_dedx_esat; //double trucation mean of hit-level+electron saturation calib 00115 double m_dedx_norun; //double trucation mean of no run gain calib 00116 double m_dedx_momentum; //dE/dx calib used momentum 00117 // int m_bitrunc; //bitrunction rate 00118 // int m_id; 00119 // int m_pid; // partile id results 00120 // int m_stat; // status flag 00121 // int m_nhits; // number of hits used in dE/dx recon 00122 // float m_dedx; // measured value of dE/dx 00123 // float m_dedx_std; // normalized dE/dx; 00124 double m_dedx_exp[5]; // expected value of dE/dx for 5 particle hypotheses 00125 double m_sigma_dedx[5]; // sigma value of dE/dx for 5 particle hypotheses 00126 double m_pid_prob[5]; // probability for each of the 5 particle hypotheses 00127 // double m_chi[5]; // chi of dE/dx for each of 5 particle hypotheses 00128 SmartRef<RecMdcTrack> m_mdcTrack; // reference to the track 00129 SmartRef<RecMdcKalTrack> m_mdcKalTrack; 00130 }; 00131 00132 typedef ObjectVector<RecMdcDedx> RecMdcDedxCol; 00133 00134 #endif 00135