[Rivet-svn] r3421 - in branches/2011-07-aida2yoda: data/plotinfo include/Rivet/Projections src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 6 21:59:05 BST 2011


Author: hoeth
Date: Thu Oct  6 21:59:04 2011
New Revision: 3421

Log:
merge r3376-3378 from trunk

Added:
   branches/2011-07-aida2yoda/include/Rivet/Projections/NonHadronicFinalState.hh
      - copied unchanged from r3377, trunk/include/Rivet/Projections/NonHadronicFinalState.hh
   branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc
      - copied unchanged from r3377, trunk/src/Projections/NonHadronicFinalState.cc
Modified:
   branches/2011-07-aida2yoda/data/plotinfo/H1_2000_S4129130.plot
   branches/2011-07-aida2yoda/include/Rivet/Projections/HadronicFinalState.hh
   branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/Makefile.am

Modified: branches/2011-07-aida2yoda/data/plotinfo/H1_2000_S4129130.plot
==============================================================================
--- branches/2011-07-aida2yoda/data/plotinfo/H1_2000_S4129130.plot	Thu Oct  6 21:57:04 2011	(r3420)
+++ branches/2011-07-aida2yoda/data/plotinfo/H1_2000_S4129130.plot	Thu Oct  6 21:59:04 2011	(r3421)
@@ -2,192 +2,224 @@
 Title=Transverse energy flow for $\langle x \rangle = 0.08\cdot 10^{-3}, \langle Q^2 \rangle =  3.2 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d02-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.14\cdot 10^{-3}, \langle Q^2 \rangle =  3.8 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d03-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.26\cdot 10^{-3}, \langle Q^2 \rangle =  3.9 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d04-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.57\cdot 10^{-3}, \langle Q^2 \rangle =  4.2 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d05-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.16\cdot 10^{-3}, \langle Q^2 \rangle =  6.3 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d06-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.27\cdot 10^{-3}, \langle Q^2 \rangle =  7.0 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d07-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.50\cdot 10^{-3}, \langle Q^2 \rangle =  7.0 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d08-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 1.10\cdot 10^{-3}, \langle Q^2 \rangle =  7.3 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d09-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.36\cdot 10^{-3}, \langle Q^2 \rangle = 13.1 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d10-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.63\cdot 10^{-3}, \langle Q^2 \rangle = 14.1 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d11-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 1.10\cdot 10^{-3}, \langle Q^2 \rangle = 14.1 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d12-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 2.30\cdot 10^{-3}, \langle Q^2 \rangle = 14.9 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d13-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.93\cdot 10^{-3}, \langle Q^2 \rangle = 28.8 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d14-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 2.10\cdot 10^{-3}, \langle Q^2 \rangle = 31.2 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d15-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 4.70\cdot 10^{-3}, \langle Q^2 \rangle = 33.2 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d16-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 2.00\cdot 10^{-3}, \langle Q^2 \rangle = 59.4 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d17-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 7.00\cdot 10^{-3}, \langle Q^2 \rangle = 70.2 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d18-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.0043, \langle Q^2 \rangle = 175 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d19-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.01, \langle Q^2 \rangle = 253 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d20-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.026, \langle Q^2 \rangle = 283 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d21-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.012, \langle Q^2 \rangle = 511 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d22-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.026, \langle Q^2 \rangle = 617 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d23-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.076, \langle Q^2 \rangle = 682 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d24-x01-y01
 Title=Transverse energy flow for $\langle x \rangle = 0.11, \langle Q^2 \rangle = 2200 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d25-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 2.5-5 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d26-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 5-10 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d27-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 10-20 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d28-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 20-50 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d29-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 50-100 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d30-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 100-220 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d31-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle = 220-400 \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d32-x01-y01
 Title=Transverse energy flow for $\langle Q^2 \rangle \text{ GeV}^2$
 XLabel=$\eta$
 YLabel=$1/N \, \mathrm{d}{E_\perp}/\mathrm{d}{\eta}$ / GeV
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d33-x01-y01
@@ -195,6 +227,7 @@
 XLabel=$Q^2$ / $\text{GeV}^2$
 YLabel=$\langle E_\perp \rangle$ / GeV
 LogX=1
+LogY=0
 # END PLOT
 
 # BEGIN PLOT /H1_2000_S4129130/d34-x01-y01
@@ -202,5 +235,6 @@
 XLabel=$Q^2$ / $\text{GeV}^2$
 YLabel=$\langle E_\perp \rangle$ / GeV
 LogX=1
+LogY=0
 # END PLOT
 

Modified: branches/2011-07-aida2yoda/include/Rivet/Projections/HadronicFinalState.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/Projections/HadronicFinalState.hh	Thu Oct  6 21:57:04 2011	(r3420)
+++ branches/2011-07-aida2yoda/include/Rivet/Projections/HadronicFinalState.hh	Thu Oct  6 21:59:04 2011	(r3421)
@@ -18,8 +18,7 @@
   public:
 
     /// Constructor: the supplied FinalState projection is assumed to live through the run.
-    HadronicFinalState(FinalState& fsp)
-      : FinalState(fsp)
+    HadronicFinalState(const FinalState& fsp)
     {
       setName("HadronicFinalState");
       addProjection(fsp, "FS");
@@ -28,7 +27,6 @@
     HadronicFinalState(double mineta = -MAXRAPIDITY,
                        double maxeta = MAXRAPIDITY,
                        double minpt = 0.0*GeV)
-      : FinalState(mineta, maxeta, minpt)
     {
       setName("HadronicFinalState");
       addProjection(FinalState(mineta, maxeta, minpt), "FS");

Copied: branches/2011-07-aida2yoda/include/Rivet/Projections/NonHadronicFinalState.hh (from r3377, trunk/include/Rivet/Projections/NonHadronicFinalState.hh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2011-07-aida2yoda/include/Rivet/Projections/NonHadronicFinalState.hh	Thu Oct  6 21:59:04 2011	(r3421, copy of r3377, trunk/include/Rivet/Projections/NonHadronicFinalState.hh)
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+#ifndef RIVET_NonHadronicFinalState_HH
+#define RIVET_NonHadronicFinalState_HH
+
+#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Rivet.hh"
+#include "Rivet/Particle.hh"
+#include "Rivet/Event.hh"
+#include "Rivet/Projection.hh"
+#include "Rivet/Projections/FinalState.hh"
+
+
+namespace Rivet {
+
+  /// @brief Project only hadronic final state particles.
+  class NonHadronicFinalState : public FinalState {
+
+  public:
+
+    /// Constructor: the supplied FinalState projection is assumed to live through the run.
+    NonHadronicFinalState(FinalState& fsp)
+    {
+      setName("NonHadronicFinalState");
+      addProjection(fsp, "FS");
+    }
+
+    NonHadronicFinalState(double mineta = -MAXRAPIDITY,
+			  double maxeta = MAXRAPIDITY,
+			  double minpt = 0.0*GeV)
+    {
+      setName("NonHadronicFinalState");
+      addProjection(FinalState(mineta, maxeta, minpt), "FS");
+    }
+
+    /// Clone on the heap.
+    virtual const Projection* clone() const {
+      return new NonHadronicFinalState(*this);
+    }
+
+  protected:
+
+    /// Apply the projection on the supplied event.
+    void project(const Event& e);
+
+    /// Compare projections.
+    int compare(const Projection& p) const;
+
+  };
+
+
+}
+
+
+#endif

Modified: branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc	Thu Oct  6 21:57:04 2011	(r3420)
+++ branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc	Thu Oct  6 21:59:04 2011	(r3421)
@@ -19,8 +19,7 @@
 
 
   void HadronicFinalState::project(const Event& e) {
-    FinalState fsp = static_cast<FinalState>(*this);
-    const FinalState& fs = applyProjection(e, fsp);
+    const FinalState& fs = applyProjection<FinalState>(e, "FS");
     _theParticles.clear();
     std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
                         std::back_inserter(_theParticles), hadronFilter);

Modified: branches/2011-07-aida2yoda/src/Projections/Makefile.am
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Makefile.am	Thu Oct  6 21:57:04 2011	(r3420)
+++ branches/2011-07-aida2yoda/src/Projections/Makefile.am	Thu Oct  6 21:59:04 2011	(r3421)
@@ -14,6 +14,7 @@
   FoxWolframMoments.cc \
   FParameter.cc \
   HadronicFinalState.cc \
+  NonHadronicFinalState.cc \
   Hemispheres.cc \
   IdentifiedFinalState.cc \
   InitialQuarks.cc \

Copied: branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc (from r3377, trunk/src/Projections/NonHadronicFinalState.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc	Thu Oct  6 21:59:04 2011	(r3421, copy of r3377, trunk/src/Projections/NonHadronicFinalState.cc)
@@ -0,0 +1,29 @@
+// -*- C++ -*-
+#include "Rivet/Rivet.hh"
+#include "Rivet/Tools/ParticleIdUtils.hh"
+#include "Rivet/Projections/NonHadronicFinalState.hh"
+#include "Rivet/Cmp.hh"
+#include <algorithm>
+
+namespace Rivet {
+
+
+  int NonHadronicFinalState::compare(const Projection& p) const {
+    return FinalState::compare(p);
+  }
+
+
+  bool nonHadronFilter(const Particle& p) {
+    return PID::isHadron(p.pdgId());
+  }
+
+  void NonHadronicFinalState::project(const Event& e) {
+    const FinalState& fs = applyProjection<FinalState>(e, "FS");
+    _theParticles.clear();
+    std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
+                        std::back_inserter(_theParticles), nonHadronFilter);
+    MSG_DEBUG("Number of hadronic final-state particles = "
+             << _theParticles.size());
+  }
+
+}


More information about the Rivet-svn mailing list