38 lowPtElectronSel_(
params.getParameter<
std::
string>(
"lowPtElectronSel")),
44 lowPtElectronName_(
params.getParameter<
std::
string>(
"lowPtElectronName")),
49 produces<nanoaod::FlatTable>(
"jets");
50 produces<nanoaod::FlatTable>(
"muons");
51 produces<nanoaod::FlatTable>(
"electrons");
52 produces<nanoaod::FlatTable>(
"lowPtElectrons");
53 produces<nanoaod::FlatTable>(
"taus");
54 produces<nanoaod::FlatTable>(
"photons");
71 std::vector<uint8_t>
jets;
72 jets.reserve(jetsProd.size());
73 for (
const auto&
j : jetsProd) {
76 auto jetsTable = std::make_unique<nanoaod::FlatTable>(jetsProd.size(),
jetName_,
false,
true);
79 std::vector<uint8_t>
muons;
80 muons.reserve(muonsProd.size());
81 for (
const auto&
m : muonsProd) {
84 auto muonsTable = std::make_unique<nanoaod::FlatTable>(muonsProd.size(),
muonName_,
false,
true);
87 std::vector<uint8_t>
eles;
88 eles.reserve(electronsProd.size());
89 for (
const auto&
e : electronsProd) {
92 auto electronsTable = std::make_unique<nanoaod::FlatTable>(electronsProd.size(),
electronName_,
false,
true);
95 std::vector<uint8_t> lowPtEles;
96 lowPtEles.reserve(lowPtelectronsProd.size());
97 for (
const auto&
e : lowPtelectronsProd) {
100 auto lowPtElectronsTable = std::make_unique<nanoaod::FlatTable>(lowPtEles.size(),
lowPtElectronName_,
false,
true);
103 std::vector<uint8_t>
taus;
104 for (
const auto&
t : tausProd) {
107 auto tausTable = std::make_unique<nanoaod::FlatTable>(tausProd.size(),
tauName_,
false,
true);
111 for (
const auto&
p : photonsProd) {
114 auto photonsTable = std::make_unique<nanoaod::FlatTable>(photonsProd.size(),
photonName_,
false,
true);
121 lowPtElectronsTable->addColumn<uint8_t>(
name_, lowPtEles,
doc_);
142 desc.add<
std::string>(
"name")->setComment(
"suffix name of the output flat table");
144 "a bitmap defining the objects that remain after selection and cross cleaning");
145 desc.add<
edm::InputTag>(
"jets")->setComment(
"a jet collection derived from pat::Jet");
146 desc.add<
edm::InputTag>(
"muons")->setComment(
"a muon collection derived from pat::Muon");
147 desc.add<
edm::InputTag>(
"electrons")->setComment(
"an electron collection derived from pat::Electron");
149 ->setComment(
"an optional electron collection derived from pat::Electron, empty=>not used");
150 desc.add<
edm::InputTag>(
"taus")->setComment(
"a tau collection derived from pat::Tau");
151 desc.add<
edm::InputTag>(
"photons")->setComment(
"a photon collection derived from pat::Photon");
153 desc.add<
std::string>(
"jetSel")->setComment(
"function on pat::Jet defining the selection of jets");
154 desc.add<
std::string>(
"muonSel")->setComment(
"function on pat::Muon defining the selection of muons");
155 desc.add<
std::string>(
"electronSel")->setComment(
"function on pat::Electron defining the selection of electrons");
157 ->setComment(
"function on pat::Electron defining the selection on alternative electrons collection");
158 desc.add<
std::string>(
"tauSel")->setComment(
"function on pat::Tau defining the selection on taus");
159 desc.add<
std::string>(
"photonSel")->setComment(
"function on pat::Photon defining the selection on photons");
161 desc.add<
std::string>(
"jetName")->setComment(
"name of the jet mask flat table output");
162 desc.add<
std::string>(
"muonName")->setComment(
"name of the muon mask flat table output");
163 desc.add<
std::string>(
"electronName")->setComment(
"name of the electron mask flat table output");
164 desc.add<
std::string>(
"lowPtElectronName")->setComment(
"name of the alternative electron mask flat table output");
165 desc.add<
std::string>(
"tauName")->setComment(
"name of the tau mask flat table output");
166 desc.add<
std::string>(
"photonName")->setComment(
"name of the photon mask flat table output");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< edm::View< pat::Photon > > photons_
void endStream() override
const edm::EDGetTokenT< edm::View< pat::Jet > > jets_
const StringCutObjectSelector< pat::Jet > jetSel_
const StringCutObjectSelector< pat::Muon > muonSel_
const edm::EDGetTokenT< edm::View< pat::Tau > > taus_
const StringCutObjectSelector< pat::Photon > photonSel_
const std::string tauName_
edm::EDGetTokenT< edm::View< pat::Electron > > lowPtElectrons_
#define DEFINE_FWK_MODULE(type)
void beginStream(edm::StreamID) override
void produce(edm::Event &, const edm::EventSetup &) override
const std::string jetName_
const std::string lowPtElectronName_
const StringCutObjectSelector< pat::Tau > tauSel_
const std::string muonName_
~NanoAODBaseCrossCleaner() override
const std::string photonName_
const edm::EDGetTokenT< edm::View< pat::Electron > > electrons_
const std::string electronName_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const StringCutObjectSelector< pat::Electron > electronSel_
const edm::EDGetTokenT< edm::View< pat::Muon > > muons_
virtual void objectSelection(const edm::View< pat::Jet > &jets, const edm::View< pat::Muon > &muons, const edm::View< pat::Electron > &eles, const edm::View< pat::Tau > &taus, const edm::View< pat::Photon > &photons, std::vector< uint8_t > &jetBits, std::vector< uint8_t > &muonBits, std::vector< uint8_t > &eleBits, std::vector< uint8_t > &tauBits, std::vector< uint8_t > &photonBits)
NanoAODBaseCrossCleaner(const edm::ParameterSet &)
const StringCutObjectSelector< pat::Electron > lowPtElectronSel_