50 if ( !unRedo ) digiRef.clear();
51 else if ( digiRef.size() > 0 )
return digiRef;
53 IDataProviderSvc* evtSvc;
55 std::string evtDataSvc_name(
"EventDataSvc" );
60 sc =
m_svcLocator->service( evtDataSvc_name, evtSvc,
true );
61 if ( !sc.isSuccess() )
63 log << MSG::FATAL <<
"Could not load EventDataSvc" << endmsg;
71 bool keepBadTdc = ( ( control &
b_keepBadTdc ) != 0x10000 );
76 sc =
m_svcLocator->service(
"MdcCalibFunSvc", m_mdcCalibFunSvc );
79 log << MSG::FATAL <<
"Could not load MdcCalibFunSvc!" << endmsg;
84 SmartDataPtr<RecEsTimeCol> esTimeCol( evtSvc,
"/Event/Recon/RecEsTimeCol" );
87 log << MSG::INFO <<
" Could not retrieve RecEsTimeCol" << endmsg;
90 else if ( ( esTimeCol->size() == 0 ) )
92 log << MSG::INFO <<
" Could not retrieve RecEsTimeCol" << endmsg;
97 RecEsTimeCol::iterator
iter = esTimeCol->begin();
98 for ( ;
iter != esTimeCol->end();
iter++ ) { t0 = ( *iter )->getTest(); }
103 bool m_hitInUse[43][288];
104 for (
int i = 0; i < 43; i++ )
106 for (
int j = 0; j < 288; j++ ) m_hitInUse[i][j] =
false;
108 bool dropHot = ( ( control &
b_dropHot ) == 0x4000 );
111 SmartDataPtr<RecMdcHitCol>
recHitCol( evtSvc,
"/Event/Recon/RecMdcHitCol" );
114 log << MSG::INFO <<
"Could not retrieve RecMdcHitCol" << endmsg;
129 bool isSkipLayers = ( ( control &
b_keepSkipped ) != 0x8000 ) && ( m_skipLayers.size() > 0 );
132 for (
int i = 0; i < 43; i++ ) { skipLayer[i] =
false; }
133 for (
unsigned iSkip = 0; iSkip < m_skipLayers.size(); iSkip++ )
134 { skipLayer[m_skipLayers[iSkip]] =
true; }
138 int nMatchedDigi = 0;
140 SmartDataPtr<MdcDigiCol> mdcDigiCol( evtSvc,
"/Event/Digi/MdcDigiCol" );
141 if ( sc != StatusCode::SUCCESS )
143 log << MSG::FATAL <<
"Could not find MdcDigiCol!" << endmsg;
146 MdcDigiCol::iterator
iter = mdcDigiCol->begin();
147 for ( ;
iter != mdcDigiCol->end();
iter++, iDigi++ )
158 if ( m_adcThresholds.size() > 0 && adc < m_adcThresholds[layer] )
continue;
162 m_mdcCalibFunSvc->getWireEff( layer, wire ) < m_effThreshold )
166 if ( isSkipLayers && skipLayer[layer] )
continue;
169 if ( dropHot && m_hitInUse[layer][wire] )
continue;
178 ( ( ( overflow & 1 ) > 0 ) ||
179 ( ( ( overflow & 12 ) != 12 ) && ( ( overflow & 12 ) != 0 ) ) ||
180 ( tdc == 0x7FFFFFFF ) || ( adc == 0x7FFFFFFF ) ) )
188 if ( m_mdcCalibFunSvc )
190 T0Walk = m_mdcCalibFunSvc->getT0( layer, wire ) +
191 m_mdcCalibFunSvc->getTimeWalk( layer, adc );
198 if ( ( maxMdcDigi > 0 ) && ( nMatchedDigi > maxMdcDigi ) )
204 digiRef.push_back( aDigi );