CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StandAloneMuonTrackToCandidate.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_StandAloneMuonTrackToCandidate_h
2 #define RecoAlgos_StandAloneMuonTrackToCandidate_h
9 
10 namespace converter {
11 
18  }
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  }
29  };
30 
31  namespace helper {
32  template<>
33  struct CandConverter<reco::Track> {
35  };
36  }
37 
38 }
39 
40 #endif
tuple t
Definition: tree.py:139
tuple cfg
Definition: looper.py:259
virtual void setCharge(Charge q)
set electric charge
Definition: LeafCandidate.h:93
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
virtual void setP4(const LorentzVector &p4)
set 4-momentum
StandAloneMuonTrackToCandidate(const edm::ParameterSet &cfg)
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:638
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:650
T sqrt(T t)
Definition: SSEVec.h:48
void convert(reco::TrackRef trkRef, reco::RecoStandAloneMuonCandidate &c) const
virtual void setVertex(const Point &vertex)
set vertex
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
void setTrack(const reco::TrackRef &r)
set reference to track
virtual void setPdgId(int pdgId)
int charge() const
track electric charge
Definition: TrackBase.h:530
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7