CMS 3D CMS Logo

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  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  }
27  };
28 
29  namespace helper {
30  template <>
31  struct CandConverter<reco::Track> {
33  };
34  } // namespace helper
35 
36 } // namespace converter
37 
38 #endif
converter::MassiveCandidateConverter
Definition: MassiveCandidateConverter.h:12
converter::StandAloneMuonTrackToCandidate
Definition: StandAloneMuonTrackToCandidate.h:12
PdtEntry::pdgId
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7
converter::StandAloneMuonTrackToCandidate::convert
void convert(reco::TrackRef trkRef, reco::RecoStandAloneMuonCandidate &c) const
Definition: StandAloneMuonTrackToCandidate.h:17
converter::StandAloneMuonTrackToCandidate::Components
reco::TrackCollection Components
Definition: StandAloneMuonTrackToCandidate.h:14
converter
Definition: CandidateProducer.h:25
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
converter::StandAloneMuonTrackToCandidate::value_type
reco::Track value_type
Definition: StandAloneMuonTrackToCandidate.h:13
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
CandidateProducer.h
edm::Ref< TrackCollection >
CandidateFwd.h
RecoStandAloneMuonCandidate.h
Track.h
converter::StandAloneMuonTrackToCandidate::Candidate
reco::RecoStandAloneMuonCandidate Candidate
Definition: StandAloneMuonTrackToCandidate.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
MassiveCandidateConverter.h
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:581
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::ParameterSet
Definition: ParameterSet.h:36
helper
Definition: helper.py:1
reco::RecoStandAloneMuonCandidate
Definition: RecoStandAloneMuonCandidate.h:15
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
RecoStandAloneMuonCandidateFwd.h
reco::TrackBase::vertex
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead
Definition: TrackBase.h:647
looper.cfg
cfg
Definition: looper.py:297
converter::helper::CandConverter< reco::Track >::type
StandAloneMuonTrackToCandidate type
Definition: StandAloneMuonTrackToCandidate.h:32
converter::StandAloneMuonTrackToCandidate::StandAloneMuonTrackToCandidate
StandAloneMuonTrackToCandidate(const edm::ParameterSet &cfg)
Definition: StandAloneMuonTrackToCandidate.h:16
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition: MassiveCandidateConverter.h:17
converter::helper::CandConverter
Definition: CandidateProducer.h:28
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:635
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition: MassiveCandidateConverter.h:18
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
reco::TrackBase::Vector
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77