Page MenuHomeHEPForge

No OneTemporary

diff --git a/Tests/Rivet/BFactory/BFactory-10.00.in b/Tests/Rivet/BFactory/BFactory-10.00.in
--- a/Tests/Rivet/BFactory/BFactory-10.00.in
+++ b/Tests/Rivet/BFactory/BFactory-10.00.in
@@ -1,13 +1,15 @@
# -*- ThePEG-repository -*-
create ThePEG::LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxA 5.0
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxB 5.0
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 9.4
set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
# argus eta pi0
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1989_I268577
# argus phi
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1989_I262551
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1989_I276860
+
diff --git a/Tests/Rivet/BFactory/BFactory-Upsilon.in b/Tests/Rivet/BFactory/BFactory-Upsilon.in
--- a/Tests/Rivet/BFactory/BFactory-Upsilon.in
+++ b/Tests/Rivet/BFactory/BFactory-Upsilon.in
@@ -1,18 +1,19 @@
# -*- ThePEG-repository -*-
create ThePEG::LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxA 4.73015*GeV
set /Herwig/EventHandlers/BFactoryLuminosity:BeamEMaxB 4.73015*GeV
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 9.45
set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction /Herwig/EventHandlers/BFactoryLuminosity
# set hard process
create Herwig::MEee2VectorMeson /Herwig/MatrixElements/MEUpsilon HwMELepton.so
set /Herwig/MatrixElements/MEUpsilon:VectorMeson /Herwig/Particles/Upsilon
set /Herwig/MatrixElements/MEUpsilon:Coupling 41.15810
set /Herwig/MatrixElements/SubProcess:MatrixElements 0 /Herwig/MatrixElements/MEUpsilon
# BELLE charm hadron production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1993_S2789213
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1993_S2669951
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1990_I278933
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1989_I262551
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ARGUS_1989_I276860
diff --git a/Tests/python/merge-BFactory b/Tests/python/merge-BFactory
--- a/Tests/python/merge-BFactory
+++ b/Tests/python/merge-BFactory
@@ -1,258 +1,269 @@
#! /usr/bin/env python
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
def fillAbove(desthisto, sourcehistosbysqrts):
for sqrts, h in sorted(sourcehistosbysqrts.iteritems()) :
if(sqrts=="U1") :
sqrts2=9.46
elif sqrts=="U2" :
sqrts2=10.02
elif sqrts=="U4" :
sqrts2=10.58
else :
sqrts2=float(sqrts)
+ if("ARGUS_1989_I276860" in desthisto.path and sqrts2==10.00) : sqrts2=9.98
for i in range(0,h.numPoints) :
if(h.points[i].x-0.01<sqrts2 and
h.points[i].x+0.01>sqrts2) :
desthisto.addPoint(h.points[i])
def merge(hpath):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath])
except:
logging.error("Unknown analysis object" + hpath)
sys.exit(1)
def useOne(hpath, sqrts):
global inhistos
global outhistso
try:
outhistos[hpath] = inhistos[hpath][float(sqrts)]
except:
try:
outhistos[hpath] = inhistos[hpath][sqrts]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
# #######################################
yodafiles=["-9.46","-10.00","-10.52","-10.52-sym","-10.54",
"-10.58-res","-10.58","-Upsilon",
"-Upsilon2","-Upsilon4","-10.45","-10.47","-Tau","-Phi"]
## Get histos
inhistos = {}
outhistos={}
weights = {}
for f in yodafiles:
file = "Rivet-%s%s.yoda" % (args[0], f)
if(file.find("9.46")>0) :
sqrts=9.46
elif(file.find("10.00")>0) :
sqrts=10.00
elif(file.find("10.45")>0) :
sqrts=10.45
elif(file.find("10.47")>0) :
sqrts=10.47
elif(file.find("10.52")>0) :
sqrts=10.52
elif(file.find("10.54")>0) :
sqrts=10.54
elif(file.find("10.58")>0) :
sqrts=10.58
elif(file.find("Tau")>0) :
sqrts=10.58
elif(file.find("Upsilon4")>0) :
sqrts="U4"
elif(file.find("Upsilon2")>0) :
sqrts="U2"
elif(file.find("Upsilon")>0) :
sqrts="U1"
if not os.access(file, os.R_OK):
if(file.find("Upsilon")>=0 or file.find("Tau")>=0) : continue
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
if("RAW" in aopath) :continue
if(aopath.find("6265367")>0 or aopath.find("6895344")>0 or
aopath.find("6181155")>0 or aopath.find("2789213")>0 or
aopath.find("2669951")>0 or aopath.find("278933" )>0 or
+ aopath.find("276860" )>0 or
aopath.find("262551" )>0 ) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
sqrttemp=sqrts
if(aopath.find("2669951")>0 and aopath.find("d01")>0 and
sqrts==10.45) :
sqrts=9.9
if not tmpE.has_key(sqrts):
tmpE[sqrts] = ao
else:
raise Exception("A set with sqrts = %s already exists" % ( sqrts))
sqrts=sqrttemp
else :
if("ARGUS_1992_I319102" in aopath) :
if("d02" in aopath and sqrts==10.47) :
outhistos[aopath] = ao
elif("d03"in aopath and sqrts=="U4") :
outhistos[aopath] = ao
else:
outhistos[aopath] = ao
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
- if( hpath.find("2669951")>0) :
+ if( hpath.find("2669951")>0 or hpath.find("276860" )>0) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,hsets.values()[0].title)
else :
outhistos[hpath] = hsets.values()[0]
# BELLE
useOne("/BELLE_2006_S6265367/d01-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y03","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y04","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y05","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y06","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y07","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y08","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d09-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d09-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d10-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d10-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d11-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d11-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d12-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d12-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d13-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d13-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d14-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d14-x01-y02","U4")
useOne("/BELLE_2006_S6265367/d15-x01-y01","U4")
useOne("/BELLE_2006_S6265367/d15-x01-y02","U4")
# BABAR
useOne("/BABAR_2007_S6895344/d01-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d02-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d03-x01-y01","10.58")
useOne("/BABAR_2007_S6895344/d04-x01-y01","10.58")
# BABAR
useOne("/BABAR_2005_S6181155/d01-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y02","10.54")
useOne("/BABAR_2005_S6181155/d03-x01-y01","10.54")
useOne("/BABAR_2005_S6181155/d04-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y02","10.54")
# ARGUS
useOne("/ARGUS_1993_S2789213/d01-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y02","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y03","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y04","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y05","10.45")
useOne("/ARGUS_1993_S2789213/d02-x01-y01", "U1")
useOne("/ARGUS_1993_S2789213/d02-x01-y02", "U1")
useOne("/ARGUS_1993_S2789213/d02-x01-y03", "U1")
useOne("/ARGUS_1993_S2789213/d02-x01-y04", "U1")
useOne("/ARGUS_1993_S2789213/d02-x01-y05", "U1")
useOne("/ARGUS_1993_S2789213/d03-x01-y01","U4")
useOne("/ARGUS_1993_S2789213/d03-x01-y02","U4")
useOne("/ARGUS_1993_S2789213/d03-x01-y03","U4")
useOne("/ARGUS_1993_S2789213/d03-x01-y04","U4")
useOne("/ARGUS_1993_S2789213/d03-x01-y05","U4")
useOne("/ARGUS_1993_S2789213/d04-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d05-x01-y01", "U1")
useOne("/ARGUS_1993_S2789213/d06-x01-y01","U4")
useOne("/ARGUS_1993_S2789213/d07-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d08-x01-y01", "U1")
useOne("/ARGUS_1993_S2789213/d09-x01-y01","U4")
useOne("/ARGUS_1993_S2789213/d10-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d11-x01-y01", "U1")
useOne("/ARGUS_1993_S2789213/d12-x01-y01","U4")
useOne("/ARGUS_1993_S2789213/d13-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d14-x01-y01", "U1")
useOne("/ARGUS_1993_S2789213/d15-x01-y01","U4")
if("/ARGUS_1993_S2669951/d04-x01-y01" in outhistos) :
useOne("/ARGUS_1993_S2669951/d02-x01-y01","10.45")
useOne("/ARGUS_1993_S2669951/d03-x01-y01","U1")
useOne("/ARGUS_1993_S2669951/d04-x01-y01","U2")
merge("/ARGUS_1993_S2669951/d01-x01-y01")
merge("/ARGUS_1993_S2669951/d01-x01-y02")
merge("/ARGUS_1993_S2669951/d05-x01-y01")
useOne("/ARGUS_1990_I278933/d01-x01-y01","9.46")
useOne("/ARGUS_1990_I278933/d01-x01-y02","U1")
useOne("/ARGUS_1990_I278933/d01-x01-y03","U2")
useOne("/ARGUS_1990_I278933/d02-x01-y01","9.46")
useOne("/ARGUS_1990_I278933/d02-x01-y02","U1")
useOne("/ARGUS_1990_I278933/d02-x01-y03","U2")
useOne("/ARGUS_1990_I278933/d03-x01-y01","9.46")
useOne("/ARGUS_1990_I278933/d03-x01-y02","9.46")
useOne("/ARGUS_1990_I278933/d04-x01-y01","U1")
useOne("/ARGUS_1990_I278933/d04-x01-y02","U2")
useOne("/ARGUS_1990_I278933/d05-x01-y01","9.46")
useOne("/ARGUS_1990_I278933/d05-x01-y02","9.46")
useOne("/ARGUS_1990_I278933/d06-x01-y01","U1")
useOne("/ARGUS_1990_I278933/d06-x01-y02","U2")
useOne("/ARGUS_1989_I262551/d01-x01-y01","10.00")
useOne("/ARGUS_1989_I262551/d02-x01-y01","U1")
useOne("/ARGUS_1989_I262551/d02-x01-y02","U2")
useOne("/ARGUS_1989_I262551/d03-x01-y01","U1")
useOne("/ARGUS_1989_I262551/d04-x01-y01","U2")
+merge("/ARGUS_1989_I276860/d01-x01-y01")
+merge("/ARGUS_1989_I276860/d01-x01-y02")
+merge("/ARGUS_1989_I276860/d02-x01-y01")
+merge("/ARGUS_1989_I276860/d03-x01-y01")
+merge("/ARGUS_1989_I276860/d04-x01-y01")
+merge("/ARGUS_1989_I276860/d04-x01-y02")
+for i in range(5,13) :
+ useOne("/ARGUS_1989_I276860/d%02d-x01-y01" %i,"U1")
+ useOne("/ARGUS_1989_I276860/d%02d-x01-y02" %i,"10.00")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
yoda.writeYODA(outhistos,name)
sys.exit(0)

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 3:38 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3804988
Default Alt Text
(12 KB)

Event Timeline