Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh the index map of pointers to hits and tracks in Pandora translator #8015

Merged
merged 2 commits into from Mar 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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