39 srcLegacy_(mayConsume<std::
vector<
reco::Vertex> >(iConfig.getParameter<edm::
InputTag>(
"src"))),
42 iConfig.getParameter<edm::
InputTag>(
"packedPFCandidates"))),
44 iConfig.existsAs<edm::
InputTag>(
"lostTracksCandidates")
45 ? iConfig.getParameter<edm::
InputTag>(
"lostTracksCandidates")
47 produces<reco::VertexCompositePtrCandidateCollection>();
53 auto outPtr = std::make_unique<reco::VertexCompositePtrCandidateCollection>();
62 if (candVertices.isValid()) {
63 outPtr->reserve(candVertices->size());
64 for (
unsigned int i = 0,
n = candVertices->size();
i <
n; ++
i) {
70 for (std::vector<reco::CandidatePtr>::const_iterator it = daughters.begin(); it != daughters.end(); ++it) {
71 if ((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0)
87 outPtr->reserve(vertices->size());
88 for (
unsigned int i = 0,
n = vertices->size();
i <
n; ++
i) {
94 if ((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0) {
97 if ((*pf2pc2)[*it].isNonnull()) {
100 edm::LogError(
"PATSecondaryVertexSlimmer") <<
"HELPME" << std::endl;
114 outPtr->reserve(srcV0s->size());
115 for (
unsigned int i = 0,
n = srcV0s->size();
i <
n; ++
i) {
122 if ((*pf2pc)[trackRef].isNonnull() && (*pf2pc)[trackRef]->numberOfHits() > 0) {
125 if ((*pf2pc2)[trackRef].isNonnull()) {
128 edm::LogError(
"PATSecondaryVertexSlimmer") <<
"HELPME" << std::endl;
const edm::EDGetTokenT< std::vector< reco::Vertex > > srcLegacy_
double vertexChi2() const override
chi-squares
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map2_
std::vector< pat::PackedCandidate > PackedCandidateCollection
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map_
const Point & vertex() const override
vertex position (overwritten by PF...)
Log< level::Error, false > LogError
PATSecondaryVertexSlimmer(const edm::ParameterSet &)
const Point & position() const
position
const LorentzVector & p4() const final
four-momentum Lorentz vector
std::vector< VertexCompositePtrCandidate > VertexCompositePtrCandidateCollection
collection of Candidate objects
virtual const daughters & daughterPtrVector() const
references to daughtes
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > srcV0s_
~PATSecondaryVertexSlimmer() override
double chi2() const
chi-squares
trackRef_iterator tracks_end() const
last iterator over tracks
double vertexNdof() const override
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
trackRef_iterator tracks_begin() const
first iterator over tracks
virtual void clearDaughters()
clear daughter references
math::XYZTLorentzVectorD p4(float mass=0.13957018, float minWeight=0.5) const
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products...
size_type numberOfDaughters() const override
number of daughters
Error error() const
return SMatrix
void addDaughter(const CandidatePtr &)
add a daughter via a reference
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > src_
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 2
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>