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

Added option to trigger on loose HMT showers in EMTF #41185

Merged
merged 3 commits into from
Mar 27, 2023
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
7 changes: 3 additions & 4 deletions L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
CSC shower and send a trigger to the uGMT. In a possible extension, the
EMTF shower sector processor can also trigger on two loose showers - to
enhance the sensitivity to long-lived particles that produce multiple
smaller showers, instead of a single large shower.
showers, instead of a single shower.
*/

#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -34,15 +34,14 @@ class SectorProcessorShower {
bool is_in_sector_csc(int tp_endcap, int tp_sector) const;

int verbose_, endcap_, sector_;
// loose shower trigger for physics
bool enableOneLooseShower_;
// nominal trigger for physics
bool enableOneNominalShower_;
// backup trigger
bool enableOneTightShower_;
// trigger to extend the physics reach
bool enableTwoLooseShowers_;
unsigned nNominalShowers_;
unsigned nTightShowers_;
unsigned nLooseShowers_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ void L1TMuonEndCapShowerProducer::produce(edm::Event& iEvent, const edm::EventSe
void L1TMuonEndCapShowerProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
// these are different shower selections that can be enabled
desc.add<bool>("enableOneNominalShowers", true);
desc.add<bool>("enableOneTightShowers", true);
desc.add<bool>("enableOneLooseShower", true);
desc.add<bool>("enableOneNominalShower", true);
desc.add<bool>("enableOneTightShower", true);
desc.add<bool>("enableTwoLooseShowers", false);
desc.add<unsigned>("nLooseShowers", 2);
desc.add<unsigned>("nNominalShowers", 1);
desc.add<unsigned>("nTightShowers", 1);
desc.add<edm::InputTag>("CSCShowerInput", edm::InputTag("simCscTriggerPrimitiveDigis"));
descriptions.add("simEmtfShowersDef", desc);
descriptions.setComment("This is the generic cfi file for the EMTF shower producer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in the endcap muon system.

The logic is executed in the SectorProcessorShower class. Multiple options
are defined: "OneNominal", "TwoLoose"
are defined: "OneLoose", "TwoLoose", "OneNominal", "OneTight"
*/

// system include files
Expand Down
24 changes: 13 additions & 11 deletions L1Trigger/L1TMuonEndCap/src/SectorProcessorShower.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ void SectorProcessorShower::configure(const edm::ParameterSet& pset, int endcap,
endcap_ = endcap;
sector_ = sector;

enableOneLooseShower_ = pset.getParameter<bool>("enableOneLooseShower");
enableTwoLooseShowers_ = pset.getParameter<bool>("enableTwoLooseShowers");
enableOneNominalShower_ = pset.getParameter<bool>("enableOneNominalShowers");
enableOneTightShower_ = pset.getParameter<bool>("enableOneTightShowers");
nLooseShowers_ = pset.getParameter<unsigned>("nLooseShowers");
nNominalShowers_ = pset.getParameter<unsigned>("nNominalShowers");
nTightShowers_ = pset.getParameter<unsigned>("nTightShowers");
enableOneNominalShower_ = pset.getParameter<bool>("enableOneNominalShower");
enableOneTightShower_ = pset.getParameter<bool>("enableOneTightShower");
}

void SectorProcessorShower::process(const CSCShowerDigiCollection& in_showers,
Expand Down Expand Up @@ -45,28 +43,32 @@ void SectorProcessorShower::process(const CSCShowerDigiCollection& in_showers,
}

// Shower recognition logic: at least one nominal shower (see DN-20-033, section 5.2)
// Updated shower recognition logic: at least one loose shower (starting April 2023)
const unsigned nLooseInTime(std::count_if(
selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isLooseInTime(); }));
const unsigned nNominalInTime(std::count_if(
selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isNominalInTime(); }));
const unsigned nTightInTime(std::count_if(
selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isTightInTime(); }));

const bool hasTwoLooseInTime(nLooseInTime >= nLooseShowers_);
const bool hasOneNominalInTime(nNominalInTime >= nNominalShowers_);
const bool hasOneTightInTime(nTightInTime >= nTightShowers_);
const bool hasOneLooseInTime(nLooseInTime >= 1);
const bool hasTwoLooseInTime(nLooseInTime >= 2);
const bool hasOneNominalInTime(nNominalInTime >= 1);
const bool hasOneTightInTime(nTightInTime >= 1);

// for startup Run-3 we're not considering out of time triggers
const bool acceptLoose(enableTwoLooseShowers_ and hasTwoLooseInTime);
const bool acceptLoose(enableOneLooseShower_ and hasOneLooseInTime);
const bool acceptTwoLoose(enableTwoLooseShowers_ and hasTwoLooseInTime);
const bool acceptNominal(enableOneNominalShower_ and hasOneNominalInTime);
const bool acceptTight(enableOneTightShower_ and hasOneTightInTime);

// trigger condition
const bool accept(acceptLoose or acceptNominal or acceptTight);
const bool accept(acceptLoose or acceptTwoLoose or acceptNominal or acceptTight);

if (accept) {
// shower output
l1t::RegionalMuonShower out_shower(hasOneNominalInTime, false, hasTwoLooseInTime, false, hasOneTightInTime, false);
l1t::RegionalMuonShower out_shower(
hasOneNominalInTime, false, hasTwoLooseInTime, false, hasOneLooseInTime, hasOneTightInTime, false);
l1t::tftype tftype = (endcap_ == 1) ? l1t::tftype::emtf_pos : l1t::tftype::emtf_neg;
out_shower.setTFIdentifiers(sector_ - 1, tftype);
out_showers.push_back(0, out_shower);
Expand Down