32 if ( iConfig.
exists(
"checkClosestZVertex") ) {
33 checkClosestZVertex_ = iConfig.
getParameter<
bool>(
"checkClosestZVertex");
35 checkClosestZVertex_ =
false;
39 pileUpAlgo_.setVerbose(verbose_);
40 pileUpAlgo_.setCheckClosestZVertex(checkClosestZVertex_);
42 produces<reco::PFCandidateCollection>();
64 auto_ptr< reco::PFCandidateCollection >
70 iEvent.
getByLabel( inputTagPFCandidates_, pfCandidates);
76 iEvent.
getByLabel( inputTagVertices_, vertices);
78 pileUpAlgo_.process(*pfCandidates,*vertices,&pfCandidates);
80 pOutput->insert(pOutput->end(),pileUpAlgo_.getPFCandidatesFromPU().begin(),pileUpAlgo_.getPFCandidatesFromPU().end());
83 iEvent.
put( pOutput );
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
PFPileUp(const edm::ParameterSet &)