CMS 3D CMS Logo

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

#include <TrackToCandidate.h>

Inheritance diagram for converter::TrackToCandidate:
converter::MassiveCandidateConverter

Public Types

typedef reco::RecoChargedCandidate Candidate
 
typedef reco::TrackCollection Components
 
typedef reco::Track value_type
 

Public Member Functions

void convert (reco::TrackRef trkRef, reco::RecoChargedCandidate &c) const
 
 TrackToCandidate (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 TrackToCandidate.h.

Member Typedef Documentation

Definition at line 15 of file TrackToCandidate.h.

Definition at line 14 of file TrackToCandidate.h.

Definition at line 13 of file TrackToCandidate.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file TrackToCandidate.h.

16  :
18  }
MassiveCandidateConverter(const edm::ParameterSet &)

Member Function Documentation

void converter::TrackToCandidate::convert ( reco::TrackRef  trkRef,
reco::RecoChargedCandidate c 
) const
inline

Definition at line 19 of file TrackToCandidate.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::RecoChargedCandidate::setTrack(), reco::LeafCandidate::setVertex(), mathSSE::sqrt(), lumiQTWidget::t, and reco::TrackBase::vertex().

19  {
20  const reco::Track & trk = * trkRef;
21  c.setCharge(trk.charge());
22  c.setVertex(trk.vertex());
24  double t = sqrt(massSqr_ + p.mag2());
25  c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t));
26  c.setTrack(trkRef);
28  }
virtual void setCharge(Charge q)
set electric charge
Definition: LeafCandidate.h:93
virtual void setP4(const LorentzVector &p4)
set 4-momentum
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:662
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:674
T sqrt(T t)
Definition: SSEVec.h:48
virtual void setVertex(const Point &vertex)
set vertex
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
virtual void setPdgId(int pdgId)
int charge() const
track electric charge
Definition: TrackBase.h:554
void setTrack(const reco::TrackRef &r)
set reference to track
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7