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

[Bug] Cannot calculate evidence for massbins with thresholded waves [sf#19] #19

Closed legordian closed 10 years ago

legordian commented 10 years ago

Reported by sebastianuhl on 2013-04-24 10:58 UTC The calculation of the evidence for a massbin with ((I guess) at least one) waves below threshold returns NaN, and prints the following error message:

Error in <TDecompLU::DecomposeLUCrout>: matrix is singular

The error message is printed during the calculation of the determinant of the covariance matrix. The reason for this seems to be that for thresholded waves the rows and columns in the covariance matrix are 0, so that columns and rows are no longer linear independent.

As also the intensity and the error on the intensity for thresholded waves are 0, one further possible source of the NaN is in the call to ROOT::Math::normal_cdf_c with a sigma of 0.

As far as I understand the evidence calculation, the following proposal should still yield a valid evidence:

  1. Identify the thresholded production amplitudes by testing the real and imaginary part of the production amplitude to be zero.
  2. From the list of thresholded production amplitudes get the list of thresholded waves using the mapping from production amplitudes to entries in the normalization integrals.
  3. Also from the list of thresholded production amplitudes get the list of columns and rows in the covariance matrix belonging to the thresholded production amplitudes.
  4. Create a new covariance matrix removing these columns and rows. Also use the size of this new covariance matrix to calculate the parameter volume.
  5. When checking for negligible waves, ignore thresholded waves.

Please consider the patch in the attachment.

legordian commented 10 years ago

Updated by legordian on 2013-04-24 12:22 UTC

legordian commented 10 years ago

Commented by bgrube on 2013-04-25 19:28 UTC This looks good and as far as I can tell should also handle rank > 1 correctly. The only thing that might not work is point 2. I'll look into this.

legordian commented 10 years ago

Commented by bgrube on 2013-04-26 20:10 UTC Should be fixed by [954a65]. Please confirm.

Higher ranks are definitely not a problem, because no fit parameters are created for the null production amplitudes, so they won't be part of the covariance matrix.

legordian commented 10 years ago

Commented by sebastianuhl on 2013-04-26 20:54 UTC Evidences are correctly calculating in the cases I previously observed this error.

legordian commented 10 years ago

Updated by sebastianuhl on 2013-04-29 08:51 UTC