44 Gaudi::svcLocator()->service(
"MessageSvc",
msgSvc);
45 MsgStream log(
msgSvc,
"MdcCalEvent");
46 log << MSG::INFO <<
"MdcCalEvent::setRecEvent" << endreq;
48 IDataProviderSvc* eventSvc =
NULL;
49 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
52 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc,
"/Event/Digi/MdcDigiCol");
54 log << MSG::FATAL <<
"Could not find event" << endreq;
57 MdcDigiCol::iterator
iter = mdcDigiCol->begin();
59 for(;
iter != mdcDigiCol->end();
iter++) {
61 unsigned fgOverFlow = (aDigi) -> getOverflow();
62 if ( ((fgOverFlow & 3) !=0 ) || ((fgOverFlow & 12) != 0) ||
69 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,
"/Event/Recon/RecEsTimeCol");
70 if( (!aevtimeCol) || (aevtimeCol->size()==0) ){
74 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
75 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
76 m_tes = (*iter_evt)->getTest();
77 m_esFlag = (*iter_evt)->getStat();
83 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
84 if(m_esFlag == m_param.
esFlag[iEs]){
93 if( !m_param.
esCut) m_esCutFg =
true;
94 else if( flagTes && (m_tes > m_param.
tesMin) && (m_tes < m_param.
tesMax) ) m_esCutFg =
true;
97 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc,
"/Event/Recon/RecMdcTrackCol");
99 log << MSG::ERROR <<
"Could not find RecMdcTrackCol" << endreq;
100 return ( StatusCode::FAILURE );
105 RecMdcTrackCol::iterator it_trk = newtrkCol->begin();
106 for(; it_trk != newtrkCol->end(); it_trk++){
110 rectrk -> setRecTrk(it_trk);
111 m_rectrk.push_back(rectrk);
117 return StatusCode::SUCCESS;
122 Gaudi::svcLocator()->service(
"MessageSvc",
msgSvc);
123 MsgStream log(
msgSvc,
"MdcCalEvent");
124 log << MSG::INFO <<
"MdcCalEvent::setKalEvent" << endreq;
126 IDataProviderSvc* eventSvc =
NULL;
127 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
130 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc,
"/Event/Digi/MdcDigiCol");
132 log << MSG::FATAL <<
"Could not find event" << endreq;
135 MdcDigiCol::iterator
iter = mdcDigiCol->begin();
137 for(;
iter != mdcDigiCol->end();
iter++) {
139 unsigned fgOverFlow = (aDigi) -> getOverflow();
140 if ( ((fgOverFlow & 3) !=0 ) || ((fgOverFlow & 12) != 0) ||
147 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,
"/Event/Recon/RecEsTimeCol");
148 if( (!aevtimeCol) || (aevtimeCol->size()==0) ){
152 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
153 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
154 m_tes = (*iter_evt)->getTest();
155 m_esFlag = (*iter_evt)->getStat();
160 bool flagTes =
false;
161 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
162 if(m_esFlag == m_param.
esFlag[iEs]){
168 if( flagTes && (m_tes > m_param.
tesMin) && (m_tes < m_param.
tesMax) ) m_esCutFg =
true;
170 SmartDataPtr<RecMdcKalTrackCol> kaltrkCol(eventSvc,
"/Event/Recon/RecMdcKalTrackCol");
172 log << MSG::FATAL <<
"Could not find RecMdcKalTrackCol" << endreq;
173 return StatusCode::FAILURE;
178 RecMdcKalTrackCol::iterator iter_trk = kaltrkCol->begin();
179 for(; iter_trk != kaltrkCol->end(); iter_trk++) {
183 rectrk -> setKalTrk(iter_trk);
184 m_rectrk.push_back(rectrk);
188 log << MSG::INFO <<
"KalTrack ntrk = " << i << endreq;
190 return StatusCode::SUCCESS;