Skip to content

Commit

Permalink
Merge pull request #8755 from rappoccio/rappoccio_FixSubjetIndex74x
Browse files Browse the repository at this point in the history
Fixing reversed distance in accessing subjet collections
  • Loading branch information
cmsbuild committed Apr 21, 2015
2 parents 201f3be + 5435c3b commit 0695fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DataFormats/PatCandidates/src/Jet.cc
Expand Up @@ -596,7 +596,7 @@ pat::JetPtrCollection const & Jet::subjets( unsigned int index) const {
pat::JetPtrCollection const & Jet::subjets( std::string label ) const {
auto found = find( subjetLabels_.begin(), subjetLabels_.end(), label );
if ( found != subjetLabels_.end() ){
auto index = std::distance( found , subjetLabels_.begin() );
auto index = std::distance( subjetLabels_.begin(), found );
return subjetCollections_[index];
}
else {
Expand Down

0 comments on commit 0695fda

Please sign in to comment.