diff --git a/analyses/pluginCMS/CMS_2016_I1487288.cc b/analyses/pluginCMS/CMS_2016_I1487288.cc --- a/analyses/pluginCMS/CMS_2016_I1487288.cc +++ b/analyses/pluginCMS/CMS_2016_I1487288.cc @@ -1,119 +1,118 @@ #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/ZFinder.hh" #include "Rivet/Projections/WFinder.hh" namespace Rivet { /// @brief WZ production cross section in pp collisions at 7 and 8 TeV class CMS_2016_I1487288 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(CMS_2016_I1487288); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { FinalState fs(Cuts::abseta < 4.9); FastJets fj(fs, FastJets::ANTIKT, 0.5, JetAlg::ALL_MUONS, JetAlg::DECAY_INVISIBLES); declare(fj, "Jets"); ZFinder zeeFinder(fs, Cuts::abseta < 2.5 && Cuts::pT > 20*GeV, PID::ELECTRON, 71*GeV, 111*GeV); declare(zeeFinder, "Zee"); ZFinder zmumuFinder(fs, Cuts::abseta < 2.4 && Cuts::pT > 20*GeV, PID::MUON, 71*GeV, 111*GeV); declare(zmumuFinder, "Zmumu"); WFinder weFinder(fs, Cuts::abseta < 2.5 && Cuts::pT > 20*GeV, PID::ELECTRON, 60*GeV, 100*GeV, 30*GeV); declare(weFinder, "We"); WFinder wmuFinder(fs, Cuts::abseta < 2.4 && Cuts::pT > 20*GeV, PID::MUON, 60*GeV, 100*GeV, 30*GeV); declare(wmuFinder, "Wmu"); - /// @todo Need HepData ref data - _h_ZpT = bookHisto1D("d01-x01-y01", {0., 20., 40., 60., 80., 100., 120., 140., 200., 300.}); - _h_Njet = bookHisto1D("d02-x01-y01", {-0.5, 0.5, 1.5, 2.5, 3.5}); - _h_JpT = bookHisto1D("d03-x01-y01", {30., 60., 100., 150., 250.}); + _h_ZpT = bookHisto1D("d03-x01-y01"); + _h_Njet = bookHisto1D("d04-x01-y01", {-0.5, 0.5, 1.5, 2.5, 3.5}); ///< @todo Ref data has null bin widths + _h_JpT = bookHisto1D("d05-x01-y01"); } /// Perform the per-event analysis void analyze(const Event& event) { // Find Z -> l+ l- const ZFinder& zeeFS = apply(event, "Zee"); const ZFinder& zmumuFS = apply(event, "Zmumu"); const Particles zlls = zeeFS.bosons() + zmumuFS.bosons(); if (zlls.empty()) vetoEvent; // Next find the W const WFinder& weFS = apply(event, "We"); const WFinder& wmuFS = apply(event, "Wmu"); const Particles wls = weFS.bosons() + wmuFS.bosons(); if (wls.empty()) vetoEvent; // If more than one Z candidate, use the one with Mll nearest to MZ const Particles zlls_mz = sortBy(zlls, [](const Particle& a, const Particle& b){ return fabs(a.mass() - 91.2*GeV) < fabs(b.mass() - 91.2*GeV); }); const Particle& Z = zlls_mz.front(); // const bool isZee = any(Z.constituents(), hasAbsPID(PID::ELECTRON)); // If more than one Z candidate, use the one with Mll nearest to MZ const Particles wls_mw = sortBy(wls, [](const Particle& a, const Particle& b){ return fabs(a.mass() - 80.4*GeV) < fabs(b.mass() - 80.4*GeV); }); const Particle& W = wls_mw.front(); // const bool isWe = any(W.constituents(), hasAbsPID(PID::ELECTRON)); // Isolate W and Z charged leptons from each other for (const Particle& lw : W.constituents()) { if (lw.charge3() == 0) continue; for (const Particle& lz : Z.constituents()) { if (deltaR(lw, lz) < 0.1) vetoEvent; } } // Fill Z pT histogram _h_ZpT->fill(Z.pT()/GeV, event.weight()); // Isolate jets from W and Z charged leptons const Particles wzleps = filter_select(W.constituents()+Z.constituents(), isChLepton); const Jets& jets = apply("Jets", event).jets(); const Jets isojets = discardIfAnyDeltaRLess(jets, wzleps, 0.5); // Fill jet histograms _h_Njet->fill(jets.size(), event.weight()); if (!jets.empty()) _h_JpT->fill(jets[0].pT()/GeV, event.weight()); } /// Normalise histograms etc., after the run void finalize() { scale(_h_ZpT, crossSection()/picobarn); scale(_h_Njet, crossSection()/picobarn); scale(_h_JpT, crossSection()/picobarn); } private: /// Histogram Histo1DPtr _h_ZpT, _h_Njet, _h_JpT; }; DECLARE_RIVET_PLUGIN(CMS_2016_I1487288); } diff --git a/analyses/pluginCMS/CMS_2016_I1487288.yoda b/analyses/pluginCMS/CMS_2016_I1487288.yoda new file mode 100644 --- /dev/null +++ b/analyses/pluginCMS/CMS_2016_I1487288.yoda @@ -0,0 +1,98 @@ +BEGIN YODA_SCATTER1D_V2 /REF/CMS_2016_I1487288/d01-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {exp: {dn: -1.06, up: 1.06}, lumi: {dn: -0.44, up: 0.44}, stat: {dn: -1.32, up: 1.32}, theo: {dn: -0.38, up: 0.38}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d01-x01-y01 +Title: doi:10.17182/hepdata.89400.v1/t1 +Type: Scatter1D +--- +# xval xerr- xerr+ +2.014000e+01 1.789972e+00 1.789972e+00 +END YODA_SCATTER1D_V2 +BEGIN YODA_SCATTER1D_V2 /REF/CMS_2016_I1487288/d01-x01-y02 +Variations: [""] +ErrorBreakdown: {0: {total: {dn: -0.34524, up: 0.32605999999999996}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d01-x01-y02 +Title: doi:10.17182/hepdata.89400.v1/t1 +Type: Scatter1D +--- +# xval xerr- xerr+ +1.918000e+01 3.452400e-01 3.260600e-01 +END YODA_SCATTER1D_V2 +BEGIN YODA_SCATTER1D_V2 /REF/CMS_2016_I1487288/d02-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {exp: {dn: -1.4, up: 1.4}, lumi: {dn: -0.63, up: 0.63}, stat: {dn: -0.87, up: 0.87}, theo: {dn: -0.8, up: 0.8}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d02-x01-y01 +Title: doi:10.17182/hepdata.89400.v1/t2 +Type: Scatter1D +--- +# xval xerr- xerr+ +2.409000e+01 1.937473e+00 1.937473e+00 +END YODA_SCATTER1D_V2 +BEGIN YODA_SCATTER1D_V2 /REF/CMS_2016_I1487288/d02-x01-y02 +Variations: [""] +ErrorBreakdown: {0: {total: {dn: -0.42624, up: 0.42624}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d02-x01-y02 +Title: doi:10.17182/hepdata.89400.v1/t2 +Type: Scatter1D +--- +# xval xerr- xerr+ +2.368000e+01 4.262400e-01 4.262400e-01 +END YODA_SCATTER1D_V2 +BEGIN YODA_SCATTER2D_V2 /REF/CMS_2016_I1487288/d03-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {lumi: {dn: -0.004, up: 0.004}, stat: {dn: -0.04, up: 0.04}, syst: {dn: -0.017, up: 0.017}}, 1: {lumi: {dn: -0.009, up: 0.009}, stat: {dn: -0.06, up: 0.06}, syst: {dn: -0.05, up: 0.05}}, 2: {lumi: {dn: -0.007, up: 0.007}, stat: {dn: -0.054, up: 0.054}, syst: {dn: -0.049, up: 0.049}}, 3: {lumi: {dn: -0.005, up: 0.005}, stat: {dn: -0.047, up: 0.047}, syst: {dn: -0.03, up: 0.03}}, 4: {lumi: {dn: -0.003, up: 0.003}, stat: {dn: -0.037, up: 0.037}, syst: {dn: -0.021, up: 0.021}}, 5: {lumi: {dn: -0.001, up: 0.001}, stat: {dn: -0.023, up: 0.023}, syst: {dn: -0.015, up: 0.015}}, 6: {lumi: {dn: -0.001, up: 0.001}, stat: {dn: -0.022, up: 0.022}, syst: {dn: -0.01, up: 0.01}}, 7: {lumi: {dn: -0.0003, up: 0.0003}, stat: {dn: -0.0073, up: 0.0073}, syst: {dn: -0.0057, up: 0.0057}}, 8: {lumi: {dn: -0.0001, up: 0.0001}, stat: {dn: -0.0036, up: 0.0036}, syst: {dn: -0.0016, up: 0.0016}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d03-x01-y01 +Title: doi:10.17182/hepdata.89400.v1/t3 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +1.000000e+01 1.000000e+01 1.000000e+01 1.480000e-01 4.364631e-02 4.364631e-02 +3.000000e+01 1.000000e+01 1.000000e+01 3.470000e-01 7.861934e-02 7.861934e-02 +5.000000e+01 1.000000e+01 1.000000e+01 2.560000e-01 7.325299e-02 7.325299e-02 +7.000000e+01 1.000000e+01 1.000000e+01 2.100000e-01 5.598214e-02 5.598214e-02 +9.000000e+01 1.000000e+01 1.000000e+01 1.200000e-01 4.264974e-02 4.264974e-02 +1.100000e+02 1.000000e+01 1.000000e+01 4.900000e-02 2.747726e-02 2.747726e-02 +1.300000e+02 1.000000e+01 1.000000e+01 5.000000e-02 2.418677e-02 2.418677e-02 +1.700000e+02 3.000000e+01 3.000000e+01 1.340000e-02 9.266607e-03 9.266607e-03 +2.500000e+02 5.000000e+01 5.000000e+01 4.900000e-03 3.940812e-03 3.940812e-03 +END YODA_SCATTER2D_V2 +BEGIN YODA_SCATTER2D_V2 /REF/CMS_2016_I1487288/d04-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {lumi: {dn: -0.42, up: 0.42}, stat: {dn: -1.95, up: 1.95}, syst: {dn: -0.88, up: 0.88}}, 1: {lumi: {dn: -0.14, up: 0.14}, stat: {dn: -1.11, up: 1.11}, syst: {dn: -0.52, up: 0.52}}, 2: {lumi: {dn: -0.05, up: 0.05}, stat: {dn: -0.69, up: 0.69}, syst: {dn: -0.27, up: 0.27}}, 3: {lumi: {dn: -0.005, up: 0.005}, stat: {dn: -0.227, up: 0.227}, syst: {dn: -0.102, up: 0.102}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d04-x01-y01 +Title: doi:10.17182/hepdata.89400.v1/t4 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +0.000000e+00 0.000000e+00 0.000000e+00 1.615000e+01 2.180206e+00 2.180206e+00 +1.000000e+00 0.000000e+00 0.000000e+00 5.270000e+00 1.233734e+00 1.233734e+00 +2.000000e+00 0.000000e+00 0.000000e+00 2.110000e+00 7.426305e-01 7.426305e-01 +3.000000e+00 0.000000e+00 0.000000e+00 1.960000e-01 2.489136e-01 2.489136e-01 +END YODA_SCATTER2D_V2 +BEGIN YODA_SCATTER2D_V2 /REF/CMS_2016_I1487288/d05-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {lumi: {dn: -0.003, up: 0.003}, stat: {dn: -0.03, up: 0.03}, syst: {dn: -0.023, up: 0.023}}, 1: {lumi: {dn: -0.001, up: 0.001}, stat: {dn: -0.018, up: 0.018}, syst: {dn: -0.019, up: 0.019}}, 2: {lumi: {dn: -0.0008, up: 0.0008}, stat: {dn: -0.012, up: 0.012}, syst: {dn: -0.0137, up: 0.0137}}, 3: {lumi: {dn: -0.0003, up: 0.0003}, stat: {dn: -0.0048, up: 0.0048}, syst: {dn: -0.0041, up: 0.0041}}} + +IsRef: 1 +Path: /REF/CMS_2016_I1487288/d05-x01-y01 +Title: doi:10.17182/hepdata.89400.v1/t5 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +4.500000e+01 1.500000e+01 1.500000e+01 1.120000e-01 3.792097e-02 3.792097e-02 +8.000000e+01 2.000000e+01 2.000000e+01 5.500000e-02 2.619160e-02 2.619160e-02 +1.250000e+02 2.500000e+01 2.500000e+01 3.060000e-02 1.822992e-02 1.822992e-02 +2.000000e+02 5.000000e+01 5.000000e+01 1.040000e-02 6.319810e-03 6.319810e-03 +END YODA_SCATTER2D_V2