Skip to content

Commit

Permalink
electron mass set to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoldouz committed Feb 8, 2022
1 parent ad3c65e commit c401a22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion RecoEgamma/EgammaElectronAlgos/src/RegressionHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ void RegressionHelper::applyCombinationRegression(reco::GsfElectron& ele) const
combinedMomentum);

ele.setP4(reco::GsfElectron::P4_COMBINATION, newMomentum, combinedMomentumError, true);
ele.setMass(0.00050);
ele.setMass(0.0);
}
}
18 changes: 9 additions & 9 deletions RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -946,25 +946,25 @@ 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);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRegression1") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
newCandidate.setCandidateP4type(reco::Photon::regression1);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRegression2") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
newCandidate.setCandidateP4type(reco::Photon::regression2);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRefinedSCRegression") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
newCandidate.setCandidateP4type(reco::Photon::regression2);
newCandidate.setMass(0);
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());
newCandidate.setP4(p4);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
// Make it an EE photon
reco::Photon::FiducialFlags fiducialFlags;
Expand Down Expand Up @@ -1089,19 +1089,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);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRegression1") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression1));
newCandidate.setCandidateP4type(reco::Photon::regression1);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRegression2") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
newCandidate.setCandidateP4type(reco::Photon::regression2);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
} else if (candidateP4type_ == "fromRefinedSCRegression") {
newCandidate.setP4(newCandidate.p4(reco::Photon::regression2));
newCandidate.setCandidateP4type(reco::Photon::regression2);
newCandidate.setMass(0);
newCandidate.setMass(0.0);
}

outputPhotonCollection.push_back(newCandidate);
Expand Down

0 comments on commit c401a22

Please sign in to comment.