Commit 16b34059 authored by Mark Hodgkinson's avatar Mark Hodgkinson Committed by Edward Moyse
Browse files

Bug fix for e/p mode such that we don't attach multiple clusters corresponding...

Bug fix for e/p mode such that we don't attach multiple clusters corresponding to the same cluster to charged PFO
parent a081765e
......@@ -2,7 +2,7 @@
#
# art-description: Athena runs EOverP ESD pflow reconstruction, PFO linking off, thinning off.
# art-type: grid
# art-include master/Athena
# art-include: master/Athena
# art-athena-mt: 8
# art-output: AOD.pool.root
# art-output: log_FE_validation.txt
......
......@@ -2,7 +2,7 @@
#
# art-description: Athena runs pflow calibration hit decoration reconstruction
# art-type: grid
# art-include master/Athena
# art-include: master/Athena
# art-athena-mt: 8
# art-output: AOD.pool.root
# art-output: log_FE_validation.txt
......
......@@ -2,7 +2,7 @@
#
# art-description: Athena runs Standard ESD pflow reconstruction, PFO linking off, thinning off.
# art-type: grid
# art-include master/Athena
# art-include: master/Athena
# art-athena-mt: 8
# art-output: AOD.pool.root
# art-output: log_FE_validation.txt
......
......@@ -131,7 +131,7 @@ void PFChargedFlowElementCreatorAlgorithm::createChargedFlowElements(const eflow
if (theSisterClusterLink.isValid()) vectorClusterToSubtractedEnergies.push_back(std::pair(theSisterClusterLink,trackClusterLinkPair.second));
else vectorClusterToSubtractedEnergies.push_back(std::pair(theOriginalClusterLink,trackClusterLinkPair.second));
}
else if (m_eOverPMode) thisTracks_trackClusterLinksSubtracted.push_back(trackClusterLink);
else if (m_eOverPMode && trackClusterLinkPair.first == trackClusterLink) thisTracks_trackClusterLinksSubtracted.push_back(trackClusterLink);
}
}
......
......@@ -113,6 +113,8 @@ void PFOChargedCreatorAlgorithm::createChargedPFO(const eflowCaloObject& energyF
std::vector<eflowTrackClusterLink*> thisTracks_trackClusterLinks = efRecTrack->getClusterMatches();
ATH_MSG_DEBUG("Have retrieved " << thisTracks_trackClusterLinks.size() << " cluster matches");
/** Each eflowCaloObject has a list of clusters for all the tracks it represents.
* We only want the subset of the clusters matched to this track, and collect these in thisTracks_trackClusterLinksSubtracted.
*/
......@@ -132,10 +134,12 @@ void PFOChargedCreatorAlgorithm::createChargedPFO(const eflowCaloObject& energyF
if (theSisterClusterLink.isValid()) vectorClusterToSubtractedEnergies.push_back(std::pair(theSisterClusterLink,trackClusterLinkPair.second));
else vectorClusterToSubtractedEnergies.push_back(std::pair(theOriginalClusterLink,trackClusterLinkPair.second));
}
else if (m_eOverPMode) thisTracks_trackClusterLinksSubtracted.push_back(trackClusterLink);
else if (m_eOverPMode && trackClusterLinkPair.first == trackClusterLink) thisTracks_trackClusterLinksSubtracted.push_back(trackClusterLink);
}
}
ATH_MSG_DEBUG("Have found " << thisTracks_trackClusterLinksSubtracted.size() << " subtracted and matched clusters");
//sort the vectorClusterToSubtractedEnergies in order of subtracted energy ratio from low (most subtracted) to high (least subtracted)
std::sort(vectorClusterToSubtractedEnergies.begin(),vectorClusterToSubtractedEnergies.end(), [](auto const& a, auto const&b){return a.second < b.second;});
thisPFO->setAttribute("PF_vectorClusterToSubtractedEnergies",vectorClusterToSubtractedEnergies);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment