51 auto outPtr = std::make_unique<reco::VertexCompositePtrCandidateCollection>();
60 if( candVertices.isValid() )
62 outPtr->reserve(candVertices->size());
63 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) {
72 if((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0)
76 outPtr->push_back( v );
90 outPtr->reserve(vertices->size());
91 for (
unsigned int i = 0, n = vertices->size();
i <
n; ++
i) {
97 if((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0) {
101 if((*pf2pc2)[*it].isNonnull()) {
104 else {
edm::LogError(
"PATSecondaryVertexSlimmer") <<
"HELPME" << std::endl;}
117 outPtr->reserve(srcV0s->size());
118 for (
unsigned int i = 0, n = srcV0s->size();
i <
n; ++
i) {
124 if((*pf2pc)[trackRef].isNonnull() && (*pf2pc)[trackRef]->numberOfHits() > 0) {
128 if((*pf2pc2)[trackRef].isNonnull()) {
131 else {
edm::LogError(
"PATSecondaryVertexSlimmer") <<
"HELPME" << std::endl;}
const edm::EDGetTokenT< std::vector< reco::Vertex > > srcLegacy_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
double vertexChi2() const override
chi-squares
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 2
trackRef_iterator tracks_end() const
last iterator over tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map2_
double vertexNdof() const override
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map_
const Point & position() const
position
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > srcV0s_
const Point & vertex() const override
vertex position (overwritten by PF...)
double chi2() const
chi-squares
const LorentzVector & p4() const final
four-momentum Lorentz vector
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
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...
Error error() const
return SMatrix
void clearDaughters()
clear daughter references
const daughters & daughterPtrVector() const
references to daughtes
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
void addDaughter(const CandidatePtr &)
add a daughter via a reference
size_type numberOfDaughters() const override
number of daughters
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > src_
trackRef_iterator tracks_begin() const
first iterator over tracks