Skip to content

Commit

Permalink
Adding 2Loose HMT showers in the GT emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
Elisa Fontanesi committed Mar 28, 2023
1 parent 9283eb9 commit e4ec80a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class MuonShowerTemplate : public GlobalCondition {
struct ObjectParameter {
bool MuonShower0;
bool MuonShower1;
bool MuonShower2;
bool MuonShowerOutOfTime0;
bool MuonShowerOutOfTime1;
};
Expand Down
3 changes: 3 additions & 0 deletions L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ void l1t::TriggerMenuParser::parseCondFormats(const L1TUtmTriggerMenu* utmMenu)

} else if (condition.getType() == esConditionType::MuonShower0 ||
condition.getType() == esConditionType::MuonShower1 ||
condition.getType() == esConditionType::MuonShower2 ||
condition.getType() == esConditionType::MuonShowerOutOfTime0 ||
condition.getType() == esConditionType::MuonShowerOutOfTime1) {
parseMuonShower(condition, chipNr, false);
Expand Down Expand Up @@ -1571,6 +1572,8 @@ bool l1t::TriggerMenuParser::parseMuonShower(L1TUtmCondition condMu, unsigned in
objParameter[0].MuonShower0 = true;
} else if (condMu.getType() == esConditionType::MuonShower1) {
objParameter[0].MuonShower1 = true;
} else if (condMu.getType() == esConditionType::MuonShower2) {
objParameter[0].MuonShower2 = true;
} else if (condMu.getType() == esConditionType::MuonShowerOutOfTime0) {
objParameter[0].MuonShowerOutOfTime0 = true;
} else if (condMu.getType() == esConditionType::MuonShowerOutOfTime1) {
Expand Down
6 changes: 5 additions & 1 deletion L1Trigger/L1TGlobal/src/GlobalBoard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,26 +383,30 @@ void l1t::GlobalBoard::receiveMuonShowerObjectData(const edm::Event& iEvent,
int nObj = 0;
for (auto mu = muonData->begin(0); mu != muonData->end(0); ++mu) {
if (nObj < nrL1MuShower) {
/* NOTE: here the single object is split up into 4 separate MuonShower objects
/* NOTE: here the single object is split up into 5 separate MuonShower objects
similarly to the description in the UTM library, where the conditions are four different objects.
*/

std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
std::shared_ptr<l1t::MuonShower> musOneTightInTime =
std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
std::shared_ptr<l1t::MuonShower> musTwoLooseInTime =
std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);
std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
std::make_shared<l1t::MuonShower>(false, false, false, false, false, false);

musOneNominalInTime->setOneNominalInTime(mu->isOneNominalInTime());
musOneTightInTime->setOneTightInTime(mu->isOneTightInTime());
musTwoLooseInTime->setTwoLooseDiffSectorsInTime(mu->isTwoLooseDiffSectorsInTime());
musOutOfTime0->setMusOutOfTime0(mu->musOutOfTime0());
musOutOfTime1->setMusOutOfTime1(mu->musOutOfTime1());

(*m_candL1MuShower).push_back(0, musOneNominalInTime);
(*m_candL1MuShower).push_back(0, musOneTightInTime);
(*m_candL1MuShower).push_back(0, musTwoLooseInTime);
(*m_candL1MuShower).push_back(0, musOutOfTime0);
(*m_candL1MuShower).push_back(0, musOutOfTime1);

Expand Down
13 changes: 10 additions & 3 deletions L1Trigger/L1TGlobal/src/MuonShowerCondition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
* Implementation:
* This condition class checks for the presente of a valid muon shower in the event.
* If present, according to the condition parsed by the xml menu
* (four possibilities for the first Run 3 implementation: MuonShower0, MuonShower1, MuonShowerOutOfTime0, MuonShowerOutOfTime1)
* the corresponding boolean flag is checked (isOneNominalInTime, isOneTightInTime, musOutOfTime0, musOutOfTime1).
* (five possibilities for the 2023 Run 3 implementation: MuonShower0, MuonShower1, MuonShower2, MuonShowerOutOfTime0, MuonShowerOutOfTime1)
* the corresponding boolean flag is checked (isOneNominalInTime, isOneTightInTime, isTwoLooseInTime, musOutOfTime0, musOutOfTime1).
* If it is set to 1, the condition is satisfied and the object is saved.
* Note that for the start of Run 3 only two cases are considered in the menu: Nominal and Tight muon showers.
* Note that for the start of Run 3 only two cases were considered in the menu: Nominal and Tight muon showers,
* an additional case is added for the 2023 data-taking: TwoLoose muon showers.
*
* \author: S. Dildick (2021) - Rice University
*
Expand Down Expand Up @@ -183,6 +184,7 @@ const bool l1t::MuonShowerCondition::checkObjectParameter(const int iCondition,
LogDebug("L1TGlobal") << "\n l1t::MuonShower (uGT emulator bits): "
<< "\n\t MuonShower0: isOneNominalInTime() = " << cand.isOneNominalInTime()
<< "\n\t MuonShower1: isOneTightInTime() = " << cand.isOneTightInTime()
<< "\n\t MuonShower2: isTwoLooseDiffSectorsInTime() = " << cand.isTwoLooseDiffSectorsInTime()
<< "\n\t MuonShowerOutOfTime0: musOutOfTime0() = " << cand.musOutOfTime0()
<< "\n\t MuonShowerOutOfTime1: musOutOfTime1() = " << cand.musOutOfTime1() << std::endl;

Expand All @@ -196,6 +198,11 @@ const bool l1t::MuonShowerCondition::checkObjectParameter(const int iCondition,
LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShower1 requirement" << std::endl;
return false;
}
// Check twoLooseInTime
if (cand.isTwoLooseDiffSectorsInTime() != objPar.MuonShower2) {
LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShower2 requirement" << std::endl;
return false;
}
if (cand.musOutOfTime0() != objPar.MuonShowerOutOfTime0) {
LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShowerOutOfTime0 requirement" << std::endl;
return false;
Expand Down

0 comments on commit e4ec80a

Please sign in to comment.