[Rivet-svn] r3903 - in branches/2012-06-aidarivet: data/anainfo doc

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Aug 24 14:57:02 BST 2012


Author: hoeth
Date: Fri Aug 24 14:57:02 2012
New Revision: 3903

Log:
merge r3817 and r3819 from trunk

Modified:
   branches/2012-06-aidarivet/data/anainfo/ATLAS_2012_I1082009.info
   branches/2012-06-aidarivet/data/anainfo/DELPHI_2000_S4328825.info
   branches/2012-06-aidarivet/doc/rivet-manual.tex

Modified: branches/2012-06-aidarivet/data/anainfo/ATLAS_2012_I1082009.info
==============================================================================
--- branches/2012-06-aidarivet/data/anainfo/ATLAS_2012_I1082009.info	Fri Aug 24 14:41:19 2012	(r3902)
+++ branches/2012-06-aidarivet/data/anainfo/ATLAS_2012_I1082009.info	Fri Aug 24 14:57:02 2012	(r3903)
@@ -16,12 +16,12 @@
 Energies: [7000]
 Description:
   Measurement of $D^{*\pm}$ meson production in jets from proton-proton collisions
-  at a centre-of-mass energy of $\sqrt{s}=7$ TeV at the LHC. 
+  at a centre-of-mass energy of $\sqrt{s}=7$ TeV at the LHC.
   The measurement is based on a data sample recorded with the ATLAS detector with
   an integrated luminosity of $0.30\,\text{pb}^{-1}$ for jets with transverse momentum
-  between 25 and 70 GeV in the pseudorapidity range $|eta| < 2.5$. 
+  between 25 and 70 GeV in the pseudorapidity range $|eta| < 2.5$.
 BibKey: Aad:2011td
-BibTeX: 'article{Aad:2011td,
+BibTeX: '@Article{Aad:2011td,
       author         = "Aad, Georges and others",
       title          = "{Measurement of $D^{*\pm}$ meson production in jets from
                         pp collisions at $\sqrt{s}=7$ TeV with the ATLAS detector}",

Modified: branches/2012-06-aidarivet/data/anainfo/DELPHI_2000_S4328825.info
==============================================================================
--- branches/2012-06-aidarivet/data/anainfo/DELPHI_2000_S4328825.info	Fri Aug 24 14:41:19 2012	(r3902)
+++ branches/2012-06-aidarivet/data/anainfo/DELPHI_2000_S4328825.info	Fri Aug 24 14:57:02 2012	(r3903)
@@ -22,7 +22,7 @@
   above the $Z^0$ mass. In addition to the energy points in the original paper
   one additional point at 206 GeV is included from a later preliminary result.
 BibKey: Abreu:2000nt
-BibTeX: 'Article{Abreu:2000nt,
+BibTeX: '@Article{Abreu:2000nt,
      author    = "Abreu, P. and others",
      collaboration = "DELPHI",
      title     = "{Hadronization properties of b quarks compared to light

Modified: branches/2012-06-aidarivet/doc/rivet-manual.tex
==============================================================================
--- branches/2012-06-aidarivet/doc/rivet-manual.tex	Fri Aug 24 14:41:19 2012	(r3902)
+++ branches/2012-06-aidarivet/doc/rivet-manual.tex	Fri Aug 24 14:57:02 2012	(r3903)
@@ -7,8 +7,8 @@
 
 \author{Andy Buckley\\ PPE Group, School of Physics, University of Edinburgh, UK.\\ E-mail: \email{andy.buckley at ed.ac.uk}}
 \author{Jonathan Butterworth\\ HEP Group, Dept. of Physics and Astronomy, UCL, London, UK.\\ E-mail: \email{J.Butterworth at ucl.ac.uk}}
-\author{Leif L\"onnblad\\ Theoretical Physics, Lund University, Sweden.\\ E-mail: \email{lonnblad at thep.lu.se}}
 \author{Hendrik Hoeth\\ IPPP, Durham University, UK.\\ E-mail: \email{hendrik.hoeth at cern.ch}}
+\author{Leif L\"onnblad\\ Theoretical Physics, Lund University, Sweden.\\ E-mail: \email{lonnblad at thep.lu.se}}
 \author{James Monk\\ HEP Group, Dept. of Physics and Astronomy, UCL, London, UK.\\ E-mail: \email{jmonk at hep.ucl.ac.uk}}
 \author{Holger Schulz\\ Institut f\"ur Physik, Berlin Humboldt University, Germany.\\ E-mail: \email{holger.schulz at physik.hu-berlin.de}}
 \author{Jan Eike von Seggern\\ Institut f\"ur Physik, Berlin Humboldt University, Germany.\\ E-mail: \email{vseggern at physik.hu-berlin.de}}
@@ -64,10 +64,10 @@
 Before we get started, a declaration of intent: this manual is intended to be a
 guide to using Rivet, rather than a comprehensive and painstakingly maintained
 reference to the application programming interface (API) of the Rivet
-library. For that purpose, you will hopefully find the online generated
-documentation at \url{http://projects.hepforge.org/rivet} to be
-sufficient. Similar API documentation is maintained for AGILe at
-\url{http://projects.hepforge.org/agile}.
+library. For that purpose the online documentation at
+\url{http://rivet.hepforge.org} should be sufficient -- in case of confusion
+please contact the authors at \url{rivet at projects.hepforge.org}. Similar API
+documentation is maintained for AGILe at \url{http://agile.hepforge.org}.
 
 
 \subsection{Typographic conventions}
@@ -232,7 +232,7 @@
 process is evolving with time, and so, rather than provide information in this
 manual which will be outdated by the time you read it, we simply refer you to
 the relevant page on the Rivet wiki:
-\url{http://projects.hepforge.org/rivet/trac/wiki/GenserMirror}.
+\url{http://rivet.hepforge.org/trac/wiki/GenserMirror}.
 
 If you are interested in using a generator not currently supported by AGILe,
 which does not output HepMC events in its native state, then please contact the
@@ -918,10 +918,12 @@
 end of the analysis respectively.
 
 The new analysis should include the header for the base analysis class plus
-whichever Rivet projections are to be used and should work under the
-\code{Rivet} namespace.  The header for a new analysis named \code{UserAnalysis}
+whichever Rivet projections are to be used, and should work under the
+\code{Rivet} namespace. Since analyses are hardly ever intended to be inherited
+from, they are usually implemented within a single \kbd{.cc} file with no
+corresponding header. The skeleton of a new analysis named \code{UserAnalysis}
 that uses the \code{FinalState} projection might therefore start off looking
-like this:
+like this, in a file named \kbd{UserAnalysis.cc}:
 %
 \begin{snippet}
 #include "Rivet/Analysis.hh"
@@ -930,45 +932,62 @@
 
   class UserAnalysis : public Analysis {
   public:
-    UserAnalysis();
-    void init();
-    void analyze(const Event& event);
-    void finalize();
+    UserAnalysis() : Analysis("USERANA") { }
+    void init() { ... }
+    void analyze(const Event& event) { ... }
+    void finalize() { ... }
   };
 
 }
 \end{snippet}
 
-The constructor for the \code{UserAnalysis} may impose certain
-requirements upon the events that the analysis will work with.  A call to the
-\code{setBeams} method declares that the analysis may only be run on events with
-specific types of beam particles, for example adding the line
-%
-\begin{snippet}
-  setBeams(PROTON, PROTON);
-\end{snippet}
-%
-\noindent ensures that the analysis can only be run on events from proton-proton
-collisions.  Other types of beam particles that may be used include
-\code{ANTIPROTON}, \code{ELECTRON}, \code{POSITRON}, \code{MUON} and \code{ALL}.
-The latter of these declares that the analysis is suitable for use with any type
-of collision and is the default.
-
-Some analyses need to know the interaction cross section that was generated by
-the Monte Carlo generator, typically in order to normalise histograms.
-Depending on the Monte Carlo that is used and its interface to Rivet, the cross
-section may or may not be known.  An analysis can therefore declare at the
-beginning of a run that it will need the cross section information during the
-finalisation stages.  Such a declaration can be used to prevent what would
-otherwise be fruitless analyses from running.  An analysis sets itself as
-requiring the cross section by calling inside the constructor
-%
-\begin{snippet}
-  setNeedsCrossSection(true);
-\end{snippet}
-%
-\noindent In the absence of this call the default is to assume that the analysis
-does not need to know the cross section.
+The constructor body is usually left empty, as all event loop setup is done in
+the \code{init()} method: the one \emph{required} constructor feature is to make
+a call to its base \code{Analysis} constructor, passing a string by which the
+analysis will \emph{register} itself with the Rivet framework. This name is the
+one exposed to a command-line or API user of this analysis: usually it is the
+same as the class name, which for official analyses is always in upper case.
+
+\begin{warning}
+  Early versions of Rivet required the user to declare allowed beam types,
+  energies, whether a cross-section is required, etc. in the analysis
+  constructor via methods like \code{setBeams(...)} and
+  \code{setNeedsCrossSection(...)}. This information is now \emph{much}
+  preferred to be taken from the \kbd{.info} file for the analysis, and
+  \emph{must} be done this way in analyses submitted for inclusion in future
+  Rivet releases.
+\end{warning}
+
+% for the \code{UserAnalysis} may impose certain
+% requirements upon the events that the analysis will work with.  A call to the
+% \code{setBeams} method declares that the analysis may only be run on events with
+% specific types of beam particles, for example adding the line
+% %
+% \begin{snippet}
+%   setBeams(PROTON, PROTON);
+% \end{snippet}
+% %
+% \noindent ensures that the analysis can only be run on events from proton-proton
+% collisions.  Other types of beam particles that may be used include
+% \code{ANTIPROTON}, \code{ELECTRON}, \code{POSITRON}, \code{MUON} and \code{ALL}.
+% The latter of these declares that the analysis is suitable for use with any type
+% of collision and is the default.
+
+% Some analyses need to know the interaction cross section that was generated by
+% the Monte Carlo generator, typically in order to normalise histograms.
+% Depending on the Monte Carlo that is used and its interface to Rivet, the cross
+% section may or may not be known.  An analysis can therefore declare at the
+% beginning of a run that it will need the cross section information during the
+% finalisation stages.  Such a declaration can be used to prevent what would
+% otherwise be fruitless analyses from running.  An analysis sets itself as
+% requiring the cross section by calling inside the constructor
+% %
+% \begin{snippet}
+%   setNeedsCrossSection(true);
+% \end{snippet}
+% %
+% \noindent In the absence of this call the default is to assume that the analysis
+% does not need to know the cross section.
 
 The \code{init()} method for the \code{UserAnalysis} class should add to the analysis all
 of the projections that will be used.  Projections can be added to an analysis
@@ -980,7 +999,7 @@
 create and add that projection is as follows:
 %
 \begin{snippet}
-Rivet::init() {
+init() {
   const FinalState fs(-5.0, 5.0);
   addProjection(fs, "FS");
 }
@@ -1093,7 +1112,7 @@
 % plugin analyses?
 %
 \begin{snippet}
-  void MyAnalysis::init() {
+  void init() {
     _h_one = bookHistogram1D(2,1,1);
     _h_two = bookProfile1D(3,1,2);
     _h_three = bookHistogram1D("d00-x00-y00", 50, 0.0, 1.0);
@@ -1118,7 +1137,7 @@
 function. Remember to specify the event weight as you fill:
 %
 \begin{snippet}
-  void MyAnalysis::analyze(const Event& e) {
+  void analyze(const Event& e) {
     [projections, cuts, etc.]
     ...
     _h_one->fill(pT, event.weight());
@@ -1205,7 +1224,7 @@
 
 To get started writing your analysis and understand the plugin system better,
 you should check out the documentation in the wiki on the Rivet website:
-\url{http://projects.hepforge.org/rivet/trac/wiki/}. The standard
+\url{http://rivet.hepforge.org/trac/wiki/}. The standard
 \kbd{rivet-mkanalysis} and \kbd{rivet-buildplugin} scripts can respectively be
 used to make an analysis template with many ``boilerplate'' details filled in
 (including bibliographic information from Inspire if available), and to build a


More information about the Rivet-svn mailing list