Skip to content

Commit

Permalink
Merge pull request #3697 from cms-sw/pwms
Browse files Browse the repository at this point in the history
fix powheg+madspin check
  • Loading branch information
efeyazgan authored Apr 29, 2024
2 parents da90a52 + 0c80ff2 commit cc69a1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/utils/request_fragment_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False):
gp_size = len(gridpack_cvmfs_path_tmp)

pw_gp = False
pw_external_gp = False
madloop_in_gp = False
minlo = False
minnlo = False
Expand Down Expand Up @@ -827,12 +828,15 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False):
sys.exit()
jhu_gp = os.path.isfile(my_path+'/'+pi+'/'+'JHUGen.input')
pw_gp = os.path.isfile(my_path+'/'+pi+'/'+'powheg.input')
if pw_gp is False:
pw_external_gp = os.path.isfile(my_path+'/'+pi+'/'+"external_tarball/powheg.input")
madloop_in_gp = os.path.isfile(my_path+'/'+pi+'/'+'MadLoopParams.dat')
mg_f1 = my_path+'/'+pi+'/'+'process/madevent/Cards/run_card.dat'
mg_f2 = my_path+'/'+pi+'/'+'process/Cards/run_card.dat'
amcnlo_gp = os.path.isfile(my_path+'/'+pi+'/'+'process/Cards/run_card.dat')
mg_gp = os.path.isfile(mg_f1) or os.path.isfile(mg_f2)
print("path powheg "+str(pw_gp))
print("path external powheg "+str(pw_external_gp))
print("path madloop "+str(madloop_in_gp))
print("path mg "+str(mg_gp))
print("path amcnlo "+str(amcnlo_gp))
Expand Down Expand Up @@ -1593,8 +1597,9 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False):
errors.append("You run MG5_aMC@NLO at LO but you have Pythia8aMCatNLOSettings_cfi in fragment")

if mg_gp is True or amcnlo_gp is True:
input_cards_madspin_card = 0
powhegcheck.append(int(os.popen('grep -c -i PowhegEmission '+pi_file).read()))
if powhegcheck[0] > 0 and pw_mg == 0:
if powhegcheck[0] > 0 and pw_mg == 0 and pw_external_gp is False:
errors.append("Please remove POWHEG settings for MG requests.")
if pw_mg is False and mg_gp is False and amcnlo_gp is False and jhu_gp is False and sherpa_gp is False:
purepythiacheck.append(int(os.popen('grep -c -i Pythia8aMCatNLOSettings '+pi_file).read()))
Expand Down

0 comments on commit cc69a1e

Please sign in to comment.