cms-nanoAOD / nanoAOD-tools

Tools for working with NanoAOD (requiring only python + root, not CMSSW)
41 stars 324 forks source link

WeightCalculatorFromHistogram.cc gives NaN #119

Open bianchini opened 5 years ago

bianchini commented 5 years ago

https://github.com/cms-nanoAOD/nanoAOD-tools/blob/master/src/WeightCalculatorFromHistogram.cc#L101 initiializes 'cropped' once and then it fills it with while() as many times as needed by thw whil() condition, but checkIntegral() assumes that the length stays the same, so it may give NaN when accessing elements beyond refvals_.size().

ktht commented 5 years ago

I opened a PR about this almost 10 months ago: https://github.com/cms-nanoAOD/nanoAOD-tools/pull/87

arizzi commented 5 years ago

@bianchini can you confirm that #87 works for you and I will merge

arizzi commented 5 years ago

@fgolf @peruzzim