Skip to content

Commit

Permalink
Merge pull request #17508 from rafaellopesdesa/RegressionCheckNegEnergy
Browse files Browse the repository at this point in the history
Regression check negative energy
  • Loading branch information
davidlange6 committed Feb 14, 2017
2 parents 32fc22e + 3aafeff commit 9e973a6
Showing 1 changed file with 15 additions and 3 deletions.
Expand Up @@ -514,8 +514,11 @@ void EGExtraInfoModifierFromDBUser::modifyObject(reco::GsfElectron& ele) const {
// std::cout << mean << " " << sigma << " ";
// std::cout << std::endl;


// Correct the energy
// Correct the energy. A negative energy means that the correction went
// outside the boundaries of the training. In this case uses raw.
// The resolution estimation, on the other hand should be ok.
if (mean < 0.) mean = 1.0;

const double ecor = mean*(raw_energy + raw_es_energy);
const double sigmacor = sigma*ecor;

Expand Down Expand Up @@ -583,6 +586,11 @@ void EGExtraInfoModifierFromDBUser::modifyObject(reco::GsfElectron& ele) const {
// std::cout << mean_trk << " " << sigma_trk << std::endl;

// Final correction
// A negative energy means that the correction went
// outside the boundaries of the training. In this case uses raw.
// The resolution estimation, on the other hand should be ok.
if (mean_trk < 0.) mean_trk = 1.0;

combinedEnergy = mean_trk*rawcomb;
combinedEnergyError = sigma_trk*rawcomb;
}
Expand Down Expand Up @@ -728,7 +736,11 @@ void EGExtraInfoModifierFromDBUser::modifyObject(reco::Photon& pho) const {
// for (size_t i=0; i<4; i++) std::cout << meanoffset + meanscale*vdt::fast_sin(ph_forestH_mean_[i]->GetResponse(eval.data())) << " ";
// std::cout << std::endl;

// Correct the energy
// Correct the energy. A negative energy means that the correction went
// outside the boundaries of the training. In this case uses raw.
// The resolution estimation, on the other hand should be ok.
if (mean < 0.) mean = 1.0;

const double ecor = mean*(raw_energy + raw_es_energy);
const double sigmacor = sigma*ecor;

Expand Down

0 comments on commit 9e973a6

Please sign in to comment.