95 G4int mdcDigiCollID = -1;
96 mdcDigiCollID = m_DigiMan->GetDigiCollectionID(
"BesMdcDigisCollection");
100 G4int nDigi = mdcDC->entries();
105 for(
int i=0;i<nDigi;i++)
119 aMdcDigiCol->push_back(aMdcDigi);
125 StatusCode scMdc = m_evtSvc->registerObject(
"/Event/Digi/MdcDigiCol", aMdcDigiCol);
126 if(scMdc!=StatusCode::SUCCESS)
127 G4cout<<
"Could not register MDC digi collection" <<G4endl;
152 G4int tofDigiCollID = -1;
153 tofDigiCollID = m_DigiMan->GetDigiCollectionID(
"BesTofDigitsCollection");
155 if( tofDigiCollID>=0 ) {
157 G4int nDigi = tofDC->entries();
161 vector<BesTofDigi*>* vecDC = tofDC->GetVector();
162 for(
int i=0; i<nDigi-1; i++ ) {
163 for(
int j=i+1; j<nDigi; j++ ) {
164 if( (*vecDC)[i]->GetTrackIndex()>(*vecDC)[j]->GetTrackIndex() ) {
166 (*vecDC)[i] = (*vecDC)[j];
173 for(
int i=0; i<nDigi; i++ ) {
184 unsigned int layer = 0;
220 aTofDigiCol->push_back(tofDigi);
250 aTofDigiCol->push_back(tofDigi);
253 if( barrel_ec==3 || barrel_ec==4 ) {
254 unsigned int endcap = 0;
256 unsigned int strip = digi->
GetStrip();
263 unsigned int tleading;
267 else { tleading = 0; }
268 unsigned int ttrailing;
272 else { ttrailing = 0; }
275 aTofDigiCol->push_back( tofDigi );
287 else { tleading = 0; }
291 else { ttrailing = 0; }
292 tofDigi =
new TofDigi( ident, tleading, ttrailing );
294 aTofDigiCol->push_back( tofDigi );
303 StatusCode scTof = m_evtSvc->registerObject(
"/Event/Digi/TofDigiCol", aTofDigiCol);
304 if( scTof!=StatusCode::SUCCESS ) {
305 G4cout<<
"Could not register TOF digi collection" <<G4endl;
315 G4int emcDigiCollID = -1;
316 emcDigiCollID = m_DigiMan->GetDigiCollectionID(
"BesEmcDigitsCollection");
320 G4int nDigi = emcDC->entries();
325 vector<BesEmcDigi*>* vecDC = emcDC->GetVector();
326 for(
int i=0;i<nDigi-1;i++)
327 for(
int j=i+1;j<nDigi;j++)
328 if((*vecDC)[i]->GetTrackIndex()>(*vecDC)[j]->GetTrackIndex())
331 (*vecDC)[i] = (*vecDC)[j];
335 for(
int i=0;i<nDigi;i++)
346 aEmcDigiCol->push_back(emcDigi);
352 StatusCode scEmc = m_evtSvc->registerObject(
"/Event/Digi/EmcDigiCol", aEmcDigiCol);
353 if(scEmc!=StatusCode::SUCCESS)
354 G4cout<<
"Could not register EMC digi collection" <<G4endl;