rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2014_I1312627

Ratios of $V$+jets observables between $W$ and $Z$ events
Experiment: ATLAS (LHC)
Inspire ID: 1312627
Status: VALIDATED
Authors:
  • Christian Gutschow
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • Inclusive $W$ and inclusive $Z$ in both electron and muon channels

Measurements of the ratio of the production cross sections for $W$ and $Z$ bosons in association with jets in proton-proton collisions at $\sqrt{s} = 7$ TeV with the ATLAS experiment at the Large Hadron Collider. The measurement is based on the entire 2011 dataset, corresponding to an integrated luminosity of 4.6$\text{fb}^{-1}$. Inclusive and differential cross-section ratios for massive vector bosons decaying to electrons and muons are measured in association with jets with transverse momentum $p_\text{T} > 30$ GeV and jet rapidity $|y| < 4.4$. The default routine will pick up the electron decay channel of the heavy bosons and compare it to the combined (muon and electron channel) data. Individual channels (for data) are available as well, use ATLAS_2014_I1312627_EL and ATLAS_2014_I1312627_MU to specify the decay channel directly. NB #1: The "x01" Scatter2D objects are constructed from the ratio of "x02" to "x03" Histo1D objects. If several output yoda files are merged with yodamerge, the merged "x01" objects will become meaningless. New "x01" Scatter2Ds can easil be constructed in a postprocessing step from the merged "x02" (nominator) and "x03" (denominator) objects. NB #2: Special care ought to be taken when evaluating theoretical uncertainties due to potential cancellations/correlations between numerator and denominator.

Source code: ATLAS_2014_I1312627.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/WFinder.hh"
  5#include "Rivet/Projections/ZFinder.hh"
  6#include "Rivet/Projections/FastJets.hh"
  7#include "Rivet/Projections/VetoedFinalState.hh"
  8
  9namespace Rivet {
 10
 11
 12  /// Measurement of V+jets distributions, taken as ratios between W and Z channels
 13  class ATLAS_2014_I1312627 : public Analysis {
 14  public:
 15
 16    /// @name Plotting helper types
 17    //@{
 18
 19    struct Plots {
 20      string ref;
 21      Histo1DPtr comp[2]; // (de)nominator components
 22      Scatter2DPtr ratio; // Rjets plot
 23    };
 24
 25    //@}
 26
 27
 28    /// Constructor
 29    RIVET_DEFAULT_ANALYSIS_CTOR(ATLAS_2014_I1312627);
 30
 31    /// @name Analysis methods
 32    //@{
 33
 34    /// Book histograms and initialise projections before the run
 35    void init() {
 36
 37      // get option
 38      _mode = 0;
 39      if ( getOption("LMODE") == "EL" )  _mode = 1;
 40      if ( getOption("LMODE") == "MU" )  _mode = 2;
 41
 42      // Set up cuts
 43      Cut cuts;
 44      if (_mode == 2) { // muon channel
 45        cuts = Cuts::pT > 25*GeV && Cuts::abseta < 2.4;;
 46      } else if (_mode) { // electron channel
 47        cuts = Cuts::pT > 25*GeV && ( Cuts::etaIn(-2.47, -1.52) || Cuts::etaIn(-1.37, 1.37) || Cuts::etaIn(1.52, 2.47) );
 48      } else { // combined data extrapolated to common phase space
 49        cuts = Cuts::pT > 25*GeV && Cuts::abseta < 2.5;
 50      }
 51
 52      // Boson finders
 53      FinalState fs;
 54      WFinder wfinder(fs, cuts, _mode > 1? PID::MUON : PID::ELECTRON, 40*GeV, 8*TeV, 0., 0.1, 
 55				              WFinder::ChargedLeptons::PROMPT, WFinder::ClusterPhotons::NODECAY, 
 56                      WFinder::AddPhotons::NO, WFinder::MassWindow::MT);
 57      declare(wfinder, "WF");
 58
 59      ZFinder zfinder(fs, cuts, _mode > 1? PID::MUON : PID::ELECTRON, 66*GeV, 116*GeV, 0.1, 
 60                      ZFinder::ChargedLeptons::PROMPT, ZFinder::ClusterPhotons::NODECAY, ZFinder::AddPhotons::NO);
 61      declare(zfinder, "ZF");
 62
 63      // Jets
 64      VetoedFinalState jet_fs(fs);
 65      jet_fs.addVetoOnThisFinalState(getProjection<WFinder>("WF"));
 66      jet_fs.addVetoOnThisFinalState(getProjection<ZFinder>("ZF"));
 67      FastJets jets(jet_fs, FastJets::ANTIKT, 0.4, JetAlg::Muons::ALL, JetAlg::Invisibles::ALL);
 68      declare(jets, "Jets");
 69
 70
 71      // Book Rjets plots
 72      _suff = string("-y0") + to_str(_mode + 1);
 73      hInit("Njets_incl",  "d01"); // inclusive number of jets
 74      hInit("Njets_excl",  "d04"); // exclusive number of jets
 75      hInit("Pt1_N1incl",  "d05"); // leading jet pT, at least 1 jet
 76      hInit("Pt1_N1excl",  "d06"); // leading jet pT, exactly 1 jet
 77      hInit("Pt1_N2incl",  "d07"); // leading jet pT, at least 2 jets
 78      hInit("Pt1_N3incl",  "d08"); // leading jet pT, at least 3 jets
 79      hInit("Pt2_N2incl",  "d09"); // subleading jet pT, at least 2 jets
 80      hInit("Pt3_N3incl",  "d10"); // sub-subleading jet pT, at least 3 jets
 81      hInit("ST_N2incl",   "d11"); // scalar jet pT sum, at least 2 jets
 82      hInit("ST_N2excl",   "d12"); // scalar jet pT sum, exactly 2 jets
 83      hInit("ST_N3incl",   "d13"); // scalar jet pT sum, at least 3 jets
 84      hInit("ST_N3excl",   "d14"); // scalar jet pT sum, exactly 3 jets
 85      hInit("DR_N2incl",   "d15"); // deltaR(j1, j2), at least 2 jets
 86      hInit("DPhi_N2incl", "d16"); // deltaPhi(j1, j2), at least 2 jets
 87      hInit("Mjj_N2incl",  "d17"); // mjj, at least 2 jets
 88      hInit("Rap1_N1incl", "d18"); // leading jet rapidity, at least 1 jet
 89      hInit("Rap2_N2incl", "d19"); // subleading jet rapidity, at least 2 jets
 90      hInit("Rap3_N3incl", "d20"); // sub-subleading jet rapidity, at least 3 jets
 91
 92      // Also book numerator and denominator for Rjets plots
 93      for (auto& item : _plots) {
 94        book(item.second.comp[0], item.second.ref + "2" + _suff, refData(item.second.ref + "1" + _suff));
 95        book(item.second.comp[1], item.second.ref + "3" + _suff, refData(item.second.ref + "1" + _suff));
 96      }
 97    }
 98
 99
100    /// Perform the per-event analysis
101    void analyze(const Event& event) {
102
103      // Retrieve boson candidate
104      const WFinder& wf = apply<WFinder>(event, "WF");
105      const ZFinder& zf = apply<ZFinder>(event, "ZF");
106      if (wf.empty() && zf.empty())  vetoEvent;
107
108      // Retrieve jets
109      const JetAlg& jetfs = apply<JetAlg>(event, "Jets");
110      Jets jets = jetfs.jetsByPt(Cuts::pT > 30*GeV && Cuts::absrap < 4.4);
111
112      // Apply boson cuts and fill histograms
113      if (!zf.empty()) {
114        const Particles& leptons = zf.constituents();
115        if (oppSign(leptons[0], leptons[1]) && deltaR(leptons[0], leptons[1]) > 0.2)
116          fillPlots(leptons, jets, 1);
117      }
118      if (!wf.empty()) {
119        const Particles& leptons = wf.constituentLeptons();
120        if (wf.constituentNeutrino().pT() > 25*GeV && wf.mT() > 40*GeV )
121          fillPlots(leptons, jets, 0);
122      }
123    }
124
125
126    /// Normalise histograms etc., after the run
127    void finalize() {
128      ///  Normalise, scale and otherwise manipulate histograms here
129      const double sf( crossSection() / sumOfWeights() );
130      for (const auto& item : _plots) {
131        scale(item.second.comp[0], sf);
132        scale(item.second.comp[1], sf);
133        divide(item.second.comp[0], item.second.comp[1], item.second.ratio);
134      }
135    }
136    //@}
137
138
139    /// Analysis helper functions
140    //@{
141
142    /// Histogram filling function, to avoid duplication
143    void fillPlots(const Particles& leptons, Jets& jets, int isZ) {
144      // Do jet-lepton overlap removal
145      idiscardIfAnyDeltaRLess(jets, leptons, 0.5);
146
147      // Calculate jet ST
148      const size_t njets = jets.size();
149      const double ST = sum(jets, pT, 0.0)/GeV;
150
151      // Fill jet histos
152      _plots["Njets_excl"].comp[isZ]->fill(njets + 0.5);
153      for (size_t i = 0; i <= njets; ++i)
154        _plots["Njets_incl"].comp[isZ]->fill(i + 0.5);
155
156      if (njets > 0) {
157        const double pT1  = jets[0].pT()/GeV;
158        const double rap1 = jets[0].absrap();
159        _plots["Pt1_N1incl" ].comp[isZ]->fill(pT1);
160        _plots["Rap1_N1incl"].comp[isZ]->fill(rap1);
161
162        if (njets == 1) {
163          _plots["Pt1_N1excl"].comp[isZ]->fill(pT1);
164        } else if (njets > 1) {
165          const double pT2  = jets[1].pT()/GeV;
166          const double rap2 = jets[1].absrap();
167          const double dR   = deltaR(jets[0], jets[1]);
168          const double dPhi = deltaPhi(jets[0], jets[1]);
169          const double mjj  = (jets[0].momentum() + jets[1].momentum()).mass()/GeV;
170          _plots["Pt1_N2incl" ].comp[isZ]->fill(pT1);
171          _plots["Pt2_N2incl" ].comp[isZ]->fill(pT2);
172          _plots["Rap2_N2incl"].comp[isZ]->fill(rap2);
173          _plots["DR_N2incl"  ].comp[isZ]->fill(dR);
174          _plots["DPhi_N2incl"].comp[isZ]->fill(dPhi);
175          _plots["Mjj_N2incl" ].comp[isZ]->fill(mjj);
176          _plots["ST_N2incl"  ].comp[isZ]->fill(ST);
177
178          if (njets == 2) {
179            _plots["ST_N2excl"].comp[isZ]->fill(ST);
180          } else if (njets > 2) {
181            const double pT3  = jets[2].pT()/GeV;
182            const double rap3 = jets[2].absrap();
183            _plots["Pt1_N3incl" ].comp[isZ]->fill(pT1);
184            _plots["Pt3_N3incl" ].comp[isZ]->fill(pT3);
185            _plots["Rap3_N3incl"].comp[isZ]->fill(rap3);
186            _plots["ST_N3incl"  ].comp[isZ]->fill(ST);
187
188            if (njets == 3)
189              _plots["ST_N3excl"].comp[isZ]->fill(ST);
190          }
191        }
192      }
193    }
194
195
196    /// Helper for histogram initialisation
197    void hInit(string label, string ident) {
198      string pre = ident + "-x0";
199      _plots[label].ref = pre;
200      book(_plots[label].ratio, pre + "1" + _suff, true);
201    }
202
203    //@}
204
205
206  protected:
207
208    // Data members
209    size_t _mode;
210    string _suff;
211
212
213  private:
214
215    /// @name Map of histograms
216    map<string, Plots> _plots;
217
218  };
219
220  // Hooks for the plugin system
221  RIVET_DECLARE_PLUGIN(ATLAS_2014_I1312627);
222}