|
[Rivet-svn] r2734 - in trunk: . include/Rivet/Projections src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Oct 29 11:08:23 BST 2010
Author: buckley Date: Fri Oct 29 11:08:22 2010 New Revision: 2734 Log: Allow passing a general FinalState reference to the JetShape projection, rather than requiring a VetoedFS. Modified: trunk/ChangeLog trunk/include/Rivet/Projections/JetShape.hh trunk/src/Projections/JetShape.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Thu Oct 28 23:16:11 2010 (r2733) +++ trunk/ChangeLog Fri Oct 29 11:08:22 2010 (r2734) @@ -1,3 +1,8 @@ +2010-10-29 Andy Buckley <andy at insectnation.org> + + * Allow passing a general FinalState reference to the JetShape + projection, rather than requiring a VetoedFS. + 2010-10-07 Andy Buckley <andy at insectnation.org> * Adding a --with-root flag to rivet-buildplugin to add Modified: trunk/include/Rivet/Projections/JetShape.hh ============================================================================== --- trunk/include/Rivet/Projections/JetShape.hh Thu Oct 28 23:16:11 2010 (r2733) +++ trunk/include/Rivet/Projections/JetShape.hh Fri Oct 29 11:08:22 2010 (r2734) @@ -4,7 +4,7 @@ #include "Rivet/Rivet.hh" #include "Rivet/Projection.hh" -#include "Rivet/Projections/VetoedFinalState.hh" +#include "Rivet/Projections/FinalState.hh" #include "Rivet/Particle.hh" #include "Rivet/Event.hh" #include "Rivet/Tools/Utils.hh" @@ -17,7 +17,7 @@ Calculate the differential and integral jet shapes in \f$P_{\perp}\f$ for a given set of jet axes each event. - + The rapidity scheme (\f$ \eta \f$ or \f$ y \f$) has to be specified when invoking the constructor. @@ -37,14 +37,11 @@ \sum_\mathrm{jets} \frac{P_\perp(0, r)}{p_\perp(0, R)} \f] with \f$ 0 \le r \le R \f$ and \f$ P_\perp(r_1, r_2) = \sum_{\in [r_1, r_2)} p_\perp \f$. - + The constructor expects also the equidistant binning in radius \f$ r \f$ to produce the jet shape of all bins in a vector and this separately for each jet to allow post-selection. - Internally, this projection uses the VetoedFinalState projection to determine the - jet shapes around the jet axes. - The jet axes are passed for each event. */ class JetShape : public Projection { @@ -57,7 +54,7 @@ //@{ /// Constructor. - JetShape(const VetoedFinalState& vfsp, const vector<FourMomentum>& jetaxes, + JetShape(const FinalState& fs, const vector<FourMomentum>& jetaxes, double rmin=0.0, double rmax=0.7, double interval=0.1, double r1minPsi=0.3, DeltaRScheme distscheme=RAPIDITY); @@ -72,25 +69,25 @@ /// Reset projection between events void clear(); - + public: - + /// Number of equidistant radius bins. double numBins() const { return _nbins; } - + /// \f$ r_\text{min} \f$ value. double rMin() const { return _rmin; } - + /// \f$ r_\text{max} \f$ value. double rMax() const { return _rmax; } - + /// Radius interval size. double interval() const { return _interval; @@ -101,29 +98,29 @@ double diffJetShape(size_t pTbin, size_t rbin) const { return _diffjetshapes[pTbin][rbin]; } - + /// Return value of integrated jet shape profile histo bin. /// @todo Remove this external indexing thing double intJetShape(size_t pTbin, size_t rbin) const { return _intjetshapes[pTbin][rbin]; } - + /// Return value of \f$ \Psi \f$ (integrated jet shape) at given radius for a \f$ p_T \f$ bin. /// @todo Remove this external indexing thing double psi(size_t pTbin) const { return _PsiSlot[pTbin]; } - + protected: - + /// Apply the projection to the event. void project(const Event& e); - + /// Compare projections. int compare(const Projection& p) const; - + private: /// The jet axes of the jet algorithm projection Modified: trunk/src/Projections/JetShape.cc ============================================================================== --- trunk/src/Projections/JetShape.cc Thu Oct 28 23:16:11 2010 (r2733) +++ trunk/src/Projections/JetShape.cc Fri Oct 29 11:08:22 2010 (r2734) @@ -6,7 +6,7 @@ /// Constructor. - JetShape::JetShape(const VetoedFinalState& vfsp, + JetShape::JetShape(const FinalState& fs, const vector<FourMomentum>& jetaxes, double rmin, double rmax, double interval, double r1minPsi, DeltaRScheme distscheme) @@ -16,7 +16,7 @@ { setName("JetShape"); _nbins = int(round((rmax-rmin)/interval)); - addProjection(vfsp, "FS"); + addProjection(fs, "FS"); } @@ -47,11 +47,11 @@ clear(); if (!_jetaxes.empty()) { - const VetoedFinalState& vfs = applyProjection<VetoedFinalState>(e, "FS"); - foreach (const Particle& p, vfs.particles()) { + const FinalState& fs = applyProjection<FinalState>(e, "FS"); + foreach (const Particle& p, fs.particles()) { double drad_min = TWOPI; size_t i_drad_min = 0; - + // Identify "best match" jet axis for this particle for (size_t j = 0; j < _jetaxes.size(); ++j) { const double drad = deltaR(_jetaxes[j], p.momentum(), _distscheme); @@ -80,8 +80,8 @@ } } - - + + // Normalize to total pT for (size_t j = 0; j < _jetaxes.size(); j++) { const double psimax = _intjetshapes[j][_nbins-1]; @@ -94,7 +94,7 @@ } } - + } }
More information about the Rivet-svn mailing list |