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