26 name_(params.getParameter<
std::
string>(
"name") ),
27 doc_(params.getParameter<
std::
string>(
"doc") ),
28 jets_(consumes<
edm::
View<
pat::
Jet>>( params.getParameter<
edm::InputTag>(
"jets") )),
29 muons_(consumes<
edm::
View<
pat::
Muon>>( params.getParameter<
edm::InputTag>(
"muons") )),
31 taus_(consumes<
edm::
View<
pat::
Tau>>( params.getParameter<
edm::InputTag>(
"taus") )),
32 photons_(consumes<
edm::
View<
pat::
Photon>>( params.getParameter<
edm::InputTag>(
"photons") )),
33 jetSel_(params.getParameter<
std::
string>(
"jetSel") ),
34 muonSel_(params.getParameter<
std::
string>(
"muonSel") ),
35 electronSel_(params.getParameter<
std::
string>(
"electronSel") ),
36 tauSel_(params.getParameter<
std::
string>(
"tauSel") ),
37 photonSel_(params.getParameter<
std::
string>(
"photonSel") ),
38 jetName_(params.getParameter<
std::
string>(
"jetName") ),
39 muonName_(params.getParameter<
std::
string>(
"muonName") ),
40 electronName_(params.getParameter<
std::
string>(
"electronName") ),
41 tauName_(params.getParameter<
std::
string>(
"tauName") ),
42 photonName_(params.getParameter<
std::
string>(
"photonName") )
45 produces<nanoaod::FlatTable>(
"jets");
46 produces<nanoaod::FlatTable>(
"muons");
47 produces<nanoaod::FlatTable>(
"electrons");
48 produces<nanoaod::FlatTable>(
"taus");
49 produces<nanoaod::FlatTable>(
"photons");
76 std::vector<uint8_t>
jets;
77 for (
const auto & j: *jetsIn) {jets.push_back(
jetSel_(j));}
78 auto jetsTable = std::make_unique<nanoaod::FlatTable>(jetsIn->size(),
jetName_,
false,
true);
82 std::vector<uint8_t>
muons;
83 for (
const auto &
m: *muonsIn) {muons.push_back(
muonSel_(
m));}
84 auto muonsTable = std::make_unique<nanoaod::FlatTable>(muonsIn->size(),
muonName_,
false,
true);
89 std::vector<uint8_t> eles;
90 for (
const auto &
e: *electronsIn) {eles.push_back(
electronSel_(
e));}
91 auto electronsTable = std::make_unique<nanoaod::FlatTable>(electronsIn->size(),
electronName_,
false,
true);
95 std::vector<uint8_t>
taus;
96 for (
const auto &
t: *tausIn) {taus.push_back(
tauSel_(
t));}
97 auto tausTable = std::make_unique<nanoaod::FlatTable>(tausIn->size(),
tauName_,
false,
true);
102 for (
const auto &
p: *photonsIn) {photons.push_back(
photonSel_(
p));}
103 auto photonsTable = std::make_unique<nanoaod::FlatTable>(photonsIn->size(),
photonName_,
false,
true);
106 objectSelection(*jetsIn,*muonsIn,*electronsIn,*tausIn,*photonsIn,jets,muons,eles,taus,photons);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< edm::View< pat::Photon > > photons_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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_
void addDefault(ParameterSetDescription const &psetDescription)
const StringCutObjectSelector< pat::Photon > photonSel_
const std::string tauName_
void beginStream(edm::StreamID) override
void produce(edm::Event &, const edm::EventSetup &) override
const std::string jetName_
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 &)