#include <PhysicsTools/RecoAlgos/src/StandAloneMuonTrackToCandidate.h>
Public Types | |
typedef reco::RecoStandAloneMuonCandidate | Candidate |
typedef reco::TrackCollection | Components |
typedef reco::Track | value_type |
Public Member Functions | |
void | convert (reco::TrackRef trkRef, reco::RecoStandAloneMuonCandidate &c) const |
StandAloneMuonTrackToCandidate (const edm::ParameterSet &cfg) |
Definition at line 12 of file StandAloneMuonTrackToCandidate.h.
Definition at line 15 of file StandAloneMuonTrackToCandidate.h.
Definition at line 14 of file StandAloneMuonTrackToCandidate.h.
Definition at line 13 of file StandAloneMuonTrackToCandidate.h.
converter::StandAloneMuonTrackToCandidate::StandAloneMuonTrackToCandidate | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 16 of file StandAloneMuonTrackToCandidate.h.
00016 : 00017 MassiveCandidateConverter(cfg) { 00018 }
void converter::StandAloneMuonTrackToCandidate::convert | ( | reco::TrackRef | trkRef, | |
reco::RecoStandAloneMuonCandidate & | c | |||
) | const [inline] |
Definition at line 19 of file StandAloneMuonTrackToCandidate.h.
References reco::TrackBase::charge(), converter::MassiveCandidateConverter::massSqr_, reco::TrackBase::momentum(), p, converter::MassiveCandidateConverter::particle_, PdtEntry::pdgId(), reco::Particle::setCharge(), reco::Particle::setP4(), reco::Particle::setPdgId(), reco::RecoStandAloneMuonCandidate::setTrack(), reco::Particle::setVertex(), funct::sqrt(), t, and reco::TrackBase::vertex().
00019 { 00020 const reco::Track & trk = * trkRef; 00021 c.setCharge(trk.charge()); 00022 c.setVertex(trk.vertex()); 00023 reco::Track::Vector p = trk.momentum(); 00024 double t = sqrt(massSqr_ + p.mag2()); 00025 c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t)); 00026 c.setTrack(trkRef); 00027 c.setPdgId(particle_.pdgId()); 00028 }