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

fitResult::intensityErr(const std::string&) broken for non-rank-1 fits #140

Closed suhlatwork closed 8 years ago

suhlatwork commented 8 years ago

In fitResult.cc starting from line 571

    // get amplitudes that correspond to wave name pattern
    const vector<unsigned int> prodAmpIndices = prodAmpIndicesMatchingPattern(waveNamePattern);
    const unsigned int         nmbAmps        = prodAmpIndices.size();
    if (not _covMatrixValid or (nmbAmps == 0)) {
        return 0.;
    }
    if(nmbAmps == 1) {
        return intensityErr(prodAmpIndices[0]);
    }

This will get the indices to the production amplitudes based on the pattern specified, and if only one production amplitude is found, call intensityErr with the corresponding index. However, intensityErr takes wave indices. The indices for production amplitudes and waves are different for anything but rank-1 fits. Symptoms might vary from a wrong value to crashes/exceptions.

This was caused by a change made in a4e9e17.