diff --git a/analyses/pluginATLAS/ATLAS_2016_I1468168.cc b/analyses/pluginATLAS/ATLAS_2016_I1468168.cc --- a/analyses/pluginATLAS/ATLAS_2016_I1468168.cc +++ b/analyses/pluginATLAS/ATLAS_2016_I1468168.cc @@ -1,81 +1,85 @@ #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/Projections/PromptFinalState.hh" #include "Rivet/Projections/DressedLeptons.hh" namespace Rivet { class ATLAS_2016_I1468168 : public Analysis { public: DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2016_I1468168); void init() { // Eta ranges Cut eta_full = Cuts::abseta < 5.0 && Cuts::pT >= 1.0*MeV; // Lepton cuts Cut lep_cuts = Cuts::abseta < 2.5 && Cuts::pT >= 25.0*GeV; // All final state particles FinalState fs(eta_full); // Get photons to dress leptons IdentifiedFinalState photons(fs); photons.acceptIdPair(PID::PHOTON); // Projection to find the electrons IdentifiedFinalState el_id(fs); el_id.acceptIdPair(PID::ELECTRON); PromptFinalState electrons(el_id); electrons.acceptTauDecays(true); DressedLeptons dressedelectrons(photons, electrons, 0.1, lep_cuts, true); declare(dressedelectrons, "DressedElectrons"); // Projection to find the muons IdentifiedFinalState mu_id(fs); mu_id.acceptIdPair(PID::MUON); PromptFinalState muons(mu_id); muons.acceptTauDecays(true); DressedLeptons dressedmuons(photons, muons, 0.1, lep_cuts, true); declare(dressedmuons, "DressedMuons"); - /// @todo Make this a counter or Scatter1D? - book(_hist ,"Passed_events", 1, 0, 1); + book(_s , 2, 1 ,1); + book(_c , "_counter"); } void analyze(const Event& event) { // Get the selected objects, using the projections. - const size_t num_es = applyProjection(event, "DressedElectrons").dressedLeptons().size(); - const size_t num_mus = applyProjection(event, "DressedMuons").dressedLeptons().size(); + const size_t num_es = apply(event, "DressedElectrons").dressedLeptons().size(); + const size_t num_mus = apply(event, "DressedMuons").dressedLeptons().size(); // Evaluate basic event selection const bool pass_emu = num_es == 1 && num_mus == 1; if (!pass_emu) vetoEvent; // Fill histogram to measure the event acceptance - _hist->fill(0.5); + _c->fill(); } void finalize() { // Normalize to cross-section - const double sf(crossSection() / sumOfWeights()); - scale(_hist, sf); + scale(_c, crossSection() / sumOfWeights()); + + double err = _c->err(); + _s->addPoint(13*TeV, _c->val(), make_pair(0.5, 0.5), make_pair(err,err)); + } private: - Histo1DPtr _hist; + CounterPtr _c; + Scatter2DPtr _s; }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2016_I1468168); } diff --git a/analyses/pluginATLAS/ATLAS_2016_I1468168.plot b/analyses/pluginATLAS/ATLAS_2016_I1468168.plot --- a/analyses/pluginATLAS/ATLAS_2016_I1468168.plot +++ b/analyses/pluginATLAS/ATLAS_2016_I1468168.plot @@ -1,11 +1,11 @@ # BEGIN PLOT /ATLAS_2016_I1468168/d02 XTwosidedTicks=1 YTwosidedTicks=1 LegendXPos=0.95 LegendYPos=0.3 LegendAlign=r LogY=0 XLabel= -XCustomMajorTicks=0.5 $\sigma_{t\bar{t}}^\text{fid}$ +XCustomMajorTicks=13000. $\sigma_{t\bar{t}}^\text{fid}$ YLabel=Cross section [pb] # END PLOT diff --git a/analyses/pluginATLAS/ATLAS_2016_I1468168.yoda b/analyses/pluginATLAS/ATLAS_2016_I1468168.yoda --- a/analyses/pluginATLAS/ATLAS_2016_I1468168.yoda +++ b/analyses/pluginATLAS/ATLAS_2016_I1468168.yoda @@ -1,9 +1,22 @@ +BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2016_I1468168/d01-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {stat: {dn: -8.0, up: 8.0}, "sys,beam": {dn: -12.0, up: 12.0}, "sys,lumi": {dn: -19.0, up: 19.0}, "sys,syst": {dn: -27.0, up: 27.0}}} +IsRef: 1 +Path: /REF/ATLAS_2016_I1468168/d01-x01-y01 +Title: doi:10.17182/hepdata.73120.v1/t1 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +1.300000e+04 5.000000e-01 5.000000e-01 8.180000e+02 3.602777e+01 3.602777e+01 +END YODA_SCATTER2D_V2 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2016_I1468168/d02-x01-y01 +Variations: [""] +ErrorBreakdown: {0: {stat: {dn: -0.1, up: 0.1}, "sys,beam": {dn: -0.17, up: 0.17}, "sys,lumi": {dn: -0.26, up: 0.26}, "sys,syst": {dn: -0.29, up: 0.29}}} IsRef: 1 Path: /REF/ATLAS_2016_I1468168/d02-x01-y01 -Title: ~ +Title: doi:10.17182/hepdata.73120.v1/t2 Type: Scatter2D --- -# xval xerr- xerr+ yval yerr- yerr+ -5.000000e-01 5.000000e-01 5.000000e-01 1.132000e+01 4.365776e-01 4.365776e-01 +# xval xerr- xerr+ yval yerr- yerr+ +1.300000e+04 5.000000e-01 5.000000e-01 1.132000e+01 4.365776e-01 4.365776e-01 END YODA_SCATTER2D_V2 diff --git a/pyext/rivet/hepdatapatches/ATLAS_2016_I1468168.py b/pyext/rivet/hepdatapatches/ATLAS_2016_I1468168.py --- a/pyext/rivet/hepdatapatches/ATLAS_2016_I1468168.py +++ b/pyext/rivet/hepdatapatches/ATLAS_2016_I1468168.py @@ -1,7 +1,11 @@ def patch(path, ao): - if path == '/REF/ATLAS_2016_I1468168/d02-x01-y01': + needs_patching = [ + '/REF/ATLAS_2016_I1468168/d01-x01-y01', + '/REF/ATLAS_2016_I1468168/d02-x01-y01' + ] + if path in needs_patching: for p in ao.points: p.xErrs = (0.5, 0.5) return ao