51 iConfig.getParameter<edm::
InputTag>(
"slimmedSecondaryVertices"))),
54 produces<reco::TrackCollection>();
55 produces<reco::VertexCollection>();
56 produces<reco::VertexCollection>(
"secondary");
74 auto outTks = std::make_unique<std::vector<reco::Track>>();
75 std::map<unsigned int, std::vector<unsigned int>> asso;
76 std::map<unsigned int, unsigned int> trackKeys;
78 for (
unsigned int i = 0;
i <
cands->size();
i++) {
82 for (
size_t ipv = 0; ipv < pvs->size(); ++ipv) {
92 for (
unsigned int i = 0;
i < addTracks->size();
i++) {
93 if ((*addTracks)[
i].hasTrackDetails()) {
94 outTks->push_back((*addTracks)[
i].pseudoTrack());
95 for (
size_t ipv = 0; ipv < pvs->size(); ++ipv) {
105 auto outPv = std::make_unique<std::vector<reco::Vertex>>();
107 for (
size_t ipv = 0; ipv < pvs->size(); ++ipv) {
109 for (
unsigned int i = 0;
i < asso[ipv].size();
i++) {
114 outPv->push_back(pv);
118 auto outSv = std::make_unique<std::vector<reco::Vertex>>();
119 for (
size_t i = 0;
i < svs->size();
i++) {
132 outSv->back().add(rr);
const edm::EDGetTokenT< reco::VertexCollection > PVs_
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
int charge() const override
electric charge
double vertexNdof() const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 3
double vertexChi2() const override
chi-squares
const edm::EDGetTokenT< std::vector< pat::PackedCandidate > > Cands_
std::vector< pat::PackedCandidate > PackedCandidateCollection
void add(Ref const &r, float w=1.0)
add a reference to a Track
const Point & vertex() const override
vertex position (overwritten by PF...)
std::vector< Vertex > VertexCollection
std::vector< VertexCompositePtrCandidate > VertexCompositePtrCandidateCollection
collection of Candidate objects
~PATTrackAndVertexUnpacker() override
const PVAssoc fromPV(size_t ipv=0) const
virtual const reco::Track & pseudoTrack() const
const edm::EDGetTokenT< std::vector< pat::PackedCandidate > > AdditionalTracks_
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > SVs_
size_t numberOfDaughters() const override
number of daughters
virtual CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
ProductID id() const
Accessor for product ID.
deadvectors[0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< edm::InputTag > VInputTag
PATTrackAndVertexUnpacker(const edm::ParameterSet &iConfig)