Skip to content

Commit

Permalink
Merge pull request #8015 from lgray/topic_fix_pandora_pointers
Browse files Browse the repository at this point in the history
Refresh the index map of pointers to hits and tracks in Pandora translator
  • Loading branch information
cmsbuild committed Mar 2, 2015
2 parents 243b4db + 37a54e1 commit 7119b93
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -183,6 +183,9 @@ void PandoraCMSPFCandProducer::produce(edm::Event& iEvent, const edm::EventSetup
convertPandoraToCMSSW(tkRefCollection,HGCRecHitHandle,iEvent);

PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=,PandoraApi::Reset(*m_pPandora));

recHitMap.clear();
recTrackMap.clear();
}

void PandoraCMSPFCandProducer::initPandoraCalibrParameters()
Expand Down Expand Up @@ -1541,7 +1544,7 @@ void PandoraCMSPFCandProducer::convertPandoraToCMSSW(const edm::Handle<reco::PFR
const auto* firsthit = *(firstlayer.second->begin());
auto iter = recHitMap.find(firsthit->GetParentCaloHitAddress());
if( iter != recHitMap.end() ) {
temp.setLayer(pfrechits[iter->second].layer());
temp.setLayer(pfrechits.at(iter->second).layer());
} else {
throw cms::Exception("TrackUsedButNotFound")
<< "Hit used in PandoraPFA was not found in the original input hit list!";
Expand Down Expand Up @@ -1672,6 +1675,9 @@ void PandoraCMSPFCandProducer::convertPandoraToCMSSW(const edm::Handle<reco::PFR
// ------------ method called once each job just before starting event loop ------------
void PandoraCMSPFCandProducer::beginJob()
{
// setup our maps for processing
recHitMap.clear();
recTrackMap.clear();

const char *pDisplay(::getenv("DISPLAY"));
if (NULL == pDisplay) {
Expand Down

0 comments on commit 7119b93

Please sign in to comment.