#!/usr/bin/env python2 # Create a sample of real cosmic events to pass to RunOAAnalysis.exe # This is a copy of the files produced by ReconGlobal validation; # so if ReconGlobal validation has already run this script will be very fast. import os, sys, os.path # Get the input file. status = os.system("comet-get-validation-input CalibGlobal 2011_comet_cosmics.root cc42bc7a0b8c9cb061380dcb272a1508") if status != 0: sys.exit(status) # Process the real 2011 file through CalibGlobal name = "2011_comet_cosmics" incaliname = name + ".root" if not os.path.exists(incaliname): print "MISSING INPUT" sys.exit(0) outcaliname = name + "-CalibGlobal.root" # only execute if the file doesn't already exist. if not os.path.exists(outcaliname): status = os.system("RunCalibGlobal.exe -o %s %s" % (outcaliname, incaliname)) if status != 0: sys.exit(status) # Process the real 2011 file through ReconGlobal outreconame = name + "_reco.root" # only execute if the file doesn't already exist. if not os.path.exists(outreconame): status = os.system("RunReconGlobal.exe -o %s %s" % (outreconame, outcaliname)) if status != 0: sys.exit(status)