#include <MdcCalEvent.h>
Public Member Functions | |
MdcCalEvent () | |
~MdcCalEvent () | |
void | setParam (MdcCalParams ¶m) |
void | setGeomSvc (IMdcGeomSvc *mdcGeomSvc) |
void | setUtilSvc (IMdcUtilitySvc *mdcUtilitySvc) |
StatusCode | setRecEvent () |
StatusCode | setKalEvent () |
int | getNRawHitTQ () const |
int | getEsFlag () const |
bool | getEsCutFlag () const |
int | getNesCutFlag () const |
double | getTes () const |
int | getNTrk () const |
MdcCalRecTrk * | getRecTrk (int index) const |
void | setEvtNoOnline (int evtNo) |
int | getEvtNoOnline () const |
void | setEvtNoOffline (int evtNo) |
int | getEvtNoOffline () const |
void | clear () |
Private Attributes | |
MdcCalParams | m_param |
IMdcGeomSvc * | m_mdcGeomSvc |
IMdcUtilitySvc * | m_mdcUtilitySvc |
int | m_nEvtOnline |
int | m_nEvtOffline |
int | m_nhitTQ |
int | m_esFlag |
bool | m_esCutFg |
int | m_nEsCutFg |
double | m_tes |
std::vector< MdcCalRecTrk * > | m_rectrk |
Definition at line 15 of file MdcCalEvent.h.
MdcCalEvent::MdcCalEvent | ( | ) |
MdcCalEvent::~MdcCalEvent | ( | ) |
void MdcCalEvent::clear | ( | ) |
bool MdcCalEvent::getEsCutFlag | ( | ) | const [inline] |
Definition at line 29 of file MdcCalEvent.h.
References m_esCutFg.
Referenced by XtMdcCalib::fillHist(), XtInteMdcCalib::fillHist(), WrMdcCalib::fillHist(), Wr2dMdcCalib::fillHist(), T0MdcCalib::fillHist(), QtMdcCalib::fillHist(), PreT0MdcCalib::fillHist(), MdcCalib::fillHist(), and GrXtMdcCalib::fillHist().
00029 { return m_esCutFg; }
int MdcCalEvent::getEsFlag | ( | ) | const [inline] |
Definition at line 28 of file MdcCalEvent.h.
References m_esFlag.
Referenced by MdcCalib::fillHist().
00028 { return m_esFlag; }
int MdcCalEvent::getEvtNoOffline | ( | ) | const [inline] |
Definition at line 40 of file MdcCalEvent.h.
References m_nEvtOffline.
00040 { return m_nEvtOffline; }
int MdcCalEvent::getEvtNoOnline | ( | ) | const [inline] |
int MdcCalEvent::getNesCutFlag | ( | ) | const [inline] |
Definition at line 30 of file MdcCalEvent.h.
References m_nEsCutFg.
Referenced by MdcCalib::fillHist().
00030 { return m_nEsCutFg; }
int MdcCalEvent::getNRawHitTQ | ( | ) | const [inline] |
Definition at line 27 of file MdcCalEvent.h.
References m_nhitTQ.
Referenced by MdcCalib::fillHist().
00027 { return m_nhitTQ; }
int MdcCalEvent::getNTrk | ( | ) | const [inline] |
Definition at line 33 of file MdcCalEvent.h.
References m_rectrk.
Referenced by WrMdcCalib::fillHist(), and Wr2dMdcCalib::fillHist().
00033 { return m_rectrk.size(); }
MdcCalRecTrk* MdcCalEvent::getRecTrk | ( | int | index | ) | const [inline] |
Definition at line 34 of file MdcCalEvent.h.
References m_rectrk.
Referenced by XtMdcCalib::fillHist(), XtInteMdcCalib::fillHist(), PreT0MdcCalib::fillHist(), and GrXtMdcCalib::fillHist().
00034 { return m_rectrk[index]; }
double MdcCalEvent::getTes | ( | ) | const [inline] |
Definition at line 31 of file MdcCalEvent.h.
References m_tes.
Referenced by PreT0MdcCalib::fillHist(), and MdcCalib::fillHist().
00031 { return m_tes; }
void MdcCalEvent::setEvtNoOffline | ( | int | evtNo | ) | [inline] |
Definition at line 39 of file MdcCalEvent.h.
References m_nEvtOffline.
Referenced by MdcCalibAlg::execute().
00039 { m_nEvtOffline = evtNo; }
void MdcCalEvent::setEvtNoOnline | ( | int | evtNo | ) | [inline] |
Definition at line 36 of file MdcCalEvent.h.
References m_nEvtOnline.
Referenced by MdcCalibAlg::execute().
00036 { m_nEvtOnline = evtNo; }
void MdcCalEvent::setGeomSvc | ( | IMdcGeomSvc * | mdcGeomSvc | ) | [inline] |
Definition at line 21 of file MdcCalEvent.h.
References m_mdcGeomSvc.
00021 { m_mdcGeomSvc = mdcGeomSvc; }
StatusCode MdcCalEvent::setKalEvent | ( | ) |
Definition at line 115 of file MdcCalEvent.cxx.
References MdcCalParams::esFlag, Bes_Common::FATAL, Bes_Common::INFO, iter(), m_esCutFg, m_esFlag, m_nEsCutFg, m_nhitTQ, m_param, m_tes, msgSvc(), and MdcCalParams::nEsFlag.
00115 { 00116 IMessageSvc *msgSvc; 00117 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00118 MsgStream log(msgSvc, "MdcCalEvent"); 00119 log << MSG::INFO << "MdcCalEvent::setKalEvent" << endreq; 00120 00121 IDataProviderSvc* eventSvc = NULL; 00122 Gaudi::svcLocator()->service("EventDataSvc", eventSvc); 00123 00124 // retrieve Mdc digi 00125 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc,"/Event/Digi/MdcDigiCol"); 00126 if (!mdcDigiCol) { 00127 log << MSG::FATAL << "Could not find event" << endreq; 00128 } 00129 00130 MdcDigiCol::iterator iter = mdcDigiCol->begin(); 00131 m_nhitTQ = 0; 00132 for(; iter != mdcDigiCol->end(); iter++) { 00133 MdcDigi *aDigi = (*iter); 00134 unsigned fgOverFlow = (aDigi) -> getOverflow(); 00135 if ( ((fgOverFlow & 3) !=0 ) || ((fgOverFlow & 12) != 0) || 00136 (aDigi->getTimeChannel() == 0x7FFFFFFF) || 00137 (aDigi->getChargeChannel() == 0x7FFFFFFF) ) continue; 00138 m_nhitTQ++; 00139 } 00140 00141 // get EsTimeCol 00142 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol"); 00143 if( (!aevtimeCol) || (aevtimeCol->size()==0) ){ 00144 m_tes = -9999.0; 00145 m_esFlag = -1; 00146 }else{ 00147 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin(); 00148 for(; iter_evt!=aevtimeCol->end(); iter_evt++){ 00149 m_tes = (*iter_evt)->getTest(); 00150 m_esFlag = (*iter_evt)->getStat(); 00151 } 00152 } 00153 m_esCutFg = false; 00154 m_nEsCutFg = -1; 00155 bool flagTes = false; 00156 for(int iEs=0; iEs<m_param.nEsFlag; iEs++){ 00157 if(m_esFlag == m_param.esFlag[iEs]){ 00158 flagTes = true; 00159 m_nEsCutFg = iEs; 00160 break; 00161 } 00162 } 00163 if( flagTes && (m_tes > m_param.tesMin) && (m_tes < m_param.tesMax) ) m_esCutFg = true; 00164 00165 SmartDataPtr<RecMdcKalTrackCol> kaltrkCol(eventSvc,"/Event/Recon/RecMdcKalTrackCol"); 00166 if (!kaltrkCol) { 00167 log << MSG::FATAL << "Could not find RecMdcKalTrackCol" << endreq; 00168 return StatusCode::FAILURE; 00169 } 00170 00171 int i = 0; 00172 MdcCalRecTrk* rectrk; 00173 RecMdcKalTrackCol::iterator iter_trk = kaltrkCol->begin(); 00174 for(; iter_trk != kaltrkCol->end(); iter_trk++) { 00175 rectrk = new MdcCalRecTrk(m_param.particle); 00176 rectrk -> setGeomSvc(m_mdcGeomSvc); 00177 rectrk -> setUtilSvc(m_mdcUtilitySvc); 00178 rectrk -> setKalTrk(iter_trk); 00179 m_rectrk.push_back(rectrk); 00180 00181 i++; 00182 } 00183 log << MSG::INFO << "KalTrack ntrk = " << i << endreq; 00184 00185 return StatusCode::SUCCESS; 00186 }
void MdcCalEvent::setParam | ( | MdcCalParams & | param | ) | [inline] |
StatusCode MdcCalEvent::setRecEvent | ( | ) |
Definition at line 42 of file MdcCalEvent.cxx.
References MdcCalParams::esFlag, Bes_Common::FATAL, Bes_Common::INFO, iter(), m_esCutFg, m_esFlag, m_nEsCutFg, m_nhitTQ, m_param, m_tes, msgSvc(), and MdcCalParams::nEsFlag.
00042 { 00043 IMessageSvc *msgSvc; 00044 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00045 MsgStream log(msgSvc, "MdcCalEvent"); 00046 log << MSG::INFO << "MdcCalEvent::setRecEvent" << endreq; 00047 00048 IDataProviderSvc* eventSvc = NULL; 00049 Gaudi::svcLocator()->service("EventDataSvc", eventSvc); 00050 00051 // retrieve Mdc digi 00052 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc,"/Event/Digi/MdcDigiCol"); 00053 if (!mdcDigiCol) { 00054 log << MSG::FATAL << "Could not find event" << endreq; 00055 } 00056 00057 MdcDigiCol::iterator iter = mdcDigiCol->begin(); 00058 m_nhitTQ = 0; 00059 for(; iter != mdcDigiCol->end(); iter++) { 00060 MdcDigi *aDigi = (*iter); 00061 unsigned fgOverFlow = (aDigi) -> getOverflow(); 00062 if ( ((fgOverFlow & 3) !=0 ) || ((fgOverFlow & 12) != 0) || 00063 (aDigi->getTimeChannel() == 0x7FFFFFFF) || 00064 (aDigi->getChargeChannel() == 0x7FFFFFFF) ) continue; 00065 m_nhitTQ++; 00066 } 00067 00068 // get EsTimeCol 00069 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol"); 00070 if( (!aevtimeCol) || (aevtimeCol->size()==0) ){ 00071 m_tes = -9999.0; 00072 m_esFlag = -1; 00073 }else{ 00074 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin(); 00075 for(; iter_evt!=aevtimeCol->end(); iter_evt++){ 00076 m_tes = (*iter_evt)->getTest(); 00077 m_esFlag = (*iter_evt)->getStat(); 00078 } 00079 } 00080 m_esCutFg = false; 00081 m_nEsCutFg = -1; 00082 bool flagTes = false; 00083 for(int iEs=0; iEs<m_param.nEsFlag; iEs++){ 00084 if(m_esFlag == m_param.esFlag[iEs]){ 00085 flagTes = true; 00086 m_nEsCutFg = iEs; 00087 break; 00088 } 00089 } 00090 if( flagTes && (m_tes > m_param.tesMin) && (m_tes < m_param.tesMax) ) m_esCutFg = true; 00091 00092 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc, "/Event/Recon/RecMdcTrackCol"); 00093 if(!newtrkCol){ 00094 log << MSG::ERROR << "Could not find RecMdcTrackCol" << endreq; 00095 return ( StatusCode::FAILURE ); 00096 } 00097 00098 int i = 0; 00099 MdcCalRecTrk* rectrk; 00100 RecMdcTrackCol::iterator it_trk = newtrkCol->begin(); 00101 for(; it_trk != newtrkCol->end(); it_trk++){ 00102 rectrk = new MdcCalRecTrk(m_param.particle); 00103 rectrk -> setGeomSvc(m_mdcGeomSvc); 00104 rectrk -> setUtilSvc(m_mdcUtilitySvc); 00105 rectrk -> setRecTrk(it_trk); 00106 m_rectrk.push_back(rectrk); 00107 00108 i++; 00109 } 00110 // log << MSG::WARNING << "RecTrack ntrk = " << i << endreq; 00111 00112 return StatusCode::SUCCESS; 00113 }
void MdcCalEvent::setUtilSvc | ( | IMdcUtilitySvc * | mdcUtilitySvc | ) | [inline] |
Definition at line 22 of file MdcCalEvent.h.
References m_mdcUtilitySvc.
00022 { m_mdcUtilitySvc = mdcUtilitySvc; }
bool MdcCalEvent::m_esCutFg [private] |
Definition at line 53 of file MdcCalEvent.h.
Referenced by getEsCutFlag(), setKalEvent(), and setRecEvent().
int MdcCalEvent::m_esFlag [private] |
Definition at line 52 of file MdcCalEvent.h.
Referenced by getEsFlag(), setKalEvent(), and setRecEvent().
IMdcGeomSvc* MdcCalEvent::m_mdcGeomSvc [private] |
IMdcUtilitySvc* MdcCalEvent::m_mdcUtilitySvc [private] |
int MdcCalEvent::m_nEsCutFg [private] |
Definition at line 54 of file MdcCalEvent.h.
Referenced by getNesCutFlag(), setKalEvent(), and setRecEvent().
int MdcCalEvent::m_nEvtOffline [private] |
Definition at line 50 of file MdcCalEvent.h.
Referenced by getEvtNoOffline(), and setEvtNoOffline().
int MdcCalEvent::m_nEvtOnline [private] |
int MdcCalEvent::m_nhitTQ [private] |
Definition at line 51 of file MdcCalEvent.h.
Referenced by getNRawHitTQ(), setKalEvent(), and setRecEvent().
MdcCalParams MdcCalEvent::m_param [private] |
Definition at line 45 of file MdcCalEvent.h.
Referenced by setKalEvent(), setParam(), and setRecEvent().
std::vector<MdcCalRecTrk*> MdcCalEvent::m_rectrk [private] |
double MdcCalEvent::m_tes [private] |
Definition at line 55 of file MdcCalEvent.h.
Referenced by getTes(), setKalEvent(), and setRecEvent().