32 template <
class PATObjType>
54 template <
class PATObjType>
57 srcToken_(consumes<
edm::
View<PATObjType>>(src_)),
58 preselectionCut_(iConfig.getParameter<
std::
string>(
"preselection")),
59 finalCut_(iConfig.getParameter<
std::
string>(
"finalCut")) {
65 for (std::vector<std::string>::const_iterator itn = overlapNames.begin(); itn != overlapNames.end(); ++itn) {
76 }
else if (
algorithm ==
"bySuperClusterSeed") {
80 <<
"PATCleaner for " <<
src_ <<
": unsupported algorithm '" <<
algorithm <<
"'\n";
84 produces<std::vector<PATObjType>>();
87 template <
class PATObjType>
94 auto output = std::make_unique<std::vector<PATObjType>>();
97 for (
auto& itov : overlapTests_) {
98 itov->readInput(
iEvent, iSetup);
104 if (!preselectionCut_(*
it))
113 bool badForOverlap =
false;
114 for (
auto& itov : overlapTests_) {
116 bool hasOverlap = itov->fillOverlapsForItem(
obj,
overlaps);
117 if (hasOverlap && itov->requireNoOverlaps()) {
118 badForOverlap =
true;
T getParameter(std::string const &) const
pat::PATCleaner< pat::GenericParticle > PATGenericParticleCleaner
const Selector preselectionCut_
pat::PATCleaner< pat::MET > PATMETCleaner
PAT Cleaner module for PAT Objects.
pat::PATCleaner< pat::Tau > PATTauCleaner
std::vector< std::unique_ptr< OverlapTest > > overlapTests_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) final
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
#define DEFINE_FWK_MODULE(type)
pat::PATCleaner< pat::PFParticle > PATPFParticleCleaner
pat::PATCleaner< pat::Electron > PATElectronCleaner
pat::PATCleaner< pat::Jet > PATJetCleaner
pat::PATCleaner< pat::Muon > PATMuonCleaner
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
pat::helper::OverlapTest OverlapTest
PATCleaner(const edm::ParameterSet &iConfig)
pat::PATCleaner< pat::Photon > PATPhotonCleaner
const edm::EDGetTokenT< edm::View< PATObjType > > srcToken_
StringCutObjectSelector< PATObjType > Selector