Ecal regression refactor

This code refactors the ECAL regression inputs so a new single class gets the data rather than the same (buggy) code being copy & pasted over 3 files. It also fixes a divide by zero bug. It changes the behaviour of the pat::Photons but for the better in my opinion. 
Damn it, yes theres a bug there. Will fix it.

Cheers,
Sam

On 21/09/2014 16:18, Tae Jeong Kim wrote:
>
> In PhysicsTools/PatAlgos/plugins/PATPhotonProducer.cc:
>
> > -    aPhoton.setEBottom( eBottom );
> > -    aPhoton.setELeft( eLeft );
> > -    aPhoton.setERight( eRight );
> > -    aPhoton.setSee( see );
> > -    aPhoton.setSpp( spp );
> > -    aPhoton.setSep( sep );
> > +    aPhoton.setEMax( ecalRegData.eMax() );
> > +    aPhoton.setE2nd( ecalRegData.e2nd() );
> > +    aPhoton.setE3x3( ecalRegData.e3x3() );
> > +    aPhoton.setETop( ecalRegData.eTop() );
> > +    aPhoton.setEBottom( ecalRegData.eBottom() );
> > +    aPhoton.setELeft( ecalRegData.eLeft() );
> > +    aPhoton.setERight( ecalRegData.eRight() );
> > +    aPhoton.setSee( ecalRegData.sigmaIEtaIEta() );
> > +    aPhoton.setSpp( ecalRegData.sigmaIEtaIPhi() );
> > +    aPhoton.setSep( ecalRegData.sigmaIPhiIPhi() );
>
> Shouldn't it be like this?
> aPhoton.setSpp (ecalRegData.sigmaIPhiIPhi() );
> aPhoton.setSep( ecalRegData.sigmaIEtaIPhi() );
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/cms-sw/cmssw/pull/5423/files#r17825651>.
>