55 enum Alg { useInputPV = 0, usePVwithMaxSumPt, useTauPV };
69 : PFTauTag_(iConfig.getParameter<
edm::
InputTag>(
"PFTauTag")),
72 produces<edm::AssociationVector<PFTauRefProd, std::vector<std::vector<reco::VertexRef>>>>();
73 produces<VertexCollection>(
"PFTauSecondaryVertices");
81 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);
reco::GsfTrackRef gsfTrackRef() const
const edm::EDGetTokenT< std::vector< reco::PFTau > > PFTauToken_
PFTauSecondaryVertexProducer(const edm::ParameterSet &iConfig)
bool isNonnull() const
Checks for non-null.
std::vector< Vertex > VertexCollection
collection of Vertex objects
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::RefProd< PFTauCollection > PFTauRefProd
references to PFTau collection
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
const edm::InputTag PFTauTag_
~PFTauSecondaryVertexProducer() override
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool hasRefittedTracks() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Particle reconstructed by the particle flow algorithm.
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackBuilderToken_
reco::TrackRef trackRef() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual const reco::Track & pseudoTrack() const
std::vector< reco::TransientTrack > const & refittedTracks() const
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.