10 ParticleFlowForChargedMETProducer::ParticleFlowForChargedMETProducer(
const edm::ParameterSet& iConfig) {
14 pfCandidatesToken = consumes<PFCandidateCollection>(pfCollectionLabel);
15 pvCollectionToken = consumes<VertexCollection>(pvCollectionLabel);
20 produces<PFCandidateCollection>();
26 iEvent.
getByToken(pvCollectionToken, pvCollection);
27 VertexCollection::const_iterator
vertex = pvCollection->begin();
31 iEvent.
getByToken(pfCandidatesToken, pfCandidates);
35 if (!pvCollection->empty()) {
36 for (
unsigned i = 0;
i < pfCandidates->size();
i++) {
41 if (pfCandPtr->
trackRef()->dz((*vertex).position()) <
dzCut) {
58 ParticleFlowForChargedMETProducer::~ParticleFlowForChargedMETProducer() {}
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double pt() const final
transverse momentum
reco::TrackRef trackRef() const
Particle reconstructed by the particle flow algorithm.