149 std::vector<std::pair<const pat::TriggerObjectStandAlone *, const SelectedObject *>> selected;
150 std::map<int, std::map<const pat::TriggerObjectStandAlone *, int>> selected_bits;
155 if (
sel.skipObjectsNotPassingQualityBits ? (selected_bits[
sel.id][&
obj] > 0) :
true) {
156 selected.emplace_back(&
obj, &
sel);
163 for (
unsigned int i = 0;
i < selected.size(); ++
i) {
164 const auto &
obj = *selected[
i].first;
165 const auto &
sel = *selected[
i].second;
167 for (
unsigned int j = 0;
j <
i; ++
j) {
168 const auto &obj2 = *selected[
j].first;
169 const auto &sel2 = *selected[
j].second;
171 selected_bits[
sel.id][&obj2] |= selected_bits[
sel.id][&
obj];
172 selected.erase(selected.begin() +
i);
184 std::vector<pair<pat::TriggerObjectStandAlone, int>> l1Objects;
192 l1Objects.emplace_back(l1obj, it->hwIso());
198 switch (it->getType()) {
201 l1obj.setCollection(
"L1ETM");
206 l1obj.setCollection(
"L1ETMHF");
211 l1obj.setCollection(
"L1ETT");
216 l1obj.setCollection(
"L1ETEm");
221 l1obj.setCollection(
"L1HTT");
226 l1obj.setCollection(
"L1HTTHF");
231 l1obj.setCollection(
"L1HTM");
236 l1obj.setCollection(
"L1HTMHF");
243 l1Objects.emplace_back(l1obj, it->hwIso());
250 l1Objects.emplace_back(l1obj, it->hwIso());
257 l1obj.setCharge(it->charge());
258 l1Objects.emplace_back(l1obj, it->hwIso());
265 l1Objects.emplace_back(l1obj, it->hwIso());
268 unsigned int nobj = selected.size();
269 std::vector<float>
pt(nobj, 0),
eta(nobj, 0),
phi(nobj, 0), l1pt(nobj, 0), l1pt_2(nobj, 0), l2pt(nobj, 0);
270 std::vector<int16_t> l1charge(nobj, 0);
271 std::vector<uint16_t>
id(nobj, 0);
272 std::vector<int>
bits(nobj, 0), l1iso(nobj, 0);
273 for (
unsigned int i = 0;
i < nobj; ++
i) {
274 const auto &
obj = *selected[
i].first;
275 const auto &
sel = *selected[
i].second;
283 for (
const auto &l1obj : l1Objects) {
284 const auto &
seed = l1obj.first;
286 if (dr2 < best &&
sel.l1cut(
seed)) {
289 l1iso[
i] = l1obj.second;
290 l1charge[
i] =
seed.charge();
294 if (
sel.l1DR2_2 > 0) {
296 for (
const auto &l1obj : l1Objects) {
297 const auto &
seed = l1obj.first;
299 if (dr2 < best &&
sel.l1cut_2(
seed)) {
301 l1pt_2[
i] =
seed.pt();
309 if (dr2 < best &&
sel.l2cut(
seed)) {
317 auto tab = std::make_unique<nanoaod::FlatTable>(nobj,
name_,
false,
false);
318 tab->addColumn<uint16_t>(
"id",
id,
idDoc_);
319 tab->addColumn<
float>(
"pt",
pt,
"pt", 12);
320 tab->addColumn<
float>(
"eta",
eta,
"eta", 12);
321 tab->addColumn<
float>(
"phi",
phi,
"phi", 12);
322 tab->addColumn<
float>(
"l1pt", l1pt,
"pt of associated L1 seed", 8);
323 tab->addColumn<
int>(
"l1iso", l1iso,
"iso of associated L1 seed");
324 tab->addColumn<int16_t>(
"l1charge", l1charge,
"charge of associated L1 seed");
325 tab->addColumn<
float>(
"l1pt_2", l1pt_2,
"pt of associated secondary L1 seed", 8);
326 tab->addColumn<
float>(
"l2pt", l2pt,
"pt of associated 'L2' seed (i.e. HLT before tracking/PF)", 10);
327 tab->addColumn<
int>(
"filterBits",
bits,
"extra bits of associated information: " +
bitsDoc_);
enum start value shifted to 81 so as to avoid clashes with PDG codes
edm::EDGetTokenT< l1t::JetBxCollection > l1Jet_
std::vector< T >::const_iterator const_iterator
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > src_
void setCollection(const std::string &collName)
Methods.
edm::EDGetTokenT< l1t::MuonBxCollection > l1Muon_
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< l1t::TauBxCollection > l1Tau_
std::vector< SelectedObject > sels_
edm::EDGetTokenT< l1t::EGammaBxCollection > l1EG_
edm::EDGetTokenT< l1t::EtSumBxCollection > l1Sum_
Analysis-level trigger object class (stand-alone)