Go to the documentation of this file.
52 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > >
genMatchTokens_;
71 : userDataHelper_(iConfig.getParameter<
edm::
ParameterSet>(
"userData"), consumesCollector()) {
84 iConfig.
getParameter<std::vector<edm::InputTag> >(
"genParticleMatch"),
85 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection> >(tag); });
104 if (iConfig.
exists(
"userData")) {
109 produces<std::vector<PFParticle> >();
120 std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > genMatches(
genMatchTokens_.size());
133 std::vector<PFParticle>*
patPFParticles =
new std::vector<PFParticle>();
144 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
PATPFParticleProducer(const edm::ParameterSet &iConfig)
Produces pat::PFParticle's.
bool enabled() const
'true' if this there is at least one efficiency configured
void addGenParticleRef(const reco::GenParticleRef &ref)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
GreaterByPt< PFParticle > pTComparator_
Analysis-level class for reconstructed particles.
bool enabled() const
'true' if this there is at least one efficiency configured
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
pat::helper::EfficiencyLoader efficiencyLoader_
~PATPFParticleProducer() override
#define DEFINE_FWK_MODULE(type)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
pat::PATUserDataHelper< pat::PFParticle > userDataHelper_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
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.
edm::EDGetTokenT< edm::View< reco::PFCandidate > > pfCandidateToken_
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator