51 map_(consumes<edm::Association<pat::
PackedCandidateCollection> >(iConfig.getParameter<edm::InputTag>(
"packedPFCandidates"))),
52 Tracks_(consumes<
reco::
TrackCollection>(iConfig.getParameter<edm::InputTag>(
"inputTracks"))),
53 Vertices_(consumes<
reco::
VertexCollection>(iConfig.getParameter<edm::InputTag>(
"secondaryVertices"))),
55 PVOrigs_(consumes<
reco::
VertexCollection>(iConfig.getParameter<edm::InputTag>(
"originalVertices"))),
56 minPt_(iConfig.getParameter<double>(
"minPt")),
57 minHits_(iConfig.getParameter<uint32_t>(
"minHits")),
58 minPixelHits_(iConfig.getParameter<uint32_t>(
"minPixelHits"))
60 produces< std::vector<reco::Track> > ();
61 produces< std::vector<pat::PackedCandidate> > ();
62 produces< edm::Association<pat::PackedCandidateCollection> > ();
72 std::vector<reco::Candidate>::const_iterator cand;
93 std::auto_ptr< std::vector<reco::Track> > outPtrP(
new std::vector<reco::Track> );
94 std::vector<int> used(tracks->size(),0);
96 std::auto_ptr< std::vector<pat::PackedCandidate> > outPtrC(
new std::vector<pat::PackedCandidate> );
99 for(
unsigned int ic=0, nc = cands->size(); ic < nc; ++ic) {
111 for(
unsigned int i=0;
i < vertices->size();
i++){
114 if(used[it->key()]==0) used[it->key()]=2;
118 std::vector<int> mapping(tracks->size(),-1);
120 for(
unsigned int i=0;
i < used.size();
i++)
127 outPtrP->push_back(tr);
130 outPtrC->back().setTrackProperties((*tracks)[
i]);
143 tk2pcFiller.
insert(tracks, mapping.begin(), mapping.end());
trackRef_iterator tracks_end() const
last iterator over tracks
edm::EDGetTokenT< reco::PFCandidateCollection > Cands_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< pat::PackedCandidate > PackedCandidateCollection
void insert(const H &h, I begin, I end)
std::vector< Track > TrackCollection
collection of Tracks
double phi() const
azimuthal angle of momentum vector
std::vector< Vertex > VertexCollection
collection of Vertex objects
PATLostTracks(const edm::ParameterSet &)
reco::TrackRef trackRef() const
bool isNonnull() const
Checks for non-null.
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
double pt() const
track transverse momentum
unsigned short numberOfValidHits() const
number of valid hits found
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual int charge() const GCC11_FINAL
electric charge
key_type key() const
Accessor for product key.
edm::EDGetTokenT< reco::TrackCollection > Tracks_
Particle reconstructed by the particle flow algorithm.
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
int numberOfValidPixelHits() const
int charge() const
track electric charge
ProductID id() const
Accessor for product ID.
edm::EDGetTokenT< reco::VertexCollection > PVOrigs_
trackRef_iterator tracks_begin() const
first iterator over tracks
edm::EDGetTokenT< reco::VertexCollection > Vertices_
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< reco::VertexCollection > PV_
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.