Hcal 25ns constrained Method 2 for pre3

Update on Nov 17th 17:30PM (Chicago time)
] Incorporate comments from Stoyan
] Switch from 3 iterations of the fit to 1 iteration by default
] Fix two problems reported from static analyzer

==
1. Fix the pulse shape used for MC to be number 105
2. If method 2 fails (nan issue) or not used (e.g., tstrig < ts4Min), it falls back now to Method 0
3. Add an option to control number of fit iterations
4. Separate out the hbheNegativeFlagSetter from the puCorrMethod switch. It was switched off when Method 1 was disabled. This hbheNegaviteFlagSetter is controlled by setNegativeFlags_ anyway.
5. Add print out to what method is actually activated
Hi Hongxuan,

This formula is form Greg, its the binning based on the ADC readout of the
Hcal.

PHil

On Mon, Nov 17, 2014 at 11:03 PM, Hongxuan Liu <notifications@github.com>
wrote:

> In RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc:
>
> >        std::vector<double> pars(x, x+5);
> >        return EvalDoublePulse(pars);
> > -   }
> > -
> > +  }
> > +
> > +  double PulseShapeFunctor::triplePulseShapeFunc( const double *x ) {
> > +      std::vector<double> pars(x, x+7);
> > +      return EvalTriplePulse(pars);
> > +  }
> > +  //Greg's Hcal Binning => here to keep the const correctness below
> > +  double PulseShapeFunctor::sigma(double ifC) {
> > +    if(ifC < 75) return (0.577 + 0.0686*ifC)/3.;
> > +    return (2.75  + 0.0373*ifC + 3e-6*ifC*ifC)/3.;
>
> @violatingcp <https://github.com/violatingcp> any comments on the formula?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6432/files#r20468919>.
>