rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_WWINC

Monte Carlo validation observables for $W^+[e^+ \, \nu]W^-[\mu^- \, \nu]$ production
Experiment: ()
Status: VALIDATED
Authors:
  • Frank Siegert
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • $WW$ analysis.

Monte Carlo validation observables for $W^+[e^+ \, \nu]W^-[\mu^- \, \nu]$ production

Source code: MC_WWINC.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/WFinder.hh"
  4#include "Rivet/Projections/VetoedFinalState.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief MC validation analysis for W^+[enu]W^-[munu] events
 10  class MC_WWINC : public Analysis {
 11  public:
 12
 13    /// Default constructor
 14    MC_WWINC()
 15      : Analysis("MC_WWINC")
 16    {    }
 17
 18
 19    /// @name Analysis methods
 20    //@{
 21
 22    /// Book histograms
 23    void init() {
 24      FinalState fs;
 25      WFinder wenufinder(fs, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
 26      declare(wenufinder, "WenuFinder");
 27
 28      VetoedFinalState wmnuinput;
 29      wmnuinput.addVetoOnThisFinalState(wenufinder);
 30      WFinder wmnufinder(wmnuinput, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
 31      declare(wmnufinder, "WmnuFinder");
 32
 33      // properties of the pair momentum
 34      double sqrts = sqrtS()>0. ? sqrtS() : 14000.;
 35      book(_h_WW_pT ,"WW_pT", logspace(100, 1.0, max(1.1,0.5*sqrts)));
 36      book(_h_WW_pT_peak ,"WW_pT_peak", 25, 0.0, 25.0);
 37      book(_h_WW_eta ,"WW_eta", 40, -7.0, 7.0);
 38      book(_h_WW_phi ,"WW_phi", 25, 0.0, TWOPI);
 39      book(_h_WW_m ,"WW_m", logspace(100, 150.0, 180.0+0.25*sqrts));
 40
 41      // correlations between the WW
 42      book(_h_WW_dphi ,"WW_dphi", 25, 0.0, PI);  /// @todo non-linear?
 43      book(_h_WW_deta ,"WW_deta", 25, -7.0, 7.0);
 44      book(_h_WW_dR ,"WW_dR", 25, 0.5, 7.0);
 45      book(_h_WW_dpT ,"WW_dpT", logspace(100, 1.0, max(1.1,0.5*sqrts)));
 46      book(_h_WW_costheta_planes ,"WW_costheta_planes", 25, -1.0, 1.0);
 47
 48      /// @todo fuer WW: missing ET
 49
 50      // properties of the W bosons
 51      book(_h_W_pT ,"W_pT", logspace(100, 10.0, max(11.,0.25*sqrts)));
 52      book(_h_W_eta ,"W_eta", 70, -7.0, 7.0);
 53
 54      // properties of the leptons
 55      book(_h_Wl_pT ,"Wl_pT", logspace(100, 30.0, max(31., 0.1*sqrts)));
 56      book(_h_Wl_eta ,"Wl_eta", 40, -3.5, 3.5);
 57
 58      // correlations between the opposite charge leptons
 59      book(_h_WeWm_dphi ,"WeWm_dphi", 25, 0.0, PI);
 60      book(_h_WeWm_deta ,"WeWm_deta", 25, -5.0, 5.0);
 61      book(_h_WeWm_dR ,"WeWm_dR", 25, 0.5, 5.0);
 62      book(_h_WeWm_m ,"WeWm_m", 100, 0.0, 300.0);
 63    }
 64
 65
 66
 67    /// Do the analysis
 68    void analyze(const Event & e) {
 69      const double weight = 1.0;
 70
 71      const WFinder& wenufinder = apply<WFinder>(e, "WenuFinder");
 72      if (wenufinder.bosons().size()!=1) {
 73        vetoEvent;
 74      }
 75
 76      const WFinder& wmnufinder = apply<WFinder>(e, "WmnuFinder");
 77      if (wmnufinder.bosons().size()!=1) {
 78        vetoEvent;
 79      }
 80
 81      FourMomentum wenu(wenufinder.bosons()[0].momentum());
 82      FourMomentum wmnu(wmnufinder.bosons()[0].momentum());
 83      FourMomentum ww(wenu+wmnu);
 84      // find leptons
 85      FourMomentum ep=wenufinder.constituentLeptons()[0].momentum();
 86      FourMomentum enu=wenufinder.constituentNeutrinos()[0].momentum();
 87      FourMomentum mm=wmnufinder.constituentLeptons()[0].momentum();
 88      FourMomentum mnu=wmnufinder.constituentNeutrinos()[0].momentum();
 89
 90      _h_WW_pT->fill(ww.pT(),weight);
 91      _h_WW_pT_peak->fill(ww.pT(),weight);
 92      _h_WW_eta->fill(ww.eta(),weight);
 93      _h_WW_phi->fill(ww.phi(),weight);
 94      double mww2=ww.mass2();
 95      if (mww2>0.0) _h_WW_m->fill(sqrt(mww2), weight);
 96
 97      _h_WW_dphi->fill(mapAngle0ToPi(wenu.phi()-wmnu.phi()), weight);
 98      _h_WW_deta->fill(wenu.eta()-wmnu.eta(), weight);
 99      _h_WW_dR->fill(deltaR(wenu,wmnu), weight);
100      _h_WW_dpT->fill(fabs(wenu.pT()-wmnu.pT()), weight);
101
102      Vector3 crossWenu = ep.p3().cross(enu.p3());
103      Vector3 crossWmnu = mm.p3().cross(mnu.p3());
104      double costheta = crossWenu.dot(crossWmnu)/crossWenu.mod()/crossWmnu.mod();
105      _h_WW_costheta_planes->fill(costheta, weight);
106
107      _h_W_pT->fill(wenu.pT(),weight);
108      _h_W_pT->fill(wmnu.pT(),weight);
109      _h_W_eta->fill(wenu.eta(),weight);
110      _h_W_eta->fill(wmnu.eta(),weight);
111
112      _h_Wl_pT->fill(ep.pT(), weight);
113      _h_Wl_pT->fill(mm.pT(), weight);
114      _h_Wl_eta->fill(ep.eta(), weight);
115      _h_Wl_eta->fill(mm.eta(), weight);
116
117      _h_WeWm_dphi->fill(mapAngle0ToPi(ep.phi()-mm.phi()), weight);
118      _h_WeWm_deta->fill(ep.eta()-mm.eta(), weight);
119      _h_WeWm_dR->fill(deltaR(ep,mm), weight);
120      double m2=FourMomentum(ep+mm).mass2();
121      if (m2 < 0) m2 = 0.0;
122      _h_WeWm_m->fill(sqrt(m2), weight);
123    }
124
125
126    /// Finalize
127    void finalize() {
128      const double norm = crossSection()/picobarn/sumOfWeights();
129      scale(_h_WW_pT, norm);
130      scale(_h_WW_pT_peak, norm);
131      scale(_h_WW_eta, norm);
132      scale(_h_WW_phi, norm);
133      scale(_h_WW_m, norm);
134      scale(_h_WW_dphi, norm);
135      scale(_h_WW_deta, norm);
136      scale(_h_WW_dR, norm);
137      scale(_h_WW_dpT, norm);
138      scale(_h_WW_costheta_planes, norm);
139      scale(_h_W_pT, norm);
140      scale(_h_W_eta, norm);
141      scale(_h_Wl_pT, norm);
142      scale(_h_Wl_eta, norm);
143      scale(_h_WeWm_dphi, norm);
144      scale(_h_WeWm_deta, norm);
145      scale(_h_WeWm_dR, norm);
146      scale(_h_WeWm_m, norm);
147    }
148
149    //@}
150
151
152  private:
153
154    /// @name Histograms
155    //@{
156    Histo1DPtr _h_WW_pT;
157    Histo1DPtr _h_WW_pT_peak;
158    Histo1DPtr _h_WW_eta;
159    Histo1DPtr _h_WW_phi;
160    Histo1DPtr _h_WW_m;
161    Histo1DPtr _h_WW_dphi;
162    Histo1DPtr _h_WW_deta;
163    Histo1DPtr _h_WW_dR;
164    Histo1DPtr _h_WW_dpT;
165    Histo1DPtr _h_WW_costheta_planes;
166    Histo1DPtr _h_W_pT;
167    Histo1DPtr _h_W_eta;
168    Histo1DPtr _h_Wl_pT;
169    Histo1DPtr _h_Wl_eta;
170    Histo1DPtr _h_WeWm_dphi;
171    Histo1DPtr _h_WeWm_deta;
172    Histo1DPtr _h_WeWm_dR;
173    Histo1DPtr _h_WeWm_m;
174    //@}
175
176  };
177
178
179
180  // The hook for the plugin system
181  RIVET_DECLARE_PLUGIN(MC_WWINC);
182
183}