rivet is hosted by Hepforge, IPPP Durham

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// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/ZFinder.hh"
  5
  6namespace Rivet {
  7
  8
  9  class CMS_2013_I1122847 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2013_I1122847);
 14
 15
 16    /// Book histograms and initialise projections before the run
 17    void init() {
 18      const FinalState fs;
 19
 20      Cut cuts_mu = Cuts::abseta < 2.4 && Cuts::pT > 20*GeV;
 21      ZFinder zfinder_mu(fs, cuts_mu, PID::MUON, 40*GeV, 7*TeV, 0.0);
 22      declare(zfinder_mu, "zfinder_mu");
 23
 24      Cut cuts_el = (Cuts::pT >= 20*GeV && Cuts::abseta < 2.4 && !Cuts::absetaIn(1.447, 1.57));
 25      ZFinder zfinder_el(fs, cuts_el, PID::ELECTRON, 40*GeV, 7*TeV, 0.0);
 26      declare(zfinder_el, "zfinder_el");
 27
 28
 29      /// Histograms
 30      // dimuon
 31      book(_hist_mm_100_num, "TMP/mm_100_num", refData(1, 1, 1));
 32      book(_hist_mm_125_num, "TMP/mm_125_num", refData(1, 1, 2));
 33      book(_hist_mm_150_num, "TMP/mm_150_num", refData(1, 1, 3));
 34      book(_hist_mm_240_num, "TMP/mm_240_num", refData(1, 1, 4));
 35
 36      book(_hist_mm_100_den, "TMP/mm_100_den", refData(1, 1, 1));
 37      book(_hist_mm_125_den, "TMP/mm_125_den", refData(1, 1, 2));
 38      book(_hist_mm_150_den, "TMP/mm_150_den", refData(1, 1, 3));
 39      book(_hist_mm_240_den, "TMP/mm_240_den", refData(1, 1, 4));
 40
 41      // Dielectron
 42      book(_hist_ee_100_num, "TMP/ee_100_num", refData(2, 1, 1));
 43      book(_hist_ee_125_num, "TMP/ee_125_num", refData(2, 1, 2));
 44      book(_hist_ee_150_num, "TMP/ee_150_num", refData(2, 1, 3));
 45      book(_hist_ee_240_num, "TMP/ee_240_num", refData(2, 1, 4));
 46
 47      book(_hist_ee_100_den, "TMP/ee_100_den", refData(2, 1, 1));
 48      book(_hist_ee_125_den, "TMP/ee_125_den", refData(2, 1, 2));
 49      book(_hist_ee_150_den, "TMP/ee_150_den", refData(2, 1, 3));
 50      book(_hist_ee_240_den, "TMP/ee_240_den", refData(2, 1, 4));
 51
 52      // Dilepton
 53      book(_hist_ll_100_num, "TMP/ll_100_num", refData(3, 1, 1));
 54      book(_hist_ll_125_num, "TMP/ll_125_num", refData(3, 1, 2));
 55      book(_hist_ll_150_num, "TMP/ll_150_num", refData(3, 1, 3));
 56      book(_hist_ll_240_num, "TMP/ll_240_num", refData(3, 1, 4));
 57
 58      book(_hist_ll_100_den, "TMP/ll_100_den", refData(3, 1, 1));
 59      book(_hist_ll_125_den, "TMP/ll_125_den", refData(3, 1, 2));
 60      book(_hist_ll_150_den, "TMP/ll_150_den", refData(3, 1, 3));
 61      book(_hist_ll_240_den, "TMP/ll_240_den", refData(3, 1, 4));
 62
 63      book(_s_mm_100, 1, 1, 1);
 64      book(_s_mm_125, 1, 1, 2);
 65      book(_s_mm_150, 1, 1, 3);
 66      book(_s_mm_240, 1, 1, 4);
 67      book(_s_ee_100, 2, 1, 1);
 68      book(_s_ee_125, 2, 1, 2);
 69      book(_s_ee_150, 2, 1, 3);
 70      book(_s_ee_240, 2, 1, 4);
 71      book(_s_ll_100, 3, 1, 1);
 72      book(_s_ll_125, 3, 1, 2);
 73      book(_s_ll_150, 3, 1, 3);
 74      book(_s_ll_240, 3, 1, 4);
 75    }
 76
 77
 78    double cosThetaCS(const Particle& l1, const Particle& l2) {
 79      const FourMomentum mom1 = l1.mom();
 80      const FourMomentum mom2 = l2.mom();
 81      const FourMomentum mom12 = mom1 + mom2;
 82      const double Q = mom12.mass();
 83      const double QT = mom12.pT();
 84      const double QZ = mom12.pz();
 85
 86      /// @todo Why include factors of sqrt2 which then get immediately multiplied then divided out?
 87      const double sqrt2 = sqrt(2.0);
 88      /// @todo Can be done more nicely via PID-ordered references to mom1, mom2
 89      const double P1p = ((l1.pid() > 0) ? (mom1.E() + mom1.pz()) : (mom2.E() + mom2.pz())) / sqrt2;
 90      const double P1m = ((l1.pid() > 0) ? (mom1.E() - mom1.pz()) : (mom2.E() - mom2.pz())) / sqrt2;
 91      const double P2p = ((l1.pid() > 0) ? (mom2.E() + mom2.pz()) : (mom1.E() + mom1.pz())) / sqrt2;
 92      const double P2m = ((l1.pid() > 0) ? (mom2.E() - mom2.pz()) : (mom1.E() - mom1.pz())) / sqrt2;
 93
 94      const double cosThetaCS = sign(QZ) * (2 / (Q * add_quad(Q, QT))) * (P1p*P2m - P1m*P2p);
 95      return cosThetaCS;
 96    }
 97
 98
 99    /// Perform the per-event analysis
100    void analyze(const Event& event) {
101      const double weight = 1.0;
102
103      const ZFinder& zfinder_el = apply<ZFinder>(event, "zfinder_el");
104      if (zfinder_el.bosons().size() > 0) {
105        const Particle& z  = zfinder_el.bosons()[0];
106        const Particle& l1 = zfinder_el.constituents()[0];
107        const Particle& l2 = zfinder_el.constituents()[1];
108
109        // Prepare variables for filling
110        const double rap = z.absrap();
111        const double costhetacs = cosThetaCS(l1, l2);
112        const double sgn = sign(costhetacs);
113
114        // Fill the histograms
115        if (rap < 1.0) {
116          _hist_ee_100_num->fill(z.mass(), weight * sgn);
117          _hist_ll_100_num->fill(z.mass(), weight * sgn);
118          _hist_ee_100_den->fill(z.mass(), weight);
119          _hist_ll_100_den->fill(z.mass(), weight);
120        } else if (rap < 1.25) {
121          _hist_ee_125_num->fill(z.mass(), weight * sgn);
122          _hist_ll_125_num->fill(z.mass(), weight * sgn);
123          _hist_ee_125_den->fill(z.mass(), weight);
124          _hist_ll_125_den->fill(z.mass(), weight);
125        } else if (rap < 1.50) {
126          _hist_ee_150_num->fill(z.mass(), weight * sgn);
127          _hist_ll_150_num->fill(z.mass(), weight * sgn);
128          _hist_ee_150_den->fill(z.mass(), weight);
129          _hist_ll_150_den->fill(z.mass(), weight);
130        } else if (rap < 2.40) {
131          _hist_ee_240_num->fill(z.mass(), weight * sgn);
132          _hist_ll_240_num->fill(z.mass(), weight * sgn);
133          _hist_ee_240_den->fill(z.mass(), weight);
134          _hist_ll_240_den->fill(z.mass(), weight);
135        }
136      }
137
138      const ZFinder& zfinder_mu = apply<ZFinder>(event, "zfinder_mu");
139      if (zfinder_mu.bosons().size() > 0) {
140        const Particle& z  = zfinder_mu.bosons()[0];
141        const Particle& l1 = zfinder_mu.constituents()[0];
142        const Particle& l2 = zfinder_mu.constituents()[1];
143
144        // Prepare variables for filling
145        const double rap = z.absrap();
146        const double costhetacs = cosThetaCS(l1, l2);
147        const double sgn = sign(costhetacs);
148
149        // Fill the histograms
150        if (rap < 1.0) {
151          _hist_mm_100_num->fill(z.mass(), weight * sgn);
152          _hist_ll_100_num->fill(z.mass(), weight * sgn);
153          _hist_mm_100_den->fill(z.mass(), weight);
154          _hist_ll_100_den->fill(z.mass(), weight);
155        } else if (rap < 1.25) {
156          _hist_mm_125_num->fill(z.mass(), weight * sgn);
157          _hist_ll_125_num->fill(z.mass(), weight * sgn);
158          _hist_mm_125_den->fill(z.mass(), weight);
159          _hist_ll_125_den->fill(z.mass(), weight);
160        } else if (rap < 1.50) {
161          _hist_mm_150_num->fill(z.mass(), weight * sgn);
162          _hist_ll_150_num->fill(z.mass(), weight * sgn);
163          _hist_mm_150_den->fill(z.mass(), weight);
164          _hist_ll_150_den->fill(z.mass(), weight);
165        } else if (rap < 2.40) {
166          _hist_mm_240_num->fill(z.mass(), weight * sgn);
167          _hist_ll_240_num->fill(z.mass(), weight * sgn);
168          _hist_mm_240_den->fill(z.mass(), weight);
169          _hist_ll_240_den->fill(z.mass(), weight);
170        }
171      }
172    }
173
174
175    /// Normalise histograms etc., after the run
176    void finalize() {
177      divide(_hist_mm_100_num, _hist_mm_100_den, _s_mm_100);
178      divide(_hist_mm_125_num, _hist_mm_125_den, _s_mm_125);
179      divide(_hist_mm_150_num, _hist_mm_150_den, _s_mm_150);
180      divide(_hist_mm_240_num, _hist_mm_240_den, _s_mm_240);
181      divide(_hist_ee_100_num, _hist_ee_100_den, _s_ee_100);
182      divide(_hist_ee_125_num, _hist_ee_125_den, _s_ee_125);
183      divide(_hist_ee_150_num, _hist_ee_150_den, _s_ee_150);
184      divide(_hist_ee_240_num, _hist_ee_240_den, _s_ee_240);
185      divide(_hist_ll_100_num, _hist_ll_100_den, _s_ll_100);
186      divide(_hist_ll_125_num, _hist_ll_125_den, _s_ll_125);
187      divide(_hist_ll_150_num, _hist_ll_150_den, _s_ll_150);
188      divide(_hist_ll_240_num, _hist_ll_240_den, _s_ll_240);
189    }
190
191
192  private:
193
194    /// Histograms
195    Histo1DPtr _hist_ee_100_num, _hist_ee_125_num, _hist_ee_150_num, _hist_ee_240_num;
196    Histo1DPtr _hist_ee_100_den, _hist_ee_125_den, _hist_ee_150_den, _hist_ee_240_den;
197    Histo1DPtr _hist_mm_100_num, _hist_mm_125_num, _hist_mm_150_num, _hist_mm_240_num;
198    Histo1DPtr _hist_mm_100_den, _hist_mm_125_den, _hist_mm_150_den, _hist_mm_240_den;
199    Histo1DPtr _hist_ll_100_num, _hist_ll_125_num, _hist_ll_150_num, _hist_ll_240_num;
200    Histo1DPtr _hist_ll_100_den, _hist_ll_125_den, _hist_ll_150_den, _hist_ll_240_den;
201    Scatter2DPtr _s_ee_100, _s_ee_125, _s_ee_150, _s_ee_240;
202    Scatter2DPtr _s_mm_100, _s_mm_125, _s_mm_150, _s_mm_240;
203    Scatter2DPtr _s_ll_100, _s_ll_125, _s_ll_150, _s_ll_240;
204
205  };
206
207  // The hook for the plugin system
208  RIVET_DECLARE_PLUGIN(CMS_2013_I1122847);
209
210}