Rivet Analyses Reference

CMS_2021_I1978840

Measurement of $\mathrm{W}^{\pm}\gamma$ differential cross sections in proton-proton collisions at $\sqrt{s}=13\,\mathrm{TeV}$ and effective field theory constraints
Experiment: CMS (LHC)
Inspire ID: 1978840
Status: VALIDATED
Authors:
  • cms-pag-conveners-smp@cern.ch
  • Andrew Gilbert
References:
  • CMS-SMP-20-005
  • arxiv:2111.13948
  • Phys. Rev. D 105 (2022) 052003
Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • pp to $\mathrm{W}^{\pm}\gamma$ at $\sqrt{s}=13$ TeV.

Differential cross section measurements of $\mathrm{W}^{\pm}\gamma$ production in proton-proton collisions at $\sqrt{s} = 13\,\mathrm{TeV}$ are presented. The data set used in this study was collected with the CMS detector at the CERN LHC in 2016--2018 with an integrated luminosity of $138\,\mathrm{fb}^{-1}$. Candidate events containing an electron or muon, a photon, and missing transverse momentum are selected. The measurements are compared with standard model predictions computed at next-to-leading and next-to-next-to-leading orders in perturbative quantum chromodynamics. Constraints on the presence of TeV-scale new physics affecting the $\mathrm{WW}\gamma$ vertex are determined within an effective field theory framework, focusing on the $\mathcal{O}_{3W}$ operator. A simultaneous measurement of the photon transverse momentum and the azimuthal angle of the charged lepton in a special reference frame is performed.

Source code: CMS_2021_I1978840.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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Event.hh"
#include "Rivet/Math/LorentzTrans.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Projections/ChargedLeptons.hh"
#include "Rivet/Projections/DressedLeptons.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/PromptFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/InvisibleFinalState.hh"

namespace Rivet {

/// @brief Measurement of Wgamma differential cross sections in proton-proton collisions at sqrt(s) = 13 TeV and effective field theory constraints
class CMS_2021_I1978840 : public Analysis {
 public:
  struct WGammaRivetVariables {
    bool is_wg_gen;

    double l0_pt;
    double l0_eta;
    double l0_phi;
    double l0_M;
    int l0_q;
    unsigned l0_abs_pdgid;

    double p0_pt;
    double p0_eta;
    double p0_phi;
    double p0_M;
    bool p0_frixione;
    double p0_frixione_sum;

    double l0p0_dr;
    double mt_cluster;

    double n0_pt;
    double n0_eta;
    double n0_phi;
    double n0_M;

    double met_pt;
    double met_phi;

    double true_phi;
    double true_phi_f;

    int n_jets;

    WGammaRivetVariables() { resetVars(); }
    void resetVars() {
      is_wg_gen = false;
      l0_pt = 0.;
      l0_eta = 0.;
      l0_phi = 0.;
      l0_M = 0.;
      l0_q = 0;
      l0_abs_pdgid = 0;
      p0_pt = 0.;
      p0_eta = 0.;
      p0_phi = 0.;
      p0_M = 0.;
      p0_frixione = false;
      n0_pt = 0.;
      n0_eta = 0.;
      n0_phi = 0.;
      n0_M = 0.;
      met_pt = 0.;
      met_phi = 0.;
      true_phi = 0.;
      true_phi_f = 0.;
      l0p0_dr = 0.;
      mt_cluster = 0.;
      n_jets = 0;
    }
  };

  struct WGSystem {
    int lepton_charge;

    FourMomentum wg_system;

    FourMomentum c_w_boson;
    FourMomentum c_charged_lepton;
    FourMomentum c_neutrino;
    FourMomentum c_photon;

    FourMomentum r_w_boson;
    FourMomentum r_charged_lepton;
    FourMomentum r_neutrino;
    FourMomentum r_photon;

    WGSystem(Particle const& lep, FourMomentum const& neu, Particle const& pho, bool verbose);

    double Phi();
    double SymPhi();
  };

  double photon_iso_dr_ = 0.4;
  double lepton_pt_cut_ = 30.;
  double lepton_abs_eta_cut_ = 2.5;
  double photon_pt_cut_ = 30.;
  double photon_abs_eta_cut_ = 2.5;
  double missing_pt_cut_ = 40.;
  double lepton_photon_dr_cut_ = 0.7;
  double dressed_lepton_cone_ = 0.1;

  double eft_lepton_pt_cut_ = 80.;
  double eft_photon_pt_cut_ = 150.;

  double jet_pt_cut_ = 30.;
  double jet_abs_eta_cut_ = 2.5;
  double jet_dr_cut_ = 0.4;

  WGammaRivetVariables vars_;
  map<string, Histo1DPtr> _h;

  RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2021_I1978840);

  void init() {
    vars_.resetVars();

    FinalState fs;
    declare(fs, "FinalState");

    // Jets - all final state particles excluding neutrinos
    VetoedFinalState vfs;
    vfs.vetoNeutrinos();
    FastJets fastjets(vfs, FastJets::ANTIKT, 0.4);
    declare(fastjets, "Jets");

    // Dressed leptons
    ChargedLeptons charged_leptons(fs);
    PromptFinalState prompt_leptons(charged_leptons);
    declare(prompt_leptons, "PromptLeptons");

    IdentifiedFinalState photons(fs);
    photons.acceptIdPair(PID::PHOTON);
    PromptFinalState prompt_photons(photons);
    prompt_photons.acceptMuonDecays(true);
    prompt_photons.acceptTauDecays(true);

    DressedLeptons dressed_leptons(prompt_photons, prompt_leptons, dressed_lepton_cone_,
                                   Cuts::open(),
                                   /*useDecayPhotons*/ false);
    declare(dressed_leptons, "DressedLeptons");

    // Photons
    VetoedFinalState vetoed_prompt_photons(prompt_photons);
    vetoed_prompt_photons.addVetoOnThisFinalState(dressed_leptons);
    declare(vetoed_prompt_photons, "Photons");

    // Invisibles
    InvisibleFinalState invisibles(true, true, true);
    declare(invisibles, "Invisibles");

    // MET
    declare(MissingMomentum(fs), "MET");

    // Booking of histograms
    book(_h["baseline_photon_pt"], 1, 1, 1);
    book(_h["baseline_photon_eta"], 8, 1, 1);
    book(_h["baseline_leppho_dr"], 15, 1, 1);
    book(_h["baseline_leppho_deta"], 22, 1, 1);
    book(_h["baseline_mt_cluster"], 29, 1, 1);
    book(_h["baseline_njet"], 36, 1, 1);
    book(_h["raz_leppho_deta"], 40, 1, 1);
    book(_h["eft_photon_pt_phi_0"], 54, 1, 1);
    book(_h["eft_photon_pt_phi_1"], 55, 1, 1);
    book(_h["eft_photon_pt_phi_2"], 56, 1, 1);
  }

  /// Perform the per-event analysis
  void analyze(const Event& event) {
    vars_.resetVars();

    const Particles leptons = apply<FinalState>(event, "DressedLeptons").particlesByPt();

    if (leptons.size() == 0) {
      vetoEvent;
    }
    auto l0 = leptons.at(0);

    const Particles photons = apply<FinalState>(event, "Photons")
                                  .particlesByPt(DeltaRGtr(l0, lepton_photon_dr_cut_));
    if (photons.size() == 0) {
      vetoEvent;
    }
    auto p0 = photons.at(0);

    
    const Particles invisibles = apply<FinalState>(event, "Invisibles").particlesByPt();
    FourMomentum n0;
    for (auto const& inv : invisibles) {
      n0 += inv.momentum();
    }
    
    if (invisibles.size() == 0) {
      vetoEvent;
    }

    FourMomentum met = apply<MissingMomentum>(event, "MET").missingMomentum();
    // Redefine the MET
    met = FourMomentum(met.pt(), met.px(), met.py(), 0.);

    // Filter jets on pT, eta and DR with lepton and photon
    const Jets jets = apply<FastJets>(event, "Jets").jetsByPt([&](Jet const& j) {
      return j.pt() > jet_pt_cut_ && std::abs(j.eta()) < jet_abs_eta_cut_ &&
             deltaR(j, l0) > jet_dr_cut_ && deltaR(j, p0) > jet_dr_cut_;
    });

    if (leptons.size() >= 1 && photons.size() >= 1 && invisibles.size() >= 1) {
      // Populate variables
      vars_.is_wg_gen = true;
      vars_.l0_pt = l0.pt();
      vars_.l0_eta = l0.eta();
      vars_.l0_phi = l0.phi(PhiMapping::MINUSPI_PLUSPI);
      vars_.l0_M = l0.mass();
      vars_.l0_q = l0.charge3() / 3;
      vars_.l0_abs_pdgid = std::abs(l0.pid());
      vars_.p0_pt = p0.pt();
      vars_.p0_eta = p0.eta();
      vars_.p0_phi = p0.phi(PhiMapping::MINUSPI_PLUSPI);
      vars_.p0_M = p0.mass();
      vars_.n_jets = jets.size();
      vars_.l0p0_dr = deltaR(l0, p0);
      vars_.n0_pt = n0.pt();
      vars_.n0_eta = n0.eta();
      vars_.n0_phi = n0.phi(PhiMapping::MINUSPI_PLUSPI);
      vars_.n0_M = n0.mass();
      vars_.met_pt = met.pt();
      vars_.met_phi = met.phi(PhiMapping::MINUSPI_PLUSPI);

      // Here we build a list of particles to cluster jets, to be used in the photon isolation.
      // The selection of particles that we want to veto from this isolation sum is non-trivial:
      // the leading pT lepton, the leading pT photon that has DeltaR > 0.7 from the leading pT
      // lepton, the invisibles  and any tau decay products. Therefore, the selection is done
      // here instead of in the initialise method.
      Particles finalparts_iso = apply<FinalState>(event, "FinalState").particles();
      Particles filtered_iso;
      for (Particle const& p : finalparts_iso) {
        bool veto_particle = false;
        if (p.genParticle() == l0.genParticle() || p.genParticle() == p0.genParticle() || p.fromTau()) {
          veto_particle = true;
        }
        for (auto const& inv : invisibles) {
          if (p.genParticle() == inv.genParticle()) {
            veto_particle = true;
          } 
        }
        if (!veto_particle) {
          filtered_iso.push_back(p);
        }
      }
      auto proj = getProjection<FastJets>("Jets");
      proj.reset();
      proj.calc(filtered_iso);
      auto jets_iso = proj.jets();

      vars_.p0_frixione = true;
      double frixione_sum = 0.;

      // Apply Frixione isolation to the photon:
      auto jparts = sortBy(jets_iso, [&](Jet const& part1, Jet const& part2) {
        return deltaR(part1, p0) < deltaR(part2, p0);
      });

      for (auto const& ip : jparts) {
        double dr = deltaR(ip, p0);
        if (dr >= photon_iso_dr_) {
          break;
        }
        frixione_sum += ip.pt();
        if (frixione_sum > (p0.pt() * ((1. - std::cos(dr)) / (1. - std::cos(photon_iso_dr_))))) {
          vars_.p0_frixione = false;
        }
      }

      // Now calculate EFT phi observables
      auto wg_system = WGSystem(l0, n0, p0, false);

      vars_.true_phi = wg_system.Phi();
      vars_.true_phi_f = wg_system.SymPhi();

      // Calculate mTcluster
      auto cand1 = l0.momentum() + p0.momentum();
      auto full_system = cand1 + met;
      double mTcluster2 =
          std::pow(std::sqrt(cand1.mass2() + cand1.pt2()) + met.pt(), 2) - full_system.pt2();
      if (mTcluster2 > 0) {
        vars_.mt_cluster = std::sqrt(mTcluster2);
      } else {
        vars_.mt_cluster = 0.;
      }

      if (vars_.l0_pt > lepton_pt_cut_ && std::abs(vars_.l0_eta) < lepton_abs_eta_cut_ &&
          vars_.p0_pt > photon_pt_cut_ && std::abs(vars_.p0_eta) < photon_abs_eta_cut_ &&
          vars_.p0_frixione && vars_.l0p0_dr > lepton_photon_dr_cut_ &&
          vars_.met_pt > missing_pt_cut_) {
        _h["baseline_photon_pt"]->fill(vars_.p0_pt / GeV);
        _h["baseline_photon_eta"]->fill(vars_.p0_eta);
        _h["baseline_leppho_dr"]->fill(vars_.l0p0_dr);
        _h["baseline_leppho_deta"]->fill(vars_.l0_eta - vars_.p0_eta);
        _h["baseline_mt_cluster"]->fill(vars_.mt_cluster / GeV);
        double fill_n_jets = vars_.n_jets >= 2 ? 2. : double(vars_.n_jets);
        _h["baseline_njet"]->fill(fill_n_jets);
        if (vars_.n_jets == 0 && vars_.mt_cluster > 150.) {
          _h["raz_leppho_deta"]->fill(vars_.l0_eta - vars_.p0_eta);
        }
      }

      if (vars_.l0_pt > eft_lepton_pt_cut_ && std::abs(vars_.l0_eta) < lepton_abs_eta_cut_ &&
          vars_.p0_pt > eft_photon_pt_cut_ && std::abs(vars_.p0_eta) < photon_abs_eta_cut_ &&
          vars_.p0_frixione && vars_.l0p0_dr > lepton_photon_dr_cut_ &&
          vars_.met_pt > missing_pt_cut_ && vars_.n_jets == 0) {
        double absphi = std::abs(vars_.true_phi_f);
        if (absphi > 0. && absphi <= (PI / 6.)) {
          _h["eft_photon_pt_phi_0"]->fill(vars_.p0_pt / GeV);
        } else if (absphi > (PI / 6.) && absphi <= (PI / 3.)) {
          _h["eft_photon_pt_phi_1"]->fill(vars_.p0_pt / GeV);
        } else if (absphi > (PI / 3.) && absphi <= (PI / 2.)) {
          _h["eft_photon_pt_phi_2"]->fill(vars_.p0_pt / GeV);
        }
      }
    }
  }

  void finalize() {
    double flavor_factor = 3. / 2.;  // account for the fact that tau events are vetoed
    // Scale according to cross section
    for (std::string const& x :
         {"baseline_photon_pt", "baseline_photon_eta", "baseline_leppho_dr", "baseline_leppho_deta",
          "baseline_mt_cluster", "baseline_njet", "raz_leppho_deta", "eft_photon_pt_phi_0",
          "eft_photon_pt_phi_1", "eft_photon_pt_phi_2"}) {
      scale(_h[x], flavor_factor * crossSection() / femtobarn / sumOfWeights());
    }

    // Since these are really 2D, we need to divide by the y bin width:
    for (std::string const& x :
         {"eft_photon_pt_phi_0", "eft_photon_pt_phi_1", "eft_photon_pt_phi_2"}) {
      scale(_h[x], 1. / (PI / 6.));
    }
  }
};

CMS_2021_I1978840::WGSystem::WGSystem(Particle const& lep, FourMomentum const& neu,
                                            Particle const& pho, bool verbose) {
  lepton_charge = lep.charge3() / 3;
  wg_system += lep.momentum();
  wg_system += neu;
  wg_system += pho.momentum();

  if (verbose) {
    std::cout << "> charge:    " << lepton_charge << "\n";
    std::cout << "> wg_system: " << wg_system << "\n";
    std::cout << "> lepton   : " << lep.momentum() << "\n";
    std::cout << "> neutrino : " << neu << "\n";
    std::cout << "> photon   : " << pho.momentum() << "\n";
  }

  auto boost = LorentzTransform::mkFrameTransformFromBeta(wg_system.betaVec());

  c_charged_lepton = boost.transform(lep);
  c_neutrino = boost.transform(neu);
  c_photon = boost.transform(pho);

  if (verbose) {
    std::cout << "> c_lepton   : " << c_charged_lepton << "\n";
    std::cout << "> c_neutrino : " << c_neutrino << "\n";
    std::cout << "> c_photon   : " << c_photon << "\n";
  }

  FourMomentum c_w_boson;
  c_w_boson += c_charged_lepton;
  c_w_boson += c_neutrino;

  auto r_uvec = wg_system.vector3().unit();

  if (verbose) {
    std::cout << "> c_w_boson : " << c_w_boson << "\n";
    std::cout << "> r_uvec   : " << r_uvec << "\n";
  }

  auto z_uvec = c_w_boson.vector3().unit();
  auto y_uvec = z_uvec.cross(r_uvec).unit();
  auto x_uvec = y_uvec.cross(z_uvec).unit();

  if (verbose) {
    std::cout << "> x_uvec   : " << x_uvec << "\n";
    std::cout << "> y_uvec   : " << y_uvec << "\n";
    std::cout << "> z_uvec   : " << z_uvec << "\n";
  }

  Matrix3 rot_matrix;
  rot_matrix.setRow(0, x_uvec).setRow(1, y_uvec).setRow(2, z_uvec);
  auto rotator = LorentzTransform();
  rotator = rotator.postMult(rot_matrix);
  if (verbose) {
    std::cout << "> rotator   : " << rotator << "\n";
  }

  r_w_boson = rotator.transform(c_w_boson);
  r_charged_lepton = rotator.transform(c_charged_lepton);
  r_neutrino = rotator.transform(c_neutrino);
  r_photon = rotator.transform(c_photon);

  if (verbose) {
    std::cout << "> r_lepton   : " << r_charged_lepton << "\n";
    std::cout << "> r_neutrino : " << r_neutrino << "\n";
    std::cout << "> r_photon   : " << r_photon << "\n";
    std::cout << "> r_w_boson  : " << r_w_boson << "\n";
  }
}

double CMS_2021_I1978840::WGSystem::Phi() {
  double lep_phi = r_charged_lepton.phi(PhiMapping::MINUSPI_PLUSPI);
  return mapAngleMPiToPi(lepton_charge > 0 ? (lep_phi) : (lep_phi + PI));
}

double CMS_2021_I1978840::WGSystem::SymPhi() {
  double lep_phi = Phi();
  if (lep_phi > PI / 2.) {
    return PI - lep_phi;
  } else if (lep_phi < -1. * (PI / 2.)) {
    return -1. * (PI + lep_phi);
  } else {
    return lep_phi;
  }
}

RIVET_DECLARE_PLUGIN(CMS_2021_I1978840);

}  // namespace Rivet