Skip to content

Commit

Permalink
Merge pull request #22823 from folguera/MuonHLT_BugFix_L3MuonCandidat…
Browse files Browse the repository at this point in the history
…eProducerFromMuons

BugFix for L3MuonCandidateProducerFromMuons
  • Loading branch information
cmsbuild authored Apr 4, 2018
2 parents d856ffd + 9d38e0e commit 4f4ddad
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ void L3MuonCandidateProducerFromMuons::produce(StreamID, Event& event, const Eve
LogError(category) << muons.whyFailed()->what();
} else {
for (unsigned int i=0; i<muons->size(); i++) {
TrackRef tkref = (*muons)[i].muonBestTrack(); // avoids crashing in case the muon is SA only.


// avoids crashing in case the muon is SA only.
TrackRef tkref = ((*muons)[i].innerTrack().isNonnull())? (*muons)[i].innerTrack() : (*muons)[i].muonBestTrack();

Particle::Charge q = tkref->charge();
Particle::LorentzVector p4(tkref->px(), tkref->py(), tkref->pz(), tkref->p());
Particle::Point vtx(tkref->vx(),tkref->vy(), tkref->vz());
Expand Down

0 comments on commit 4f4ddad

Please sign in to comment.