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

[13_0_X] Add logic to produce "two loose showers in different sectors" in the MuonShowerProducer #41206

Merged
merged 1 commit into from
Mar 28, 2023
Merged
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
31 changes: 23 additions & 8 deletions L1Trigger/L1TMuon/plugins/L1TMuonShowerProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,45 @@ void L1TMuonShowerProducer::produce(edm::Event& iEvent, const edm::EventSetup& i
Showers that arrive out-of-time are also under consideration, but are not
going be to enabled at startup Run-3. So all showers should be in-time.
*/
bool isOneNominalInTime = false;
bool isTwoLooseInTime = false;
bool isOneTightInTime = false;
bool isOneNominalInTime{false};
bool isTwoLooseInTime{false};
bool isOneTightInTime{false};
bool isTwoLooseDifferentSectorsInTime{false};

bool foundOneLoose{false};
for (size_t i = 0; i < emtfShowers->size(0); ++i) {
auto shower = emtfShowers->at(0, i);
if (shower.isValid()) {
// nominal
if (shower.isOneNominalInTime())
if (shower.isOneNominalInTime()) {
isOneNominalInTime = true;
}
// two loose
if (shower.isTwoLooseInTime())
if (shower.isTwoLooseInTime()) {
isTwoLooseInTime = true;
}
// tight
if (shower.isOneTightInTime())
if (shower.isOneTightInTime()) {
isOneTightInTime = true;
}
// two loos in different sectors
if (shower.isOneLooseInTime()) {
if (foundOneLoose) {
isTwoLooseDifferentSectorsInTime = true;
} else {
foundOneLoose = true;
}
}
}
}

// Check for at least one nominal shower
const bool acceptCondition(isOneNominalInTime or isTwoLooseInTime or isOneTightInTime);
const bool acceptCondition{isOneNominalInTime or isTwoLooseInTime or isOneTightInTime or
isTwoLooseDifferentSectorsInTime};

if (acceptCondition) {
MuonShower outShower(isOneNominalInTime, false, isTwoLooseInTime, false, isOneTightInTime, false);
MuonShower outShower(
isOneNominalInTime, false, isTwoLooseInTime, false, isOneTightInTime, false, isTwoLooseDifferentSectorsInTime);
outShowers->push_back(0, outShower);
}
iEvent.put(std::move(outShowers));
Expand Down