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 protonproton 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.6fb1. 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
  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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/WFinder.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"

namespace Rivet {


  /// Measurement of V+jets distributions, taken as ratios between W and Z channels
  class ATLAS_2014_I1312627 : public Analysis {
  public:

    /// @name Plotting helper types
    //@{

    struct Plots {
      string ref;
      Histo1DPtr comp[2]; // (de)nominator components
      Scatter2DPtr ratio; // Rjets plot
    };

    typedef map<string, Plots> PlotMap;
    typedef PlotMap::value_type PlotMapPair;

    //@}


    /// Constructor
    ATLAS_2014_I1312627(std::string name="ATLAS_2014_I1312627")
      : Analysis(name)
    {
      _mode = 0; // using electron channel for combined data by default
      setNeedsCrossSection(true);
    }


    /// @name Analysis methods
    //@{

    /// Book histograms and initialise projections before the run
    void init() {

      // Set up cuts
      Cut cuts;
      if (_mode == 2) { // muon channel
        cuts = (Cuts::pT > 25.0*GeV) & Cuts::etaIn(-2.4, 2.4);
      } else if (_mode) { // electron channel
        cuts = (Cuts::pT > 25.0*GeV) & ( Cuts::etaIn(-2.47, -1.52) | Cuts::etaIn(-1.37, 1.37) | Cuts::etaIn(1.52, 2.47) );
      } else { // combined data extrapolated to common phase space
        cuts = (Cuts::pT > 25.0*GeV) & Cuts::etaIn(-2.5, 2.5);
      }

      // Boson finders
      FinalState fs;
      WFinder wfinder(fs, cuts, _mode > 1? PID::MUON : PID::ELECTRON, 40.0*GeV, MAXDOUBLE, 0.0*GeV, 0.1,
                      WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS);
      declare(wfinder, "WF");

      ZFinder zfinder(fs, cuts, _mode > 1? PID::MUON : PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK);
      declare(zfinder, "ZF");

      // Jets
      VetoedFinalState jet_fs(fs);
      jet_fs.addVetoOnThisFinalState(getProjection<WFinder>("WF"));
      jet_fs.addVetoOnThisFinalState(getProjection<ZFinder>("ZF"));
      FastJets jets(jet_fs, FastJets::ANTIKT, 0.4);
      jets.useInvisibles(true);
      declare(jets, "Jets");


      // Book Rjets plots
      _suff = string("-y0") + to_str(_mode + 1);
      hInit("Njets_incl",  "d01"); // inclusive number of jets
      hInit("Njets_excl",  "d04"); // exclusive number of jets
      hInit("Pt1_N1incl",  "d05"); // leading jet pT, at least 1 jet
      hInit("Pt1_N1excl",  "d06"); // leading jet pT, exactly 1 jet
      hInit("Pt1_N2incl",  "d07"); // leading jet pT, at least 2 jets
      hInit("Pt1_N3incl",  "d08"); // leading jet pT, at least 3 jets
      hInit("Pt2_N2incl",  "d09"); // subleading jet pT, at least 2 jets
      hInit("Pt3_N3incl",  "d10"); // sub-subleading jet pT, at least 3 jets
      hInit("ST_N2incl",   "d11"); // scalar jet pT sum, at least 2 jets
      hInit("ST_N2excl",   "d12"); // scalar jet pT sum, exactly 2 jets
      hInit("ST_N3incl",   "d13"); // scalar jet pT sum, at least 3 jets
      hInit("ST_N3excl",   "d14"); // scalar jet pT sum, exactly 3 jets
      hInit("DR_N2incl",   "d15"); // deltaR(j1, j2), at least 2 jets
      hInit("DPhi_N2incl", "d16"); // deltaPhi(j1, j2), at least 2 jets
      hInit("Mjj_N2incl",  "d17"); // mjj, at least 2 jets
      hInit("Rap1_N1incl", "d18"); // leading jet rapidity, at least 1 jet
      hInit("Rap2_N2incl", "d19"); // subleading jet rapidity, at least 2 jets
      hInit("Rap3_N3incl", "d20"); // sub-subleading jet rapidity, at least 3 jets

      // Also book numerator and denominator for Rjets plots
      foreach (PlotMapPair& str_plot, _plots) {
        str_plot.second.comp[0] = bookHisto1D( str_plot.second.ref + "2" + _suff, *(str_plot.second.ratio) );
        str_plot.second.comp[1] = bookHisto1D( str_plot.second.ref + "3" + _suff, *(str_plot.second.ratio) );
      }
    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {

      // Retrieve boson candidate
      const WFinder& wf = apply<WFinder>(event, "WF");
      const ZFinder& zf = apply<ZFinder>(event, "ZF");
      if (wf.empty() && zf.empty())  vetoEvent;

      // Retrieve jets
      const JetAlg& jetfs = apply<JetAlg>(event, "Jets");
      Jets all_jets = jetfs.jetsByPt(Cuts::pT > 30*GeV && Cuts::absrap < 4.4);

      // Apply boson cuts and fill histograms
      const double weight = event.weight();
      if (zf.size() == 2) {
        const Particles& leptons = zf.constituents();
        if (oppSign(leptons[0], leptons[1]) && deltaR(leptons[0], leptons[1]) > 0.2)
          fillPlots(leptons, all_jets, weight, 1);
      }
      if (!wf.empty()) {
        const Particles& leptons = wf.constituentLeptons();
        if (wf.constituentNeutrino().pT() > 25*GeV && wf.mT() > 40*GeV )
          fillPlots(leptons, all_jets, weight, 0);
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      ///  Normalise, scale and otherwise manipulate histograms here
      const double sf( crossSection() / sumOfWeights() );
      foreach (PlotMapPair& str_plot, _plots) {
        scale(str_plot.second.comp[0], sf);
        scale(str_plot.second.comp[1], sf);
        divide(str_plot.second.comp[0], str_plot.second.comp[1], str_plot.second.ratio);
      }
    }
    //@}


    /// Analysis helper functions
    //@{

    /// Histogram filling function, to avoid duplication
    void fillPlots(const Particles& leptons, Jets& all_jets, const double& weight, int isZ) {
      // Do jet-lepton overlap removal
      Jets jets;
      foreach (const Jet& j, all_jets) {
        /// @todo A nice place for a lambda and any() logic when C++11 is available
        bool keep = true;
        foreach (const Particle& l, leptons) keep &= deltaR(j, l) > 0.5;
        if (keep)  jets.push_back(j);
      }

      // Calculate jet ST
      const size_t njets = jets.size();
      double ST = 0.0; // scalar pT sum of all selected jets
      for (size_t i = 0; i < njets; ++i)
        ST += jets[i].pT() * GeV;

      // Fill jet histos
      _plots["Njets_excl"].comp[isZ]->fill(njets + 0.5, weight);
      for (size_t i = 0; i <= njets; ++i)
        _plots["Njets_incl"].comp[isZ]->fill(i + 0.5, weight);

      if (njets > 0) {
        const double pT1  = jets[0].pT()/GeV;
        const double rap1 = jets[0].absrap();
        _plots["Pt1_N1incl" ].comp[isZ]->fill(pT1,  weight);
        _plots["Rap1_N1incl"].comp[isZ]->fill(rap1, weight);

        if (njets == 1) {
          _plots["Pt1_N1excl"].comp[isZ]->fill(pT1, weight);
        } else if (njets > 1) {
          const double pT2  = jets[1].pT()/GeV;
          const double rap2 = jets[1].absrap();
          const double dR   = deltaR(jets[0], jets[1]);
          const double dPhi = deltaPhi(jets[0], jets[1]);
          const double mjj  = (jets[0].momentum() + jets[1].momentum()).mass()/GeV;
          _plots["Pt1_N2incl" ].comp[isZ]->fill(pT1,  weight);
          _plots["Pt2_N2incl" ].comp[isZ]->fill(pT2,  weight);
          _plots["Rap2_N2incl"].comp[isZ]->fill(rap2, weight);
          _plots["DR_N2incl"  ].comp[isZ]->fill(dR,   weight);
          _plots["DPhi_N2incl"].comp[isZ]->fill(dPhi, weight);
          _plots["Mjj_N2incl" ].comp[isZ]->fill(mjj,  weight);
          _plots["ST_N2incl"  ].comp[isZ]->fill(ST,   weight);

          if (njets == 2) {
            _plots["ST_N2excl"].comp[isZ]->fill(ST, weight);
          } else if (njets > 2) {
            const double pT3  = jets[2].pT()/GeV;
            const double rap3 = jets[2].absrap();
            _plots["Pt1_N3incl" ].comp[isZ]->fill(pT1,  weight);
            _plots["Pt3_N3incl" ].comp[isZ]->fill(pT3,  weight);
            _plots["Rap3_N3incl"].comp[isZ]->fill(rap3, weight);
            _plots["ST_N3incl"  ].comp[isZ]->fill(ST,   weight);

            if (njets == 3)
              _plots["ST_N3excl"].comp[isZ]->fill(ST, weight);
          }
        }
      }
    }


    /// Helper for histogram initialisation
    void hInit(string label, string ident) {
      string pre = ident + "-x0";
      _plots[label].ref = pre;
      _plots[label].ratio = bookScatter2D(pre + "1" + _suff, true);
    }

    //@}


  protected:

    // Data members
    size_t _mode;
    string _suff;


  private:

    /// @name Map of histograms
    PlotMap _plots;

  };



  /// Electron-specific version of the ATLAS_2014_I1312627 R-jets analysis
  class ATLAS_2014_I1312627_EL : public ATLAS_2014_I1312627 {
  public:
    ATLAS_2014_I1312627_EL()
      : ATLAS_2014_I1312627("ATLAS_2014_I1312627_EL")
    { _mode = 1; }
  };


  /// Muon-specific version of the ATLAS_2014_I1312627 R-jets analysis
  class ATLAS_2014_I1312627_MU : public ATLAS_2014_I1312627 {
  public:
    ATLAS_2014_I1312627_MU()
      : ATLAS_2014_I1312627("ATLAS_2014_I1312627_MU")
    { _mode = 2; }
  };


  // Hooks for the plugin system
  DECLARE_RIVET_PLUGIN(ATLAS_2014_I1312627);
  DECLARE_RIVET_PLUGIN(ATLAS_2014_I1312627_EL);
  DECLARE_RIVET_PLUGIN(ATLAS_2014_I1312627_MU);


}