Go to the documentation of this file.
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;
StringCutObjectSelector< PATObjType > Selector
PATCleaner(const edm::ParameterSet &iConfig)
pat::PATCleaner< pat::Electron > PATElectronCleaner
pat::PATCleaner< pat::Photon > PATPhotonCleaner
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) final
#define DEFINE_FWK_MODULE(type)
pat::PATCleaner< pat::Jet > PATJetCleaner
std::vector< std::unique_ptr< OverlapTest > > overlapTests_
PAT Cleaner module for PAT Objects.
const Selector preselectionCut_
pat::PATCleaner< pat::Muon > PATMuonCleaner
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
pat::PATCleaner< pat::MET > PATMETCleaner
pat::PATCleaner< pat::GenericParticle > PATGenericParticleCleaner
pat::helper::OverlapTest OverlapTest
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const edm::EDGetTokenT< edm::View< PATObjType > > srcToken_
pat::PATCleaner< pat::Tau > PATTauCleaner
pat::PATCleaner< pat::PFParticle > PATPFParticleCleaner