Skip to content

Commit

Permalink
Merge pull request #3658 from cms-sw/madspin_reweight
Browse files Browse the repository at this point in the history
madspin and reweighting should not be together
  • Loading branch information
efeyazgan authored Mar 6, 2024
2 parents c728150 + 94d7ab2 commit 680b285
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/utils/request_fragment_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False):
if os.path.isdir(dir_path):
input_cards_customize_card = find_file(dir_path,"customizecards.dat")
input_cards_madspin_card = find_file(dir_path,"madspin_card.dat")
input_cards_reweight_card = find_file(dir_path,"reweight_card.dat")
input_patch = find_file(dir_path,"patch")
if input_cards_madspin_card:
print("---------------------------------------------")
Expand Down Expand Up @@ -1120,7 +1121,8 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False):
if int(x) < int(y): customize_widths_flag = 1
if customize_widths_flag > 0:
errors.append("COMPUTE_WIDTHS followed by SET command(s) should not be used in customizecards. Instead use \"set width X auto\" to compute the widths for X and change the parameter card settings.")
input_cards_reweight_card = find_file(dir_path,"reweight_card.dat")
if input_cards_reweight_card and input_cards_madspin_card:
errors.append("MadSpin and Reweight used together. The issue is that madspin calculates probabilities based on the input ME. As this is changing through reweighting, it doesn't work properly. Until a fix is done by MG5_aMC these madspin and reweighting should not be used together. See e.g. https://cms-talk.web.cern.ch/t/atgc-with-ewdim6nlo-ufo-for-wv-semileptonic-channel/29869/8")
if input_cards_reweight_card:
reweights = os.popen('more '+input_cards_reweight_card+' | tr -s \' \' | grep "rwgt_name"').read()
reweights = re.sub("launch --rwgt_name",'',reweights)
Expand Down

0 comments on commit 680b285

Please sign in to comment.