36 if (this->
initialize(log) != StatusCode::SUCCESS) {
37 log << MSG::FATAL <<
"Could not initialize PixelGangedClusterAmbiguitiesCnv_p1 " <<
endmsg;
41 if (transObj->empty()) {
42 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"No ganged pixels in this event. PixelAmbiMap has size 0. This happens often on single particle files." <<
endmsg;
45 InDet::PixelGangedClusterAmbiguities::const_iterator itr = transObj->begin();
46 InDet::PixelGangedClusterAmbiguities::const_iterator itrE = transObj->end();
47 InDet::PixelGangedClusterAmbiguities::const_iterator previous_itr = transObj->begin();
52 log << MSG::WARNING <<
"No containers found!"<<
endmsg;
62 unsigned int index = pixelCluster->getHashAndIndex().objIndex();
63 IdentifierHash idHash = pixelCluster->getHashAndIndex().collHash();
66 for ( ; dh!=dhEnd; ++dh ) {
67 const auto *coll = dh->indexFindPtr(idHash);
71 if ( (coll!=
nullptr)&& (coll->size()>
index) && (pixelCluster==(*coll)[
index]) ){
80 log << MSG::ERROR<<
"Could not find matching PRD container for this PixelCluster! Dumping PRD: "<<*pixelCluster<<
endmsg;
83 std::vector<unsigned int> uintvector;
86 for( ; itr != itrE ; ++itr ) {
89 keyPixelCluster = itr->first;
91 gangedPixelCluster = itr->second;
94 else if (keyPixelCluster != keyPreviousPixelCluster)
112 if (this->
initialize(log) != StatusCode::SUCCESS) {
113 log << MSG::FATAL <<
"Could not initialize PixelGangedClusterAmbiguitiesCnv_p1 " <<
endmsg;
119 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"Name of the pixel cluster container is empty. Most likely cause: input is a single particle file and there were no pixel ambiguities." <<
endmsg;
122 const InDet::PixelClusterContainer* pCC(
nullptr);
124 log << MSG::FATAL <<
"PixelGangedClusterAmbiguitiesCnv_p1: Cannot retrieve "
131 for (
const std::pair<uint32_t, std::vector<uint32_t> >& mapElement : persObj->
m_ambiguityMap)
133 for (uint32_t elt : mapElement.second)
137 for (InDet::PixelClusterContainer::const_iterator contItr = pCC->begin();
138 contItr != pCC->end(); ++contItr)
140 const InDet::PixelClusterCollection* coll = (*contItr);
141 if (coll->identifyHash() == keyIdentContIndex.
collHash())
143 keyPixelCluster = coll->at(keyIdentContIndex.
objIndex());
144 gangedPixelCluster = coll->at(gangedIdentContIndex.
objIndex());
145 transObj->insert(std::pair<const InDet::PixelCluster*, const InDet::PixelCluster*>(keyPixelCluster,gangedPixelCluster));