Page MenuHomeHEPForge

No OneTemporary

diff --git a/Tests/python/LowEnergy-GammaGamma-NonPerturbative.in b/Tests/python/LowEnergy-GammaGamma-NonPerturbative.in
--- a/Tests/python/LowEnergy-GammaGamma-NonPerturbative.in
+++ b/Tests/python/LowEnergy-GammaGamma-NonPerturbative.in
@@ -1,44 +1,51 @@
# -*- ThePEG-repository -*-
read snippets/EECollider.in
##################################################
# Selected the hard process
##################################################
# leading-order processes
##################################################
cd /Herwig/MatrixElements
-create Herwig::MEGammaGamma2PiPi MEgg2PiPi HwMEGammaGamma.so
+create Herwig::MEGammaGamma2X MEgg2PiPi HwMEGammaGamma.so
+create Herwig::GammaGamma2PiPiAmplitude GG2PiPiAmp
+set GG2PiPiAmp:Mode 1
+set MEgg2PiPi:Amplitude GG2PiPiAmp
+create Herwig::MEGammaGamma2X MEgg2KK HwMEGammaGamma.so
+create Herwig::GammaGamma2PiPiAmplitude GG2KKAmp
+set GG2KKAmp:Mode 2
+set MEgg2KK:Amplitude GG2KKAmp
# set the process
${processes}
##################################################
# LEP physics parameters (override defaults)
##################################################
cd /Herwig/Generators
set EventGenerator:EventHandler:LuminosityFunction:Energy ${ECMS}
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 0.2
set /Herwig/Particles/gamma:PDF /Herwig/Partons/NoPDF
set /Herwig/Particles/pi0:Stable Stable
set /Herwig/Particles/K_S0:Stable Stable
cd /Herwig/Generators
##################################################
## prepare for Rivet analysis or HepMC output
## when running with parton shower
##################################################
create ThePEG::RivetAnalysis /Herwig/Analysis/Rivet RivetAnalysis.so
insert EventGenerator:AnalysisHandlers 0 /Herwig/Analysis/Rivet
${ANALYSES}
cd /Herwig/EventHandlers
set EventHandler:BeamA /Herwig/Particles/gamma
set EventHandler:BeamB /Herwig/Particles/gamma
###################################################
# Save run for later usage with 'Herwig run'
##################################################
cd /Herwig/Generators
set EventGenerator:MaxErrors 10000
set EventGenerator:EventHandler:StatLevel Full
set EventGenerator:EventHandler:CascadeHandler NULL
saverun Rivet-LowEnergy-GammaGamma-NonPerturbative-${ECMS} EventGenerator
diff --git a/Tests/python/LowEnergy-GammaGamma-Perturbative.in b/Tests/python/LowEnergy-GammaGamma-Perturbative.in
--- a/Tests/python/LowEnergy-GammaGamma-Perturbative.in
+++ b/Tests/python/LowEnergy-GammaGamma-Perturbative.in
@@ -1,38 +1,36 @@
# -*- ThePEG-repository -*-
read snippets/EECollider.in
##################################################
# Selected the hard process
##################################################
# leading-order processes
##################################################
cd /Herwig/MatrixElements
# default gamma gamma -> q qbar
-insert SubProcess:MatrixElements 0 MEgg2ff
-set MEgg2ff:Process ${maxflavour}
-${lepton}
+${process}
set /Herwig/Particles/pi0:Stable Stable
set /Herwig/Particles/K_S0:Stable Stable
##################################################
# LEP physics parameters (override defaults)
##################################################
cd /Herwig/Generators
set EventGenerator:EventHandler:LuminosityFunction:Energy ${ECMS}
set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 0.2
set /Herwig/Particles/gamma:PDF /Herwig/Partons/NoPDF
cd /Herwig/EventHandlers
set EventHandler:BeamA /Herwig/Particles/gamma
set EventHandler:BeamB /Herwig/Particles/gamma
cd /Herwig/Generators
create ThePEG::RivetAnalysis /Herwig/Analysis/Rivet RivetAnalysis.so
insert EventGenerator:AnalysisHandlers 0 /Herwig/Analysis/Rivet
${ANALYSES}
###################################################
# Save run for later usage with 'Herwig run'
##################################################
set EventGenerator:MaxErrors 10000
-saverun Rivet-LowEnergy-EE-Perturbative-${ECMS} EventGenerator
+saverun Rivet-LowEnergy-GammaGamma-Perturbative-${ECMS} EventGenerator
diff --git a/Tests/python/LowEnergy-GammaGamma-Resonance.in b/Tests/python/LowEnergy-GammaGamma-Resonance.in
new file mode 100644
--- /dev/null
+++ b/Tests/python/LowEnergy-GammaGamma-Resonance.in
@@ -0,0 +1,104 @@
+# -*- ThePEG-repository -*-
+
+read snippets/EECollider.in
+
+##################################################
+# Selected the hard process
+##################################################
+# leading-order processes
+##################################################
+cd /Herwig/MatrixElements
+create Herwig::MEGammaGamma2X MEgg2f0_980 HwMEGammaGamma.so
+create Herwig::GammaGamma2ScalarAmplitude GG2f0_980Amp
+set GG2f0_980Amp:MassOption OffShell
+set GG2f0_980Amp:Particle /Herwig/Particles/f_0
+set GG2f0_980Amp:FTT 0.0293433
+set MEgg2f0_980:Amplitude GG2f0_980Amp
+create Herwig::MEGammaGamma2X MEgg2f0_1370 HwMEGammaGamma.so
+create Herwig::GammaGamma2ScalarAmplitude GG2f0_1370Amp
+set GG2f0_1370Amp:MassOption OffShell
+set GG2f0_1370Amp:Particle /Herwig/Particles/f'_0
+set GG2f0_1370Amp:FTT 0.134229
+set MEgg2f0_1370:Amplitude GG2f0_1370Amp
+create Herwig::MEGammaGamma2X MEgg2f0_1710 HwMEGammaGamma.so
+create Herwig::GammaGamma2ScalarAmplitude GG2f0_1710Amp
+set GG2f0_1710Amp:MassOption OffShell
+set GG2f0_1710Amp:Particle /Herwig/Particles/f_0(1710)
+set GG2f0_1710Amp:FTT 0.0130292
+set MEgg2f0_1710:Amplitude GG2f0_1710Amp
+create Herwig::MEGammaGamma2X MEgg2a0_980 HwMEGammaGamma.so
+create Herwig::GammaGamma2ScalarAmplitude GG2a0_980Amp
+set GG2a0_980Amp:MassOption OffShell
+set GG2a0_980Amp:Particle /Herwig/Particles/a_00
+set GG2a0_980Amp:FTT 0.0296427
+set MEgg2a0_980:Amplitude GG2a0_980Amp
+create Herwig::MEGammaGamma2X MEgg2a0_1450 HwMEGammaGamma.so
+create Herwig::GammaGamma2ScalarAmplitude GG2a0_1450Amp
+set GG2a0_1450Amp:MassOption OffShell
+set GG2a0_1450Amp:Particle /Herwig/Particles/a'_00
+set GG2a0_1450Amp:FTT 0.045237
+set MEgg2a0_1450:Amplitude GG2a0_1450Amp
+
+create Herwig::MEGammaGamma2X MEgg2a2_1320 HwMEGammaGamma.so
+create Herwig::GammaGamma2TensorAmplitude GG2a2_1320Amp
+set GG2a2_1320Amp:MassOption OffShell
+set GG2a2_1320Amp:Particle /Herwig/Particles/a_20
+set GG2a2_1320Amp:FTT0 0.
+set GG2a2_1320Amp:FTT2 0.0581115
+set MEgg2a2_1320:Amplitude GG2a2_1320Amp
+create Herwig::MEGammaGamma2X MEgg2f2_1270 HwMEGammaGamma.so
+create Herwig::GammaGamma2TensorAmplitude GG2f2_1270Amp
+set GG2f2_1270Amp:MassOption OffShell
+set GG2f2_1270Amp:Particle /Herwig/Particles/f_2
+set GG2f2_1270Amp:FTT0 0.
+set GG2f2_1270Amp:FTT2 0.0921718
+set MEgg2f2_1270:Amplitude GG2f2_1270Amp
+create Herwig::MEGammaGamma2X MEgg2f2_1525 HwMEGammaGamma.so
+create Herwig::GammaGamma2TensorAmplitude GG2f2_1525Amp
+set GG2f2_1525Amp:MassOption OffShell
+set GG2f2_1525Amp:Particle /Herwig/Particles/f'_2
+set GG2f2_1525Amp:FTT0 0.
+set GG2f2_1525Amp:FTT2 0.0178537
+set MEgg2f2_1525:Amplitude GG2f2_1525Amp
+
+
+# set the process
+insert SubProcess:MatrixElements 0 MEgg2f0_980
+insert SubProcess:MatrixElements 0 MEgg2f0_1710
+insert SubProcess:MatrixElements 0 MEgg2a0_980
+insert SubProcess:MatrixElements 0 MEgg2a0_1450
+insert SubProcess:MatrixElements 0 MEgg2a2_1320
+insert SubProcess:MatrixElements 0 MEgg2f2_1270
+insert SubProcess:MatrixElements 0 MEgg2f2_1525
+
+
+##################################################
+# LEP physics parameters (override defaults)
+##################################################
+cd /Herwig/Generators
+set EventGenerator:EventHandler:LuminosityFunction:Energy ${ECMS}
+set /Herwig/Generators/EventGenerator:EventHandler:Cuts:MHatMin 0.2
+set /Herwig/Particles/gamma:PDF /Herwig/Partons/NoPDF
+set /Herwig/Particles/pi0:Stable Stable
+set /Herwig/Particles/K_S0:Stable Stable
+cd /Herwig/Generators
+##################################################
+## prepare for Rivet analysis or HepMC output
+## when running with parton shower
+##################################################
+create ThePEG::RivetAnalysis /Herwig/Analysis/Rivet RivetAnalysis.so
+insert EventGenerator:AnalysisHandlers 0 /Herwig/Analysis/Rivet
+${ANALYSES}
+
+cd /Herwig/EventHandlers
+set EventHandler:BeamA /Herwig/Particles/gamma
+set EventHandler:BeamB /Herwig/Particles/gamma
+
+###################################################
+# Save run for later usage with 'Herwig run'
+##################################################
+cd /Herwig/Generators
+set EventGenerator:MaxErrors 10000
+set EventGenerator:EventHandler:StatLevel Full
+set EventGenerator:EventHandler:CascadeHandler NULL
+saverun Rivet-LowEnergy-GammaGamma-Resonance-${ECMS} EventGenerator
diff --git a/Tests/python/LowEnergy-Photon.py.in b/Tests/python/LowEnergy-Photon.py.in
--- a/Tests/python/LowEnergy-Photon.py.in
+++ b/Tests/python/LowEnergy-Photon.py.in
@@ -1,172 +1,358 @@
#! @PYTHON@
+# -*- mode: python -*-
from __future__ import print_function
import yoda,os,math,subprocess,optparse
from string import Template
+import numpy as np
# get the path for the rivet data
p = subprocess.Popen(["rivet-config", "--datadir"],stdout=subprocess.PIPE)
path=p.communicate()[0].strip().decode("UTF-8")
#Define the arguments
op = optparse.OptionParser(usage=__doc__)
op.add_option("--process" , dest="processes" , default=[], action="append")
op.add_option("--path" , dest="path" , default=path)
op.add_option("--non-perturbative", dest="nonPerturbative" , default=False, action="store_true")
op.add_option("--perturbative" , dest="perturbative" , default=False, action="store_true")
+op.add_option("--resonance" , dest="resonance" , default=False, action="store_true")
op.add_option("--dest" , dest="dest" , default="Rivet")
op.add_option("--list" , dest="list" , default=False, action="store_true")
-op.add_option("--plots" , dest="plot" , default=False, action="store_true")
+op.add_option("--plots" , dest="plot" , default=False, action="store_true")
opts, args = op.parse_args()
path=opts.path
thresholds = [0.7,2.*.5,2.*1.87,2.*5.28]
# the list of analyses and processes
analyses = { 'KK' : {}, 'PiPi' : {}, 'PPbar' : {}, "3Pi" : {},
- "EtaprimePiPi" : {}, "4Pi" : {}, "EtaPhi" : {}, "EtaOmega" : {},
+ "EtaPi" : {}, "4Pi" : {}, "EtaEta" : {}, "EtaOmega" : {},
"2K1Pi" : {}, "2K2Pi" : {}, "4K" : {}, "6m" : {},
- "EtaPiPi" : {}, "OmegaPi" : {}, "PiGamma" : {}, "EtaGamma" : {},
+ "EtaPiPi" : {}, "EtaPrimePiPi" : {}, "OmegaPi" : {}, "PiGamma" : {}, "EtaGamma" : {},
"PhiPi" : {}, "OmegaPiPi" : {}, "DD" : {}, "BB" : {},
"5Pi" : {}, "LL" : {}, "Baryon" : {} }
# pi+pi-
+analyses["PiPi"]["ALEPH_2003_I626022" ] = ["d03-x01-y01"]
+analyses["PiPi"]["BELLE_2005_I667712" ] = ["d01-x01-y02",
+ "d03-x01-y01","d03-x01-y02","d03-x01-y03",
+ "d03-x01-y04","d03-x01-y05","d03-x01-y06",
+ "d05-x01-y01","d05-x01-y02","d05-x01-y03",
+ "d05-x01-y04","d05-x01-y05","d05-x01-y06"]
+analyses["PiPi"]["BELLE_2007_I749358" ] = ["d01-x01-y01"]
analyses["PiPi"]["CELLO_1992_I345437" ] = ["d01-x01-y01"]
-# proton-antiproton
+analyses["PiPi"]["CLEO_1994_I372230" ] = ["d01-x01-y01"]
+analyses["PiPi"]["MARKII_1984_I195739" ] = ["d01-x01-y01"]
+analyses["PiPi"]["MARKII_1986_I220003" ] = ["d01-x01-y01","d01-x01-y02"]
+analyses["PiPi"]["MARKII_1990_I304882" ] = ["d01-x01-y01",
+ "d02-x01-y01","d02-x01-y02","d02-x01-y03",
+ "d02-x01-y04","d02-x01-y05","d02-x01-y06"]
+analyses["PiPi"]["PLUTO_1984_I204487" ] = ["d01-x01-y01"]
+analyses["PiPi"]["TPC_1986_I228072" ] = ["d01-x01-y01","d04-x01-y01"]
+analyses["PiPi"]["VENUS_1995_I392360" ] = ["d01-x01-y01"]
+# pi0pi0
+analyses["PiPi"]["BELLE_2009_I815978" ] = ["d31-x01-y01","d31-x01-y02"]
+analyses["PiPi"]["CRYSTAL_BALL_1982_I168793"] = ["d01-x01-y01"]
+analyses["PiPi"]["CRYSTAL_BALL_1990_I294492"] = ["d01-x01-y01"]
+analyses["PiPi"]["JADE_1990_I295180" ] = ["d01-x01-y01"]
+# K+K-
+analyses["KK" ]["ALEPH_2003_I626022" ] = ["d04-x01-y01"]
+analyses["KK" ]["BELLE_2003_I629334" ] = ["d01-x01-y01"]
+analyses["KK" ]["BELLE_2005_I667712" ] = ["d01-x01-y01",
+ "d04-x01-y01","d04-x01-y02","d04-x01-y03",
+ "d04-x01-y04","d04-x01-y05","d04-x01-y06",
+ "d06-x01-y01","d06-x01-y02","d06-x01-y03",
+ "d06-x01-y04","d06-x01-y05","d06-x01-y06"]
+analyses["KK" ]["CLEO_1994_I372230" ] = ["d01-x01-y01"]
+analyses["KK" ]["MARKII_1984_I195739" ] = ["d01-x01-y01"]
+analyses["KK" ]["MARKII_1986_I220003" ] = ["d01-x01-y01","d01-x01-y02"]
+analyses["KK" ]["TPC_1986_I228072" ] = ["d05-x01-y01"]
+# K0K0
+analyses["KK" ]["BELLE_2013_I1245023" ] = ["d01-x01-y01","d01-x01-y02"]
+# Eta Eta
+analyses["EtaEta"]["BELLE_2010_I862260" ] = ["d01-x01-y01","d01-x01-y02"]
+# Eta Pi
+analyses["EtaPi"]["BELLE_2009_I822474" ] = ["d01-x01-y01"]
+analyses["EtaPi"]["CRYSTAL_BALL_1986_I217547" ] = ["d01-x01-y01"]
+# 3 pions
+analyses["3Pi"]["ARGUS_1997_I420421" ] = ["d01-x01-y01","d02-x01-y01","d03-x01-y05",
+ "d04-x01-y03","d05-x01-y01"]
+analyses["3Pi"]["TASSO_1986_I228876" ] = ["d01-x01-y01"]
+# 4 pions
+analyses["4Pi"]["ARGUS_1989_I266416" ] = ["d01-x01-y01","d02-x01-y01",
+ "d03-x01-y01","d04-x01-y01"]
+analyses["4Pi"]["CELLO_1989_I267081" ] = ["d01-x01-y01","d02-x01-y01"]
+analyses["4Pi"]["TASSO_1982_I180755" ] = ["d01-x01-y01"]
+# proton antiproton
+analyses["PPbar" ]["ARGUS_1989_I267759" ] = ["d02-x01-y01"]
+analyses["PPbar" ]["BELLE_2005_I677625" ] = ["d01-x01-y01"]
+analyses["PPbar" ]["CLEO_1994_I358510" ] = ["d01-x01-y01"]
+analyses["PPbar" ]["JADE_1986_I231554" ] = ["d01-x01-y01"]
+analyses["PPbar" ]["TASSO_1983_I191417" ] = ["d01-x01-y01"]
+analyses["PPbar" ]["TPC_1987_I246557" ] = ["d01-x01-y01"]
+# other baryons
+analyses["Baryon"]["BELLE_2016_I1444981" ] = ["d01-x01-y01","d02-x01-y01"]
+# K_0S K+/- pi -/+
+analyses["2K1Pi"]["CELLO_1989_I266414" ] = ["d01-x01-y01"]
+# K*K* and various 2K2pi states
+analyses["2K2Pi"]["ARGUS_1987_I248680"] = ["d01-x01-y01","d02-x01-y01","d03-x01-y01","d04-x01-y01",
+ "d05-x01-y01","d05-x01-y02","d05-x01-y03","d05-x01-y04","d05-x01-y05"]
+analyses["2K2Pi"]["ARGUS_1988_I262713"] = ["d01-x01-y01","d02-x01-y01","d03-x01-y01","d04-x01-y01"]
+analyses["2K2Pi"]["ARGUS_1994_I372451"] = ["d01-x01-y01","d02-x01-y01"]
+analyses["2K2Pi"]["ARGUS_2000_I511512" ] = ["d03-x01-y01","d03-x01-y02","d03-x01-y03","d03-x01-y04",
+ "d04-x01-y01","d04-x01-y02","d04-x01-y03","d04-x01-y04",
+ "d05-x01-y01","d05-x01-y02","d05-x01-y03","d05-x01-y04",
+ "d06-x01-y01","d06-x01-y02",
+ "d07-x01-y01","d07-x01-y02","d07-x01-y03",
+ "d08-x01-y01","d08-x01-y02","d08-x01-y03",
+ "d09-x01-y01","d09-x01-y02",
+ "d10-x01-y01","d10-x01-y02",
+ "d11-x01-y01"]
+# eta' pipi
+analyses["EtaPrimePiPi"]["BELLE_2018_I1672149"] = ["d01-x01-y01","d02-x01-y01"]
+# 6 meson final-states
+analyses["6m"]["ARGUS_1996_I403304"] = [ "d01-x01-y01","d01-x01-y02","d01-x01-y03"]
+analyses["6m"]["BELLE_2012_I1090664"] = ["d01-x01-y01","d01-x01-y02",
+ "d01-x02-y01","d01-x02-y02",
+ "d01-x03-y01","d01-x03-y02"]
+analyses["6m"]["ARGUS_1987_I247567"] = ["d01-x01-y01","d02-x01-y01"]
+analyses["6m"]["ARGUS_1988_I260828"] = ["d01-x01-y01"]
+analyses["6m"]["ARGUS_1991_I296187"] = ["d02-x01-y01","d03-x01-y01","d05-x01-y01"]
+analyses["6m"]["ARGUS_1991_I315058"] = ["d01-x01-y01","d01-x01-y02","d01-x01-y03"]
+# hyperons
+analyses["LL"]["BELLE_2006_I727063" ] = ["d01-x01-y01","d01-x01-y02"]
+analyses["LL"]["CLEOII_1997_I439745"] = ["d01-x01-y01"]
+
# list the analysis if required and quit()
allProcesses=False
if "All" in opts.processes :
allProcesses=True
processes = sorted(list(analyses.keys()))
else :
processes = sorted(list(set(opts.processes)))
if(opts.list) :
for process in processes :
print (" ".join(analyses[process]))
quit()
if(opts.plot) :
output=""
for process in processes:
for analysis in analyses[process] :
if(analysis=="CELLO_1992_I345437") :
for iy in range(1,22) :
- output+= " -m/%s/%s" % (analysis,"d02-x01-y%02d"%iy)
+ output+= " -f/%s/%s" % (analysis,"d02-x01-y%02d"%iy)
+ elif(analysis=="VENUS_1995_I392360") :
+ for iy in range(2,12) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y01"%iy)
+ elif(analysis=="ALEPH_2003_I626022") :
+ if process =="PiPi" :
+ output+= " -f/%s/%s" % (analysis,"d01-x01-y01")
+ elif process =="KK" :
+ output+= " -f/%s/%s" % (analysis,"d02-x01-y01")
+ elif(analysis=="BELLE_2003_I629334") :
+ for ix in range(2,8) :
+ for iy in range(1,5) :
+ if(ix==8 and iy>1) : continue
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y%02d"%(ix,iy))
+ elif(analysis=="BELLE_2007_I749358") :
+ for iy in range(2,100) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y01"%iy)
+ for iy in range(100,142) :
+ output+= " -f/%s/%s" % (analysis,"d%03d-x01-y01"%iy)
+ elif(analysis=="BELLE_2010_I862260") :
+ for iy in range(2,44) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y01"%iy)
+ elif(analysis=="BELLE_2009_I822474") :
+ for iy in range(2,76) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y01"%iy)
+ elif(analysis=="BELLE_2013_I1245023") :
+ for iy in range(2,41) :
+ for iz in range(1,4) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y0%s"%(iy,iz))
+ elif(analysis=="BELLE_2005_I677625") :
+ for iy in range(2,7) :
+ for iz in range(1,4) :
+ if iy==6 and iz ==3 : break
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y0%s"%(iy,iz))
+ elif(analysis=="BELLE_2009_I815978") :
+ for iy in range(1,31) :
+ for iz in range(1,4) :
+ if iy==30 and iz ==2 : break
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y0%s"%(iy,iz))
+ elif(analysis=="CLEO_1994_I358510") :
+ for iy in range(2,4) :
+ output+= " -f/%s/%s" % (analysis,"d%02d-x01-y01"%iy)
+ elif(analysis=="CLEO_1994_I358510" or analysis=="TASSO_1983_I191417" or
+ analysis=="CRYSTAL_BALL_1986_I217547") :
+ for iy in range(1,3) :
+ output+= " -f/%s/%s" % (analysis,"d02-x01-y%02d"%iy)
+ elif(analysis=="JADE_1986_I231554" or analysis=="CRYSTAL_BALL_1982_I168793") :
+ output+= " -f/%s/%s" % (analysis,"d02-x01-y01")
+ elif(analysis=="ARGUS_1989_I267759") :
+ output+= " -f/%s/%s" % (analysis,"d01-x01-y01")
+ elif(analysis=="TPC_1987_I246557") :
+ for iy in range(1,3) :
+ output+= " -f/%s/%s" % (analysis,"d03-x01-y%02d"%iy)
+ elif(analysis=="CRYSTAL_BALL_1990_I294492") :
+ for iy in range(1,8) :
+ output+= " -f/%s/%s" % (analysis,"d02-x01-y%02d"%iy)
for plot in analyses[process][analysis]:
- output+= " -m/%s/%s" % (analysis,plot)
+ output+= " -e/%s/%s" % (analysis,plot)
print (output)
quit()
# mapping of process to me to use
-me = { "PiPi" : "MEgg2PiPi"}
+me = { "PiPi" : "MEgg2PiPi",
+ "KK" : "MEgg2KK"}
# get the particle masses from Herwig
particles = { "pi+" : 0., "pi0" : 0. ,"eta" : 0. ,"eta'" : 0. ,"phi" : 0. ,"omega" : 0. ,"p+" : 0. ,"K+" : 0.}
for val in particles :
tempTxt = "get /Herwig/Particles/%s:NominalMass\nget /Herwig/Particles/%s:WidthLoCut\n" % (val,val)
with open("temp.in",'w') as f:
f.write(tempTxt)
p = subprocess.Popen(["../src/Herwig", "read","temp.in"],stdout=subprocess.PIPE)
vals = p.communicate()[0].split()
mass = float(vals[0])-float(vals[1])
particles[val]=mass
os.remove("temp.in")
# minimum CMS energies for specific processes
minMass = { "PiPi" : 2.*particles["pi+"],
"KK" : 2.*particles["K+"],
"3Pi" : 2.*particles["pi+"]+particles["pi0"],
"4Pi" : 2.*particles["pi+"]+2.*particles["pi0"],
"EtaPiPi" : particles["eta"]+2.*particles["pi+"],
"EtaprimePiPi" : particles["eta'"]+2.*particles["pi+"],
"EtaPhi" : particles["phi"]+particles["eta"],
"EtaOmega" : particles["omega"]+particles["eta"],
"OmegaPi" : particles["omega"]+particles["pi0"],
"OmegaPiPi" : particles["omega"]+2.*particles["pi0"],
"PhiPi" : particles["phi"]+particles["pi0"],
"PiGamma" : particles["pi0"],
"EtaGamma" : particles["eta"],
"PPbar" : 2.*particles["p+"],
"LL" : 0.,
"2K1Pi" : 2.*particles["K+"]+particles["pi0"] }
# energies we need
energies={}
def nearestEnergy(en) :
Emin=0
delta=1e30
anals=[]
for val in energies :
if(abs(val-en)<delta) :
delta = abs(val-en)
Emin = val
anals=energies[val]
return (Emin,delta,anals)
for process in processes:
if(process not in analyses) : continue
matrix=""
if( process in me ) :
matrix = me[process]
for analysis in analyses[process] :
- aos=yoda.read(os.path.join(os.path.join(os.getcwd(),path),analysis+".yoda"))
+ try :
+ aos=yoda.read(os.path.join(os.path.join(os.getcwd(),path),analysis+".yoda.gz"))
+ except :
+ try :
+ aos=yoda.read(os.path.join(os.path.join(os.getcwd(),path),analysis+".yoda.gz"))
+ except:
+ continue
if(len(aos)==0) : continue
for plot in analyses[process][analysis] :
histo = aos["/REF/%s/%s" %(analysis,plot)]
- for point in histo.points() :
- energy = point.x()
- if(analysis=="KLOE_2009_I797438" or
- analysis=="KLOE_2005_I655225" or
- analysis=="KLOE2_2017_I1634981" or
- analysis=="FENICE_1994_I377833") :
- energy = math.sqrt(energy)
- if(energy>200) :
- energy *= 0.001
+ eTemp=[]
+ if hasattr(histo,'bins') :
+ for bin in histo.bins() :
+ if bin.edge(0) :
+ energy = bin.edge(0)
+ else :
+ energy = bin.mid(0)
+ if analysis=="ARGUS_1994_I372451" and plot=="d02-x01-y01" and energy=="1.9 - 2.3":
+ energy=2.1
+ energy=float(energy)
+ eTemp.append(energy)
+ elif hasattr(histo,'points') :
+ for point in histo.points() :
+ eTemp.append(point.x())
+ else :
+ #print("Can't handle %s " % type(histo))
+ continue
+ eTemp=np.array(eTemp)
+ if(analysis=="KLOE_2009_I797438" or
+ analysis=="KLOE_2005_I655225" or
+ analysis=="KLOE2_2017_I1634981" or
+ analysis=="FENICE_1994_I377833") :
+ eTemp = np.sqrt(eTemp)
+ if(eTemp[0]>200) :
+ eTemp *= 0.001
+ for energy in eTemp:
emin,delta,anals = nearestEnergy(energy)
if(energy in energies) :
if(analysis not in energies[energy][1]) :
energies[energy][1].append(analysis)
if(matrix!="" and matrix not in energies[energy][0] and
minMass[process]<=energy) :
energies[energy][0].append(matrix)
elif(delta<1e-7) :
if(analysis not in anals[1]) :
anals[1].append(analysis)
if(matrix!="" and matrix not in anals[0] and
minMass[process]<=energy) :
anals[0].append(matrix)
else :
if(matrix=="") :
energies[energy]=[[],[analysis]]
elif(minMass[process]<=energy) :
energies[energy]=[[matrix],[analysis]]
with open("python/LowEnergy-GammaGamma-Perturbative.in", 'r') as f:
templateText = f.read()
perturbative=Template( templateText )
with open("python/LowEnergy-GammaGamma-NonPerturbative.in", 'r') as f:
templateText = f.read()
nonPerturbative=Template( templateText )
+with open("python/LowEnergy-GammaGamma-Resonance.in", 'r') as f:
+ templateText = f.read()
+resonance=Template( templateText )
targets=""
for energy in sorted(energies) :
anal=""
for analysis in energies[energy][1]:
anal+= "insert /Herwig/Analysis/Rivet:Analyses 0 %s\n" %analysis
proc=""
matrices = energies[energy][0]
- if(allProcesses) : matrices = me.values()
for matrix in matrices:
proc+="insert SubProcess:MatrixElements 0 %s\n" % matrix
maxflavour =5
if(energy<thresholds[1]) :
maxflavour=2
elif(energy<thresholds[2]) :
maxflavour=3
elif(energy<thresholds[3]) :
maxflavour=4
# input file for perturbative QCD
if(opts.perturbative and energy> thresholds[0]) :
+ process=""
+ for i in range(1,maxflavour+1) :
+ process+="cp MEgg2ff MEgg2qq%s\n" %i
+ process+="cp gg2ffAmp gg2fqq%sAmp\n" %i
+ process+="set MEgg2qq%s:Amplitude gg2fqq%sAmp\n" % (i,i)
+ process+="set gg2fqq%sAmp:Process %s\n" %(i,i+10)
+ process+="insert SubProcess:MatrixElements 0 MEgg2qq%s\n" % i
inputPerturbative = perturbative.substitute({"ECMS" : "%8.6f" % energy, "ANALYSES" : anal,
- "lepton" : "", "maxflavour" : 10+maxflavour})
+ "process" : process})
with open(opts.dest+"/Rivet-LowEnergy-GammaGamma-Perturbative-%8.6f.in" % energy ,'w') as f:
f.write(inputPerturbative)
targets += "Rivet-LowEnergy-GammaGamma-Perturbative-%8.6f.yoda " % energy
# input file for currents
if(opts.nonPerturbative and proc!="") :
inputNonPerturbative = nonPerturbative.substitute({"ECMS" : "%8.6f" % energy, "ANALYSES" : anal,
"processes" : proc})
with open(opts.dest+"/Rivet-LowEnergy-GammaGamma-NonPerturbative-%8.6f.in" % energy ,'w') as f:
f.write(inputNonPerturbative)
targets += "Rivet-LowEnergy-GammaGamma-NonPerturbative-%8.6f.yoda " % energy
+ # input file for resonances
+ if(opts.resonance and energy>0.81) :
+ inputResonance = resonance.substitute({"ECMS" : "%8.6f" % energy, "ANALYSES" : anal})
+ with open(opts.dest+"/Rivet-LowEnergy-GammaGamma-Resonance-%8.6f.in" % energy ,'w') as f:
+ f.write(inputResonance)
+ targets += "Rivet-LowEnergy-GammaGamma-Resonance-%8.6f.yoda " % energy
+
print (targets)

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 3:08 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023232
Default Alt Text
(27 KB)

Event Timeline