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++) {
80 if (
c.hasTrackDetails() &&
c.charge() != 0 &&
c.numberOfHits() > 0) {
81 outTks->push_back(
c.pseudoTrack());
82 for (
size_t ipv = 0; ipv <
pvs->size(); ++ipv) {
84 asso[ipv].push_back(
j);
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) {
97 asso[ipv].push_back(
j);
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++) {
121 outSv->push_back(
reco::Vertex(
sv.vertex(),
sv.vertexCovariance(),
sv.vertexChi2(),
sv.vertexNdof(), 0));
122 for (
size_t j = 0;
j <
sv.numberOfDaughters();
j++) {
124 if (
sv.daughterPtr(
j).id() ==
cands.id()) {
132 outSv->back().add(
rr);