56 enum Alg { useInputPV = 0, usePVwithMaxSumPt, useTauPV };
69 : PFTauTag_(iConfig.getParameter<
edm::
InputTag>(
"PFTauTag")),
71 produces<edm::AssociationVector<PFTauRefProd, std::vector<std::vector<reco::VertexRef>>>>();
72 produces<VertexCollection>(
"PFTauSecondaryVertices");
80 if (pfCand !=
nullptr) {
101 auto AVPFTauSV = std::make_unique<edm::AssociationVector<PFTauRefProd, std::vector<std::vector<reco::VertexRef>>>>(
103 auto VertexCollection_out = std::make_unique<VertexCollection>();
110 std::vector<reco::VertexRef>
SV;
111 if (RefPFTau->decayMode() >= 5) {
114 std::vector<reco::TransientTrack> transTrk;
116 const std::vector<edm::Ptr<reco::Candidate>>
cands = RefPFTau->signalChargedHadrCands();
121 if (
track !=
nullptr)
122 transTrk.push_back(transTrackBuilder->
build(*
track));
128 if (transTrk.size() > 1) {
129 transVtx = kvf.
vertex(transTrk);
139 VertexCollection_out->push_back(transVtx);
142 AVPFTauSV->setValue(iPFTau,
SV);
153 descriptions.
add(
"PFTauSecondaryVertexProducer",
desc);