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

L1 MHT and forward Jet fixes #11676

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions L1Trigger/L1TCalorimeter/src/JetFinderMethods.cc
Expand Up @@ -144,6 +144,19 @@ namespace l1t {
if(forward)
jetQual |= 0x2;

// check for input overflow regions
if(forward && regionET == 255) {
jetET = 1023; // 10 bit max
} else if(!forward && regionET == 1023) {
jetET = 1023; // 10 bit max
} else if(region->hwEta() == 17) {
if(neighborNE_et == 255 || neighborE_et == 255 || neighborSE_et == 255)
jetET = 1023; // 10 bit max
} else if(region->hwEta() == 4) {
if(neighborNW_et == 255 || neighborW_et == 255 || neighborSW_et == 255)
jetET = 1023; // 10 bit max
}

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
//l1t::Jet theJet(0, jetET, jetEta, jetPhi);
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/L1TCalorimeter/src/PUSubtractionMethods.cc
Expand Up @@ -132,6 +132,8 @@ namespace l1t {
int regionEtCorr = std::max(0, regionET - puSub);
if(regionET == 1023)
regionEtCorr = 1023; // do not subtract overflow regions
if((regionET==255) && (regionEta < 4 || regionEta > 17))
regionEtCorr = 255;

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > lorentz(0,0,0,0);
CaloRegion newSubRegion(*&lorentz, 0, 0, regionEtCorr, regionEta, regionPhi, notCorrectedRegion->hwQual(), notCorrectedRegion->hwEtEm(), notCorrectedRegion->hwEtHad());
Expand Down
Expand Up @@ -123,24 +123,21 @@ void l1t::Stage1Layer2EtSumAlgorithmImpHW::processEvent(const std::vector<l1t::C
int MHTqual = 0;
int ETTqual = 0;
int HTTqual = 0;
if(MET >= 0xfff || regionOverflowEt) // MET 12 bits
if(MET > 0xfff || regionOverflowEt) // MET 12 bits
METqual = 1;
if(MHT >= 0x7f || regionOverflowHt) // MHT 7 bits
if(MHT > 0x7f || regionOverflowHt) // MHT 7 bits
MHTqual = 1;
if(sumET >= 0xfff || regionOverflowEt)
if(sumET > 0xfff || regionOverflowEt)
ETTqual = 1;
if(sumHT >= 0xfff || regionOverflowHt)
if(sumHT > 0xfff || regionOverflowHt)
HTTqual = 1;

MHT &= 127; // limit MHT to 7 bits as the firmware does, but only after checking for overflow.
//MHT is replaced with MHT/HT
uint16_t MHToHT=MHToverHT(MHT,sumHT);
// std::cout << "MHT HT MHT/HT" << std::endl;
// std::cout << MHT << " " << sumHT << " " << MHToHT << std::endl;
//iPhiHt is replaced by the dPhi between two most energetic jets
iPhiHT = DiJetPhi(jets);


const ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > etLorentz(0,0,0,0);
l1t::EtSum etMiss(*&etLorentz,EtSum::EtSumType::kMissingEt,MET&0xfff,0,iPhiET,METqual);
l1t::EtSum htMiss(*&etLorentz,EtSum::EtSumType::kMissingHt,MHToHT&0x7f,0,iPhiHT,MHTqual);
Expand Down