rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2015_CONF_2015_041

$Z$+jets at 13 TeV
Experiment: ATLAS (LHC)
Status: OBSOLETE
Authors:
  • Christian Gutschow
References:
  • ATLAS-CONF-2015-041
Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • Inclusive $Z$ production in the electron channel

Preliminary measurements of the cross-section for the production of a $Z$ boson in association with jets in $pp$ collisions at $\sqrt{s} = 13$\,TeV are presented, using data corresponding to an integrated luminosity of $85\,\text{pb}^{-1}$ collected by the ATLAS experiment at the Large Hadron Collider. The cross-sections are measured for events containing a $Z$ boson decaying to electrons or muons and produced in association with up to four jets in the kinematical range of $p_\text{T} > 30$\,GeV and $|y| < 2.5$. NB--Use the plugin names ATLAS_2015_CONF_2015_041_EL or ATLAS_2015_CONF_2015_041_MU to specify the lepton channel. Note: this analysis is superseded by ATLAS_2017_I1514251.

Source code: ATLAS_2015_CONF_2015_041.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/ZFinder.hh"
  4#include "Rivet/Projections/FastJets.hh"
  5#include "Rivet/Projections/VetoedFinalState.hh"
  6
  7namespace Rivet {
  8
  9
 10  /// Z + jets in pp at 13 TeV
 11  /// @note This base class contains a "mode" variable for combined, e, and mu channel derived classes
 12  class ATLAS_2015_CONF_2015_041 : public Analysis {
 13  public:
 14
 15    /// @name Constructors etc.
 16    //@{
 17
 18    /// Constructor
 19    ATLAS_2015_CONF_2015_041(const string name="ATLAS_2015_CONF_2015_041", size_t channel = 0,
 20                             const string ref_data="ATLAS_2015_CONF_2015_041")
 21                             : Analysis(name) {
 22      _mode = channel; // This class uses the combined e+mu mode
 23      setRefDataName(ref_data);
 24    }
 25
 26    //@}
 27
 28
 29    /// Book histograms and initialise projections before the run
 30    void init() {
 31      const FinalState fs;
 32
 33      Cut cuts = (Cuts::pT > 25*GeV) & (Cuts::abseta < 2.5);
 34      ZFinder zfinder(fs, cuts, _mode? PID::MUON : PID::ELECTRON, 66*GeV, 116*GeV);
 35      declare(zfinder, "zfinder");
 36
 37      // Define veto FS in order to prevent Z-decay products entering the jet algorithm
 38      VetoedFinalState had_fs;
 39      had_fs.addVetoOnThisFinalState(zfinder);
 40      FastJets jets(had_fs, FastJets::ANTIKT, 0.4, JetAlg::Muons::ALL, JetAlg::Invisibles::DECAY);
 41      declare(jets, "jets");
 42
 43      // individual channels
 44      book(_hNjets      ,1, 1, _mode + 1);
 45      book(_hNjetsRatio ,2, 1, _mode + 1, true);
 46      // combination
 47      book(_hNjets_comb      ,1, 2, _mode + 1);
 48      book(_hNjetsRatio_comb ,2, 2, _mode + 1, true);
 49
 50      _weights.resize(5);
 51      for (size_t i = 0; i < 5; i++)
 52        book(_weights[i], "_weights" + to_str(i));
 53    }
 54
 55
 56    /// Perform the per-event analysis
 57    void analyze(const Event& event) {
 58
 59      const ZFinder& zfinder = apply<ZFinder>(event, "zfinder");
 60      const Particles& leptons = zfinder.constituents();
 61      if (leptons.size() != 2)  vetoEvent;
 62
 63      Jets jets;
 64      for (Jet j : apply<JetAlg>(event, "jets").jetsByPt(Cuts::pT > 30*GeV && Cuts::absrap < 2.5)) {
 65        bool keep = true;
 66        for(const Particle& l : leptons)  keep &= deltaR(j, l) > 0.4;
 67        if (keep)  jets += j;
 68      }
 69
 70      size_t njets = jets.size();
 71
 72      for(size_t i = 0; i <= njets; ++i) {
 73        _hNjets->fill(i + 0.5);
 74        _hNjets_comb->fill(i + 0.5);
 75      }
 76
 77      for (size_t i = 0; i < 5; ++i) {
 78        if (njets >= i) _weights[i]->fill();
 79      }
 80
 81    }
 82
 83    /// @name Ratio calculator util functions
 84    //@{
 85
 86    /// Calculate the ratio, being careful about div-by-zero
 87    double ratio(double a, double b) {
 88      return (b != 0) ? a/b : 0;
 89    }
 90
 91    /// Calculate the ratio error, being careful about div-by-zero
 92    double ratio_err(double a, double b) {
 93      return (b != 0) ? sqrt(a/b*(1-a/b)/b) : 0;
 94    }
 95
 96    //@}
 97
 98    void finalize() {
 99      for (size_t i = 0; i < 4; ++i) {
100        double  n = _hNjets->bin(i + 1).sumW();
101        double dN = _hNjets->bin(i + 1).sumW2();
102        double  d = _hNjets->bin(i).sumW();
103        double dD = _hNjets->bin(i).sumW2();
104        double r = safediv(n, d);
105        double e = sqrt( safediv(r * (1 - r), d) );
106        if ( _hNjets->effNumEntries() != _hNjets->numEntries() ) {
107          // use F. James's approximation for weighted events:
108          e = sqrt( safediv((1 - 2 * r) * dN + r * r * dD, d * d) );
109        }
110        _hNjetsRatio->point(i).setY(r, e);
111        _hNjetsRatio_comb->point(i).setY(r, e);
112      }
113
114      scale(_hNjets,      crossSectionPerEvent() );
115      scale(_hNjets_comb, crossSectionPerEvent() );
116    }
117
118    //@}
119
120
121  protected:
122
123    size_t _mode;
124
125
126  private:
127
128    vector<CounterPtr> _weights;
129    Scatter2DPtr _hNjetsRatio, _hNjetsRatio_comb;
130    Histo1DPtr _hNjets, _hNjets_comb;
131  };
132
133
134
135  class ATLAS_2015_CONF_2015_041_EL : public ATLAS_2015_CONF_2015_041 {
136  public:
137    ATLAS_2015_CONF_2015_041_EL() : ATLAS_2015_CONF_2015_041("ATLAS_2015_CONF_2015_041_EL", 0) { }
138  };
139
140
141
142  class ATLAS_2015_CONF_2015_041_MU : public ATLAS_2015_CONF_2015_041 {
143  public:
144    ATLAS_2015_CONF_2015_041_MU() : ATLAS_2015_CONF_2015_041("ATLAS_2015_CONF_2015_041_MU", 1) { }
145  };
146
147
148  RIVET_DECLARE_PLUGIN(ATLAS_2015_CONF_2015_041);
149  RIVET_DECLARE_PLUGIN(ATLAS_2015_CONF_2015_041_EL);
150  RIVET_DECLARE_PLUGIN(ATLAS_2015_CONF_2015_041_MU);
151}