Rivet analyses referenceMC_WJETSMonte Carlo validation observables for $W[e \, \nu]$ + jets productionExperiment: () Status: VALIDATED Authors:
Beams: * * Beam energies: ANY Run details:
Monte Carlo validation observables for $W[\ell \, \nu]$ + jets production 60 GeV $<m_W<$ 100 GeV cut applied. Source code: MC_WJETS.cc 1// -*- C++ -*-
2#include "Rivet/Analyses/MC_JetAnalysis.hh"
3#include "Rivet/Projections/WFinder.hh"
4#include "Rivet/Projections/FastJets.hh"
5#include "Rivet/Analysis.hh"
6
7namespace Rivet {
8
9
10 /// @brief MC validation analysis for W + jets events
11 class MC_WJETS : public MC_JetAnalysis {
12 public:
13
14 /// Default constructor
15 MC_WJETS(string name="MC_WJETS")
16 : MC_JetAnalysis(name, 4, "Jets")
17 { }
18
19
20 /// @name Analysis methods
21 //@{
22
23 /// Book histograms
24 void init() {
25 _dR=0.2;
26 if (getOption("SCHEME") == "BARE") _dR = 0.0;
27 _lepton=PID::ELECTRON;
28 if (getOption("LMODE") == "MU") _lepton = PID::MUON;
29
30 FinalState fs;
31 WFinder wfinder(fs, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, _lepton, 60.0*GeV, 100.0*GeV, 25.0*GeV, _dR);
32 declare(wfinder, "WFinder");
33 FastJets jetpro(wfinder.remainingFinalState(), FastJets::ANTIKT, 0.4);
34 declare(jetpro, "Jets");
35
36 book(_h_W_jet1_deta ,"W_jet1_deta", 50, -5.0, 5.0);
37 book(_h_W_jet1_dR ,"W_jet1_dR", 25, 0.5, 7.0);
38
39 MC_JetAnalysis::init();
40 }
41
42
43
44 /// Do the analysis
45 void analyze(const Event & e) {
46
47 const WFinder& wfinder = apply<WFinder>(e, "WFinder");
48 if (wfinder.bosons().size() != 1) {
49 vetoEvent;
50 }
51 FourMomentum wmom(wfinder.bosons().front().momentum());
52
53 const Jets& jets = apply<FastJets>(e, "Jets").jetsByPt(_jetptcut);
54 if (jets.size() > 0) {
55 _h_W_jet1_deta->fill(wmom.eta()-jets[0].eta());
56 _h_W_jet1_dR->fill(deltaR(wmom, jets[0].momentum()));
57 }
58
59 MC_JetAnalysis::analyze(e);
60 }
61
62
63 /// Finalize
64 void finalize() {
65 scale(_h_W_jet1_deta, crossSection()/picobarn/sumOfWeights());
66 scale(_h_W_jet1_dR, crossSection()/picobarn/sumOfWeights());
67 MC_JetAnalysis::finalize();
68 }
69
70 //@}
71
72
73 protected:
74
75 /// @name Parameters for specialised e/mu and dressed/bare subclassing
76 //@{
77 double _dR;
78 PdgId _lepton;
79 //@}
80
81
82 private:
83
84 /// @name Histograms
85 //@{
86 Histo1DPtr _h_W_jet1_deta;
87 Histo1DPtr _h_W_jet1_dR;
88 //@}
89
90 };
91
92 // The hooks for the plugin system
93 RIVET_DECLARE_PLUGIN(MC_WJETS);
94}
|