CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
converter::StandAloneMuonTrackToCandidate Struct Reference

#include <StandAloneMuonTrackToCandidate.h>

Inheritance diagram for converter::StandAloneMuonTrackToCandidate:
converter::MassiveCandidateConverter

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, edm::ConsumesCollector iC)
 
- Public Member Functions inherited from converter::MassiveCandidateConverter
void beginFirstRun (const edm::EventSetup &)
 
 MassiveCandidateConverter (const edm::ParameterSet &, edm::ConsumesCollector)
 

Additional Inherited Members

- Protected Attributes inherited from converter::MassiveCandidateConverter
double massSqr_
 
PdtEntry particle_
 

Detailed Description

Definition at line 12 of file StandAloneMuonTrackToCandidate.h.

Member Typedef Documentation

Definition at line 15 of file StandAloneMuonTrackToCandidate.h.

Definition at line 14 of file StandAloneMuonTrackToCandidate.h.

Definition at line 13 of file StandAloneMuonTrackToCandidate.h.

Constructor & Destructor Documentation

converter::StandAloneMuonTrackToCandidate::StandAloneMuonTrackToCandidate ( const edm::ParameterSet cfg,
edm::ConsumesCollector  iC 
)
inline

Definition at line 16 of file StandAloneMuonTrackToCandidate.h.

17  : MassiveCandidateConverter(cfg, iC) {}
MassiveCandidateConverter(const edm::ParameterSet &, edm::ConsumesCollector)

Member Function Documentation

void converter::StandAloneMuonTrackToCandidate::convert ( reco::TrackRef  trkRef,
reco::RecoStandAloneMuonCandidate c 
) const
inline

Definition at line 18 of file StandAloneMuonTrackToCandidate.h.

References reco::TrackBase::charge(), converter::MassiveCandidateConverter::massSqr_, reco::TrackBase::momentum(), AlCaHLTBitMon_ParallelJobs::p, converter::MassiveCandidateConverter::particle_, PdtEntry::pdgId(), reco::LeafCandidate::setCharge(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::RecoStandAloneMuonCandidate::setTrack(), reco::LeafCandidate::setVertex(), mathSSE::sqrt(), submitPVValidationJobs::t, and reco::TrackBase::vertex().

18  {
19  const reco::Track& trk = *trkRef;
20  c.setCharge(trk.charge());
21  c.setVertex(trk.vertex());
22  const reco::Track::Vector& p = trk.momentum();
23  double t = sqrt(massSqr_ + p.mag2());
24  c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t));
25  c.setTrack(trkRef);
27  }
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
void setVertex(const Point &vertex) override
set vertex
void setCharge(Charge q) final
set electric charge
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:676
T sqrt(T t)
Definition: SSEVec.h:19
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
void setTrack(const reco::TrackRef &r)
set reference to track
int charge() const
track electric charge
Definition: TrackBase.h:596
void setPdgId(int pdgId) final
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
void setP4(const LorentzVector &p4) final
set 4-momentum
int pdgId() const
PDG id.
Definition: PdtEntry.cc:5