Skip to content

Commit

Permalink
Bug-fix: single-RP output saved irrespective of multi-RP reco.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kaspar committed Apr 29, 2019
1 parent 61d9d2d commit 6801cb8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions RecoCTPPS/ProtonReconstruction/plugins/CTPPSProtonProducer.cc
Expand Up @@ -290,18 +290,16 @@ void CTPPSProtonProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
}
}

// check that exactly two tracking RPs are involved
// - 1 is insufficient for multi-RP reconstruction
// - PPS did not use more than 2 tracking RPs per arm -> algorithms are tuned to this
std::set<unsigned int> rpIds;
for (const auto &idx : indices)
rpIds.insert(hTracks->at(idx).getRPId());

// do multi-RP reco if chosen
if (doMultiRPReconstruction_)
if (doMultiRPReconstruction_ && rpIds.size() == 2)
{
// check that exactly two tracking RPs are involved
// - 1 is insufficient for multi-RP reconstruction
// - PPS did not use more than 2 tracking RPs per arm -> algorithms are tuned to this
std::set<unsigned int> rpIds;
for (const auto &idx : indices)
rpIds.insert(hTracks->at(idx).getRPId());
if (rpIds.size() != 2)
continue;

// find matching track pairs from different tracking RPs
std::vector<std::pair<unsigned int, unsigned int>> idx_pairs;
std::map<unsigned int, unsigned int> idx_pair_multiplicity;
Expand Down

0 comments on commit 6801cb8

Please sign in to comment.