Skip to content

Conversation

@lihaoahil
Copy link
Contributor

@lihaoahil lihaoahil commented Sep 17, 2025

This pull request introduces two functionalities to improve the random fitting workflow:

  1. Randomized SDME Generator (Commit ae16a23)
    • Added new library files src/libraries/UTILITIES/randomized_sdme.cc/.h for randomized initialization of spin-density matrix elements (SDMEs) in upper vertex photoproduction of the vector mesons.
    • When performing random initialization for SDME fits, independent uniform randomization of each SDME parameter often leads to many failed fits. The reason is that this approach samples inefficiently in the 9-dimensional SDME space, where the majority of combinations correspond to non-physical values. A more effective strategy is to sample from the underlying helicity amplitudes — the fundamental “building blocks” of the SDMEs — since they can take values over the entire complex plane and naturally produce physically consistent SDME configurations.
    • Helicity amplitudes can be sampled from uniform or Gaussian distributions (default option), and then parsed into SDMEs for vector mesons, following formulation in Mathieu et al., PRD 97, 094003. More details of the implementation can be seen in the new added src/libraries/UTILITIES/randomized_sdme.h and Hao's presentation on Amplitude Analysis Meeting, July 7, 2025.
    • Integrated into fit.cc to initialize SDME parameters at runtime.
    • Usage: add the following block to your config file to enable randomized SDME initialization (note the the order can not be altered):
         keyword parSDME 1 1
         parSDME rho000
         parSDME rho100
         parSDME rho1m10
         parSDME rho111
         parSDME rho001
         parSDME rho101
         parSDME rho1m11
         parSDME rho102
         parSDME rho1m12

Notice

  1. This implementation is currently only for vector meson SDME.
  2. For other types of SDME initialization, contributions are welcome to help expand the library files:
    src/libraries/UTILITIES/randomized_sdme.cc and src/libraries/UTILITIES/randomized_sdme.h
  1. Sample result
    • 50000 set of randomized helicity amplitudes (top: uniform, bottom: Gaussian):
helicity_uniform_amplitudes helicity_gaussian_amplitudes
  • Resulted SDMEs (top: uniform, bottom: Gaussian):
sdme_uniform_pairgrid sdme_gaussian_pairgrid
  • Thanks for @aaust pointed out that it will be useful to check if this result is consistent with the Schilling constraints (table 2 in Nucl. Phys. B15, 397 (1970)). Here is a new plot comparing the randomized SDMEs with the constriants Schilling derived (updated in Sep 19 to be compared with the new result below after the follow-up commit for reference):
constraints_5x2_gaussianInit
  1. Fit Summary Reporting with Log-Likelihood Ranking (Commit 0d2d194) in fit.cc
    • Introduced summarizeFits() to sort fit results by log-likelihood.
    • Outputs a formatted summary table to both stdout and fit_ranking.txt.
    • Table columns: fit index, success flag, fit status, eMatrix status, and log-likelihood (aligned for readability).
    • Added overall success rate reporting (count and percentage) to terminal.
    • Example (also a live example that sometimes the “Best” fit is just the universe trolling you):
        SUMMARY OF ALL FITS:
        #     Success  FitStatus  eMatrix  LogL            
        8     N        4          1        -24450.968           
        9     Y        0          3        -23986.586           
        0     N        4          2        -23606.51           
        3     Y        0          3        -23520.304            
        2     N        4          2        -23445.354        
        1     Y        0          3        -23416.864        
        5     Y        0          3        -23212.222       
        6     Y        0          3        -23203.468           
        7     Y        0          3        -23200.325           
        4     Y        0          3        -23024.955          
        
        Success: 7 / 10 (70.000%)

Hao Li added 2 commits September 16, 2025 02:43
- Introduced new library files randomized_sdme.cc/.h for random
  randomization of spin-density matrix elements (SDMEs) from helicity
  amplitudes sampled from uniform/gaussian distribution by choice,
  following Mathieu et al. (PRD 97, 094003).
- Modified fit.cc to initialize SDME parameters from the randomized
  generator, with assert check for parameter count (must be 9) and
  reminder about SDME output order.
- Introduced summarizeFits() to sort fit results by log-likelihood
  and print a formatted summary table to stdout and fit_ranking.txt.
- Table includes: index, success flag, fit status, eMatrix status,
  and log-likelihood with aligned columns.
- Added overall success rate (count and percentage) printed to terminal.
- Fit results are stored in vector<tuple<int,bool,int,int,double>> and
  filled during the fit loop.
@lihaoahil lihaoahil added the enhancement New feature or request label Sep 17, 2025
@gluex
Copy link

gluex commented Sep 17, 2025

…six-helicity normalization and parity-averaged (λγ=±1) bilinears, replacing +1 photon helicity only version. Improves consistency with Schilling constraints.
@gluex
Copy link

gluex commented Sep 19, 2025

@lihaoahil
Copy link
Contributor Author

The new commit 1b2520 updates the implementation to use both photon helicities (λγ = ±1) in parity-averaged bilinears form, replacing the earlier version that relied solely on the +1 photon helicity since the creation of this pull request. The updated build has been tested on the kπ data with 10 random fits (helicity amplitude randomized by gaussian distribution by default):

# Success FitStatus eMatrix LogL
4 Y 0 3 -25370.487
8 Y 0 3 -25370.487
3 Y 0 3 -25370.487
9 Y 0 3 -25370.487
5 Y 0 3 -25370.487
6 Y 0 3 -25370.487
1 Y 0 3 -25370.487
7 Y 0 3 -25370.487
0 N 4 1 -25051.202
2 N 4 2 -23387.664

The randomized helicity amplitudes look the same, since there is no change to the sampling method.
helicity_gaussian_amplitudes

The pairplot of the resulted SDMEs look a bit different:
sdme_gaussian_pairgrid

This change also improves consistency with the Schilling constraints (table 2 in Nucl. Phys. B15, 397 (1970)):
constraints_5x2_gaussianInit

Copy link
Contributor

@jrstevenjlab jrstevenjlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this, which I hope is useful for others fitting vector SDMEs.

There are still a couple differences between the constraints from the Schilling paper and the randomly generated SDMEs, but we can work those out separately. Could you provide a link to the code used to produce those constraint plots so others could look at it and potentially use as well?

@jrstevenjlab jrstevenjlab merged commit 0a1a342 into master Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants