diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -1,116 +1,118 @@ Makefile$ Makefile\.in$ \.deps$ \.libs$ \.l[ao]$ \.so$ \.so\. \.o$ ~$ \.pyc$ \.codereplace$ \.orig$ \.tar\.(gz|bz2)$ ^autom4te.cache$ ^config.herwig$ ^config.log$ ^config.status$ ^configure$ ^include/Herwig$ ^Config/config.guess$ ^Config/config.h$ ^Config/config.h.in$ ^Config/config.sub$ ^Config/depcomp$ ^Config/compile$ ^Config/install-sh$ ^Config/missing$ ^Config/stamp-h1$ ^Config/ar-lib$ ^Contrib/make_makefiles.sh$ ^Contrib/.*/.*\.(log|out|tex|run)$ ^Utilities/hgstamp.inc$ ^Doc/HerwigDefaults.in$ ^Doc/refman-html$ ^Doc/fixinterfaces.pl$ ^Doc/refman.conf$ ^Doc/refman.h$ ^Doc/AllInterfaces.h$ ^Doc/HerwigDefaults.rpo$ ^Doc/Herwig-refman.tag$ ^Doc/tagfileThePEG.tag$ ^Doc/.*\.log$ ^INSTALL$ ^aclocal.m4$ ^confdefs.h$ ^conftest.c$ ^conftest.err$ ^include/done-all-links$ ^libtool$ \.dirstamp$ ^src/hgstamp.inc$ ^src/herwigopts.h$ ^src/herwigopts.c$ ^src/defaults/Analysis.in$ ^src/defaults/Decays.in$ ^src/defaults/decayers.in$ ^src/herwig-config$ ^src/.*\.(run|tex|out|log|rpo|spc|top|dump|dot|aux|pdf|ps|png|svg|hepmc|dvi)$ ^src/Makefile-UserModules$ ^lib/done-all-links$ ^lib/apple-fixes$ ^src/defaults/PDF.in$ ^src/defaults/done-all-links$ ^src/tune$ ^src/Herwig$ ^src/Herwig-cache$ ^src/tests/.*\.(time|mult|Bmult|chisq)$ ^src/Merging/test/*yoda ^src/Merging/test/Herwig* ^src/Merging/test/L* ^src/Merging/test/done-all-links ^src/Merging/done-all-links ^Tests/.*/.*\.(top|ps|pyc|info|dat|pdf|png)$ ^Tests/.*\.(top|ps|pyc|info|dat|pdf|png|log|out)$ ^Tests/.*\.(top|run|tex|mult|Bmult|aida|yoda)$ ^Tests/Rivet-.*$ ^Tests/.cache$ ^Tests/Rivet/.*(LEP|DIS|LHC|TVT|Star|BFactory|ISR|SppS)-.*\.in$ ^Tests/plots$ ^Tests/Herwig$ ^Tests/.*index.html$ PDF/SaSPhotonPDF.cc ^Herwig\- ^Models/Feynrules/python/Makefile-FR$ ^MatrixElement/Matchbox/External/MadGraph/mg2herwig$ ^MatrixElement/Matchbox/Scales/MatchboxScale.cc$ ^Utilities/Statistics/herwig-combinedistributions$ ^Utilities/Statistics/herwig-combineruns$ ^Utilities/Statistics/herwig-makedistributions$ ^src/defaults/MatchboxDefaults.in$ ^src/defaults/setup.gosam.in$ ^src/Matchbox/LO-DefaultShower.in$ ^src/Matchbox/LO-DipoleShower.in$ ^src/Matchbox/LO-NoShower.in$ ^src/Matchbox/MCatLO-DefaultShower.in$ ^src/Matchbox/MCatLO-DipoleShower.in$ ^src/Matchbox/MCatNLO-DefaultShower.in$ ^src/Matchbox/MCatNLO-DipoleShower.in$ ^src/Matchbox/NLO-NoShower.in$ ^src/Matchbox/Powheg-DefaultShower.in$ ^src/Matchbox/Powheg-DipoleShower.in$ ^src/defaults/MatchboxMergingDefaults.in ^src/Matchbox/done-all-links$ ^src/snippets/done-all-links$ ^Utilities/XML/xml_test$ ^Utilities/utilities_test$ ^Utilities/versionstring.h$ ^MatrixElement/Matchbox/External/MadGraph/mg2herwig.py$ test\.(log|trs)$ test-suite\.log$ ^Config/test-driver$ param_card\.dat$ __all.cc$ .ccR$ ^tmp/* PDF/stamp-h2 +Tests/anatohepmc.txt +Tests/hepmctoana.txt diff --git a/Tests/python/merge-EE b/Tests/python/merge-EE old mode 100644 new mode 100755 diff --git a/Tests/python/merge-EE-Gamma b/Tests/python/merge-EE-Gamma old mode 100644 new mode 100755 diff --git a/Tests/python/plot-EE b/Tests/python/plot-EE old mode 100644 new mode 100755 diff --git a/Tests/python/rivet_check.script b/Tests/python/rivet_check.script old mode 100644 new mode 100755 --- a/Tests/python/rivet_check.script +++ b/Tests/python/rivet_check.script @@ -1,112 +1,99 @@ #!/usr/bin/python import glob,subprocess,os,optparse op = optparse.OptionParser(usage=__doc__) op.add_option("--obsolete", dest="obsolete" , default=False, action="store_true" , help="Warn if obsolete analyses not included") op.add_option("--search", dest="search" , default=False, action="store_true" , help="Warn if search analyses not included") op.add_option("--heavy-ion", dest="heavy_ion" , default=False, action="store_true" , help="Warn if heavy ion analyses not included") op.add_option("--MC", dest="MC" , default=False, action="store_true" , help="Warn if MC analyses not included") op.add_option("--print-descriptions", dest="output" , default=False, action="store_true" , help="Print analysis descriptions") opts, args = op.parse_args() # analyses to skip skip = [ "ATLAS_2010_I849050", # alias "TOTEM_2012_002" , # alias "TEST" , # test analysis ] searches=["ALEPH_2016_I1492968"] p=subprocess.Popen(["rivet","--list"],stdout=subprocess.PIPE) analyses={} for line in p.communicate()[0].split("\n") : line=line.strip() if(line=="") : continue temp = line.split(None,1) if(len(temp)==2) : analyses[temp[0].strip()] = temp[1].strip() elif(len(temp)==1) : analyses[temp[0].strip()] = "" else : print line quit() # main line hw analyses at high energy hw_analyses={} files=[] for idir in glob.glob("Rivet/*") : if( "Powheg" in idir or "MCatNLO" in idir) : continue if ( not os.path.isdir(idir) ) : continue if ( "Templates" in idir ) : continue for ifile in glob.glob("%s/*.in" % idir) : fshort=ifile.split("/")[-1].replace(".in","") files.append(fshort) file=open(ifile) line=file.readline() while line: if("RivetAnalysis:Analyses" in line) : line=line.strip().split() anal = line[-1].strip().split(":")[0] if(anal not in hw_analyses) : hw_analyses[anal] = [fshort] else : hw_analyses[anal].append(fshort) line=file.readline() -# low energy herwig analysis -p = subprocess.Popen(["./python/LowEnergy.py","--list","--process","all"],stdout=subprocess.PIPE) -lowEnergy = p.communicate()[0] -hw_low_energy_analyses=lowEnergy.strip().split() -# R analyses -p = subprocess.Popen(["./python/R.py","--list"],stdout=subprocess.PIPE) -Rlist = p.communicate()[0] -hw_R_analyses=Rlist.strip().split() - anatohepmc = open("anatohepmc.txt",'w') hepmctoana = open("hepmctoana.txt",'w') # check the analyses for analysis in sorted(analyses.keys()) : # we have it high energy if(analysis in hw_analyses) : anatohepmc.write("%s %s\n" % (analysis,' '.join(sorted(hw_analyses[analysis]))) ) if("[OBSOLETE]" in analyses[analysis]) : print "WARNING Obsolete analysis %s included : %s" % (analysis,analyses[analysis]) - # we have it low energy or R or skipping - elif (analysis in hw_low_energy_analyses or analysis in skip or - analysis in hw_R_analyses ) : - continue # obsolete elif("[OBSOLETE]" in analyses[analysis]) : if(opts.obsolete) : print "Obsolete analysis %s not included : %s" % (analysis,analyses[analysis]) # searches elif("Search" in analyses[analysis] or "search" in analyses[analysis] or analysis in searches) : if(opts.search) : print "Search analysis %s not included : %s" % (analysis,analyses[analysis]) # mc only elif(analysis[0:3]=="MC_") : if(opts.MC) : print "MC analysis %s not included : %s" % (analysis,analyses[analysis]) # examples elif("[EXAMPLE]" in analyses[analysis]) : continue # we don't have it else : p=subprocess.Popen(["rivet","--show-analysis",analysis],stdout=subprocess.PIPE) desc=p.communicate()[0] beams=[] for line in desc.split("\n") : if("Beams:" in line) : beams=line.replace("Beams:","").split() nHeavy = sum((part=="Pb" or part=="Au") for part in beams) if(nHeavy == len(beams) or nHeavy+1 == len(beams)) : if(opts.heavy_ion) : print "Heavy Ion analysis %s not included : %s" % (analysis,analyses[analysis]) else : print "MISSING ANALYSIS",analysis,analyses[analysis] if(opts.output) : print desc # output second file for rivet anatohepmc.close() for fname in sorted(files) : anals=[] for anal in hw_analyses : if(fname in hw_analyses[anal]) : anals.append(anal) hepmctoana.write("%s %s\n" % (fname,' '.join(sorted(anals))) ) hepmctoana.close()