Commit dcc77e17 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Merge branch 'rjhunter-TOS-ignore-neutrals' into 'master'

Don't attempt to access the LHCbIDs of neutrals when TOS matching in HltEfficiencyChecker

See merge request !61
parents 0e9f9eef 8927e54c
Pipeline #3251583 passed with stage
in 15 seconds
......@@ -70,7 +70,14 @@ void MCTupleToolTOSHLT2::fetchLHCbIDsFromRecoParticle( const LHCb::Particle& par
if ( part.isBasicParticle() ) {
// We can just get the protoparticle and its IDs
bucket_of_ids.emplace_back( part.proto()->track()->lhcbIDs() );
if ( part.charge() == 0 ) {
warning() << "Particle with ID " << part.particleID()
<< " is neutral, so has no track. Adding empty container of LHCbIDs to this candidate for this track."
<< endmsg;
bucket_of_ids.emplace_back();
} else {
bucket_of_ids.emplace_back( part.proto()->track()->lhcbIDs() );
}
} else {
const auto& children = part.daughters();
for ( const auto& child : children ) { fetchLHCbIDsFromRecoParticle( *child, bucket_of_ids ); }
......
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