119 std::vector<std::pair<const pat::TriggerObjectStandAlone *, const SelectedObject *>> selected;
120 for (
const auto &
obj : *src) {
123 selected.emplace_back(&
obj,&
sel);
130 std::map<const pat::TriggerObjectStandAlone *,int> selected_bits;
131 for(
unsigned int i = 0;
i < selected.size(); ++
i) {
132 const auto &
obj = *selected[
i].first;
133 const auto &
sel = *selected[
i].second;
136 for(
unsigned int j=0; j<
i; ++j){
137 const auto & obj2 = *selected[j].first;
138 const auto & sel2 = *selected[j].second;
140 selected_bits[&obj2] |= selected_bits[&
obj];
141 selected.erase(selected.begin()+
i);
158 std::vector<pair<pat::TriggerObjectStandAlone,int>> l1Objects;
164 l1Objects.emplace_back(l1obj,it->hwIso());
170 switch(it->getType()){
174 l1obj.setCollection(
"L1ETM");
177 case l1t::EtSum::EtSumType::kMissingEtHF:
179 l1obj.setCollection(
"L1ETMHF");
184 l1obj.setCollection(
"L1ETT");
187 case l1t::EtSum::EtSumType::kTotalEtEm:
189 l1obj.setCollection(
"L1ETEm");
194 l1obj.setCollection(
"L1HTT");
197 case l1t::EtSum::EtSumType::kTotalHtHF:
199 l1obj.setCollection(
"L1HTTHF");
204 l1obj.setCollection(
"L1HTM");
207 case l1t::EtSum::EtSumType::kMissingHtHF:
209 l1obj.setCollection(
"L1HTMHF");
216 l1Objects.emplace_back(l1obj,it->hwIso());
224 l1Objects.emplace_back(l1obj,it->hwIso());
231 l1obj.setCharge(it->charge());
232 l1Objects.emplace_back(l1obj,it->hwIso());
239 l1Objects.emplace_back(l1obj,it->hwIso());
243 unsigned int nobj = selected.size();
244 std::vector<float>
pt(nobj,0),
eta(nobj,0),
phi(nobj,0), l1pt(nobj, 0), l1pt_2(nobj, 0), l2pt(nobj, 0);
245 std::vector<int>
id(nobj,0),
bits(nobj, 0), l1iso(nobj, 0), l1charge(nobj,0);
246 for (
unsigned int i = 0; i < nobj; ++
i) {
247 const auto &
obj = *selected[
i].first;
248 const auto &
sel = *selected[
i].second;
255 float best =
sel.l1DR2;
256 for (
const auto & l1obj : l1Objects) {
257 const auto &
seed = l1obj.first;
259 if (dr2 < best &&
sel.l1cut(
seed)) {
261 l1iso[
i] = l1obj.second;
262 l1charge[
i] =
seed.charge();
266 if (
sel.l1DR2_2 > 0) {
267 float best =
sel.l1DR2_2;
268 for (
const auto & l1obj : l1Objects) {
269 const auto &
seed = l1obj.first;
271 if (dr2 < best &&
sel.l1cut_2(
seed)) {
272 l1pt_2[
i] =
seed.pt();
277 float best =
sel.l2DR2;
278 for (
const auto &
seed : *src) {
280 if (dr2 < best &&
sel.l2cut(
seed)) {
287 auto tab = std::make_unique<nanoaod::FlatTable>(nobj,
name_,
false,
false);
const_iterator end(int bx) const
enum start value shifted to 81 so as to avoid clashes with PDG codes
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
edm::EDGetTokenT< l1t::JetBxCollection > l1Jet_
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)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
edm::EDGetTokenT< l1t::TauBxCollection > l1Tau_
std::vector< SelectedObject > sels_
edm::EDGetTokenT< l1t::EGammaBxCollection > l1EG_
edm::EDGetTokenT< l1t::EtSumBxCollection > l1Sum_
const_iterator begin(int bx) const
std::vector< EGamma >::const_iterator const_iterator
Analysis-level trigger object class (stand-alone)