ra4_stats  0341147a0dc35f80f4e12c6003afb76a38e2ed6e
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
change_r.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 import os
4 import re
5 import mod_parameter
6 
7 def GluinoMass(name):
8  return int(re.search("mGluino-(.*)_mLSP-", name).group(1))
9 
10 def LSPMass(name):
11  return int(re.search("mLSP-(.*)_xsec", name).group(1))
12 
13 workdir = "mod_sigs"
14 files = [f for f in os.listdir(workdir) if os.path.isfile(os.path.join(workdir,f))]
15 
16 for f in files:
17  mglu = GluinoMass(f)
18  mlsp = LSPMass(f)
19 
20  rmax = -1
21  if mglu <= 1200 and mlsp <= 550:
22  rmax = 5.
23  if mglu <= 900 and mlsp <= 350:
24  rmax = 1.5
25 
26  if rmax > 0:
27  mod_parameter.ModParam(os.path.join(workdir,f), "w", "r", "upper", rmax)
def LSPMass(name)
Definition: change_r.py:10
def ModParam(filename, workspacename, parameter, valtype, value)
Definition: mod_parameter.py:9
def GluinoMass(name)
Definition: change_r.py:7