27 userDataHelper_ ( iConfig.getParameter<edm::
ParameterSet>(
"userData") )
57 if ( iConfig.
exists(
"userData") ) {
62 produces<std::vector<PFParticle> >();
82 std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > genMatches(
genMatchSrc_.size());
93 std::vector<PFParticle> *
patPFParticles =
new std::vector<PFParticle>();
95 itPFParticle = pfCandidates->begin();
96 itPFParticle != pfCandidates->end();
100 unsigned int idx = itPFParticle - pfCandidates->begin();
106 for(
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
127 patPFParticles->push_back(aPFParticle);
134 std::auto_ptr<std::vector<PFParticle> > ptr(patPFParticles);
147 std::ostringstream err;
148 err<<
" cannot get PFCandidates: "
bool enabled() const
'true' if this there is at least one efficiency configured
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::InputTag pfCandidateSrc_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
pat::helper::KinResolutionsLoader resolutionLoader_
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
PATPFParticleProducer(const edm::ParameterSet &iConfig)
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool enabled() const
'true' if this there is at least one efficiency configured
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
std::vector< edm::InputTag > genMatchSrc_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
pat::helper::EfficiencyLoader efficiencyLoader_
Produces pat::PFParticle's.
void addGenParticleRef(const reco::GenParticleRef &ref)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
Analysis-level class for reconstructed particles.
pat::PATUserDataHelper< pat::PFParticle > userDataHelper_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
void fetchCandidateCollection(edm::Handle< edm::View< reco::PFCandidate > > &c, const edm::InputTag &tag, const edm::Event &iSetup) const
void newEvent(const edm::Event &event, const edm::EventSetup &setup) const
To be called for each new event, reads in the EventSetup object.
void newEvent(const edm::Event &event) const
To be called for each new event, reads in the ValueMaps for efficiencies.
GreaterByPt< PFParticle > pTComparator_