Skip to content

Commit

Permalink
Set member data in l1t::TkJet
Browse files Browse the repository at this point in the history
This fixes an UBSAN warning.
  • Loading branch information
Dr15Jones committed Dec 16, 2022
1 parent 52c0dac commit 8989fef
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions DataFormats/L1TCorrelator/src/TkJet.cc
Expand Up @@ -8,13 +8,27 @@

using namespace l1t;

TkJet::TkJet() {}
TkJet::TkJet()
: JetVtx_(-999.),
ntracks_(0),
tighttracks_(0),
displacedtracks_(0),
tightdisplacedtracks_(0),
displacedTag_(false) {}

TkJet::TkJet(const LorentzVector& p4,
const edm::Ref<JetBxCollection>& jetRef,
const std::vector<edm::Ptr<L1TTTrackType> >& trkPtrs,
float jetvtx)
: L1Candidate(p4), jetRef_(jetRef), trkPtrs_(trkPtrs), JetVtx_(jetvtx) {}
: L1Candidate(p4),
jetRef_(jetRef),
trkPtrs_(trkPtrs),
JetVtx_(jetvtx),
ntracks_(0),
tighttracks_(0),
displacedtracks_(0),
tightdisplacedtracks_(0),
displacedTag_(false) {}
TkJet::TkJet(const LorentzVector& p4,
const std::vector<edm::Ptr<L1TTTrackType> >& trkPtrs,
float jetvtx,
Expand Down

0 comments on commit 8989fef

Please sign in to comment.