Method2 for phase II

] Merged Mark's PR that fixed a memory issue

] Hcal 25ns reconstruction Method2 is backported from 730 to the SLHC release
] First results were reported in https://indico.cern.ch/event/356574/contribution/7/material/slides/0.pdf
Hi Mark
This same bug was in the 73x version - perhaps the code that got back ported is out of date

On Dec 7, 2014, at 1:30 AM, Mark Grimes <notifications@github.com>
 wrote:

> In RecoLocalCalo/HcalRecAlgos/src/PulseShapeFitOOTPileupCorrection.cc:
> 
> > +  //Greg's Hcal Binning => here to keep the const correctness below (channel discretization)
> > +   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.; 
> > +   }
> > +  
> > +}
> > +
> > +PulseShapeFitOOTPileupCorrection::PulseShapeFitOOTPileupCorrection() : cntsetPulseShape(0), chargeThreshold_(6.) {
> > +   hybridfitter = new PSFitter::HybridMinimizer(PSFitter::HybridMinimizer::kMigrad);
> > +   iniTimesArr = { {-100,-75,-50,-25,0,25,50,75,100,125} };
> > +}
> > +
> > +PulseShapeFitOOTPileupCorrection::~PulseShapeFitOOTPileupCorrection() { 
> > +   if(hybridfitter) delete hybridfitter;
> > +   if(spfunctor_)   delete spfunctor_;
> 
> I think these are causing the crashes (or at least some of them). Only hybridfitter is set in the constructor so spfunctor_ et al will have a random value until set in other methods. If the object is destructed before then it will try to delete a random block of memory.
> I'll put in a pull request on your branch.
> 
> —
> Reply to this email directly or view it on GitHub.
>