Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate HepMC event weights to EDM4hep and LCIO outputs of ddsim #1059

Merged

Conversation

tmadlener
Copy link
Contributor

@tmadlener tmadlener commented Feb 10, 2023

BEGINRELEASENOTES

  • Propagate HepMC event weights to EDM4hep and LCIO outputs of ddsim
    • Store all available weights and their names into the Frame / Event parameters, additionally store the first weight into the weight field of the edm4hep::EventHeader, resp. the LCEvent.
  • Add a possibility to store double values in DDG4::EventParameters

ENDRELEASENOTES

Fixes #988

@tmadlener
Copy link
Contributor Author

After this fix, the output of podio-dump -d example.edm4hep.root | tail -n25 looks like

float parameters
Key                           Value 
--------------------------------------------------------------------------------

double parameters
Key                           Value 
--------------------------------------------------------------------------------
EventWeights                  [1]

std::string parameters
Key                           Value 
--------------------------------------------------------------------------------
EventWeightNames              [0]
GenCrossSection               [2.64422551e+03 2.64422551e+03 -1 -1]
GenPdfInfo                    [11 -11 9.97420767e-01 9.99999975e-01 9.18812775e+01 1.56824725e+01 2.82148362e+06 0 0]
alphaQCD                      [0.129844]
alphaQED                      [0.007818181]
event_scale                   [91.88128]
mpi                           [0]
signal_process_id             [221]
signal_process_vertex         [0]

and root -l example.edm4hep.root -e 'events->Scan("EventHeader.weight")' produces

root [0] 
Attaching file example.edm4hep.root as _file0...
(TFile *) 0x55faabc41d60
***********************************
*    Row   * Instance * EventHead *
***********************************
*        0 *        0 *         1 *
*        1 *        0 *         1 *
*        2 *        0 *         1 *
*        3 *        0 *         1 *
*        4 *        0 *         1 *
*        5 *        0 *         1 *
*        6 *        0 *         1 *
*        7 *        0 *         1 *
*        8 *        0 *         1 *
*        9 *        0 *         1 *
***********************************
(long long) 10

So that it seems that all the necessary information is propagated to where it should be.

@tmadlener
Copy link
Contributor Author

LCIO seems to have gained the double parameter capabilities with 2.17 only: https://github.com/iLCSoft/LCIO/blob/master/doc/ReleaseNotes.md#v02-17

@tmadlener
Copy link
Contributor Author

Made both LCIO and EDM4hep only use the functionality when it is actually present. Had to work around AIDASoft/podio#374 for podio.

@tmadlener tmadlener changed the title [wip] Propagate HepMC event weights to EDM4hep and LCIO outputs of ddsim Propagate HepMC event weights to EDM4hep and LCIO outputs of ddsim Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagate cross section to the simulation
2 participants