From 0f5d08db69af37776f4ac915825a6c6752bde0b5 Mon Sep 17 00:00:00 2001 From: pallabidas Date: Mon, 22 Jul 2024 17:04:02 +0200 Subject: [PATCH 1/2] updates to HF tower splitting, adding 3x3 clusters in HF --- .../interface/Phase2L1CaloJetEmulator.h | 171 +++++++++--------- .../interface/Phase2L1CaloPFClusterEmulator.h | 168 +++++++++++++++++ .../plugins/Phase2L1CaloJetEmulator.cc | 50 +++-- .../plugins/Phase2L1CaloPFClusterEmulator.cc | 156 +++++++++++++++- .../python/l1tPhase2CaloJetEmulator_cfi.py | 36 ++-- .../l1tPhase2CaloPFClusterEmulator_cfi.py | 1 + 6 files changed, 464 insertions(+), 118 deletions(-) diff --git a/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloJetEmulator.h b/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloJetEmulator.h index 5f963ae618922..6817f01635349 100644 --- a/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloJetEmulator.h +++ b/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloJetEmulator.h @@ -10,8 +10,7 @@ static constexpr int nHgcalEta = 36; static constexpr int nHgcalPhi = 72; static constexpr int nHfEta = 24; static constexpr int nHfPhi = 72; -static constexpr int nSTEta = 6; -static constexpr int nSTEta_hf = 4; +static constexpr int nSTEta = 8; static constexpr int nSTPhi = 24; static constexpr int nJets = 10; @@ -144,9 +143,9 @@ namespace gctobj { int index_i = 0; int index_j = 0; - for (int i = 0; i < nBarrelEta / 2 + 1; i += 3) { // 17+1 to divide into 6 super towers + for (int i = 0; i < nBarrelEta / 2 + 1; i += 3) { // 17+1 to divide into 6 supertowers, 7th and 8th to be set 0 index_j = 0; - for (int j = 0; j < nBarrelPhi; j += 3) { // 72 phi to 24 super towers + for (int j = 0; j < nBarrelPhi; j += 3) { // 72 phi to 24 supertowers stripEta[index_i][index_j][0] = ex_et[i][j] + ex_et[i][j + 1] + ex_et[i][j + 2]; stripEta[index_i][index_j][1] = ex_et[i + 1][j] + ex_et[i + 1][j + 1] + ex_et[i + 1][j + 2]; stripEta[index_i][index_j][2] = ex_et[i + 2][j] + ex_et[i + 2][j + 1] + ex_et[i + 2][j + 2]; @@ -163,20 +162,30 @@ namespace gctobj { for (int i = 0; i < nSTEta; i++) { for (int j = 0; j < nSTPhi; j++) { GCTsupertower_t temp; - float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; - temp.et = supertowerEt; - temp.eta = i; - temp.phi = j; - int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.towerEta = peakEta; - int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.towerPhi = peakPhi; - float peakEt = ex_et[i * 3 + peakEta][j * 3 + peakPhi]; - temp.towerEt = peakEt; - int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.centerEta = cEta; - int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.centerPhi = cPhi; + temp.et = 0; + temp.eta = 0; + temp.phi = 0; + temp.towerEta = 0; + temp.towerPhi = 0; + temp.towerEt = 0; + temp.centerEta = 0; + temp.centerPhi = 0; + if (i < 6) { + float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; + temp.et = supertowerEt; + temp.eta = i; + temp.phi = j; + int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.towerEta = peakEta; + int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.towerPhi = peakPhi; + float peakEt = ex_et[i * 3 + peakEta][j * 3 + peakPhi]; + temp.towerEt = peakEt; + int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.centerEta = cEta; + int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.centerPhi = cPhi; + } supertower_return[i][j] = temp; } } @@ -190,9 +199,9 @@ namespace gctobj { int index_i = 0; int index_j = 0; - for (int i = 0; i < nHgcalEta / 2; i += 3) { // 18 eta to 6 super towers + for (int i = 0; i < nHgcalEta / 2; i += 3) { // 18 eta to 6 supertowers, 7th and 8th to be set 0 index_j = 0; - for (int j = 0; j < nHgcalPhi; j += 3) { // 72 phi to 24 super towers + for (int j = 0; j < nHgcalPhi; j += 3) { // 72 phi to 24 supertowers stripEta[index_i][index_j][0] = hgcalTowers[i][j] + hgcalTowers[i][j + 1] + hgcalTowers[i][j + 2]; stripEta[index_i][index_j][1] = hgcalTowers[i + 1][j] + hgcalTowers[i + 1][j + 1] + hgcalTowers[i + 1][j + 2]; stripEta[index_i][index_j][2] = hgcalTowers[i + 2][j] + hgcalTowers[i + 2][j + 1] + hgcalTowers[i + 2][j + 2]; @@ -219,35 +228,37 @@ namespace gctobj { temp.towerEt = 0; temp.centerEta = 0; temp.centerPhi = 0; - float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; - temp.et = supertowerEt; - temp.eta = i; - temp.phi = j; - int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.towerEta = peakEta; - int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.towerPhi = peakPhi; - float peakEt = hgcalTowers[i * 3 + peakEta][j * 3 + peakPhi]; - temp.towerEt = peakEt; - int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.centerEta = cEta; - int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.centerPhi = cPhi; + if (i < 6) { + float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; + temp.et = supertowerEt; + temp.eta = i; + temp.phi = j; + int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.towerEta = peakEta; + int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.towerPhi = peakPhi; + float peakEt = hgcalTowers[i * 3 + peakEta][j * 3 + peakPhi]; + temp.towerEt = peakEt; + int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.centerEta = cEta; + int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.centerPhi = cPhi; + } supertower_return[i][j] = temp; } } } - inline void makeST_hf(const float hfTowers[nHfEta / 2][nHfPhi], GCTsupertower_t supertower_return[nSTEta][nSTPhi]) { + inline void makeST_hf(const float hfTowers[nHfEta][nHfPhi], GCTsupertower_t supertower_return[nSTEta][nSTPhi]) { float et_sumEta[nSTEta][nSTPhi][3]; float stripEta[nSTEta][nSTPhi][3]; float stripPhi[nSTEta][nSTPhi][3]; - int index_i = 0; // 5th and 6th ST to be set 0 + int index_i = 0; int index_j = 0; - for (int i = 0; i < nHfEta / 2; i += 3) { // 12 eta to 4 super towers + for (int i = 0; i < nHfEta; i += 3) { // 24 eta to 8 supertowers index_j = 0; - for (int j = 0; j < nHfPhi; j += 3) { // 72 phi to 24 super towers + for (int j = 0; j < nHfPhi; j += 3) { // 72 phi to 24 supertowers stripEta[index_i][index_j][0] = hfTowers[i][j] + hfTowers[i][j + 1] + hfTowers[i][j + 2]; stripEta[index_i][index_j][1] = hfTowers[i + 1][j] + hfTowers[i + 1][j + 1] + hfTowers[i + 1][j + 2]; stripEta[index_i][index_j][2] = hfTowers[i + 2][j] + hfTowers[i + 2][j + 1] + hfTowers[i + 2][j + 2]; @@ -273,22 +284,20 @@ namespace gctobj { temp.towerEt = 0; temp.centerEta = 0; temp.centerPhi = 0; - if (i < 4) { - float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; - temp.et = supertowerEt; - temp.eta = i; - temp.phi = j; - int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.towerEta = peakEta; - int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.towerPhi = peakPhi; - float peakEt = hfTowers[i * 3 + peakEta][j * 3 + peakPhi]; - temp.towerEt = peakEt; - int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); - temp.centerEta = cEta; - int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); - temp.centerPhi = cPhi; - } + float supertowerEt = et_sumEta[i][j][0] + et_sumEta[i][j][1] + et_sumEta[i][j][2]; + temp.et = supertowerEt; + temp.eta = i; + temp.phi = j; + int peakEta = getPeakBinOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.towerEta = peakEta; + int peakPhi = getPeakBinOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.towerPhi = peakPhi; + float peakEt = hfTowers[i * 3 + peakEta][j * 3 + peakPhi]; + temp.towerEt = peakEt; + int cEta = getEtCenterOf3(stripEta[i][j][0], stripEta[i][j][1], stripEta[i][j][2]); + temp.centerEta = cEta; + int cPhi = getEtCenterOf3(stripPhi[i][j][0], stripPhi[i][j][1], stripPhi[i][j][2]); + temp.centerPhi = cPhi; supertower_return[i][j] = temp; } } @@ -331,25 +340,26 @@ namespace gctobj { return bestOf24; } - inline towerMax getPeakBin6N(const etaStripPeak_t& etaStrip) { + inline towerMax getPeakBin8N(const etaStripPeak_t& etaStrip) { towerMax x; GCTsupertower_t best01 = bestOf2(etaStrip.pk[0], etaStrip.pk[1]); GCTsupertower_t best23 = bestOf2(etaStrip.pk[2], etaStrip.pk[3]); GCTsupertower_t best45 = bestOf2(etaStrip.pk[4], etaStrip.pk[5]); + GCTsupertower_t best67 = bestOf2(etaStrip.pk[6], etaStrip.pk[7]); GCTsupertower_t best0123 = bestOf2(best01, best23); - - GCTsupertower_t bestOf6 = bestOf2(best0123, best45); - - x.energy = bestOf6.et; - x.phi = bestOf6.phi; - x.eta = bestOf6.eta; - x.energyMax = bestOf6.towerEt; - x.etaMax = bestOf6.towerEta; - x.phiMax = bestOf6.towerPhi; - x.etaCenter = bestOf6.centerEta; - x.phiCenter = bestOf6.centerPhi; + GCTsupertower_t best4567 = bestOf2(best45, best67); + GCTsupertower_t bestOf8 = bestOf2(best0123, best4567); + + x.energy = bestOf8.et; + x.phi = bestOf8.phi; + x.eta = bestOf8.eta; + x.energyMax = bestOf8.towerEt; + x.etaMax = bestOf8.towerEta; + x.phiMax = bestOf8.towerPhi; + x.etaCenter = bestOf8.centerEta; + x.phiCenter = bestOf8.centerPhi; return x; } @@ -365,26 +375,26 @@ namespace gctobj { etaStripPeak.pk[i] = getPeakBin24N(test); } - towerMax peakIn6; - peakIn6 = getPeakBin6N(etaStripPeak); + towerMax peakIn8; + peakIn8 = getPeakBin8N(etaStripPeak); - jet.seedEnergy = peakIn6.energy; + jet.seedEnergy = peakIn8.energy; jet.energy = 0; jet.tauEt = 0; - jet.eta = peakIn6.eta; - jet.phi = peakIn6.phi; - jet.energyMax = peakIn6.energyMax; - jet.etaMax = peakIn6.etaMax; // overwritten in getJetValues - jet.phiMax = peakIn6.phiMax; // overwritten in getJetValues - jet.etaCenter = peakIn6.etaCenter; // overwritten in getJetValues - jet.phiCenter = peakIn6.phiCenter; // overwritten in getJetValues + jet.eta = peakIn8.eta; + jet.phi = peakIn8.phi; + jet.energyMax = peakIn8.energyMax; + jet.etaMax = peakIn8.etaMax; // overwritten in getJetValues + jet.phiMax = peakIn8.phiMax; // overwritten in getJetValues + jet.etaCenter = peakIn8.etaCenter; // overwritten in getJetValues + jet.phiCenter = peakIn8.phiCenter; // overwritten in getJetValues return jet; } inline jetInfo getJetValues(GCTsupertower_t tempX[nSTEta][nSTPhi], int seed_eta, int seed_phi) { float temp[nSTEta + 2][nSTPhi + 2]; - float eta_slice[3] = {0.f, 0.f, 0.f}; + float eta_slice[3] = {0.}; jetInfo jet_tmp; for (int i = 0; i < nSTEta + 2; i++) { @@ -419,7 +429,7 @@ namespace gctobj { } jet_tmp.energy = eta_slice[0] + eta_slice[1] + eta_slice[2]; - jet_tmp.tauEt = eta_slice[1]; //set tau Pt to be sum of ST energies in center eta slice */ + jet_tmp.tauEt = eta_slice[1]; //set tau Pt to be sum of ST energies in center eta slice // To find the jet centre: note that seed supertower is always (1, 1) jet_tmp.etaCenter = 3 * seed_eta + tempX[seed_eta][seed_phi].centerEta; //this is the ET weighted eta centre of the ST @@ -446,12 +456,9 @@ namespace gctobj { jet_tmp = getJetPosition(temp); int seed_phi = jet_tmp.phi; int seed_eta = jet_tmp.eta; - float seed_energy = jet_tmp.seedEnergy; float seed_tower_energy = jet_tmp.energyMax; jet = getJetValues(temp, seed_eta, seed_phi); - if (seed_energy > 10. && - seed_tower_energy > - TTseedThreshold) { // suppress <= 10 GeV ST as ST seed and <=5 GeV (3 GeV) as max TT in ST barrel/HF (endcap) + if (seed_tower_energy > TTseedThreshold) { // suppress ST seeds with max TT <=5 GeV (3 GeV) in barrel (endcap/HF) jet_tmp.energy = jet.energy; jet_tmp.tauEt = jet.tauEt; } else { diff --git a/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloPFClusterEmulator.h b/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloPFClusterEmulator.h index 376c4a8c98d09..661525d244c15 100644 --- a/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloPFClusterEmulator.h +++ b/L1Trigger/L1CaloTrigger/interface/Phase2L1CaloPFClusterEmulator.h @@ -23,6 +23,9 @@ static constexpr int nSLR = 36; static constexpr int nTowerEtaSLR = 21; // including overlap: 2+17+2 static constexpr int nTowerPhiSLR = 8; // including overlap: 2+4+2 static constexpr int nPFClusterSLR = 8; +static constexpr int nHfEta = 24; +static constexpr int nHfPhi = 72; +static constexpr int nHfRegions = 12; namespace gctpf { @@ -46,14 +49,26 @@ namespace gctpf { GCTint_t t[nTowerPhiSLR]; } GCTEtaStrip_t; + typedef struct { + GCTint_t t[nHfPhi / 6]; + } GCTEtaHFStrip_t; + typedef struct { GCTint_t p[nTowerEtaSLR - 2]; } GCTEtaStripPeak_t; + typedef struct { + GCTint_t p[nHfEta]; + } GCTEtaHFStripPeak_t; + typedef struct { GCTEtaStrip_t s[nTowerEtaSLR]; } Region_t; + typedef struct { + GCTEtaHFStrip_t s[nHfEta]; + } RegionHF_t; + inline GCTint_t bestOf2(const GCTint_t& t0, const GCTint_t& t1) { GCTint_t x; x = (t0.et > t1.et) ? t0 : t1; @@ -71,6 +86,22 @@ namespace gctpf { return bestAll; } + inline GCTint_t getPeakOfHFStrip(const GCTEtaHFStrip_t& etaStrip) { + GCTint_t best01 = bestOf2(etaStrip.t[0], etaStrip.t[1]); + GCTint_t best23 = bestOf2(etaStrip.t[2], etaStrip.t[3]); + GCTint_t best45 = bestOf2(etaStrip.t[4], etaStrip.t[5]); + GCTint_t best67 = bestOf2(etaStrip.t[6], etaStrip.t[7]); + GCTint_t best89 = bestOf2(etaStrip.t[8], etaStrip.t[9]); + GCTint_t best1011 = bestOf2(etaStrip.t[10], etaStrip.t[11]); + GCTint_t best0123 = bestOf2(best01, best23); + GCTint_t best4567 = bestOf2(best45, best67); + GCTint_t best891011 = bestOf2(best89, best1011); + GCTint_t best01234567 = bestOf2(best0123, best4567); + GCTint_t bestAll = bestOf2(best01234567, best891011); + + return bestAll; + } + inline GCTint_t getPeakBin(const GCTEtaStripPeak_t& etaStripPeak) { GCTint_t best01 = bestOf2(etaStripPeak.p[0], etaStripPeak.p[1]); GCTint_t best23 = bestOf2(etaStripPeak.p[2], etaStripPeak.p[3]); @@ -94,6 +125,34 @@ namespace gctpf { return bestAll; } + inline GCTint_t getPeakBinHF(const GCTEtaHFStripPeak_t& etaStripPeak) { + GCTint_t best01 = bestOf2(etaStripPeak.p[0], etaStripPeak.p[1]); + GCTint_t best23 = bestOf2(etaStripPeak.p[2], etaStripPeak.p[3]); + GCTint_t best45 = bestOf2(etaStripPeak.p[4], etaStripPeak.p[5]); + GCTint_t best67 = bestOf2(etaStripPeak.p[6], etaStripPeak.p[7]); + GCTint_t best89 = bestOf2(etaStripPeak.p[8], etaStripPeak.p[9]); + GCTint_t best1011 = bestOf2(etaStripPeak.p[10], etaStripPeak.p[11]); + GCTint_t best1213 = bestOf2(etaStripPeak.p[12], etaStripPeak.p[13]); + GCTint_t best1415 = bestOf2(etaStripPeak.p[14], etaStripPeak.p[15]); + GCTint_t best1617 = bestOf2(etaStripPeak.p[16], etaStripPeak.p[17]); + GCTint_t best1819 = bestOf2(etaStripPeak.p[18], etaStripPeak.p[19]); + GCTint_t best2021 = bestOf2(etaStripPeak.p[20], etaStripPeak.p[21]); + GCTint_t best2223 = bestOf2(etaStripPeak.p[22], etaStripPeak.p[23]); + GCTint_t best0123 = bestOf2(best01, best23); + GCTint_t best4567 = bestOf2(best45, best67); + GCTint_t best891011 = bestOf2(best89, best1011); + GCTint_t best12131415 = bestOf2(best1213, best1415); + GCTint_t best16171819 = bestOf2(best1617, best1819); + GCTint_t best20212223 = bestOf2(best2021, best2223); + GCTint_t best0to7 = bestOf2(best0123, best4567); + GCTint_t best8to15 = bestOf2(best891011, best12131415); + GCTint_t best16to23 = bestOf2(best16171819, best20212223); + GCTint_t best0to15 = bestOf2(best0to7, best8to15); + GCTint_t bestAll = bestOf2(best0to15, best16to23); + + return bestAll; + } + inline GCTint_t getPeakPosition(const Region_t& region) { GCTEtaStripPeak_t etaPeak; for (int i = 0; i < nTowerEtaSLR - 2; i++) { @@ -104,6 +163,16 @@ namespace gctpf { return max; } + inline GCTint_t getPeakPositionHF(const RegionHF_t& region) { + GCTEtaHFStripPeak_t etaPeak; + for (int i = 0; i < nHfPhi / 6; i++) { + etaPeak.p[i] = getPeakOfHFStrip(region.s[i]); + } + GCTint_t max = getPeakBinHF(etaPeak); + + return max; + } + inline Region_t initStructure(float temp[nTowerEtaSLR][nTowerPhiSLR]) { Region_t r; @@ -118,6 +187,20 @@ namespace gctpf { return r; } + inline RegionHF_t initStructureHF(float temp[nHfEta][nHfPhi / 6]) { + RegionHF_t r; + + for (int i = 0; i < nHfPhi / 6; i++) { + for (int j = 0; j < nHfEta; j++) { + r.s[j].t[i].et = temp[j][i]; + r.s[j].t[i].eta = j; + r.s[j].t[i].phi = i; + } + } + + return r; + } + inline float getEt(float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi) { float et_sumEta[3] = {0., 0., 0.}; @@ -136,6 +219,37 @@ namespace gctpf { return pfcluster_et; } + inline float getEtHF(float temp[nHfEta][nHfPhi / 6], int eta, int phi) { + float tempX[nHfEta + 2][nHfPhi / 6 + 2]; + float et_sumEta[3] = {0., 0., 0.}; + + for (int i = 0; i < nHfEta + 2; i++) { + for (int k = 0; k < nHfPhi / 6 + 2; k++) { + tempX[i][k] = 0; + } + } + + for (int i = 0; i < nHfEta; i++) { + for (int k = 0; k < nHfPhi / 6; k++) { + tempX[i + 1][k + 1] = temp[i][k]; + } + } + + for (int i = 0; i < nHfEta; i++) { + for (int j = 0; j < nHfPhi / 6; j++) { + if (i == eta && j == phi) { + for (int k = 0; k < 3; k++) { + et_sumEta[k] = tempX[i + k][j] + tempX[i + k][j + 1] + tempX[i + k][j + 2]; + } + } + } + } + + float pfcluster_et = et_sumEta[0] + et_sumEta[1] + et_sumEta[2]; + + return pfcluster_et; + } + inline void RemoveTmp(float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi) { for (int i = 0; i < nTowerEtaSLR; i++) { if (i + 1 >= eta && i <= eta + 1) { @@ -150,6 +264,20 @@ namespace gctpf { return; } + inline void RemoveTmpHF(float temp[nHfEta][nHfPhi / 6], int eta, int phi) { + for (int i = 0; i < nHfEta; i++) { + if (i + 1 >= eta && i <= eta + 1) { + for (int j = 0; j < nHfPhi / 6; j++) { + if (j + 1 >= phi && j <= phi + 1) { + temp[i][j] = 0; + } + } + } + } + + return; + } + inline GCTpfcluster_t recoPfcluster(float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset) { GCTpfcluster_t pfclusterReturn; @@ -174,6 +302,28 @@ namespace gctpf { return pfclusterReturn; } + inline GCTpfcluster_t recoPfclusterHF(float temporary[nHfEta][nHfPhi / 6], int etaoffset, int phioffset) { + GCTpfcluster_t pfclusterReturn; + + RegionHF_t region; + + region = initStructureHF(temporary); + + GCTint_t regionMax = getPeakPositionHF(region); + + float pfcluster_et = getEtHF(temporary, regionMax.eta, regionMax.phi); + + RemoveTmpHF(temporary, regionMax.eta, regionMax.phi); + + pfclusterReturn.et = pfcluster_et; + pfclusterReturn.eta = regionMax.eta + etaoffset; + pfclusterReturn.phi = regionMax.phi + phioffset; + if (pfclusterReturn.phi < 0) + pfclusterReturn.phi += nHfPhi; + + return pfclusterReturn; + } + inline PFcluster_t pfcluster(float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset) { GCTpfcluster_t pfcluster[nPFClusterSLR]; @@ -192,6 +342,24 @@ namespace gctpf { return GCTPfclusters; } + inline PFcluster_t pfclusterHF(float temporary[nHfEta][nHfPhi / 6], int etaoffset, int phioffset) { + GCTpfcluster_t pfcluster[nPFClusterSLR]; + + for (int i = 0; i < nPFClusterSLR; i++) { + pfcluster[i] = recoPfclusterHF(temporary, etaoffset, phioffset); + } + + PFcluster_t GCTPfclusters; + + for (int i = 0; i < nPFClusterSLR; i++) { + GCTPfclusters.GCTpfclusters[i].et = pfcluster[i].et; + GCTPfclusters.GCTpfclusters[i].eta = pfcluster[i].eta; + GCTPfclusters.GCTpfclusters[i].phi = pfcluster[i].phi; + } + + return GCTPfclusters; + } + } // namespace gctpf #endif diff --git a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc index a039cf7f20934..fd61b01dade23 100644 --- a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc +++ b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc @@ -349,19 +349,22 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& float temporary_hgcal[nHgcalEta / 2][nHgcalPhi]; // Assign ETs to each eta-half of the forward region (12x72) - float hfTowers[nHfEta][nHfPhi]; + float hfTowers[2 * nHfEta][nHfPhi]; // split 12 -> 24 float hfEta[nHfEta][nHfPhi]; float hfPhi[nHfEta][nHfPhi]; for (int iphi = 0; iphi < nHfPhi; iphi++) { + //std::cout<= (l1t::CaloTools::kHFBegin + 1)) { ieta = nHfEta / 2 + (hit.id().ieta() - (l1t::CaloTools::kHFBegin + 1)); } - int iphi = 0; - if (hit.id().iphi() <= nHfPhi / 2) - iphi = hit.id().iphi() + (nHfPhi / 2 - 1); - else if (hit.id().iphi() > nHfPhi / 2) - iphi = hit.id().iphi() - (nHfPhi / 2 + 1); + int iphi = hit.id().iphi() - 1; // HF phi runs between 1-72 + //std::cout<= 29) et = et - all_nvtx_to_PU_sub_funcs["hf"]["er29to33"].Eval(EstimatedNvtx); if (abs(hit.id().ieta()) <= 37 && abs(hit.id().ieta()) >= 34) @@ -390,11 +390,29 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& et = et - all_nvtx_to_PU_sub_funcs["hf"]["er38to41"].Eval(EstimatedNvtx); if (et < 0) et = 0; - if (et > 1.) - hfTowers[ieta][iphi] = et; // suppress <= 1 GeV towers + //if (et > 1.) + // hfTowers[ieta][iphi] = et; // suppress <= 1 GeV towers + // split tower energy + hfTowers[2 * ieta][iphi] = et / 2; + hfTowers[2 * ieta + 1][iphi] = et / 2; + if ((ieta < 2 || ieta >= nHfEta - 2) && iphi % 4 == 2) { + hfTowers[2 * ieta][iphi] = et / 8; + hfTowers[2 * ieta + 1][iphi] = et / 8; + hfTowers[2 * ieta][iphi + 1] = et / 8; + hfTowers[2 * ieta + 1][iphi + 1] = et / 8; + hfTowers[2 * ieta][iphi + 2] = et / 8; + hfTowers[2 * ieta + 1][iphi + 2] = et / 8; + hfTowers[2 * ieta][iphi + 3] = et / 8; + hfTowers[2 * ieta + 1][iphi + 3] = et / 8; + } else if ((ieta >= 2 && ieta < nHfEta - 2) && iphi % 2 == 0) { + hfTowers[2 * ieta][iphi] = et / 4; + hfTowers[2 * ieta + 1][iphi] = et / 4; + hfTowers[2 * ieta][iphi + 1] = et / 4; + hfTowers[2 * ieta + 1][iphi + 1] = et / 4; + } } - float temporary_hf[nHfEta / 2][nHfPhi]; + float temporary_hf[nHfEta][nHfPhi]; // Begin creating jets // First create 3x3 super towers: 6x24 in barrel, endcap; 4x24 in forward @@ -508,21 +526,21 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& // HF for (int iphi = 0; iphi < nHfPhi; iphi++) { - for (int ieta = 0; ieta < nHfEta / 2; ieta++) { + for (int ieta = 0; ieta < nHfEta; ieta++) { if (k == 0) temporary_hf[ieta][iphi] = hfTowers[ieta][iphi]; else - temporary_hf[ieta][iphi] = hfTowers[nHfEta / 2 + ieta][iphi]; + temporary_hf[ieta][iphi] = hfTowers[nHfEta + ieta][iphi]; } } gctobj::GCTsupertower_t tempST_hf[nSTEta][nSTPhi]; gctobj::makeST_hf(temporary_hf, tempST_hf); - float TTseedThresholdHF = 5.; + float TTseedThresholdHF = 3.; for (int i = 2 * nJets; i < 3 * nJets; i++) { jet[i] = gctobj::getRegion(tempST_hf, TTseedThresholdHF); l1tp2::Phase2L1CaloJet tempJet; - int hfjeteta = jet[i].etaCenter; + int hfjeteta = jet[i].etaCenter / 2; // 24 -> 12 towers int hfjetphi = jet[i].phiCenter; tempJet.setJetIEta(hfjeteta + k * nHfEta / 2); tempJet.setJetIPhi(hfjetphi); @@ -533,7 +551,7 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& tempJet.setJetEt(get_jet_pt_calibration(jet[i].energy, jeteta)); tempJet.setTauEt(get_tau_pt_calibration(jet[i].tauEt, jeteta)); tempJet.setTowerEt(jet[i].energyMax); - int hftowereta = jet[i].etaMax; + int hftowereta = jet[i].etaMax / 2; // 24 -> 12 towers int hftowerphi = jet[i].phiMax; tempJet.setTowerIEta(hftowereta + k * nHfEta / 2); tempJet.setTowerIPhi(hftowerphi); diff --git a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc index 8c6d0a1465579..b175a57874c98 100644 --- a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc +++ b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc @@ -33,6 +33,11 @@ #include "DataFormats/L1TCalorimeterPhase2/interface/CaloTower.h" #include "DataFormats/L1TCalorimeterPhase2/interface/CaloPFCluster.h" #include "DataFormats/L1Trigger/interface/EGamma.h" +#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" +#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h" +#include "CalibFormats/CaloTPG/interface/CaloTPGTranscoder.h" +#include "CalibFormats/CaloTPG/interface/CaloTPGRecord.h" +#include "L1Trigger/L1TCalorimeter/interface/CaloTools.h" #include #include @@ -56,14 +61,18 @@ class Phase2L1CaloPFClusterEmulator : public edm::stream::EDProducer<> { void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- - const edm::EDGetTokenT caloTowerToken_; + edm::EDGetTokenT caloTowerToken_; + edm::EDGetTokenT hfToken_; + edm::ESGetToken decoderTag_; }; // // constructors and destructor // Phase2L1CaloPFClusterEmulator::Phase2L1CaloPFClusterEmulator(const edm::ParameterSet& iConfig) - : caloTowerToken_(consumes(iConfig.getParameter("gctFullTowers"))) { + : caloTowerToken_(consumes(iConfig.getParameter("gctFullTowers"))), + hfToken_(consumes(iConfig.getParameter("hcalDigis"))), + decoderTag_(esConsumes(edm::ESInputTag("", ""))) { produces("GCTPFCluster"); } @@ -163,6 +172,148 @@ void Phase2L1CaloPFClusterEmulator::produce(edm::Event& iEvent, const edm::Event } } + edm::Handle hfHandle; + if (!iEvent.getByToken(hfToken_, hfHandle)) + edm::LogError("Phase2L1CaloJetEmulator") << "Failed to get HcalTrigPrimDigi for HF!"; + iEvent.getByToken(hfToken_, hfHandle); + + float hfTowers[2 * nHfEta][nHfPhi]; // split 12 -> 24 + float hfEta[nHfEta][nHfPhi]; + float hfPhi[nHfEta][nHfPhi]; + for (int iphi = 0; iphi < nHfPhi; iphi++) { + for (int ieta = 0; ieta < nHfEta; ieta++) { + hfTowers[2 * ieta][iphi] = 0; + hfTowers[2 * ieta + 1][iphi] = 0; + int temp; + if (ieta < nHfEta / 2) + temp = ieta - l1t::CaloTools::kHFEnd; + else + temp = ieta - nHfEta / 2 + l1t::CaloTools::kHFBegin + 1; + hfEta[ieta][iphi] = l1t::CaloTools::towerEta(temp); + hfPhi[ieta][iphi] = l1t::CaloTools::towerPhi(temp, iphi + 1); + } + } + + float regionsHF[nHfRegions][nHfEta] + [nHfPhi / + 6]; // 6 regions each 3 sectors (1 sector = 20 deg in phi), 12x12->24x12 unique towers, no overlap in phi + + for (int ieta = 0; ieta < nHfEta; ieta++) { + for (int iphi = 0; iphi < nHfPhi / 6; iphi++) { + for (int k = 0; k < nHfRegions; k++) { + regionsHF[k][ieta][iphi] = 0.; + } + } + } + + // Assign ET to 12 24x12 regions + const auto& decoder = iSetup.getData(decoderTag_); + for (const auto& hit : *hfHandle.product()) { + double et = decoder.hcaletValue(hit.id(), hit.t0()); + int ieta = 0; + if (abs(hit.id().ieta()) < l1t::CaloTools::kHFBegin) + continue; + if (abs(hit.id().ieta()) > l1t::CaloTools::kHFEnd) + continue; + if (hit.id().ieta() <= -(l1t::CaloTools::kHFBegin + 1)) { + ieta = hit.id().ieta() + l1t::CaloTools::kHFEnd; + } else if (hit.id().ieta() >= (l1t::CaloTools::kHFBegin + 1)) { + ieta = nHfEta / 2 + (hit.id().ieta() - (l1t::CaloTools::kHFBegin + 1)); + } + int iphi = hit.id().iphi() - 1; // HF phi runs between 1-72 + //std::cout<= nHfEta - 2) && iphi % 4 == 2) { + hfTowers[2 * ieta][iphi] = et / 8; + hfTowers[2 * ieta + 1][iphi] = et / 8; + hfTowers[2 * ieta][iphi + 1] = et / 8; + hfTowers[2 * ieta + 1][iphi + 1] = et / 8; + hfTowers[2 * ieta][iphi + 2] = et / 8; + hfTowers[2 * ieta + 1][iphi + 2] = et / 8; + hfTowers[2 * ieta][iphi + 3] = et / 8; + hfTowers[2 * ieta + 1][iphi + 3] = et / 8; + } else if ((ieta >= 2 && ieta < nHfEta - 2) && iphi % 2 == 0) { + hfTowers[2 * ieta][iphi] = et / 4; + hfTowers[2 * ieta + 1][iphi] = et / 4; + hfTowers[2 * ieta][iphi + 1] = et / 4; + hfTowers[2 * ieta + 1][iphi + 1] = et / 4; + } + } + + // for (int iphi = 0; iphi < nHfPhi; iphi++) { + // for (int ieta = 0; ieta < 2*nHfEta; ieta++) { + // std::cout< 1) + regionsHF[k][ieta][iphi] = hfTowers[ieta][iphi + k * (nHfRegions / 2) - 2]; + } + } else { + regionsHF[1][ieta - nHfEta][0] = hfTowers[ieta][70]; + regionsHF[1][ieta - nHfEta][1] = hfTowers[ieta][71]; + for (int k = 1; k < nHfRegions; k += 2) { + if (k != 1 || iphi > 1) + regionsHF[k][ieta - nHfEta][iphi] = hfTowers[ieta][iphi + (k - 1) * (nHfRegions / 2) - 2]; + } + } + } + } + + // for (int k = 0; k < 12; k++) { + // std::cout<<"------------"< 1 && k % 2 == 0) + phioffsetHF = phioffsetHF + nHfPhi / 6; + + gctpf::PFcluster_t tempPfclustersHF; + tempPfclustersHF = gctpf::pfclusterHF(temporaryHF, etaoffsetHF, phioffsetHF); + + for (int i = 0; i < nPFClusterSLR; i++) { + int hfeta = tempPfclustersHF.GCTpfclusters[i].eta / 2; // turn back 24 -> 12 + int hfphi = tempPfclustersHF.GCTpfclusters[i].phi; + float towereta = hfEta[hfeta][hfphi]; + float towerphi = hfPhi[hfeta][hfphi]; + l1tp2::CaloPFCluster l1CaloPFCluster; + l1CaloPFCluster.setClusterEt(tempPfclustersHF.GCTpfclusters[i].et); + l1CaloPFCluster.setClusterIEta(hfeta); + l1CaloPFCluster.setClusterIPhi(hfphi); + l1CaloPFCluster.setClusterEta(towereta); + l1CaloPFCluster.setClusterPhi(towerphi); + pfclusterCands->push_back(l1CaloPFCluster); + } + } + iEvent.put(std::move(pfclusterCands), "GCTPFCluster"); } @@ -170,6 +321,7 @@ void Phase2L1CaloPFClusterEmulator::produce(edm::Event& iEvent, const edm::Event void Phase2L1CaloPFClusterEmulator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.add("gctFullTowers", edm::InputTag("l1tPhase2L1CaloEGammaEmulator", "GCTFullTowers")); + desc.add("hcalDigis", edm::InputTag("simHcalTriggerPrimitiveDigis")); descriptions.addWithDefaultLabel(desc); } diff --git a/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloJetEmulator_cfi.py b/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloJetEmulator_cfi.py index cb87a253491b1..f13c9b6c801c9 100644 --- a/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloJetEmulator_cfi.py +++ b/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloJetEmulator_cfi.py @@ -85,39 +85,39 @@ nvtx_params = cms.vdouble( -0.229562, 0.050560 ) ), ), - # Calibrations derived 4 April 2024 on 14_0_0_pre3 131X QCD sample + # Calibrations derived 26 June 2024 on 14_0_0_pre3 131X QCD sample jetPtBins = cms.vdouble([ 0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,75.0,80.0,85.0,90.0,95.0,100.0,110.0,120.0,130.0,140.0,150.0,160.0,170.0,180.0,190.0,200.0,225.0,250.0,275.0,300.0,325.0,400.0,500.0]), absEtaBinsBarrel = cms.vdouble([ 0.00,0.30,0.60,1.00,1.50]), jetCalibrationsBarrel = cms.vdouble([ - 2.221, 2.009, 1.943, 1.884, 1.833, 1.789, 1.749, 1.715, 1.685, 1.658, 1.635, 1.614, 1.595, 1.579, 1.564, 1.551, 1.540, 1.524, 1.507, 1.493, 1.481, 1.470, 1.461, 1.453, 1.446, 1.439, 1.432, 1.421, 1.407, 1.393, 1.380, 1.366, 1.340, 1.294, - 1.886, 1.760, 1.718, 1.680, 1.646, 1.615, 1.587, 1.562, 1.539, 1.519, 1.500, 1.483, 1.467, 1.453, 1.440, 1.429, 1.418, 1.404, 1.387, 1.373, 1.361, 1.351, 1.342, 1.334, 1.327, 1.321, 1.315, 1.306, 1.294, 1.284, 1.274, 1.265, 1.247, 1.217, - 2.032, 1.818, 1.755, 1.702, 1.657, 1.619, 1.587, 1.560, 1.536, 1.516, 1.499, 1.484, 1.471, 1.460, 1.450, 1.441, 1.433, 1.423, 1.411, 1.400, 1.391, 1.383, 1.375, 1.367, 1.360, 1.353, 1.346, 1.335, 1.318, 1.301, 1.285, 1.268, 1.236, 1.178, - 2.762, 2.411, 2.304, 2.213, 2.135, 2.067, 2.009, 1.959, 1.916, 1.878, 1.846, 1.817, 1.792, 1.770, 1.750, 1.732, 1.717, 1.696, 1.673, 1.653, 1.635, 1.620, 1.606, 1.592, 1.580, 1.568, 1.556, 1.536, 1.508, 1.481, 1.454, 1.427, 1.373, 1.279, + 2.256, 2.007, 1.932, 1.869, 1.816, 1.770, 1.731, 1.697, 1.668, 1.643, 1.622, 1.603, 1.587, 1.573, 1.561, 1.550, 1.540, 1.527, 1.513, 1.500, 1.490, 1.481, 1.472, 1.464, 1.457, 1.449, 1.442, 1.431, 1.414, 1.397, 1.381, 1.365, 1.332, 1.276, + 1.847, 1.733, 1.695, 1.661, 1.630, 1.601, 1.576, 1.552, 1.531, 1.512, 1.495, 1.479, 1.464, 1.451, 1.439, 1.428, 1.418, 1.404, 1.388, 1.375, 1.363, 1.353, 1.344, 1.336, 1.329, 1.323, 1.317, 1.308, 1.296, 1.285, 1.275, 1.265, 1.247, 1.215, + 1.934, 1.775, 1.726, 1.683, 1.646, 1.613, 1.585, 1.560, 1.538, 1.519, 1.502, 1.488, 1.474, 1.462, 1.452, 1.442, 1.434, 1.422, 1.409, 1.398, 1.388, 1.379, 1.371, 1.363, 1.356, 1.349, 1.342, 1.331, 1.316, 1.300, 1.285, 1.270, 1.240, 1.188, + 2.731, 2.353, 2.244, 2.153, 2.076, 2.012, 1.958, 1.912, 1.873, 1.840, 1.811, 1.787, 1.766, 1.747, 1.731, 1.716, 1.703, 1.686, 1.666, 1.649, 1.634, 1.620, 1.607, 1.594, 1.582, 1.570, 1.558, 1.537, 1.509, 1.480, 1.451, 1.423, 1.365, 1.265, ]), absEtaBinsHGCal = cms.vdouble([ 1.50,1.90,2.40,3.00]), jetCalibrationsHGCal = cms.vdouble([ - 2.620, 2.126, 2.008, 1.919, 1.852, 1.802, 1.764, 1.735, 1.712, 1.695, 1.682, 1.671, 1.663, 1.657, 1.651, 1.647, 1.643, 1.638, 1.633, 1.628, 1.624, 1.620, 1.617, 1.613, 1.609, 1.606, 1.602, 1.596, 1.587, 1.578, 1.569, 1.560, 1.542, 1.511, - 6.766, 1.454, 1.273, 1.221, 1.207, 1.204, 1.204, 1.205, 1.207, 1.209, 1.210, 1.212, 1.214, 1.215, 1.217, 1.219, 1.221, 1.223, 1.226, 1.230, 1.233, 1.237, 1.240, 1.243, 1.247, 1.250, 1.253, 1.259, 1.268, 1.276, 1.285, 1.293, 1.310, 1.340, - 3.635, 2.281, 1.968, 1.737, 1.566, 1.441, 1.349, 1.281, 1.232, 1.197, 1.172, 1.154, 1.142, 1.133, 1.128, 1.125, 1.124, 1.125, 1.128, 1.133, 1.139, 1.145, 1.152, 1.159, 1.166, 1.174, 1.181, 1.193, 1.211, 1.229, 1.247, 1.265, 1.301, 1.364, + 2.413, 1.721, 1.617, 1.556, 1.519, 1.497, 1.484, 1.476, 1.471, 1.467, 1.465, 1.463, 1.462, 1.460, 1.459, 1.458, 1.458, 1.456, 1.454, 1.453, 1.451, 1.449, 1.448, 1.446, 1.444, 1.442, 1.441, 1.438, 1.433, 1.429, 1.425, 1.420, 1.412, 1.397, + 1.555, 1.307, 1.240, 1.187, 1.145, 1.112, 1.086, 1.066, 1.050, 1.038, 1.030, 1.023, 1.018, 1.015, 1.014, 1.013, 1.013, 1.014, 1.018, 1.023, 1.028, 1.034, 1.041, 1.047, 1.054, 1.061, 1.068, 1.080, 1.098, 1.115, 1.133, 1.150, 1.186, 1.247, + 3.097, 1.989, 1.721, 1.518, 1.365, 1.250, 1.163, 1.099, 1.051, 1.016, 0.991, 0.973, 0.960, 0.952, 0.947, 0.944, 0.944, 0.945, 0.951, 0.958, 0.967, 0.977, 0.987, 0.997, 1.008, 1.018, 1.029, 1.048, 1.074, 1.101, 1.128, 1.154, 1.208, 1.301, ]), absEtaBinsHF = cms.vdouble([ 3.00,3.60,6.00]), jetCalibrationsHF = cms.vdouble([ - 4.632, 3.392, 3.056, 2.784, 2.563, 2.385, 2.239, 2.121, 2.024, 1.944, 1.877, 1.822, 1.776, 1.737, 1.703, 1.674, 1.649, 1.617, 1.580, 1.549, 1.522, 1.497, 1.474, 1.451, 1.429, 1.408, 1.386, 1.349, 1.297, 1.244, 1.192, 1.140, 1.036, 0.853, - 2.092, 1.771, 1.675, 1.593, 1.524, 1.465, 1.414, 1.371, 1.335, 1.303, 1.276, 1.253, 1.233, 1.216, 1.201, 1.187, 1.176, 1.161, 1.145, 1.132, 1.122, 1.113, 1.105, 1.098, 1.091, 1.085, 1.080, 1.070, 1.057, 1.044, 1.031, 1.019, 0.994, 0.950, + 4.353, 3.282, 2.979, 2.730, 2.525, 2.355, 2.215, 2.098, 2.001, 1.920, 1.853, 1.796, 1.748, 1.707, 1.672, 1.642, 1.616, 1.582, 1.546, 1.517, 1.492, 1.469, 1.449, 1.430, 1.412, 1.395, 1.378, 1.348, 1.307, 1.267, 1.226, 1.186, 1.104, 0.963, + 2.155, 1.822, 1.722, 1.637, 1.564, 1.502, 1.449, 1.403, 1.364, 1.331, 1.302, 1.277, 1.256, 1.237, 1.221, 1.206, 1.194, 1.178, 1.160, 1.146, 1.134, 1.124, 1.116, 1.108, 1.101, 1.094, 1.087, 1.077, 1.062, 1.048, 1.034, 1.020, 0.992, 0.943, ]), - # Calibrations derived 4 April 2024 on 14_0_0_pre3 131X VBFHiggsTauTau sample + # Calibrations derived 6 June 2024 on 14_0_0_pre3 131X VBFHiggsTauTau sample tauPtBins = cms.vdouble([ 0.0,10.0,15.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,70.0,80.0,100.0,150.0,200.0]), tauAbsEtaBinsBarrel = cms.vdouble([ 0.00,0.30,0.60,1.00,1.50]), tauCalibrationsBarrel = cms.vdouble([ - 1.978, 1.661, 1.517, 1.411, 1.333, 1.276, 1.233, 1.202, 1.179, 1.162, 1.150, 1.137, 1.127, 1.119, 1.115, 1.115, - 1.912, 1.641, 1.512, 1.414, 1.338, 1.281, 1.237, 1.203, 1.177, 1.158, 1.143, 1.127, 1.113, 1.102, 1.095, 1.094, - 1.989, 1.683, 1.541, 1.434, 1.353, 1.292, 1.246, 1.211, 1.185, 1.166, 1.151, 1.135, 1.122, 1.113, 1.107, 1.106, - 2.734, 2.129, 1.860, 1.665, 1.523, 1.420, 1.346, 1.292, 1.252, 1.224, 1.203, 1.182, 1.166, 1.155, 1.149, 1.148, + 1.936, 1.643, 1.508, 1.408, 1.332, 1.276, 1.235, 1.204, 1.180, 1.163, 1.150, 1.137, 1.126, 1.118, 1.113, 1.112, + 1.905, 1.637, 1.510, 1.413, 1.338, 1.281, 1.237, 1.204, 1.178, 1.159, 1.144, 1.128, 1.114, 1.103, 1.096, 1.095, + 1.941, 1.663, 1.531, 1.430, 1.353, 1.294, 1.249, 1.215, 1.188, 1.168, 1.153, 1.136, 1.122, 1.111, 1.104, 1.103, + 2.692, 2.109, 1.849, 1.659, 1.520, 1.419, 1.346, 1.292, 1.253, 1.224, 1.203, 1.182, 1.166, 1.154, 1.148, 1.147, ]), tauAbsEtaBinsHGCal = cms.vdouble([ 1.50,1.90,2.40,3.00]), tauCalibrationsHGCal = cms.vdouble([ - 3.528, 2.418, 2.003, 1.740, 1.573, 1.466, 1.399, 1.356, 1.329, 1.312, 1.301, 1.292, 1.286, 1.283, 1.282, 1.282, - 3.196, 2.328, 1.990, 1.770, 1.625, 1.531, 1.470, 1.429, 1.403, 1.386, 1.374, 1.364, 1.358, 1.355, 1.353, 1.353, - 5.837, 3.089, 2.205, 1.704, 1.421, 1.260, 1.170, 1.118, 1.089, 1.073, 1.063, 1.056, 1.053, 1.052, 1.051, 1.051, + 3.047, 2.104, 1.762, 1.550, 1.418, 1.336, 1.285, 1.254, 1.234, 1.222, 1.215, 1.208, 1.205, 1.203, 1.202, 1.202, + 3.401, 2.104, 1.718, 1.513, 1.403, 1.345, 1.313, 1.297, 1.288, 1.283, 1.281, 1.279, 1.278, 1.278, 1.278, 1.278, + 4.381, 2.648, 2.012, 1.613, 1.364, 1.208, 1.110, 1.049, 1.010, 0.986, 0.971, 0.959, 0.951, 0.947, 0.946, 0.946, ]), ) \ No newline at end of file diff --git a/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloPFClusterEmulator_cfi.py b/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloPFClusterEmulator_cfi.py index b6d52f5d7bc93..2fd9624d82f61 100644 --- a/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloPFClusterEmulator_cfi.py +++ b/L1Trigger/L1CaloTrigger/python/l1tPhase2CaloPFClusterEmulator_cfi.py @@ -2,4 +2,5 @@ l1tPhase2CaloPFClusterEmulator = cms.EDProducer("Phase2L1CaloPFClusterEmulator", gctFullTowers = cms.InputTag("l1tPhase2L1CaloEGammaEmulator","GCTFullTowers"), + hcalDigis = cms.InputTag("simHcalTriggerPrimitiveDigis"), ) From dc5f6b86df5defaa75cf9a01dc72515f4a7be30d Mon Sep 17 00:00:00 2001 From: pallabidas Date: Wed, 24 Jul 2024 09:54:57 +0200 Subject: [PATCH 2/2] remove commented code --- .../plugins/Phase2L1CaloJetEmulator.cc | 7 +------ .../plugins/Phase2L1CaloPFClusterEmulator.cc | 18 ------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc index fd61b01dade23..e7bc18fe580b1 100644 --- a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc +++ b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloJetEmulator.cc @@ -353,7 +353,6 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& float hfEta[nHfEta][nHfPhi]; float hfPhi[nHfEta][nHfPhi]; for (int iphi = 0; iphi < nHfPhi; iphi++) { - //std::cout<= 29) et = et - all_nvtx_to_PU_sub_funcs["hf"]["er29to33"].Eval(EstimatedNvtx); if (abs(hit.id().ieta()) <= 37 && abs(hit.id().ieta()) >= 34) @@ -390,9 +387,7 @@ void Phase2L1CaloJetEmulator::produce(edm::Event& iEvent, const edm::EventSetup& et = et - all_nvtx_to_PU_sub_funcs["hf"]["er38to41"].Eval(EstimatedNvtx); if (et < 0) et = 0; - //if (et > 1.) - // hfTowers[ieta][iphi] = et; // suppress <= 1 GeV towers - // split tower energy + // split tower energy hfTowers[2 * ieta][iphi] = et / 2; hfTowers[2 * ieta + 1][iphi] = et / 2; if ((ieta < 2 || ieta >= nHfEta - 2) && iphi % 4 == 2) { diff --git a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc index b175a57874c98..4c1a321876505 100644 --- a/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc +++ b/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloPFClusterEmulator.cc @@ -221,7 +221,6 @@ void Phase2L1CaloPFClusterEmulator::produce(edm::Event& iEvent, const edm::Event ieta = nHfEta / 2 + (hit.id().ieta() - (l1t::CaloTools::kHFBegin + 1)); } int iphi = hit.id().iphi() - 1; // HF phi runs between 1-72 - //std::cout<