rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2017_I1514251

Z plus jets at 13 TeV
Experiment: ATLAS (LHC)
Inspire ID: 1514251
Status: VALIDATED
Authors:
  • Gavin Hesketh
References: Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • pp -> Z(->ll) + jets at 13 TeV

Measurements of the production cross section of a $Z$ boson in association with jets in proton-proton collisions at i $\sqrt{s}=13$ TeV are presented, using data corresponding to an integrated luminosity of 3.16 fb${}^{-1}$ collected by the ATLAS experiment at the CERN Large Hadron Collider in 2015. Inclusive and differential cross sections are measured for events containing a $Z$ boson decaying to electrons or muons and produced in association with up to seven jets with $p_\text{T}>30$ GeV and $|y|<2.5$. Predictions from different Monte Carlo generators based on leading-order and next-to-leading-order matrix elements for up to two additional partons interfaced with parton shower and fixed-order predictions at next-to-leading order and next-to-next-to-leading order are compared with the measured cross sections. Good agreement within the uncertainties is observed for most of the modelled quantities, in particular with the generators which use next-to-leading-order matrix elements and the more recent next-to-next-to-leading-order fixed-order predictions.

Source code: ATLAS_2017_I1514251.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"

namespace Rivet {
  
  /// Z + jets in pp at 13 TeV 
  /// @note This base class contains a "mode" variable for combined, e, and mu channel derived classes
  class ATLAS_2017_I1514251 : public Analysis {
  public:
    
    /// Constructor
    ATLAS_2017_I1514251(string name="ATLAS_2017_I1514251")
      : Analysis(name)  {
      // This class uses the combined e+mu mode
      _mode = 0;
    }
    
    /// Book histograms and initialise projections before the run
    void init() {
      const FinalState fs;
      
      Cut cuts = (Cuts::pT > 25*GeV) && (Cuts::abseta < 2.5);
      
      ZFinder zeefinder(fs, cuts, PID::ELECTRON, 71*GeV, 111*GeV);
      ZFinder zmumufinder(fs, cuts, PID::MUON, 71*GeV, 111*GeV);
      declare(zeefinder, "zeefinder");
      declare(zmumufinder, "zmumufinder");
      
      // Define veto FS in order to prevent Z-decay products entering the jet algorithm
      VetoedFinalState had_fs;
      had_fs.addVetoOnThisFinalState(zeefinder);
      had_fs.addVetoOnThisFinalState(zmumufinder);
      FastJets jets(had_fs, FastJets::ANTIKT, 0.4);
      jets.useInvisibles(true);
      declare(jets, "jets");
      
      // individual channels
      _h_Njets_excl  = bookHisto1D(  _mode + 1, 1, 1);
      _h_Njets       = bookHisto1D(  _mode + 4, 1, 1);
      _h_Njets_Ratio = bookScatter2D(_mode + 7, 1, 1, true);

      _h_leading_jet_pT_eq1jet = bookHisto1D(_mode + 10, 1, 1);
      _h_leading_jet_pT        = bookHisto1D(_mode + 13, 1, 1);
      _h_leading_jet_pT_2jet   = bookHisto1D(_mode + 16, 1, 1);
      _h_leading_jet_pT_3jet   = bookHisto1D(_mode + 19, 1, 1);
      _h_leading_jet_pT_4jet   = bookHisto1D(_mode + 22, 1, 1);
      _h_leading_jet_rap       = bookHisto1D(_mode + 25, 1, 1);
      _h_HT                    = bookHisto1D(_mode + 28, 1, 1);
      _h_jet_dphi              = bookHisto1D(_mode + 31, 1, 1);
      _h_jet_mass              = bookHisto1D(_mode + 34, 1, 1);

    }
    
    
    /// Perform the per-event analysis
    void analyze(const Event& event) {
      
      const double weight = event.weight();
      
      const ZFinder& zeefinder = apply<ZFinder>(event, "zeefinder");
      const ZFinder& zmumufinder = apply<ZFinder>(event, "zmumufinder");
      
      const Particles& zees = zeefinder.bosons();
      const Particles& zmumus = zmumufinder.bosons();

      //Veto Z->mumu in electron mode, and vice versa:      
      if (_mode==1 && (zees.size()!=1 || zmumus.size() ) )  vetoEvent;
      else if (_mode==2 && (zees.size() || zmumus.size()!=1 ) )  vetoEvent;
      else if (zees.size() + zmumus.size() != 1) {
        // Running in combined mode, we did not find exactly one Z. Not good.
        MSG_DEBUG("Did not find exactly one good Z candidate");
        vetoEvent;
      }

      // Find the (dressed!) leptons
      const Particles& leptons = zees.size() ? zeefinder.constituents() : zmumufinder.constituents();
      if (leptons.size() != 2) vetoEvent;

      Jets jets =  apply<JetAlg>(event, "jets").jetsByPt(Cuts::pT > 30*GeV && Cuts::absrap < 2.5);
      
      bool veto = false;
      foreach(const Jet& j, jets)  {
        foreach(const Particle& l, leptons) { veto |= deltaR(j, l) < 0.4; }
      }
      if (veto) vetoEvent;
      
      double HT=0;
      foreach(const Particle& l, leptons) { HT += l.pT(); }

      const size_t Njets = jets.size();
      _h_Njets_excl->fill(Njets, weight);	
      for(size_t i = 0; i <= Njets; ++i) { _h_Njets->fill(i, weight);	}

      if (Njets < 1)  vetoEvent;

      
      for(size_t i = 0; i < Njets; ++i) { HT += jets[i].pT(); }
      const double pT = jets[0].pT();
      const double rap = jets[0].rapidity();
      
      _h_HT->fill(HT, weight);      
      _h_leading_jet_rap->fill(fabs(rap), weight);
      _h_leading_jet_pT->fill(pT, weight);
      if (Njets == 1)  _h_leading_jet_pT_eq1jet->fill(pT, weight);
      if (Njets > 1) {
        _h_leading_jet_pT_2jet->fill(pT, weight);
        _h_jet_dphi->fill( deltaPhi(jets[0], jets[1]), weight );
        _h_jet_mass->fill( (jets[0].momentum()+jets[1].momentum()).mass() , weight );
      }
      
      if (Njets > 2)  _h_leading_jet_pT_3jet->fill(pT, weight);
      if (Njets > 3)  _h_leading_jet_pT_4jet->fill(pT, weight);

    }

    void finalize() {
      for (size_t i = 0; i < _h_Njets->numBins()-2; ++i) {
        double  n = _h_Njets->bin(i + 1).sumW();
        double dN = _h_Njets->bin(i + 1).sumW2();
        double  d = _h_Njets->bin(i).sumW();
        double dD = _h_Njets->bin(i).sumW2();
        double r = safediv(n, d);
        double e = sqrt( safediv(r * (1 - r), d) );
        if ( _h_Njets->effNumEntries() != _h_Njets->numEntries() ) {
          // use F. James's approximation for weighted events:
          e = sqrt( safediv((1 - 2 * r) * dN + r * r * dD, d * d) );
        }
        _h_Njets_Ratio->point(i).setY(r, e);
      }

      scale(_h_Njets,                  crossSectionPerEvent() );
      scale(_h_Njets_excl,             crossSectionPerEvent() );
      scale(_h_HT,                     crossSectionPerEvent() );
      scale(_h_leading_jet_rap,        crossSectionPerEvent() );
      scale(_h_leading_jet_pT,         crossSectionPerEvent() );
      scale(_h_leading_jet_pT_eq1jet,  crossSectionPerEvent() );
      scale(_h_leading_jet_pT_2jet,    crossSectionPerEvent() );
      scale(_h_leading_jet_pT_3jet,    crossSectionPerEvent() );
      scale(_h_leading_jet_pT_4jet,    crossSectionPerEvent() );
      scale(_h_jet_dphi,               crossSectionPerEvent() );
      scale(_h_jet_mass,               crossSectionPerEvent() );

    }

    //@}


  protected:

    size_t _mode;


  private:

    Scatter2DPtr _h_Njets_Ratio;
    Histo1DPtr   _h_Njets;
    Scatter2DPtr _h_Njets_excl_Ratio;
    Histo1DPtr   _h_Njets_excl;
    Histo1DPtr   _h_HT;
    Histo1DPtr   _h_leading_jet_rap;
    Histo1DPtr   _h_leading_jet_pT;
    Histo1DPtr   _h_leading_jet_pT_eq1jet;
    Histo1DPtr   _h_leading_jet_pT_2jet;
    Histo1DPtr   _h_leading_jet_pT_3jet;
    Histo1DPtr   _h_leading_jet_pT_4jet;
    Histo1DPtr   _h_jet_dphi;
    Histo1DPtr   _h_jet_mass;
  
  };



  class ATLAS_2017_I1514251_EL : public ATLAS_2017_I1514251 {
  public:
    ATLAS_2017_I1514251_EL()
      : ATLAS_2017_I1514251("ATLAS_2017_I1514251_EL")
    {
      _mode = 1;
    }
  };



  class ATLAS_2017_I1514251_MU : public ATLAS_2017_I1514251 {
  public:
    ATLAS_2017_I1514251_MU()
      : ATLAS_2017_I1514251("ATLAS_2017_I1514251_MU")
    {
      _mode = 2;
    }
  };



  DECLARE_RIVET_PLUGIN(ATLAS_2017_I1514251);
  DECLARE_RIVET_PLUGIN(ATLAS_2017_I1514251_EL);
  DECLARE_RIVET_PLUGIN(ATLAS_2017_I1514251_MU);
}