ROOTPWA-Maintainers / ROOTPWA

ROOTPWA is a toolkit for partial-wave analysis of multi-particle final states produced in high-energy particle reactions. It is used to determine hadron spectra from experimental data.
Other
8 stars 14 forks source link

src: Fix a bug in pwaLikelihood's readDecayAmplitudes. #70

Closed legordian closed 9 years ago

legordian commented 9 years ago

Fix a bug in pwaLikelihood::readDecayAmplitude, where the array containing the decay amplitudes was resized every time a new amplitude file was read in, while slowed down the initial loading of amplitudes by some order of magnitudes. While doing that, also finally fix the bug that the firstWave boolean was never set to false so the consistency in terms of number of events in the amplitude files was never properly checked as was intended.

suhlatwork commented 9 years ago

Merged.

Did you test the performance impact? I cannot imagine that boost does not check the size before actually allocating memory and copying stuff around, that would just be too stupid.

legordian commented 9 years ago

Obviously, the impact depends heavily on the number of amplitudes being loaded. I did not make a quantitative test for the 1546 waves wave set, but my guess would be that there is a factor of about 500 between before/after the fix.