rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_WINC

Monte Carlo validation observables for inclusive $W[\ell \, \nu]$ production
Experiment: ()
Status: VALIDATED
Authors:
  • Frank Siegert
  • Christian Gutschow
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • $\ell \, \nu$ + jets analysis.

Monte Carlo validation observables for inclusive $W[\ell \, \nu]$ production. 60 GeV $<m_W<$ 100 GeV cut applied.

Source code: MC_WINC.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/WFinder.hh"
  4
  5namespace Rivet {
  6
  7
  8
  9  /// @brief MC validation analysis for inclusive W events
 10  class MC_WINC : public Analysis {
 11  public:
 12
 13    /// Default constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(MC_WINC);
 15
 16    /// @name Analysis methods
 17    //@{
 18
 19    /// Book histograms
 20    void init() {
 21		  _dR=0.2;
 22      if (getOption("SCHEME") == "BARE")  _dR = 0.0;
 23		  _lepton=PID::ELECTRON;
 24      if (getOption("LMODE") == "MU")  _lepton = PID::MUON;
 25
 26      FinalState fs;
 27      WFinder wfinder(fs, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, _lepton, 60.0*GeV, 100.0*GeV, 25.0*GeV, _dR);
 28      declare(wfinder, "WFinder");
 29
 30      double sqrts = sqrtS()>0. ? sqrtS() : 14000.;
 31      book(_h_W_mass ,"W_mass", 50, 55.0, 105.0);
 32      book(_h_W_mT ,"W_mT", 40, 60.0, 100.0);
 33      book(_h_W_pT ,"W_pT", logspace(100, 1.0, 0.5*sqrts));
 34      book(_h_W_pT_peak ,"W_pT_peak", 25, 0.0, 125.0);
 35      book(_h_W_y ,"W_y", 40, -4.0, 4.0);
 36      book(_h_W_phi ,"W_phi", 25, 0.0, TWOPI);
 37      book(_h_Wplus_pT ,"Wplus_pT", logspace(25, 10.0, 0.5*sqrts));
 38      book(_h_Wminus_pT ,"Wminus_pT", logspace(25, 10.0, 0.5*sqrts));
 39      book(_h_lepton_pT ,"lepton_pT", logspace(100, 10.0, 0.25*sqrts));
 40      book(_h_lepton_eta ,"lepton_eta", 40, -4.0, 4.0);
 41      book(_htmp_dsigminus_deta ,"lepton_dsigminus_deta", 20, 0.0, 4.0);
 42      book(_htmp_dsigplus_deta  ,"lepton_dsigplus_deta", 20, 0.0, 4.0);
 43
 44      book(_h_asym, "W_chargeasymm_eta");
 45      book(_h_asym_pT, "W_chargeasymm_pT");
 46    }
 47
 48
 49
 50    /// Do the analysis
 51    void analyze(const Event & e) {
 52
 53      const WFinder& wfinder = apply<WFinder>(e, "WFinder");
 54      if (wfinder.bosons().size() != 1) {
 55        vetoEvent;
 56      }
 57
 58      double charge3_x_eta = 0;
 59      int charge3 = 0;
 60      FourMomentum emom;
 61      FourMomentum wmom(wfinder.bosons().front().momentum());
 62      _h_W_mass->fill(wmom.mass()/GeV);
 63      _h_W_mT->fill(wfinder.mT()/GeV);
 64      _h_W_pT->fill(wmom.pT()/GeV);
 65      _h_W_pT_peak->fill(wmom.pT()/GeV);
 66      _h_W_y->fill(wmom.rapidity());
 67      _h_W_phi->fill(wmom.phi());
 68      Particle l=wfinder.constituentLeptons()[0];
 69      _h_lepton_pT->fill(l.pT()/GeV);
 70      _h_lepton_eta->fill(l.eta());
 71      if (PID::charge3(l.pid()) != 0) {
 72        emom = l.momentum();
 73        charge3_x_eta = PID::charge3(l.pid()) * emom.eta();
 74        charge3 = PID::charge3(l.pid());
 75      }
 76      assert(charge3_x_eta != 0);
 77      assert(charge3!=0);
 78      if (emom.Et() > 30/GeV) {
 79        if (charge3_x_eta < 0) {
 80          _htmp_dsigminus_deta->fill(emom.eta());
 81        } else {
 82          _htmp_dsigplus_deta->fill(emom.eta());
 83        }
 84      }
 85      if (charge3 < 0) {
 86        _h_Wminus_pT->fill(wmom.pT()/GeV);
 87      } else {
 88        _h_Wplus_pT->fill(wmom.pT()/GeV);
 89      }
 90    }
 91
 92
 93    /// Finalize
 94    void finalize() {
 95      scale(_h_W_mass, crossSection()/sumOfWeights());
 96      scale(_h_W_mT, crossSection()/sumOfWeights());
 97      scale(_h_W_pT, crossSection()/sumOfWeights());
 98      scale(_h_W_pT_peak, crossSection()/sumOfWeights());
 99      scale(_h_W_y, crossSection()/sumOfWeights());
100      scale(_h_W_phi, crossSection()/sumOfWeights());
101      scale(_h_lepton_pT, crossSection()/sumOfWeights());
102      scale(_h_lepton_eta, crossSection()/sumOfWeights());
103
104      // Construct asymmetry: (dsig+/deta - dsig-/deta) / (dsig+/deta + dsig-/deta) for each Et region
105      divide(*_htmp_dsigplus_deta - *_htmp_dsigminus_deta,
106             *_htmp_dsigplus_deta + *_htmp_dsigminus_deta,
107             _h_asym);
108
109      // // W charge asymmetry vs. pTW: dsig+/dpT / dsig-/dpT
110      divide(_h_Wplus_pT, _h_Wminus_pT,
111             _h_asym_pT);
112
113      scale(_h_Wplus_pT, crossSection()/picobarn/sumOfWeights());
114      scale(_h_Wminus_pT, crossSection()/picobarn/sumOfWeights());
115    }
116
117    //@}
118
119
120  protected:
121
122    /// @name Parameters for specialised e/mu and dressed/bare subclassing
123    //@{
124    double _dR;
125    PdgId _lepton;
126    //@}
127
128
129  private:
130
131    /// @name Histograms
132    //@{
133    Histo1DPtr _h_W_mass;
134    Histo1DPtr _h_W_mT;
135    Histo1DPtr _h_W_pT;
136    Histo1DPtr _h_W_pT_peak;
137    Histo1DPtr _h_W_y;
138    Histo1DPtr _h_W_phi;
139    Histo1DPtr _h_Wplus_pT;
140    Histo1DPtr _h_Wminus_pT;
141    Histo1DPtr _h_lepton_pT;
142    Histo1DPtr _h_lepton_eta;
143
144    Histo1DPtr _htmp_dsigminus_deta;
145    Histo1DPtr _htmp_dsigplus_deta;
146
147    Scatter2DPtr _h_asym;
148    Scatter2DPtr _h_asym_pT;
149    //@}
150
151  };
152
153  // The hooks for the plugin system
154  RIVET_DECLARE_PLUGIN(MC_WINC);
155}