10 ParticleFlowForChargedMETProducer::ParticleFlowForChargedMETProducer(
const edm::ParameterSet& iConfig)
15 pfCandidatesToken = consumes<PFCandidateCollection>(pfCollectionLabel);
16 pvCollectionToken = consumes<VertexCollection>(pvCollectionLabel);
21 produces<PFCandidateCollection>();
29 iEvent.
getByToken(pvCollectionToken, pvCollection);
30 VertexCollection::const_iterator vertex = pvCollection->begin();
34 iEvent.
getByToken(pfCandidatesToken, pfCandidates);
38 if (pvCollection->size()>0) {
39 for(
unsigned i=0;
i<pfCandidates->size();
i++ ) {
44 if (pfCandPtr->
trackRef()->dz((*vertex).position()) <
dzCut) {
66 ParticleFlowForChargedMETProducer::~ParticleFlowForChargedMETProducer(){}
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
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
reco::TrackRef trackRef() const
Particle reconstructed by the particle flow algorithm.