Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for L1T-MuonShowers as trigger objects at HLT #36951

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions DataFormats/HLTReco/interface/TriggerEventWithRefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ namespace trigger {
size_type pftaus_;
size_type pfmets_;
size_type l1tmuon_;
size_type l1tmuonShower_;
size_type l1tegamma_;
size_type l1tjet_;
size_type l1ttkmuon_;
Expand Down Expand Up @@ -82,6 +83,7 @@ namespace trigger {
pftaus_(0),
pfmets_(0),
l1tmuon_(0),
l1tmuonShower_(0),
l1tegamma_(0),
l1tjet_(0),
l1ttkmuon_(0),
Expand Down Expand Up @@ -113,6 +115,7 @@ namespace trigger {
size_type pftaus,
size_type pfmets,
size_type l1tmuon,
size_type l1tmuonShower,
size_type l1tegamma,
size_type l1tjet,
size_type l1ttkmuon,
Expand Down Expand Up @@ -142,6 +145,7 @@ namespace trigger {
pftaus_(pftaus),
pfmets_(pfmets),
l1tmuon_(l1tmuon),
l1tmuonShower_(l1tmuonShower),
l1tegamma_(l1tegamma),
l1tjet_(l1tjet),
l1ttkmuon_(l1ttkmuon),
Expand Down Expand Up @@ -193,6 +197,7 @@ namespace trigger {
addObjects(tfowr.pftauIds(), tfowr.pftauRefs()),
addObjects(tfowr.pfmetIds(), tfowr.pfmetRefs()),
addObjects(tfowr.l1tmuonIds(), tfowr.l1tmuonRefs()),
addObjects(tfowr.l1tmuonShowerIds(), tfowr.l1tmuonShowerRefs()),
addObjects(tfowr.l1tegammaIds(), tfowr.l1tegammaRefs()),
addObjects(tfowr.l1tjetIds(), tfowr.l1tjetRefs()),
addObjects(tfowr.l1ttkmuonIds(), tfowr.l1ttkmuonRefs()),
Expand Down Expand Up @@ -334,6 +339,11 @@ namespace trigger {
const size_type end(filterObjects_.at(filter).l1tmuon_);
return std::pair<size_type, size_type>(begin, end);
}
std::pair<size_type, size_type> l1tmuonShowerSlice(size_type filter) const {
const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tmuonShower_);
const size_type end(filterObjects_.at(filter).l1tmuonShower_);
return std::pair<size_type, size_type>(begin, end);
}
std::pair<size_type, size_type> l1tegammaSlice(size_type filter) const {
const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tegamma_);
const size_type end(filterObjects_.at(filter).l1tegamma_);
Expand Down Expand Up @@ -583,6 +593,17 @@ namespace trigger {
TriggerRefsCollections::getObjects(id, l1tmuon, begin, end);
}

void getObjects(size_type filter, Vids& ids, VRl1tmuonShower& l1tmuonShower) const {
const size_type begin(l1tmuonShowerSlice(filter).first);
const size_type end(l1tmuonShowerSlice(filter).second);
TriggerRefsCollections::getObjects(ids, l1tmuonShower, begin, end);
}
void getObjects(size_type filter, int id, VRl1tmuonShower& l1tmuonShower) const {
const size_type begin(l1tmuonShowerSlice(filter).first);
const size_type end(l1tmuonShowerSlice(filter).second);
TriggerRefsCollections::getObjects(id, l1tmuonShower, begin, end);
}

void getObjects(size_type filter, Vids& ids, VRl1tegamma& l1tegamma) const {
const size_type begin(l1tegammaSlice(filter).first);
const size_type end(l1tegammaSlice(filter).second);
Expand Down
57 changes: 57 additions & 0 deletions DataFormats/HLTReco/interface/TriggerRefsCollections.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h" // deprecate

#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/L1Trigger/interface/MuonShower.h"
#include "DataFormats/L1Trigger/interface/EGamma.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/Tau.h"
Expand Down Expand Up @@ -80,6 +81,7 @@ namespace trigger {
typedef std::vector<l1extra::L1HFRingsRef> VRl1hfrings; //deprecate

typedef l1t::MuonVectorRef VRl1tmuon;
typedef l1t::MuonShowerVectorRef VRl1tmuonShower;
typedef l1t::EGammaVectorRef VRl1tegamma;
typedef l1t::JetVectorRef VRl1tjet;
typedef l1t::TauVectorRef VRl1ttau;
Expand Down Expand Up @@ -132,6 +134,8 @@ namespace trigger {

Vids l1tmuonIds_;
VRl1tmuon l1tmuonRefs_;
Vids l1tmuonShowerIds_;
VRl1tmuonShower l1tmuonShowerRefs_;
Vids l1tegammaIds_;
VRl1tegamma l1tegammaRefs_;
Vids l1tjetIds_;
Expand Down Expand Up @@ -198,6 +202,8 @@ namespace trigger {

l1tmuonIds_(),
l1tmuonRefs_(),
l1tmuonShowerIds_(),
l1tmuonShowerRefs_(),
l1tegammaIds_(),
l1tegammaRefs_(),
l1tjetIds_(),
Expand Down Expand Up @@ -262,6 +268,8 @@ namespace trigger {

std::swap(l1tmuonIds_, other.l1tmuonIds_);
std::swap(l1tmuonRefs_, other.l1tmuonRefs_);
std::swap(l1tmuonShowerIds_, other.l1tmuonShowerIds_);
std::swap(l1tmuonShowerRefs_, other.l1tmuonShowerRefs_);
std::swap(l1tegammaIds_, other.l1tegammaIds_);
std::swap(l1tegammaRefs_, other.l1tegammaRefs_);
std::swap(l1tjetIds_, other.l1tjetIds_);
Expand Down Expand Up @@ -353,6 +361,10 @@ namespace trigger {
l1tmuonIds_.push_back(id);
l1tmuonRefs_.push_back(ref);
}
void addObject(int id, const l1t::MuonShowerRef& ref) {
l1tmuonShowerIds_.push_back(id);
l1tmuonShowerRefs_.push_back(ref);
}
void addObject(int id, const l1t::EGammaRef& ref) {
l1tegammaIds_.push_back(id);
l1tegammaRefs_.push_back(ref);
Expand Down Expand Up @@ -492,6 +504,12 @@ namespace trigger {
l1tmuonRefs_.insert(l1tmuonRefs_.end(), refs.begin(), refs.end());
return l1tmuonIds_.size();
}
size_type addObjects(const Vids& ids, const VRl1tmuonShower& refs) {
assert(ids.size() == refs.size());
l1tmuonShowerIds_.insert(l1tmuonShowerIds_.end(), ids.begin(), ids.end());
l1tmuonShowerRefs_.insert(l1tmuonShowerRefs_.end(), refs.begin(), refs.end());
return l1tmuonShowerIds_.size();
}
size_type addObjects(const Vids& ids, const VRl1tegamma& refs) {
assert(ids.size() == refs.size());
l1tegammaIds_.insert(l1tegammaIds_.end(), ids.begin(), ids.end());
Expand Down Expand Up @@ -1077,6 +1095,41 @@ namespace trigger {
return;
}

void getObjects(Vids& ids, VRl1tmuonShower& refs) const { getObjects(ids, refs, 0, l1tmuonShowerIds_.size()); }
void getObjects(Vids& ids, VRl1tmuonShower& refs, size_type begin, size_type end) const {
assert(begin <= end);
assert(end <= l1tmuonShowerIds_.size());
const size_type n(end - begin);
ids.resize(n);
refs.resize(n);
size_type j(0);
for (size_type i = begin; i != end; ++i) {
ids[j] = l1tmuonShowerIds_[i];
refs[j] = l1tmuonShowerRefs_[i];
++j;
}
}
void getObjects(int id, VRl1tmuonShower& refs) const { getObjects(id, refs, 0, l1tmuonShowerIds_.size()); }
void getObjects(int id, VRl1tmuonShower& refs, size_type begin, size_type end) const {
assert(begin <= end);
assert(end <= l1tmuonShowerIds_.size());
size_type n(0);
for (size_type i = begin; i != end; ++i) {
if (id == l1tmuonShowerIds_[i]) {
++n;
}
}
refs.resize(n);
size_type j(0);
for (size_type i = begin; i != end; ++i) {
if (id == l1tmuonShowerIds_[i]) {
refs[j] = l1tmuonShowerRefs_[i];
++j;
}
}
return;
}

void getObjects(Vids& ids, VRl1tegamma& refs) const { getObjects(ids, refs, 0, l1tegammaIds_.size()); }
void getObjects(Vids& ids, VRl1tegamma& refs, size_type begin, size_type end) const {
assert(begin <= end);
Expand Down Expand Up @@ -1637,6 +1690,10 @@ namespace trigger {
const Vids& l1tmuonIds() const { return l1tmuonIds_; }
const VRl1tmuon& l1tmuonRefs() const { return l1tmuonRefs_; }

size_type l1tmuonShowerSize() const { return l1tmuonShowerIds_.size(); }
const Vids& l1tmuonShowerIds() const { return l1tmuonShowerIds_; }
const VRl1tmuonShower& l1tmuonShowerRefs() const { return l1tmuonShowerRefs_; }

size_type l1tegammaSize() const { return l1tegammaIds_.size(); }
const Vids& l1tegammaIds() const { return l1tegammaIds_; }
const VRl1tegamma& l1tegammaRefs() const { return l1tegammaRefs_; }
Expand Down
4 changes: 3 additions & 1 deletion DataFormats/HLTReco/interface/TriggerTypeDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace trigger {
TriggerL1AsymHt = -111,
TriggerL1AsymEtHF = -112,
TriggerL1AsymHtHF = -113,
/// This has all to be decided for Phase-2. Here is Thiago's proposal.
// Phase-2: This has all to be decided for Phase-2. Here is Thiago's proposal.
TriggerL1TkMu = -114,
TriggerL1TkEle = -115,
TriggerL1PFJet = -116,
Expand All @@ -72,6 +72,8 @@ namespace trigger {
TriggerL1PFMHT = -122,
TriggerL1PFTrack = -123,
TriggerL1Vertex = -124,
// Phase-1: MuonShower
TriggerL1MuShower = -125, // stage2 (introduced in Run 3)

/// HLT
TriggerPhoton = +81,
Expand Down
12 changes: 8 additions & 4 deletions DataFormats/HLTReco/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
<version ClassVersion="10" checksum="2923979599"/>
</class>
<class name="trigger::TriggerObjectCollection"/>
<class name="trigger::TriggerRefsCollections" ClassVersion="15">
<class name="trigger::TriggerRefsCollections" ClassVersion="16">
<version ClassVersion="16" checksum="3574724031"/>
<version ClassVersion="15" checksum="1920377523"/>
<version ClassVersion="14" checksum="874193725"/>
<version ClassVersion="13" checksum="3831523881"/>
<version ClassVersion="12" checksum="4231679693"/>
</class>
<class name="trigger::TriggerFilterObjectWithRefs" ClassVersion="14">
<class name="trigger::TriggerFilterObjectWithRefs" ClassVersion="15">
<version ClassVersion="15" checksum="2946786356"/>
<version ClassVersion="14" checksum="4087045168"/>
<version ClassVersion="13" checksum="2951644382"/>
<version ClassVersion="12" checksum="2645314434"/>
Expand All @@ -64,14 +66,16 @@
<version ClassVersion="11" checksum="3351458717"/>
<version ClassVersion="10" checksum="1112210423"/>
</class>
<class name="trigger::TriggerEventWithRefs::TriggerFilterObject" ClassVersion="15">
<class name="trigger::TriggerEventWithRefs::TriggerFilterObject" ClassVersion="16">
<version ClassVersion="16" checksum="752200108"/>
<version ClassVersion="15" checksum="450435068"/>
<version ClassVersion="14" checksum="1673531968"/>
<version ClassVersion="13" checksum="1672519577"/>
<version ClassVersion="12" checksum="2301242282"/>
</class>
<class name="std::vector<trigger::TriggerEventWithRefs::TriggerFilterObject>"/>
<class name="trigger::TriggerEventWithRefs" ClassVersion="14">
<class name="trigger::TriggerEventWithRefs" ClassVersion="15">
<version ClassVersion="15" checksum="3947606822"/>
<version ClassVersion="14" checksum="2001321210"/>
<version ClassVersion="13" checksum="1258968436"/>
<version ClassVersion="12" checksum="3347721344"/>
Expand Down
13 changes: 13 additions & 0 deletions HLTrigger/HLTcore/interface/HLTEventAnalyzerRAW.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ class HLTEventAnalyzerRAW : public edm::stream::EDAnalyzer<> {
trigger::Vids l1hfringsIds_;
trigger::VRl1hfrings l1hfringsRefs_;

trigger::Vids l1tmuonIds_;
trigger::VRl1tmuon l1tmuonRefs_;
trigger::Vids l1tmuonShowerIds_;
trigger::VRl1tmuonShower l1tmuonShowerRefs_;
trigger::Vids l1tegammaIds_;
trigger::VRl1tegamma l1tegammaRefs_;
trigger::Vids l1tjetIds_;
trigger::VRl1tjet l1tjetRefs_;
trigger::Vids l1ttauIds_;
trigger::VRl1ttau l1ttauRefs_;
trigger::Vids l1tetsumIds_;
trigger::VRl1tetsum l1tetsumRefs_;

/* Phase-2 */
trigger::Vids l1ttkmuIds_;
trigger::VRl1ttkmuon l1ttkmuRefs_;
Expand Down
1 change: 1 addition & 0 deletions HLTrigger/HLTcore/interface/TriggerSummaryProducerAOD.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class TriggerSummaryProducerAOD : public edm::global::EDProducer<> {
edm::GetterOfProducts<reco::PFJetCollection> getPFJetCollection_;
edm::GetterOfProducts<reco::PFTauCollection> getPFTauCollection_;
edm::GetterOfProducts<l1t::MuonBxCollection> getL1TMuonParticleCollection_;
edm::GetterOfProducts<l1t::MuonShowerBxCollection> getL1TMuonShowerParticleCollection_;
edm::GetterOfProducts<l1t::EGammaBxCollection> getL1TEGammaParticleCollection_;
edm::GetterOfProducts<l1t::JetBxCollection> getL1TJetParticleCollection_;
edm::GetterOfProducts<l1t::TauBxCollection> getL1TTauParticleCollection_;
Expand Down
Loading