#include <MdcAliEvent.h>
Public Member Functions | |
void | setParam (MdcAliParams ¶m) |
StatusCode | setRecEvent () |
StatusCode | setKalEvent () |
int | getEsFlag () const |
bool | getEsCutFlag () const |
double | getTes () const |
int | getNTrk () const |
MdcAliRecTrk * | getRecTrk (int index) const |
void | clear () |
Private Attributes | |
MdcAliParams | m_param |
int | m_esFlag |
bool | m_esCutFg |
double | m_tes |
std::vector< MdcAliRecTrk * > | m_rectrk |
Definition at line 15 of file MdcAliEvent.h.
void MdcAliEvent::clear | ( | ) |
Definition at line 142 of file MdcAliEvent.cxx.
References m_rectrk.
Referenced by MdcAlignAlg::execute().
00142 { 00143 unsigned int i; 00144 for(i=0; i<m_rectrk.size(); i++){ 00145 delete m_rectrk[i]; 00146 } 00147 m_rectrk.clear(); 00148 }
bool MdcAliEvent::getEsCutFlag | ( | ) | const [inline] |
Definition at line 22 of file MdcAliEvent.h.
References m_esCutFg.
Referenced by ResiAlign::fillHist().
00022 { return m_esCutFg; }
int MdcAliEvent::getEsFlag | ( | ) | const [inline] |
int MdcAliEvent::getNTrk | ( | ) | const [inline] |
MdcAliRecTrk* MdcAliEvent::getRecTrk | ( | int | index | ) | const [inline] |
Definition at line 26 of file MdcAliEvent.h.
References m_rectrk.
Referenced by ResiAlign::fillHist(), and MilleAlign::fillHist().
00026 { return m_rectrk[index]; }
double MdcAliEvent::getTes | ( | ) | const [inline] |
StatusCode MdcAliEvent::setKalEvent | ( | ) |
Definition at line 89 of file MdcAliEvent.cxx.
References MdcAliParams::esFlag, Bes_Common::INFO, m_esCutFg, m_esFlag, m_param, m_tes, msgSvc(), and MdcAliParams::nEsFlag.
00089 { 00090 IMessageSvc *msgSvc; 00091 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00092 MsgStream log(msgSvc, "MdcAliEvent"); 00093 log << MSG::INFO << "MdcAliEvent::setKalEvent" << endreq; 00094 00095 IDataProviderSvc* eventSvc = NULL; 00096 Gaudi::svcLocator()->service("EventDataSvc", eventSvc); 00097 00098 // get EsTimeCol 00099 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol"); 00100 if( ! aevtimeCol || (aevtimeCol->size()==0) ){ 00101 m_tes = -9999.0; 00102 m_esFlag = -1; 00103 }else{ 00104 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin(); 00105 for(; iter_evt!=aevtimeCol->end(); iter_evt++){ 00106 m_tes = (*iter_evt)->getTest(); 00107 m_esFlag = (*iter_evt)->getStat(); 00108 } 00109 } 00110 00111 m_esCutFg = false; 00112 bool flagTes = false; 00113 for(int iEs=0; iEs<m_param.nEsFlag; iEs++){ 00114 if(m_esFlag == m_param.esFlag[iEs]){ 00115 flagTes = true; 00116 break; 00117 } 00118 } 00119 if( flagTes && (m_tes > m_param.tesMin) && (m_tes < m_param.tesMax) ) m_esCutFg = true; 00120 00121 SmartDataPtr<RecMdcKalTrackCol> kaltrkCol(eventSvc,"/Event/Recon/RecMdcKalTrackCol"); 00122 if (!kaltrkCol) { 00123 log << MSG::FATAL << "Could not find RecMdcKalTrackCol" << endreq; 00124 return StatusCode::FAILURE; 00125 } 00126 00127 int i = 0; 00128 MdcAliRecTrk* rectrk; 00129 RecMdcKalTrackCol::iterator iter_trk = kaltrkCol->begin(); 00130 for(; iter_trk != kaltrkCol->end(); iter_trk++) { 00131 rectrk = new MdcAliRecTrk(); 00132 rectrk -> setKalTrk(iter_trk); 00133 m_rectrk.push_back(rectrk); 00134 00135 i++; 00136 } 00137 log << MSG::INFO << "KalTrack ntrk = " << i << endreq; 00138 00139 return StatusCode::SUCCESS; 00140 }
void MdcAliEvent::setParam | ( | MdcAliParams & | param | ) | [inline] |
StatusCode MdcAliEvent::setRecEvent | ( | ) |
Definition at line 36 of file MdcAliEvent.cxx.
References MdcAliParams::esFlag, Bes_Common::INFO, m_esCutFg, m_esFlag, m_param, m_tes, msgSvc(), and MdcAliParams::nEsFlag.
00036 { 00037 IMessageSvc *msgSvc; 00038 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00039 MsgStream log(msgSvc, "MdcAliEvent"); 00040 log << MSG::INFO << "MdcAliEvent::setRecEvent" << endreq; 00041 00042 IDataProviderSvc* eventSvc = NULL; 00043 Gaudi::svcLocator()->service("EventDataSvc", eventSvc); 00044 00045 // get EsTimeCol 00046 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol"); 00047 if( ! aevtimeCol || (aevtimeCol->size()==0) ){ 00048 m_tes = -9999.0; 00049 m_esFlag = -1; 00050 }else{ 00051 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin(); 00052 for(; iter_evt!=aevtimeCol->end(); iter_evt++){ 00053 m_tes = (*iter_evt)->getTest(); 00054 m_esFlag = (*iter_evt)->getStat(); 00055 } 00056 } 00057 00058 m_esCutFg = false; 00059 bool flagTes = false; 00060 for(int iEs=0; iEs<m_param.nEsFlag; iEs++){ 00061 if(m_esFlag == m_param.esFlag[iEs]){ 00062 flagTes = true; 00063 break; 00064 } 00065 } 00066 if( flagTes && (m_tes > m_param.tesMin) && (m_tes < m_param.tesMax) ) m_esCutFg = true; 00067 00068 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc, "/Event/Recon/RecMdcTrackCol"); 00069 if(!newtrkCol){ 00070 log << MSG::ERROR << "Could not find RecMdcTrackCol" << endreq; 00071 return ( StatusCode::FAILURE ); 00072 } 00073 00074 int i = 0; 00075 MdcAliRecTrk* rectrk; 00076 RecMdcTrackCol::iterator it_trk = newtrkCol->begin(); 00077 for(; it_trk != newtrkCol->end(); it_trk++){ 00078 rectrk = new MdcAliRecTrk(); 00079 rectrk -> setRecTrk(it_trk); 00080 m_rectrk.push_back(rectrk); 00081 00082 i++; 00083 } 00084 log << MSG::WARNING << "RecTrack ntrk = " << i << endreq; 00085 00086 return StatusCode::SUCCESS; 00087 }
bool MdcAliEvent::m_esCutFg [private] |
Definition at line 33 of file MdcAliEvent.h.
Referenced by getEsCutFlag(), setKalEvent(), and setRecEvent().
int MdcAliEvent::m_esFlag [private] |
Definition at line 32 of file MdcAliEvent.h.
Referenced by getEsFlag(), setKalEvent(), and setRecEvent().
MdcAliParams MdcAliEvent::m_param [private] |
Definition at line 31 of file MdcAliEvent.h.
Referenced by setKalEvent(), setParam(), and setRecEvent().
std::vector<MdcAliRecTrk*> MdcAliEvent::m_rectrk [private] |
double MdcAliEvent::m_tes [private] |
Definition at line 34 of file MdcAliEvent.h.
Referenced by getTes(), setKalEvent(), and setRecEvent().