File indexing completed on 2024-04-06 12:04:19
0001 #include "DataFormats/HcalIsolatedTrack/interface/HcalIsolatedTrackCandidate.h"
0002
0003 using namespace reco;
0004
0005 HcalIsolatedTrackCandidate::HcalIsolatedTrackCandidate(const HcalIsolatedTrackCandidate& right)
0006 : RecoCandidate(right), track_(right.track_), l1Jet_(right.l1Jet_) {
0007 maxP_ = right.maxP_;
0008 enEcal_ = right.enEcal_;
0009 ptL1_ = right.ptL1_;
0010 etaL1_ = right.etaL1_;
0011 phiL1_ = right.phiL1_;
0012 etaPhiEcal_ = right.etaPhiEcal_;
0013 etaEcal_ = right.etaEcal_;
0014 phiEcal_ = right.phiEcal_;
0015 etaPhiHcal_ = right.etaPhiHcal_;
0016 etaHcal_ = right.etaHcal_;
0017 phiHcal_ = right.phiHcal_;
0018 ietaHcal_ = right.ietaHcal_;
0019 iphiHcal_ = right.iphiHcal_;
0020 }
0021
0022 HcalIsolatedTrackCandidate::~HcalIsolatedTrackCandidate() {}
0023
0024 HcalIsolatedTrackCandidate* HcalIsolatedTrackCandidate::clone() const { return new HcalIsolatedTrackCandidate(*this); }
0025
0026 reco::TrackRef HcalIsolatedTrackCandidate::track() const { return track_; }
0027
0028 l1extra::L1JetParticleRef HcalIsolatedTrackCandidate::l1jet() const { return l1Jet_; }
0029
0030 math::XYZTLorentzVector HcalIsolatedTrackCandidate::l1jetp() const {
0031 double pL1_ = ptL1_ * cosh(etaL1_);
0032 math::XYZTLorentzVector pL1(ptL1_ * cos(phiL1_), ptL1_ * sin(phiL1_), pL1_ * tanh(etaL1_), pL1_);
0033 return pL1;
0034 }
0035
0036 bool HcalIsolatedTrackCandidate::overlap(const Candidate& c) const {
0037 const RecoCandidate* o = dynamic_cast<const RecoCandidate*>(&c);
0038 return (o != nullptr && checkOverlap(track(), o->track()));
0039 }