Rivet Analyses Reference

CMS_2013_I1122847

Forward-backward asymmetry A\_FB in Drell-Yan lepton pairs at sqrt(s) = 7 TeV
Experiment: CMS (LHC)
Inspire ID: 1122847
Status: VALIDATED
Authors:
  • Markus Radziej
References:Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • Drell-Yan events with an electron or muon final state are necessary. High statistics as well as a NLO generator are recommended for a good agreement

This analysis measures the forward-backward asymmetry $A_{FB}$ in Drell-Yan events at a center-of-mass energy of 7 TeV. Both the individual and combined electron and muon pair channels are analyzed. In four rapidity regions, $A_{FB}$ is given as a function of the lepton mass. The data, recorded with the CMS detector, corresponds to an integrated luminosity of $5\,\textrm{fb}^{-1}$.

Source code: CMS_2013_I1122847.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
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"

namespace Rivet {


  class CMS_2013_I1122847 : public Analysis {
  public:

    /// Constructor
    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2013_I1122847);


    /// Book histograms and initialise projections before the run
    void init() {
      const FinalState fs;

      Cut cuts_mu = Cuts::abseta < 2.4 && Cuts::pT > 20*GeV;
      ZFinder zfinder_mu(fs, cuts_mu, PID::MUON, 40*GeV, 7*TeV, 0.0);
      declare(zfinder_mu, "zfinder_mu");

      Cut cuts_el = (Cuts::pT >= 20*GeV && Cuts::abseta < 2.4 && !Cuts::absetaIn(1.447, 1.57));
      ZFinder zfinder_el(fs, cuts_el, PID::ELECTRON, 40*GeV, 7*TeV, 0.0);
      declare(zfinder_el, "zfinder_el");


      /// Histograms
      // dimuon
      book(_hist_mm_100_num, "TMP/mm_100_num", refData(1, 1, 1));
      book(_hist_mm_125_num, "TMP/mm_125_num", refData(1, 1, 2));
      book(_hist_mm_150_num, "TMP/mm_150_num", refData(1, 1, 3));
      book(_hist_mm_240_num, "TMP/mm_240_num", refData(1, 1, 4));

      book(_hist_mm_100_den, "TMP/mm_100_den", refData(1, 1, 1));
      book(_hist_mm_125_den, "TMP/mm_125_den", refData(1, 1, 2));
      book(_hist_mm_150_den, "TMP/mm_150_den", refData(1, 1, 3));
      book(_hist_mm_240_den, "TMP/mm_240_den", refData(1, 1, 4));

      // Dielectron
      book(_hist_ee_100_num, "TMP/ee_100_num", refData(2, 1, 1));
      book(_hist_ee_125_num, "TMP/ee_125_num", refData(2, 1, 2));
      book(_hist_ee_150_num, "TMP/ee_150_num", refData(2, 1, 3));
      book(_hist_ee_240_num, "TMP/ee_240_num", refData(2, 1, 4));

      book(_hist_ee_100_den, "TMP/ee_100_den", refData(2, 1, 1));
      book(_hist_ee_125_den, "TMP/ee_125_den", refData(2, 1, 2));
      book(_hist_ee_150_den, "TMP/ee_150_den", refData(2, 1, 3));
      book(_hist_ee_240_den, "TMP/ee_240_den", refData(2, 1, 4));

      // Dilepton
      book(_hist_ll_100_num, "TMP/ll_100_num", refData(3, 1, 1));
      book(_hist_ll_125_num, "TMP/ll_125_num", refData(3, 1, 2));
      book(_hist_ll_150_num, "TMP/ll_150_num", refData(3, 1, 3));
      book(_hist_ll_240_num, "TMP/ll_240_num", refData(3, 1, 4));

      book(_hist_ll_100_den, "TMP/ll_100_den", refData(3, 1, 1));
      book(_hist_ll_125_den, "TMP/ll_125_den", refData(3, 1, 2));
      book(_hist_ll_150_den, "TMP/ll_150_den", refData(3, 1, 3));
      book(_hist_ll_240_den, "TMP/ll_240_den", refData(3, 1, 4));

      book(_s_mm_100, 1, 1, 1);
      book(_s_mm_125, 1, 1, 2);
      book(_s_mm_150, 1, 1, 3);
      book(_s_mm_240, 1, 1, 4);
      book(_s_ee_100, 2, 1, 1);
      book(_s_ee_125, 2, 1, 2);
      book(_s_ee_150, 2, 1, 3);
      book(_s_ee_240, 2, 1, 4);
      book(_s_ll_100, 3, 1, 1);
      book(_s_ll_125, 3, 1, 2);
      book(_s_ll_150, 3, 1, 3);
      book(_s_ll_240, 3, 1, 4);
    }


    double cosThetaCS(const Particle& l1, const Particle& l2) {
      const FourMomentum mom1 = l1.mom();
      const FourMomentum mom2 = l2.mom();
      const FourMomentum mom12 = mom1 + mom2;
      const double Q = mom12.mass();
      const double QT = mom12.pT();
      const double QZ = mom12.pz();

      /// @todo Why include factors of sqrt2 which then get immediately multiplied then divided out?
      const double sqrt2 = sqrt(2.0);
      /// @todo Can be done more nicely via PID-ordered references to mom1, mom2
      const double P1p = ((l1.pid() > 0) ? (mom1.E() + mom1.pz()) : (mom2.E() + mom2.pz())) / sqrt2;
      const double P1m = ((l1.pid() > 0) ? (mom1.E() - mom1.pz()) : (mom2.E() - mom2.pz())) / sqrt2;
      const double P2p = ((l1.pid() > 0) ? (mom2.E() + mom2.pz()) : (mom1.E() + mom1.pz())) / sqrt2;
      const double P2m = ((l1.pid() > 0) ? (mom2.E() - mom2.pz()) : (mom1.E() - mom1.pz())) / sqrt2;

      const double cosThetaCS = sign(QZ) * (2 / (Q * add_quad(Q, QT))) * (P1p*P2m - P1m*P2p);
      return cosThetaCS;
    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {
      const double weight = 1.0;

      const ZFinder& zfinder_el = apply<ZFinder>(event, "zfinder_el");
      if (zfinder_el.bosons().size() > 0) {
        const Particle& z  = zfinder_el.bosons()[0];
        const Particle& l1 = zfinder_el.constituents()[0];
        const Particle& l2 = zfinder_el.constituents()[1];

        // Prepare variables for filling
        const double rap = z.absrap();
        const double costhetacs = cosThetaCS(l1, l2);
        const double sgn = sign(costhetacs);

        // Fill the histograms
        if (rap < 1.0) {
          _hist_ee_100_num->fill(z.mass(), weight * sgn);
          _hist_ll_100_num->fill(z.mass(), weight * sgn);
          _hist_ee_100_den->fill(z.mass(), weight);
          _hist_ll_100_den->fill(z.mass(), weight);
        } else if (rap < 1.25) {
          _hist_ee_125_num->fill(z.mass(), weight * sgn);
          _hist_ll_125_num->fill(z.mass(), weight * sgn);
          _hist_ee_125_den->fill(z.mass(), weight);
          _hist_ll_125_den->fill(z.mass(), weight);
        } else if (rap < 1.50) {
          _hist_ee_150_num->fill(z.mass(), weight * sgn);
          _hist_ll_150_num->fill(z.mass(), weight * sgn);
          _hist_ee_150_den->fill(z.mass(), weight);
          _hist_ll_150_den->fill(z.mass(), weight);
        } else if (rap < 2.40) {
          _hist_ee_240_num->fill(z.mass(), weight * sgn);
          _hist_ll_240_num->fill(z.mass(), weight * sgn);
          _hist_ee_240_den->fill(z.mass(), weight);
          _hist_ll_240_den->fill(z.mass(), weight);
        }
      }

      const ZFinder& zfinder_mu = apply<ZFinder>(event, "zfinder_mu");
      if (zfinder_mu.bosons().size() > 0) {
        const Particle& z  = zfinder_mu.bosons()[0];
        const Particle& l1 = zfinder_mu.constituents()[0];
        const Particle& l2 = zfinder_mu.constituents()[1];

        // Prepare variables for filling
        const double rap = z.absrap();
        const double costhetacs = cosThetaCS(l1, l2);
        const double sgn = sign(costhetacs);

        // Fill the histograms
        if (rap < 1.0) {
          _hist_mm_100_num->fill(z.mass(), weight * sgn);
          _hist_ll_100_num->fill(z.mass(), weight * sgn);
          _hist_mm_100_den->fill(z.mass(), weight);
          _hist_ll_100_den->fill(z.mass(), weight);
        } else if (rap < 1.25) {
          _hist_mm_125_num->fill(z.mass(), weight * sgn);
          _hist_ll_125_num->fill(z.mass(), weight * sgn);
          _hist_mm_125_den->fill(z.mass(), weight);
          _hist_ll_125_den->fill(z.mass(), weight);
        } else if (rap < 1.50) {
          _hist_mm_150_num->fill(z.mass(), weight * sgn);
          _hist_ll_150_num->fill(z.mass(), weight * sgn);
          _hist_mm_150_den->fill(z.mass(), weight);
          _hist_ll_150_den->fill(z.mass(), weight);
        } else if (rap < 2.40) {
          _hist_mm_240_num->fill(z.mass(), weight * sgn);
          _hist_ll_240_num->fill(z.mass(), weight * sgn);
          _hist_mm_240_den->fill(z.mass(), weight);
          _hist_ll_240_den->fill(z.mass(), weight);
        }
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      divide(_hist_mm_100_num, _hist_mm_100_den, _s_mm_100);
      divide(_hist_mm_125_num, _hist_mm_125_den, _s_mm_125);
      divide(_hist_mm_150_num, _hist_mm_150_den, _s_mm_150);
      divide(_hist_mm_240_num, _hist_mm_240_den, _s_mm_240);
      divide(_hist_ee_100_num, _hist_ee_100_den, _s_ee_100);
      divide(_hist_ee_125_num, _hist_ee_125_den, _s_ee_125);
      divide(_hist_ee_150_num, _hist_ee_150_den, _s_ee_150);
      divide(_hist_ee_240_num, _hist_ee_240_den, _s_ee_240);
      divide(_hist_ll_100_num, _hist_ll_100_den, _s_ll_100);
      divide(_hist_ll_125_num, _hist_ll_125_den, _s_ll_125);
      divide(_hist_ll_150_num, _hist_ll_150_den, _s_ll_150);
      divide(_hist_ll_240_num, _hist_ll_240_den, _s_ll_240);
    }


  private:

    /// Histograms
    Histo1DPtr _hist_ee_100_num, _hist_ee_125_num, _hist_ee_150_num, _hist_ee_240_num;
    Histo1DPtr _hist_ee_100_den, _hist_ee_125_den, _hist_ee_150_den, _hist_ee_240_den;
    Histo1DPtr _hist_mm_100_num, _hist_mm_125_num, _hist_mm_150_num, _hist_mm_240_num;
    Histo1DPtr _hist_mm_100_den, _hist_mm_125_den, _hist_mm_150_den, _hist_mm_240_den;
    Histo1DPtr _hist_ll_100_num, _hist_ll_125_num, _hist_ll_150_num, _hist_ll_240_num;
    Histo1DPtr _hist_ll_100_den, _hist_ll_125_den, _hist_ll_150_den, _hist_ll_240_den;
    Scatter2DPtr _s_ee_100, _s_ee_125, _s_ee_150, _s_ee_240;
    Scatter2DPtr _s_mm_100, _s_mm_125, _s_mm_150, _s_mm_240;
    Scatter2DPtr _s_ll_100, _s_ll_125, _s_ll_150, _s_ll_240;

  };

  // The hook for the plugin system
  RIVET_DECLARE_PLUGIN(CMS_2013_I1122847);

}