CMS 3D CMS Logo

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

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

◆ Candidate

Definition at line 15 of file StandAloneMuonTrackToCandidate.h.

◆ Components

Definition at line 14 of file StandAloneMuonTrackToCandidate.h.

◆ value_type

Definition at line 13 of file StandAloneMuonTrackToCandidate.h.

Constructor & Destructor Documentation

◆ StandAloneMuonTrackToCandidate()

converter::StandAloneMuonTrackToCandidate::StandAloneMuonTrackToCandidate ( const edm::ParameterSet cfg)
inline

Definition at line 16 of file StandAloneMuonTrackToCandidate.h.

Member Function Documentation

◆ convert()

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

Definition at line 17 of file StandAloneMuonTrackToCandidate.h.

17  {
18  const reco::Track& trk = *trkRef;
19  c.setCharge(trk.charge());
20  c.setVertex(trk.vertex());
21  const reco::Track::Vector& p = trk.momentum();
22  double t = sqrt(massSqr_ + p.mag2());
23  c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t));
24  c.setTrack(trkRef);
25  c.setPdgId(particle_.pdgId());
26  }

References HltBtagPostValidation_cff::c, reco::TrackBase::charge(), converter::MassiveCandidateConverter::massSqr_, reco::TrackBase::momentum(), AlCaHLTBitMon_ParallelJobs::p, converter::MassiveCandidateConverter::particle_, PdtEntry::pdgId(), mathSSE::sqrt(), submitPVValidationJobs::t, and reco::TrackBase::vertex().

PdtEntry::pdgId
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
reco::TrackBase::vertex
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead
Definition: TrackBase.h:676
looper.cfg
cfg
Definition: looper.py:297
converter::MassiveCandidateConverter::MassiveCandidateConverter
MassiveCandidateConverter(const edm::ParameterSet &)
Definition: MassiveCandidateConverter.cc:10
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition: MassiveCandidateConverter.h:17
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::TrackBase::momentum
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition: MassiveCandidateConverter.h:18
reco::TrackBase::Vector
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77