You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is mean to hold the discussion of whether adding a way to parametrize the argument nevents that MadGraph run cards contain, is something worth implementing.
Context
On recent days, a way to determine the number of events of a given madminer-workflow run has come into discussion (see issue madminer-tool/madminer-workflow#39), because of the crucial value this parameter has when scaling up an experiment.
Problem
With the current containerization of workflows, there is no easy way to tune this parameter given a built Docker image, requiring users to re-build the Docker image for each change on the MadGraph run-cards.
Disclaimer: If there is any other way to specify nevents to MadGraph, it should be considered.
Proposal
My initial approach would have involved modifying the workflow run_card_background.dat and run_card_signal.dat to make the nevents value Python-formatted. Something like:
{madgraph_num_events} = nevents ! Number of unweighted events requested
So that we could read this file and format it with the desired number of events just before running MadGraph / Pythia8. Following this StackOverflow answer, something like:
withopen("code/cards/run_card_signal.dat", "r+") asrun_card_file:
run_card_spec=run_card_file.read()
run_card_spec.format(madgraph_num_events=10000) # For examplerun_card_file.seek(0)
run_card_file.write(run_card_spec)
run_card_file.truncate()
But, then I thought that this functionality of parametrizing MadGraph cards could be useful within the MadMiner library itself, instead of being something specific for the madminer-workflow project.
Discussion
Do you think it would be useful to have the described functionality within the library itself?
If you do, what do you think should be the way to proceed?
B) Define a completely different class (maybe within utils/interfaces/mg.py? or within utils/interfaces/mg_cards.py?) to parametrize run cards completely independent of whether or not they will be immediately used.
C) ...
The text was updated successfully, but these errors were encountered:
This issue is mean to hold the discussion of whether adding a way to parametrize the argument
nevents
that MadGraph run cards contain, is something worth implementing.Context
On recent days, a way to determine the number of events of a given madminer-workflow run has come into discussion (see issue madminer-tool/madminer-workflow#39), because of the crucial value this parameter has when scaling up an experiment.
Problem
With the current containerization of workflows, there is no easy way to tune this parameter given a built Docker image, requiring users to re-build the Docker image for each change on the MadGraph run-cards.
Disclaimer: If there is any other way to specify
nevents
to MadGraph, it should be considered.Proposal
My initial approach would have involved modifying the workflow
run_card_background.dat
andrun_card_signal.dat
to make thenevents
value Python-formatted. Something like:So that we could read this file and format it with the desired number of events just before running MadGraph / Pythia8. Following this StackOverflow answer, something like:
But, then I thought that this functionality of parametrizing MadGraph cards could be useful within the MadMiner library itself, instead of being something specific for the madminer-workflow project.
Discussion
num_events
parameter to MadMiner.run_multiple method.The text was updated successfully, but these errors were encountered: