Skip to content

Commit

Permalink
Merge pull request #33666 from afiqaize/egm-hcal-rechit_v2
Browse files Browse the repository at this point in the history
Calotower -> HCAL rechit for EGM ID variables
  • Loading branch information
cmsbuild authored Jul 14, 2021
2 parents a2b431c + 5ad8a10 commit 37bf1fa
Show file tree
Hide file tree
Showing 58 changed files with 1,741 additions and 1,164 deletions.
2 changes: 1 addition & 1 deletion DQM/Physics/src/SMPDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void SMPDQM::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {

double elecCombRelIso = 1.;

elecCombRelIso = (elecIso.ecalRecHitSumEt + elecIso.hcalDepth1TowerSumEt + elecIso.tkSumPt) / elec->pt();
elecCombRelIso = (elecIso.ecalRecHitSumEt + elecIso.hcalRecHitSumEt[0] + elecIso.tkSumPt) / elec->pt();
elIso_CombRelIso->Fill(elecCombRelIso);
elIso_cal->Fill(elecIso.ecalRecHitSumEt);
elIso_trk->Fill(elecIso.tkSumPt);
Expand Down
2 changes: 1 addition & 1 deletion DQM/Physics/src/TopDiLeptonDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte
double elecCombRelIso = 1.;

if (elec->et() != 0.)
elecCombRelIso = (elecIso.ecalRecHitSumEt + elecIso.hcalDepth1TowerSumEt + elecIso.tkSumPt) / elec->et();
elecCombRelIso = (elecIso.ecalRecHitSumEt + elecIso.hcalRecHitSumEt[0] + elecIso.tkSumPt) / elec->et();

ElecIso_CombRelIso_->Fill(elecCombRelIso);

Expand Down
6 changes: 3 additions & 3 deletions DQMOffline/EGamma/plugins/ElectronAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,11 +814,11 @@ bool ElectronAnalyzer::isolationCut(const reco::GsfElectronCollection::const_ite

if (gsfIter->dr03TkSumPt() > tkIso03Max_)
return true;
if (gsfIter->isEB() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxBarrel_)
if (gsfIter->isEB() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxBarrel_)
return true;
if (gsfIter->isEE() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxEndcaps_)
if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxEndcaps_)
return true;
if (gsfIter->isEE() && gsfIter->dr03HcalDepth2TowerSumEt() > hcalIso03Depth2MaxEndcaps_)
if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(2) > hcalIso03Depth2MaxEndcaps_)
return true;
if (gsfIter->isEB() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxBarrel_)
return true;
Expand Down
6 changes: 3 additions & 3 deletions DQMOffline/EGamma/plugins/ElectronTagProbeAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ bool ElectronTagProbeAnalyzer::isolationCut(const reco::GsfElectronCollection::c

if (gsfIter->dr03TkSumPt() > tkIso03Max_)
return true;
if (gsfIter->isEB() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxBarrel_)
if (gsfIter->isEB() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxBarrel_)
return true;
if (gsfIter->isEE() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxEndcaps_)
if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxEndcaps_)
return true;
if (gsfIter->isEE() && gsfIter->dr03HcalDepth2TowerSumEt() > hcalIso03Depth2MaxEndcaps_)
if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(2) > hcalIso03Depth2MaxEndcaps_)
return true;
if (gsfIter->isEB() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxBarrel_)
return true;
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/EGamma/plugins/PhotonAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1711,8 +1711,8 @@ void PhotonAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& esup) {
fill2DHistoVector(p_hOverEVsEta_, aPho->eta(), aPho->hadronicOverEm(), cut, type);
fill2DHistoVector(p_hOverEVsEt_, aPho->et(), aPho->hadronicOverEm(), cut, type);

fill3DHistoVector(h_h1OverE_, aPho->hadronicDepth1OverEm(), cut, type, part);
fill3DHistoVector(h_h2OverE_, aPho->hadronicDepth2OverEm(), cut, type, part);
fill3DHistoVector(h_h1OverE_, aPho->hadronicOverEm(1), cut, type, part);
fill3DHistoVector(h_h2OverE_, aPho->hadronicOverEm(2), cut, type, part);

// filling pf isolation variables
if (aPho->isEB()) {
Expand Down
8 changes: 4 additions & 4 deletions DQMOffline/EGamma/plugins/ZToMuMuGammaAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,14 @@ void ZToMuMuGammaAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& e
h_ecalSum_[0]->Fill(aPho->ecalRecHitSumEtConeDR04());
h_hcalSum_[0]->Fill(aPho->hcalTowerSumEtConeDR04());
h_hOverE_[0]->Fill(aPho->hadTowOverEm());
h_h1OverE_[0]->Fill(aPho->hadTowDepth1OverEm());
h_h2OverE_[0]->Fill(aPho->hadTowDepth2OverEm());
h_h1OverE_[0]->Fill(aPho->hadTowOverEm(1));
h_h2OverE_[0]->Fill(aPho->hadTowOverEm(2));
h_newhOverE_[0]->Fill(aPho->hadTowOverEm());
h_ecalSum_[iDet]->Fill(aPho->ecalRecHitSumEtConeDR04());
h_hcalSum_[iDet]->Fill(aPho->hcalTowerSumEtConeDR04());
h_hOverE_[iDet]->Fill(aPho->hadTowOverEm());
h_h1OverE_[iDet]->Fill(aPho->hadTowDepth1OverEm());
h_h2OverE_[iDet]->Fill(aPho->hadTowDepth2OverEm());
h_h1OverE_[iDet]->Fill(aPho->hadTowOverEm(1));
h_h2OverE_[iDet]->Fill(aPho->hadTowOverEm(2));
h_newhOverE_[iDet]->Fill(aPho->hadTowOverEm());
// Isolation from particle flow
h_chHadIso_[0]->Fill(aPho->chargedHadronIso());
Expand Down
5 changes: 2 additions & 3 deletions DQMOffline/Trigger/src/EgHLTOffHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ void OffHelper::fillIsolData(const reco::GsfElectron& ele, OffEle::IsolData& iso
isolData.ptTrks = ele.dr03TkSumPt();
isolData.nrTrks = 999; //no longer supported
isolData.em = ele.dr03EcalRecHitSumEt();
isolData.hadDepth1 = ele.dr03HcalDepth1TowerSumEt();
isolData.hadDepth2 = ele.dr03HcalDepth2TowerSumEt();
isolData.hadDepth1 = ele.dr03HcalTowerSumEt(1);
isolData.hadDepth2 = ele.dr03HcalTowerSumEt(2);

//now time to do the HLT algos
if (calHLTHcalIsol_)
Expand Down Expand Up @@ -509,7 +509,6 @@ void OffHelper::fillClusShapeData(const reco::Photon& pho, OffPho::ClusShapeData
const auto& stdCov =
EcalClusterTools::covariances(seedClus, eeRecHits_.product(), caloTopology_.product(), caloGeom_.product());
const auto& crysCov = EcalClusterTools::localCovariances(seedClus, eeRecHits_.product(), caloTopology_.product());

clusShapeData.sigmaPhiPhi = sqrt(stdCov[2]);
clusShapeData.sigmaIPhiIPhi = sqrt(crysCov[2]);
}
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/src/FunctionDefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ std::function<float(const reco::GsfElectron&)> hltdqm::getUnaryFuncExtraFloat<re
if (varName == "scEta")
varFunc = scEtaFunc<reco::GsfElectron>;
else if (varName == "hOverE")
varFunc = &reco::GsfElectron::hcalOverEcal;
varFunc = [](const reco::GsfElectron& ele) -> float { return ele.hcalOverEcal(); };
return varFunc;
}

Expand All @@ -17,6 +17,6 @@ std::function<float(const reco::Photon&)> hltdqm::getUnaryFuncExtraFloat<reco::P
if (varName == "scEta")
varFunc = scEtaFunc<reco::Photon>;
else if (varName == "hOverE")
varFunc = &reco::Photon::hadTowOverEm;
varFunc = [](const reco::Photon& pho) -> float { return pho.hadTowOverEm(); };
return varFunc;
}
Loading

0 comments on commit 37bf1fa

Please sign in to comment.