Angular analysis of B+->K*+(K+pi0)mumu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9 KiB

  1. # Renata Kopecna
  2. #########################################################
  3. # #
  4. # Set of functions used for running FCNC fitter #
  5. # #
  6. #########################################################
  7. import sys
  8. import os
  9. import subprocess
  10. from runUtils import *
  11. from runArgs import *
  12. allYearsDict ={ 2011:1,
  13. 2012:1,
  14. 2015:2,
  15. 2016:2,
  16. 2017:2,
  17. 2018:2,
  18. }
  19. if '__main__' == __name__:
  20. print ("")
  21. #Add and parse arguments
  22. parser = ShowArgumentsParser(
  23. formatter_class=argparse.RawTextHelpFormatter,
  24. prog=os.path.basename(sys.argv[0]),
  25. description=("""Do the comparison for:
  26. For a full list of arguments, do: 'python {0} -h'
  27. """).format(os.path.basename(sys.argv[0]))
  28. )
  29. addAllArgs(parser)
  30. opts = parser.parse_args()
  31. dir(opts)
  32. #check dir is the FCNC dir
  33. print ("Starting program in directory: ")
  34. os.system('pwd')
  35. print ("\n")
  36. #Open output file; if none specified, print into console
  37. if (opts.log!=""): logFile = open(opts.log,'w')
  38. else: logFile = open("dummy",'w') #easiest is to create a dummy and then not save anything in it
  39. #if (opts.compile):
  40. #Just compile always, because you're a dumb dumb
  41. if (not opts.dontCompile):
  42. waitForCommand("bash",["cmake.sh"], logFile)
  43. print ("\n\nCompiled.")
  44. cmd = './bu2kstarmumu'
  45. arg_list = []
  46. arg_list.append('-v ' + str(opts.verbosity))
  47. if (opts.hilfe):
  48. arg_list.append("-h")
  49. waitForCommand(cmd,arg_list,logFile)
  50. else:
  51. argListList= fullArgListPerRun(opts)
  52. for arguments in argListList:
  53. print("Runinng ./bu2kstarmumu ", arguments, "\n")
  54. waitForCommand(cmd,arguments,logFile)
  55. print ("\n\nDone running FCNC.\n")