ckheton = "(row_next_extrig_nrp>%d && row_next_extrig_nrp<%d)" % (row_next_thl, row_next_thh) ckhetoff = "(row_next_extrig_nrp>%d || row_next_extrig_nrp<%d)" % ( row_next_thh, row_next_thl) cene = "energy_phc>%d && energy_phc<%d" % (ene_thl, ene_thh) cut_1 = "%s && %s && %s && %s" % (good, prime, spill, jbrsc) cut_all = "%s && %s && %s && %s && %s" % (good, prime, spill, sprmc, jbrsc) cut_ene_all = "%s && %s" % (cene, cut_all) cut_kheton_all = "%s && %s" % (ckheton, cut_all) cut_khetoff_all = "%s && %s" % (ckhetoff, cut_all) # -------------------------------------------------------- # use cut1 fnameins = [ "%s/run%04d/run%04d_noi%04d_mass_2018%s_cut1" % (util.dumprootdir, run, run, noi, add) for run, noi in zip(runs, util.get_noise_list(runs)) ] fnameout = "%s/%s_%s_run%04d_%04d" % (util.outdir, util.hpht_phc, htag, runs[0], runs[-1]) for fnamein in fnameins: if os.path.isfile(fnamein + ".root") == False: print "Error: file is missing %s" % (fnamein + ".root") print "forgetting options? --pre=xxx --post=yyy" sys.exit(0) print "runs: ", runs print "basic cuts: ", cut_1 print "sprmc: ", sprmc print "khet: ", ckheton print "input files[0]: ", fnameins[0] + ".root" print "output file: ", fnameout + ".root" util.check_continue()
runs=util.runs_he4 options,args = util.parser.parse_args() cut_pre = options.cut_pre cut_post = options.cut_post spill = options.spill add="" if cut_pre!=0 or cut_post!=0: add+="_pre%03d_post%03d"%(cut_pre,cut_post) if spill==-1: print "Error: please specify --spill=0 or --spill=1" sys.exit(0) elif spill==0: add+="_spilloff_sprmcon_jbrscon_prime" elif spill==1: add+="_spillon_sprmcon_jbrscon_prime" fnameins=["%s/run%04d/run%04d_noi%04d_mass_2018%s"%(util.datadir,run,run,noi,add) for run,noi in zip(runs,util.get_noise_list(runs))] for fnamein in fnameins: if os.path.isfile(fnamein+".hdf5")==False: print "Error: file is missing %s"%(fnamein+".hdf5") print "forgetting options? --pre=xxx --post=yyy" sys.exit(0) fnameout="%s/pp_run%04d_%04d%s"%(util.outdir,runs[0],runs[-1],add) print "runs: ", runs print "input files[0]: ", fnameins[0]+".hdf5" print "output file: ", fnameout+".csv" util.check_continue() #print "debug exit" #sys.exit(0)# please remove this exit # --------------------------------------------------------