-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_cards_1j.py
23 lines (21 loc) · 1.17 KB
/
make_cards_1j.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import sys
card_types = ["customizecards", "extramodels", "proc_card", "run_card", "madspin_card"]
masses = [50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500]
for mass in masses:
output_card_dir = "cards/scalar_m{}".format(mass)
os.system("mkdir -pv {}".format(output_card_dir))
for card_type in card_types:
with open("template_cards/Spin0ToTauTau_1j_scalar_g1_HT300_MX_{}.dat".format(card_type), 'r') as input_card:
with open("{}/Spin0ToTauTau_1j_scalar_g1_HT300_M{}_{}.dat".format(output_card_dir, mass, card_type), 'w') as output_card:
for line in input_card:
output_card.write(line.replace("@MASS@", str(mass)))
output_card.write("\n")
output_card_dir = "cards/pseudoscalar_m{}".format(mass)
os.system("mkdir -pv {}".format(output_card_dir))
for card_type in card_types:
with open("template_cards/Spin0ToTauTau_1j_pseudoscalar_g1_HT300_MX_{}.dat".format(card_type), 'r') as input_card:
with open("{}/Spin0ToTauTau_1j_pseudoscalar_g1_HT300_M{}_{}.dat".format(output_card_dir, mass, card_type), 'w') as output_card:
for line in input_card:
output_card.write(line.replace("@MASS@", str(mass)))
output_card.write("\n")