34 srcLegacy_(mayConsume<std::vector<
reco::Vertex> >(iConfig.getParameter<edm::
InputTag>(
"src"))),
38 produces< reco::VertexCompositePtrCandidateCollection >();
45 auto outPtr = std::make_unique<reco::VertexCompositePtrCandidateCollection>();
54 if( candVertices.isValid() )
56 outPtr->reserve(candVertices->size());
57 for (
unsigned int i = 0,
n = candVertices->size();
i <
n; ++
i) {
64 for(std::vector<reco::CandidatePtr>::const_iterator it = daughters.begin(); it != daughters.end(); ++it) {
66 if((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0)
70 outPtr->push_back( v );
82 outPtr->reserve(vertices->size());
83 for (
unsigned int i = 0,
n = vertices->size();
i <
n; ++
i) {
89 if((*pf2pc)[*it].isNonnull() && (*pf2pc)[*it]->numberOfHits() > 0) {
93 if((*pf2pc2)[*it].isNonnull()) {
96 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)
trackRef_iterator tracks_end() const
last iterator over tracks
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_
PATSecondaryVertexSlimmer(const edm::ParameterSet &)
const Point & position() const
position
std::vector< VertexCompositePtrCandidate > VertexCompositePtrCandidateCollection
collection of Candidate objects
double chi2() const
chi-squares
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
~PATSecondaryVertexSlimmer()
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
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > src_
trackRef_iterator tracks_begin() const
first iterator over tracks
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const