Skip to content

Commit

Permalink
Two showers in diff sectors for mu shower producer
Browse files Browse the repository at this point in the history
  • Loading branch information
dinyar committed Mar 27, 2023
1 parent fa4424a commit dde9823
Showing 1 changed file with 23 additions and 8 deletions.
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

0 comments on commit dde9823

Please sign in to comment.