Produces pat::PFParticle's.
The PATPFParticleProducer produces analysis-level pat::PFParticle's starting from a collection of objects of reco::PFCandidate.
- Author
- Steven Lowette, Roger Wolf
- Version
- Id
- PATPFParticleProducer.h,v 1.8 2012/05/26 10:42:53 gpetrucc Exp
Definition at line 39 of file PATPFParticleProducer.cc.
Definition at line 115 of file PATPFParticleProducer.cc.
References pat::PATUserDataHelper< ObjectType >::add(), addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), efficiencyLoader_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), genMatchTokens_, mps_fire::i, heavyIonCSV_trainingSettings::idx, iEvent, dqmiolumiharvest::j, eostools::move(), dqmiodumpmetadata::n, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), pfParticleProducer_cfi::patPFParticles, zmumugammaAnalyzer_cfi::pfCandidates, pfCandidateToken_, pTComparator_, resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::helper::KinResolutionsLoader::setResolutions(), jetUpdater_cfi::sort, userDataHelper_, and useUserData_.
121 std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > genMatches(
genMatchTokens_.size());
134 std::vector<PFParticle>*
patPFParticles =
new std::vector<PFParticle>();
145 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
147 aPFParticle.addGenParticleRef(genPFParticle);
150 aPFParticle.embedGenParticle();
bool enabled() const
'true' if this there is at least one efficiency configured
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
pat::helper::KinResolutionsLoader resolutionLoader_
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool enabled() const
'true' if this there is at least one efficiency configured
pat::helper::EfficiencyLoader efficiencyLoader_
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
edm::EDGetTokenT< edm::View< reco::PFCandidate > > pfCandidateToken_
Analysis-level class for reconstructed particles.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
pat::PATUserDataHelper< pat::PFParticle > userDataHelper_
GreaterByPt< PFParticle > pTComparator_