1 #ifndef PhysicsTools_PatAlgos_plugins_PATCleaner_h
2 #define PhysicsTools_PatAlgos_plugins_PATCleaner_h
39 template <
class PATObjType>
61 template <
class PATObjType>
64 srcToken_(consumes<
edm::
View<PATObjType>>(src_)),
65 preselectionCut_(iConfig.getParameter<
std::
string>(
"preselection")),
66 finalCut_(iConfig.getParameter<
std::
string>(
"finalCut")) {
72 for (std::vector<std::string>::const_iterator itn = overlapNames.begin(); itn != overlapNames.end(); ++itn) {
83 }
else if (
algorithm ==
"bySuperClusterSeed") {
87 <<
"PATCleaner for " <<
src_ <<
": unsupported algorithm '" <<
algorithm <<
"'\n";
91 produces<std::vector<PATObjType>>();
94 template <
class PATObjType>
101 auto output = std::make_unique<std::vector<PATObjType>>();
104 for (
auto& itov : overlapTests_) {
105 itov->readInput(
iEvent, iSetup);
111 if (!preselectionCut_(*it))
120 bool badForOverlap =
false;
121 for (
auto& itov : overlapTests_) {
123 bool hasOverlap = itov->fillOverlapsForItem(
obj,
overlaps);
124 if (hasOverlap && itov->requireNoOverlaps()) {
125 badForOverlap =
true;