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.
virtual double vertexNdof() const
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
trackRef_iterator tracks_end() const
last iterator over tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual const Point & vertex() const
vertex position (overwritten by PF...)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map2_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > map_
const Point & position() const
position
virtual size_type numberOfDaughters() const
number of daughters
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > srcV0s_
virtual double vertexChi2() const
chi-squares
double chi2() const
chi-squares
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
virtual double vertexCovariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
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...
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
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
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > src_
trackRef_iterator tracks_begin() const
first iterator over tracks
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector