|
[Rivet-svn] r3633 - in branches/2011-07-aida2yoda: . data/anainfo data/refdata doc pyext src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Mar 20 14:34:56 GMT 2012
Author: hoeth Date: Tue Mar 20 14:34:56 2012 New Revision: 3633 Log: merge c3586-3589 from trunk Modified: branches/2011-07-aida2yoda/ChangeLog branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES.info branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES_RATIOS.info branches/2011-07-aida2yoda/data/refdata/JADE_1998_S3612880.aida branches/2011-07-aida2yoda/doc/mk-analysis-html branches/2011-07-aida2yoda/pyext/lighthisto.py branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES.cc branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES_RATIOS.cc Modified: branches/2011-07-aida2yoda/ChangeLog ============================================================================== --- branches/2011-07-aida2yoda/ChangeLog Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/ChangeLog Tue Mar 20 14:34:56 2012 (r3633) @@ -1,3 +1,13 @@ +2012-02-28 Hendrik Hoeth <hendrik.hoeth at cern.ch> + + * lighthisto.py: Caching for re.compile(). This speeds up aida2flat + ant flat2aida by more than an order of magnitude. + +2012-02-27 Andy Buckley <andy.buckley at cern.ch> + + * doc/mk-analysis-html: Adding more LaTeX/text -> HTML conversion + replacements, including better <,> handling. + 2012-02-26 Andy Buckley <andy.buckley at cern.ch> * Adding CMS_2011_S8973270, CMS_2011_S8941262, CMS_2011_S9215166, Modified: branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES.info Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES.info Tue Mar 20 14:34:56 2012 (r3633) @@ -13,7 +13,7 @@ Hadronic events in $e^+ e^-$ collisions NumEvents: 1000000 Beams: [e+, e-] -Energies: [91.2] +Energies: [10, 35, 91.2, 177] PtCuts: [0] Description: Hadron multiplicities in hadronic $e^+e^-$ events, taken from Review of Modified: branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES_RATIOS.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES_RATIOS.info Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/data/anainfo/PDG_HADRON_MULTIPLICITIES_RATIOS.info Tue Mar 20 14:34:56 2012 (r3633) @@ -13,7 +13,7 @@ Hadronic events in $e^+ e^-$ collisions NumEvents: 1000000 Beams: [e+, e-] -Energies: [91.2] +Energies: [10, 35, 91.2, 177] PtCuts: [0] Description: Ratios (w.r.t. $\pi^+/\pi^-$) of hadron multiplicities in hadronic $e^+ e^-$ Modified: branches/2011-07-aida2yoda/data/refdata/JADE_1998_S3612880.aida ============================================================================== --- branches/2011-07-aida2yoda/data/refdata/JADE_1998_S3612880.aida Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/data/refdata/JADE_1998_S3612880.aida Tue Mar 20 14:34:56 2012 (r3633) @@ -681,11 +681,11 @@ </dataPoint> </dataPointSet> <dataPointSet name="d11-x01-y01" dimension="2" - path="/REF/JADE_1998_S3612880" title="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=22$ GeV"> + path="/REF/JADE_1998_S3612880" title="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=35$ GeV"> <dimension dim="0" title="$D_2$" /> <dimension dim="1" title="$1/\sigma \text{d}\sigma/\text{d}(d_2)$" /> <annotation> - <item key="Title" value="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=22$ GeV" sticky="true"/> + <item key="Title" value="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=35$ GeV" sticky="true"/> <item key="AidaPath" value="/REF/JADE_1998_S3612880/d11-x01-y01" sticky="true"/> <item key="FullPath" value="/temp.aida/REF/JADE_1998_S3612880/d11-x01-y01" sticky="true"/> </annotation> @@ -755,9 +755,9 @@ </dataPoint> </dataPointSet> <dataPointSet name="d12-x01-y01" dimension="2" - path="/REF/JADE_1998_S3612880" title="(1/SIG)*D(SIG)/D(Y23)"> + path="/REF/JADE_1998_S3612880" title="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=22$ GeV"> <annotation> - <item key="Title" value="(1/SIG)*D(SIG)/D(Y23)" sticky="true"/> + <item key="Title" value="Wide Differential 2-Jet rate (Durham), $\sqrt{s}=22$ GeV" sticky="true"/> <item key="AidaPath" value="/REF/JADE_1998_S3612880/d12-x01-y01" sticky="true"/> <item key="FullPath" value="/temp.aida/REF/JADE_1998_S3612880/d12-x01-y01" sticky="true"/> </annotation> Modified: branches/2011-07-aida2yoda/doc/mk-analysis-html ============================================================================== --- branches/2011-07-aida2yoda/doc/mk-analysis-html Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/doc/mk-analysis-html Tue Mar 20 14:34:56 2012 (r3633) @@ -43,10 +43,16 @@ import rivet -def htmlify(s): +def htmlify(s, para=False): + # TODO: also replace LaTeX like \text, $$, \le, \ge, \mathrm, \emph, etc. t = s \ .replace("&", "&") \ - #.replace("->", "\\ensuremath{\\to}") \ + .replace(">", ">") \ + .replace("<", "<") \ + .replace("$", "") \ + .replace("\\pm", "+-") + if para: + t = t.replace("\n\n", "</p><p>") return t @@ -58,7 +64,7 @@ page = "" ana = rivet.AnalysisLoader.getAnalysis(aname) page += "<h3 id='%s'>%s</h3>\n" % (aname, aname) - page += "<b>%s</b><br/>\n" % ana.summary() + page += "<b>%s</b><br/>\n" % htmlify(ana.summary()) page += "<b>Experiment:</b> %s (%s)<br/>\n" % (ana.experiment(), ana.collider()) if ana.inspireId(): spiresbase = "http://inspire-hep.net/record" @@ -82,7 +88,7 @@ email = a.split()[-1].replace("<", "").replace(">", "") #s = "<a href='mailto:%s'>%s</a>" % (email, name) s = name - page += " <li>%s</li>\n" % s + page += " <li>%s</li>\n" % htmlify(s) page += "</ul>\n" else: page += "<b>No authors listed</b>\n" @@ -95,13 +101,13 @@ if r.startswith("arXiv:"): code = r.split()[0].replace("arXiv:", "") url = "http://arxiv.org/abs/" + code - page += " <li>%s <a href='%s'>%s</a></li>\n" % ("arXiv:", url, code) + page += " <li>%s <a href='%s'>%s</a></li>\n" % ("arXiv:", htmlify(url), htmlify(code)) elif r.startswith("doi:"): code = r.replace("doi:", "") url = "http://dx.doi.org/" + code - page += " <li>%s <a href='%s'>%s</a></li>\n" % ("DOI:", url, code) + page += " <li>%s <a href='%s'>%s</a></li>\n" % ("DOI:", htmlify(url), htmlify(code)) else: - page += " <li>%s</li>\n" % r + page += " <li>%s</li>\n" % htmlify(r) page += "</ul>\n" else: page += "<b>No references listed</b>\n" @@ -142,15 +148,14 @@ l = l.strip() if l.startswith("*"): l = l[1:].strip() - page += " <li>%s</li>\n" % l + page += " <li>%s</li>\n" % htmlify(l) page += "</ul>\n" else: page += "<ul>No run details listed</ul>\n" - page += "\n<p>" + ana.description().replace("\n\n", "</p><p>") + "</p>\n" + page += "\n<p>" + htmlify(ana.description(), para=True) + "</p>\n" - page = htmlify(page) pages.append(page) Modified: branches/2011-07-aida2yoda/pyext/lighthisto.py ============================================================================== --- branches/2011-07-aida2yoda/pyext/lighthisto.py Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/pyext/lighthisto.py Tue Mar 20 14:34:56 2012 (r3633) @@ -553,6 +553,7 @@ pat_comment = re.compile('^#|^\s*$') pat_property = re.compile('^(\w+?)=(.*)$') pat_path_property = re.compile('^(\S+?)::(\w+?)=(.*)$') + pat_paths = {} def __init__(self, plotpaths=None, addfiles=[]): """ @@ -633,7 +634,9 @@ if m: tag, pathpat = m.group(1,2) # pathpat could be a regex - if tag == section and re.match(pathpat,hpath): + if not self.pat_paths.has_key(pathpat): + self.pat_paths[pathpat] = re.compile(pathpat) + if tag == section and self.pat_paths[pathpat].match(hpath): startreading = True if section in ['SPECIAL']: ret[section] = '' Modified: branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES.cc Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES.cc Tue Mar 20 14:34:56 2012 (r3633) @@ -608,33 +608,33 @@ } if (sqrtS()/GeV >= 29 && sqrtS()/GeV <= 35) { - scale(_histMeanMultiPiPlus , 1.0/sumOfWeights()); - scale(_histMeanMultiPi0 , 1.0/sumOfWeights()); - scale(_histMeanMultiKPlus , 1.0/sumOfWeights()); - scale(_histMeanMultiK0 , 1.0/sumOfWeights()); - scale(_histMeanMultiEta , 1.0/sumOfWeights()); - scale(_histMeanMultiEtaPrime , 1.0/sumOfWeights()); - scale(_histMeanMultiDPlus , 1.0/sumOfWeights()); - scale(_histMeanMultiD0 , 1.0/sumOfWeights()); - scale(_histMeanMultiDPlus_s , 1.0/sumOfWeights()); - scale(_histMeanMultiF0_980 , 1.0/sumOfWeights()); - scale(_histMeanMultiRho770_0 , 1.0/sumOfWeights()); - scale(_histMeanMultiKStar892Plus , 1.0/sumOfWeights()); - scale(_histMeanMultiKStar892_0 , 1.0/sumOfWeights()); - scale(_histMeanMultiPhi1020 , 1.0/sumOfWeights()); - scale(_histMeanMultiDStar2010Plus , 1.0/sumOfWeights()); - scale(_histMeanMultiDStar2007_0 , 1.0/sumOfWeights()); - scale(_histMeanMultiF2_1270 , 1.0/sumOfWeights()); - scale(_histMeanMultiK2Star1430Plus , 1.0/sumOfWeights()); - scale(_histMeanMultiK2Star1430_0 , 1.0/sumOfWeights()); - scale(_histMeanMultiP , 1.0/sumOfWeights()); - scale(_histMeanMultiLambda , 1.0/sumOfWeights()); - scale(_histMeanMultiXiMinus , 1.0/sumOfWeights()); - scale(_histMeanMultiSigma1385Minus , 1.0/sumOfWeights()); - scale(_histMeanMultiSigma1385Plus , 1.0/sumOfWeights()); - scale(_histMeanMultiSigma1385PlusMinus, 1.0/sumOfWeights()); - scale(_histMeanMultiOmegaMinus , 1.0/sumOfWeights()); - scale(_histMeanMultiLambda_c_Plus , 1.0/sumOfWeights()); + scale(_histMeanMultiPiPlus , 5.0/sumOfWeights()); + scale(_histMeanMultiPi0 , 5.0/sumOfWeights()); + scale(_histMeanMultiKPlus , 5.0/sumOfWeights()); + scale(_histMeanMultiK0 , 5.0/sumOfWeights()); + scale(_histMeanMultiEta , 5.0/sumOfWeights()); + scale(_histMeanMultiEtaPrime , 5.0/sumOfWeights()); + scale(_histMeanMultiDPlus , 5.0/sumOfWeights()); + scale(_histMeanMultiD0 , 5.0/sumOfWeights()); + scale(_histMeanMultiDPlus_s , 5.0/sumOfWeights()); + scale(_histMeanMultiF0_980 , 5.0/sumOfWeights()); + scale(_histMeanMultiRho770_0 , 5.0/sumOfWeights()); + scale(_histMeanMultiKStar892Plus , 5.0/sumOfWeights()); + scale(_histMeanMultiKStar892_0 , 5.0/sumOfWeights()); + scale(_histMeanMultiPhi1020 , 5.0/sumOfWeights()); + scale(_histMeanMultiDStar2010Plus , 5.0/sumOfWeights()); + scale(_histMeanMultiDStar2007_0 , 5.0/sumOfWeights()); + scale(_histMeanMultiF2_1270 , 5.0/sumOfWeights()); + scale(_histMeanMultiK2Star1430Plus , 5.0/sumOfWeights()); + scale(_histMeanMultiK2Star1430_0 , 5.0/sumOfWeights()); + scale(_histMeanMultiP , 5.0/sumOfWeights()); + scale(_histMeanMultiLambda , 5.0/sumOfWeights()); + scale(_histMeanMultiXiMinus , 5.0/sumOfWeights()); + scale(_histMeanMultiSigma1385Minus , 5.0/sumOfWeights()); + scale(_histMeanMultiSigma1385Plus , 5.0/sumOfWeights()); + scale(_histMeanMultiSigma1385PlusMinus, 5.0/sumOfWeights()); + scale(_histMeanMultiOmegaMinus , 5.0/sumOfWeights()); + scale(_histMeanMultiLambda_c_Plus , 5.0/sumOfWeights()); } if (sqrtS()/GeV >= 89.5 && sqrtS()/GeV <= 91.8) { @@ -692,11 +692,11 @@ } if (sqrtS()/GeV >= 130 && sqrtS()/GeV <= 200) { - scale(_histMeanMultiPiPlus , 1.0/sumOfWeights()); - scale(_histMeanMultiKPlus , 1.0/sumOfWeights()); - scale(_histMeanMultiK0 , 1.0/sumOfWeights()); - scale(_histMeanMultiP , 1.0/sumOfWeights()); - scale(_histMeanMultiLambda , 1.0/sumOfWeights()); + scale(_histMeanMultiPiPlus , 70.0/sumOfWeights()); + scale(_histMeanMultiKPlus , 70.0/sumOfWeights()); + scale(_histMeanMultiK0 , 70.0/sumOfWeights()); + scale(_histMeanMultiP , 70.0/sumOfWeights()); + scale(_histMeanMultiLambda , 70.0/sumOfWeights()); } } Modified: branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES_RATIOS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES_RATIOS.cc Tue Mar 20 14:32:36 2012 (r3632) +++ branches/2011-07-aida2yoda/src/Analyses/PDG_HADRON_MULTIPLICITIES_RATIOS.cc Tue Mar 20 14:34:56 2012 (r3633) @@ -604,32 +604,32 @@ } if (sqrtS()/GeV >= 29 && sqrtS()/GeV <= 35) { - scale(_histMeanMultiPi0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiKPlus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiK0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiEta , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiEtaPrime , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiDPlus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiD0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiDPlus_s , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiF0_980 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiRho770_0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiKStar892Plus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiKStar892_0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiPhi1020 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiDStar2010Plus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiDStar2007_0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiF2_1270 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiK2Star1430Plus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiK2Star1430_0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiP , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiLambda , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiXiMinus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiSigma1385Minus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiSigma1385Plus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiSigma1385PlusMinus, 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiOmegaMinus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiLambda_c_Plus , 1.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiPi0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiKPlus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiK0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiEta , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiEtaPrime , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiDPlus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiD0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiDPlus_s , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiF0_980 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiRho770_0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiKStar892Plus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiKStar892_0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiPhi1020 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiDStar2010Plus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiDStar2007_0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiF2_1270 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiK2Star1430Plus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiK2Star1430_0 , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiP , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiLambda , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiXiMinus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiSigma1385Minus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiSigma1385Plus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiSigma1385PlusMinus, 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiOmegaMinus , 5.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiLambda_c_Plus , 5.0/_weightedTotalNumPiPlus); } if (sqrtS()/GeV >= 89.5 && sqrtS()/GeV <= 91.8) { @@ -686,10 +686,10 @@ } if (sqrtS()/GeV >= 130 && sqrtS()/GeV <= 200) { - scale(_histMeanMultiKPlus , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiK0 , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiP , 1.0/_weightedTotalNumPiPlus); - scale(_histMeanMultiLambda , 1.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiKPlus , 70.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiK0 , 70.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiP , 70.0/_weightedTotalNumPiPlus); + scale(_histMeanMultiLambda , 70.0/_weightedTotalNumPiPlus); } }
More information about the Rivet-svn mailing list |