From 47f12d9c367a3124eb05bef8f12ec0b7af4e882a Mon Sep 17 00:00:00 2001 From: reza goldouzian Date: Mon, 14 Feb 2022 05:53:42 -0500 Subject: [PATCH 1/3] electron mass set to zero - comments applied --- RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc | 1 + RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc | 1 + .../EgammaPhotonProducers/src/GEDPhotonProducer.cc | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc index 7613eb063fd9f..be35acc3f749a 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc @@ -1067,6 +1067,7 @@ void GsfElectronAlgo::createElectron(reco::GsfElectronCollection& electrons, // Will be overwritten later in the case of the regression ele.setCorrectedEcalEnergyError(egamma::ecalClusterEnergyUncertaintyElectronSpecific(*(ele.superCluster()))); ele.setP4(GsfElectron::P4_FROM_SUPER_CLUSTER, momentum, 0, true); + ele.setMass(0.0); //==================================================== // brems fractions diff --git a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc index 93f505a9a3758..51606efb40851 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc @@ -194,5 +194,6 @@ void RegressionHelper::applyCombinationRegression(reco::GsfElectron& ele) const combinedMomentum); ele.setP4(reco::GsfElectron::P4_COMBINATION, newMomentum, combinedMomentumError, true); + ele.setMass(0.0); } } diff --git a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc index 337cea3032416..8eebbeb0e10af 100644 --- a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc +++ b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc @@ -946,19 +946,23 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, if (candidateP4type_ == "fromEcalEnergy") { newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons)); newCandidate.setCandidateP4type(reco::Photon::ecal_photons); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRegression1") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression1)); newCandidate.setCandidateP4type(reco::Photon::regression1); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRegression2") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression2)); newCandidate.setCandidateP4type(reco::Photon::regression2); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRefinedSCRegression") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression2)); newCandidate.setCandidateP4type(reco::Photon::regression2); + newCandidate.setMass(0.0); } } else { math::XYZVector gamma_momentum = direction.unit() * scRef->energy(); - math::XYZTLorentzVectorD p4(gamma_momentum.x(), gamma_momentum.y(), gamma_momentum.z(), scRef->energy()); + math::PtEtaPhiMLorentzVector p4(gamma_momentum.rho(), gamma_momentum.eta(), gamma_momentum.phi(), 0.0); newCandidate.setP4(p4); newCandidate.setCandidateP4type(reco::Photon::ecal_photons); // Make it an EE photon @@ -1084,15 +1088,19 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, if (candidateP4type_ == "fromEcalEnergy") { newCandidate.setP4(newCandidate.p4(reco::Photon::ecal_photons)); newCandidate.setCandidateP4type(reco::Photon::ecal_photons); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRegression1") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression1)); newCandidate.setCandidateP4type(reco::Photon::regression1); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRegression2") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression2)); newCandidate.setCandidateP4type(reco::Photon::regression2); + newCandidate.setMass(0.0); } else if (candidateP4type_ == "fromRefinedSCRegression") { newCandidate.setP4(newCandidate.p4(reco::Photon::regression2)); newCandidate.setCandidateP4type(reco::Photon::regression2); + newCandidate.setMass(0.0); } outputPhotonCollection.push_back(newCandidate); From f0f0086a4ba48e1d55007033db515f7c7c79d9f2 Mon Sep 17 00:00:00 2001 From: reza goldouzian Date: Mon, 7 Mar 2022 03:30:55 -0500 Subject: [PATCH 2/3] electron and photon masses are set to zero --- RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc | 2 ++ RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc | 2 ++ RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc index be35acc3f749a..a62f0bf8d65fc 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc @@ -1235,3 +1235,5 @@ void GsfElectronAlgo::setPixelMatchInfomation(reco::GsfElectron& ele) const { ele.setPixelMatchDRz1(dRz1); ele.setPixelMatchDRz2(dRz2); } + + diff --git a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc index 51606efb40851..d9f920b352703 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc @@ -197,3 +197,5 @@ void RegressionHelper::applyCombinationRegression(reco::GsfElectron& ele) const ele.setMass(0.0); } } + + diff --git a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc index 8eebbeb0e10af..7521cac69a3a5 100644 --- a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc +++ b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc @@ -1106,3 +1106,5 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, outputPhotonCollection.push_back(newCandidate); } } + + From 8c391820f691b9d4c48e46e137e101d6173a4199 Mon Sep 17 00:00:00 2001 From: reza goldouzian Date: Mon, 7 Mar 2022 03:35:10 -0500 Subject: [PATCH 3/3] electron and photon masses are set to zero --- RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc | 2 -- RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc | 2 -- RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc | 2 -- 3 files changed, 6 deletions(-) diff --git a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc index a62f0bf8d65fc..be35acc3f749a 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/GsfElectronAlgo.cc @@ -1235,5 +1235,3 @@ void GsfElectronAlgo::setPixelMatchInfomation(reco::GsfElectron& ele) const { ele.setPixelMatchDRz1(dRz1); ele.setPixelMatchDRz2(dRz2); } - - diff --git a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc index d9f920b352703..51606efb40851 100644 --- a/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc +++ b/RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc @@ -197,5 +197,3 @@ void RegressionHelper::applyCombinationRegression(reco::GsfElectron& ele) const ele.setMass(0.0); } } - - diff --git a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc index 7521cac69a3a5..8eebbeb0e10af 100644 --- a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc +++ b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc @@ -1106,5 +1106,3 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, outputPhotonCollection.push_back(newCandidate); } } - -