diff --git a/analyses/pluginATLAS/ATLAS_2013_I1230812.cc b/analyses/pluginATLAS/ATLAS_2013_I1230812.cc --- a/analyses/pluginATLAS/ATLAS_2013_I1230812.cc +++ b/analyses/pluginATLAS/ATLAS_2013_I1230812.cc @@ -1,292 +1,295 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ZFinder.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/PromptFinalState.hh" namespace Rivet { /// Z + jets in pp at 7 TeV (combined channel / base class) /// @note This base class contains a "mode" variable for combined, e, and mu channel derived classes class ATLAS_2013_I1230812 : public Analysis { public: /// @name Constructors etc. //@{ /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2013_I1230812); //@} /// Book histograms and initialise projections before the run void init() { // Get options from the new option system _mode = 0; if ( getOption("LMODE") == "EL" ) _mode = 1; if ( getOption("LMODE") == "MU" ) _mode = 2; // Determine the e/mu decay channels used (NB Prompt leptons only). /// @todo Note that Zs are accepted with any rapidity: the cuts are on the e/mu: is this correct? Cut pt20 = Cuts::pT >= 20*GeV; Cut eta_e = _mode? Cuts::abseta < 1.37 || Cuts::absetaIn(1.52, 2.47) : Cuts::abseta < 2.5; Cut eta_m = _mode? Cuts::abseta < 2.4 : Cuts::abseta < 2.5; ZFinder zfinder_el(FinalState(eta_e), pt20, PID::ELECTRON, 66*GeV, 116*GeV); ZFinder zfinder_mu(FinalState(eta_m), pt20, PID::MUON, 66*GeV, 116*GeV); declare(zfinder_el, "zfinder_el"); declare(zfinder_mu, "zfinder_mu"); // Define veto FS in order to prevent Z-decay products entering the jet algorithm VetoedFinalState had_fs; had_fs.addVetoOnThisFinalState(getProjection("zfinder_el")); had_fs.addVetoOnThisFinalState(getProjection("zfinder_mu")); FastJets jets(had_fs, FastJets::ANTIKT, 0.4); jets.useInvisibles(true); declare(jets, "jets"); _h_njet_incl = bookHisto1D( 1, 1, _mode + 1); _h_njet_incl_ratio = bookScatter2D(2, 1, _mode + 1, true); _h_njet_excl = bookHisto1D( 3, 1, _mode + 1); _h_njet_excl_ratio = bookScatter2D(4, 1, _mode + 1, true); _h_njet_excl_pt150 = bookHisto1D( 5, 1, _mode + 1); _h_njet_excl_pt150_ratio = bookScatter2D(6, 1, _mode + 1, true); _h_njet_excl_vbf = bookHisto1D ( 7, 1, _mode + 1); _h_njet_excl_vbf_ratio = bookScatter2D(8, 1, _mode + 1, true); _h_ptlead = bookHisto1D( 9, 1, _mode + 1); _h_ptseclead = bookHisto1D( 10, 1, _mode + 1); _h_ptthirdlead = bookHisto1D( 11, 1, _mode + 1); _h_ptfourthlead = bookHisto1D( 12, 1, _mode + 1); _h_ptlead_excl = bookHisto1D( 13, 1, _mode + 1); _h_pt_ratio = bookHisto1D( 14, 1, _mode + 1); _h_pt_z = bookHisto1D( 15, 1, _mode + 1); _h_pt_z_excl = bookHisto1D( 16, 1, _mode + 1); _h_ylead = bookHisto1D( 17, 1, _mode + 1); _h_yseclead = bookHisto1D( 18, 1, _mode + 1); _h_ythirdlead = bookHisto1D( 19, 1, _mode + 1); _h_yfourthlead = bookHisto1D( 20, 1, _mode + 1); _h_deltay = bookHisto1D( 21, 1, _mode + 1); _h_mass = bookHisto1D( 22, 1, _mode + 1); _h_deltaphi = bookHisto1D( 23, 1, _mode + 1); _h_deltaR = bookHisto1D( 24, 1, _mode + 1); _h_ptthirdlead_vbf = bookHisto1D( 25, 1, _mode + 1); _h_ythirdlead_vbf = bookHisto1D( 26, 1, _mode + 1); _h_ht = bookHisto1D( 27, 1, _mode + 1); _h_st = bookHisto1D( 28, 1, _mode + 1); } /// Perform the per-event analysis void analyze(const Event& event) { FourMomentum z, lp, lm; const ZFinder& zfinder_el = apply(event, "zfinder_el"); const ZFinder& zfinder_mu = apply(event, "zfinder_mu"); - if (_mode == 0 && (zfinder_el.constituents().size() + zfinder_mu.constituents().size()) != 2) vetoEvent; - if (_mode == 1 && !(zfinder_el.constituents().size() == 2 && zfinder_mu.constituents().empty())) vetoEvent; - if (_mode == 2 && !(zfinder_el.constituents().empty() && zfinder_mu.constituents().size() == 2)) vetoEvent; + bool e_ok = zfinder_el.constituents().size() == 2 && zfinder_mu.constituents().size() ==0; + bool m_ok = zfinder_el.constituents().size() == 0 && zfinder_mu.constituents().size() ==2; + + if (_mode == 0 && !e_ok && !m_ok ) vetoEvent; + if (_mode == 1 && !e_ok) vetoEvent; + if (_mode == 2 && !m_ok) vetoEvent; if (zfinder_el.constituents().size() == 2) { z = zfinder_el.boson().momentum(); lp = zfinder_el.constituents()[0].momentum(); lm = zfinder_el.constituents()[1].momentum(); } else if (zfinder_mu.constituents().size() == 2) { z = zfinder_mu.boson().momentum(); lp = zfinder_mu.constituents()[0].momentum(); lm = zfinder_mu.constituents()[1].momentum(); } else vetoEvent; if (deltaR(lp, lm) < 0.2) vetoEvent; Jets jets = apply(event, "jets").jetsByPt(Cuts::pT > 30*GeV && Cuts::absrap < 4.4); ifilter_discard(jets, deltaRLess(lp, 0.5)); ifilter_discard(jets, deltaRLess(lm, 0.5)); const double weight = event.weight(); // Fill jet multiplicities for (size_t ijet = 0; ijet <= jets.size(); ++ijet) { _h_njet_incl->fill(ijet, weight); } _h_njet_excl->fill(jets.size(), weight); // Require at least one jet if (jets.size() >= 1) { // Leading jet histos const double ptlead = jets[0].pT()/GeV; const double yabslead = fabs(jets[0].rapidity()); const double ptz = z.pT()/GeV; _h_ptlead->fill(ptlead, weight); _h_ylead ->fill(yabslead, weight); _h_pt_z ->fill(ptz, weight); // Fill jet multiplicities if (ptlead > 150) _h_njet_excl_pt150->fill(jets.size(), weight); // Loop over selected jets, fill inclusive distributions double st = 0; double ht = lp.pT()/GeV + lm.pT()/GeV; for (size_t ijet = 0; ijet < jets.size(); ++ijet) { ht += jets[ijet].pT()/GeV; st += jets[ijet].pT()/GeV; } _h_ht->fill(ht, weight); _h_st->fill(st, weight); // Require exactly one jet if (jets.size() == 1) { _h_ptlead_excl->fill(ptlead, weight); _h_pt_z_excl ->fill(ptz, weight); } } // Require at least two jets if (jets.size() >= 2) { // Second jet histos const double ptlead = jets[0].pT()/GeV; const double pt2ndlead = jets[1].pT()/GeV; const double ptratio = pt2ndlead/ptlead; const double yabs2ndlead = fabs(jets[1].rapidity()); _h_ptseclead->fill(pt2ndlead, weight); _h_yseclead->fill( yabs2ndlead, weight); _h_pt_ratio->fill( ptratio, weight); // Dijet histos const double deltaphi = fabs(deltaPhi(jets[1], jets[0])); const double deltarap = fabs(jets[0].rapidity() - jets[1].rapidity()) ; const double deltar = fabs(deltaR(jets[0], jets[1], RAPIDITY)); const double mass = (jets[0].momentum() + jets[1].momentum()).mass()/GeV; _h_mass->fill( mass, weight); _h_deltay->fill( deltarap, weight); _h_deltaphi->fill(deltaphi, weight); _h_deltaR->fill( deltar, weight); if (mass > 350 && deltarap > 3) _h_njet_excl_vbf->fill(jets.size(), weight); } // Require at least three jets if (jets.size() >= 3) { // Third jet histos const double pt3rdlead = jets[2].pT()/GeV; const double yabs3rdlead = fabs(jets[2].rapidity()); _h_ptthirdlead->fill(pt3rdlead, weight); _h_ythirdlead->fill( yabs3rdlead, weight); //Histos after VBF preselection const double deltarap = fabs(jets[0].rapidity() - jets[1].rapidity()) ; const double mass = (jets[0].momentum() + jets[1].momentum()).mass(); if (mass > 350 && deltarap > 3) { _h_ptthirdlead_vbf->fill(pt3rdlead, weight); _h_ythirdlead_vbf->fill( yabs3rdlead, weight); } } // Require at least four jets if (jets.size() >= 4) { // Fourth jet histos const double pt4thlead = jets[3].pT()/GeV; const double yabs4thlead = fabs(jets[3].rapidity()); _h_ptfourthlead->fill(pt4thlead, weight); _h_yfourthlead->fill( yabs4thlead, weight); } } /// @name Ratio calculator util functions //@{ /// Calculate the efficiency error, being careful about div-by-zero double err_incl(const HistoBin1D &M, const HistoBin1D &N, bool hasWeights) { double r = safediv(M.sumW(), N.sumW()); if (hasWeights) { // use F. James's approximation for weighted events return sqrt( safediv((1 - 2 * r) * M.sumW2() + r * r * N.sumW2(), N.sumW() * N.sumW()) ); } return sqrt( safediv(r * (1 - r), N.sumW()) ); } /// Calculate the ratio error, being careful about div-by-zero double err_excl(const HistoBin1D &A, const HistoBin1D &B) { double r = safediv(A.sumW(), B.sumW()); double dAsquared = safediv(A.sumW2(), A.sumW() * A.sumW()); // squared relative error of A double dBsquared = safediv(B.sumW2(), B.sumW() * B.sumW()); // squared relative error of B return r * sqrt(dAsquared + dBsquared); } //@} void finalize() { bool hasWeights = _h_njet_incl->effNumEntries() != _h_njet_incl->numEntries(); for (size_t i = 0; i < 6; ++i) { _h_njet_incl_ratio->point(i).setY(safediv(_h_njet_incl->bin(i + 1).sumW(), _h_njet_incl->bin(i).sumW()), err_incl(_h_njet_incl->bin(i + 1), _h_njet_incl->bin(i), hasWeights)); _h_njet_excl_ratio->point(i).setY(safediv(_h_njet_excl->bin(i + 1).sumW(), _h_njet_excl->bin(i).sumW()), err_excl(_h_njet_excl->bin(i + 1), _h_njet_excl->bin(i))); if (i >= 1) { _h_njet_excl_pt150_ratio->point(i - 1).setY(safediv(_h_njet_excl_pt150->bin(i).sumW(), _h_njet_excl_pt150->bin(i - 1).sumW()), err_excl(_h_njet_excl_pt150->bin(i), _h_njet_excl_pt150->bin(i - 1))); if (i >= 2) { _h_njet_excl_vbf_ratio->point(i - 2).setY(safediv(_h_njet_excl_vbf->bin(i).sumW(), _h_njet_excl_vbf->bin(i - 1).sumW()), err_excl(_h_njet_excl_vbf->bin(i), _h_njet_excl_vbf->bin(i - 1))); } } } double sf = _mode? 1.0 : 0.5; const double xs = sf * crossSectionPerEvent()/picobarn; scale({_h_njet_incl, _h_njet_excl, _h_njet_excl_pt150, _h_njet_excl_vbf}, xs); scale({_h_ptlead, _h_ptseclead, _h_ptthirdlead, _h_ptfourthlead, _h_ptlead_excl}, xs); scale({_h_pt_ratio, _h_pt_z, _h_pt_z_excl}, xs); scale({_h_ylead, _h_yseclead, _h_ythirdlead, _h_yfourthlead}, xs); scale({_h_deltay, _h_mass, _h_deltaphi, _h_deltaR}, xs); scale({_h_ptthirdlead_vbf, _h_ythirdlead_vbf}, xs); scale({_h_ht, _h_st}, xs); } //@} protected: size_t _mode; private: Scatter2DPtr _h_njet_incl_ratio; Scatter2DPtr _h_njet_excl_ratio; Scatter2DPtr _h_njet_excl_pt150_ratio; Scatter2DPtr _h_njet_excl_vbf_ratio; Histo1DPtr _h_njet_incl; Histo1DPtr _h_njet_excl; Histo1DPtr _h_njet_excl_pt150; Histo1DPtr _h_njet_excl_vbf; Histo1DPtr _h_ptlead; Histo1DPtr _h_ptseclead; Histo1DPtr _h_ptthirdlead; Histo1DPtr _h_ptfourthlead; Histo1DPtr _h_ptlead_excl; Histo1DPtr _h_pt_ratio; Histo1DPtr _h_pt_z; Histo1DPtr _h_pt_z_excl; Histo1DPtr _h_ylead; Histo1DPtr _h_yseclead; Histo1DPtr _h_ythirdlead; Histo1DPtr _h_yfourthlead; Histo1DPtr _h_deltay; Histo1DPtr _h_mass; Histo1DPtr _h_deltaphi; Histo1DPtr _h_deltaR; Histo1DPtr _h_ptthirdlead_vbf; Histo1DPtr _h_ythirdlead_vbf; Histo1DPtr _h_ht; Histo1DPtr _h_st; }; DECLARE_RIVET_PLUGIN(ATLAS_2013_I1230812); } diff --git a/analyses/pluginATLAS/ATLAS_2016_I1502620.cc b/analyses/pluginATLAS/ATLAS_2016_I1502620.cc --- a/analyses/pluginATLAS/ATLAS_2016_I1502620.cc +++ b/analyses/pluginATLAS/ATLAS_2016_I1502620.cc @@ -1,216 +1,242 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/WFinder.hh" #include "Rivet/Projections/ZFinder.hh" namespace Rivet { /// @brief inclusive W/Z cross sections at 7 TeV class ATLAS_2016_I1502620 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2016_I1502620); //@} /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Get options from the new option system + // run everything _mode = 0; - if ( getOption("LMODE") == "EL" ) _mode = 1; - if ( getOption("LMODE") == "MU" ) _mode = 2; + _runZ = true; + _runW = true; + if ( getOption("LMODE") == "EL" || + getOption("LMODE") == "ZEL" || + getOption("LMODE") == "WEL" ) + _mode = 1; + if ( getOption("LMODE") == "MU" || + getOption("LMODE") == "ZMU" || + getOption("LMODE") == "WMU" ) + _mode = 2; + if ( getOption("LMODE") == "Z" || + getOption("LMODE") == "ZEL" || + getOption("LMODE") == "ZMU" ) + _runW = false; + if ( getOption("LMODE") == "W" || + getOption("LMODE") == "WEL" || + getOption("LMODE") == "WMU" ) + _runZ = false; + + ///Initialise and register projections here const FinalState fs; Cut Wcuts = Cuts::pT >= 25*GeV; // minimum lepton pT Cut Zcuts = Cuts::pT >= 20.0*GeV; WFinder wfinder_edressed(fs, Wcuts, PID::ELECTRON, 40*GeV, 13*TeV, 25*GeV, 0.1, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); declare(wfinder_edressed, "WFinder_edressed"); ZFinder zfindere(fs, Zcuts, PID::ELECTRON, 46.0*GeV, 150*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); declare(zfindere, "ZFindere"); WFinder wfinder_mdressed(fs, Wcuts, PID::MUON, 40*GeV, 13*TeV, 25*GeV, 0.1, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); declare(wfinder_mdressed, "WFinder_mdressed"); ZFinder zfinderm(fs, Zcuts, PID::MUON, 46.0*GeV, 150*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); declare(zfinderm, "ZFinderm"); - /// Book histograms here - _h_Wp_eta = bookHisto1D( 9, 1, 1); - _h_Wm_eta = bookHisto1D( 10, 1, 1); - _h_W_asym = bookScatter2D(35, 1, 1); + /// Book histograms here + if (_runW) { + _h_Wp_eta = bookHisto1D( 9, 1, 1); + _h_Wm_eta = bookHisto1D( 10, 1, 1); + _h_W_asym = bookScatter2D(35, 1, 1); + } - _h_Zcenlow_y_dressed = bookHisto1D(11, 1, 1); - _h_Zcenpeak_y_dressed = bookHisto1D(12, 1, 1); - _h_Zcenhigh_y_dressed = bookHisto1D(13, 1, 1); - _h_Zfwdpeak_y_dressed = bookHisto1D(14, 1, 1); - _h_Zfwdhigh_y_dressed = bookHisto1D(15, 1, 1); - + if (_runZ) { + _h_Zcenlow_y_dressed = bookHisto1D(11, 1, 1); + _h_Zcenpeak_y_dressed = bookHisto1D(12, 1, 1); + _h_Zcenhigh_y_dressed = bookHisto1D(13, 1, 1); + _h_Zfwdpeak_y_dressed = bookHisto1D(14, 1, 1); + _h_Zfwdhigh_y_dressed = bookHisto1D(15, 1, 1); + } } /// Perform the per-event analysis void analyze(const Event& event) { // W stuff const WFinder& wfindere = apply(event, "WFinder_edressed"); const WFinder& wfinderm = apply(event, "WFinder_mdressed"); - if (wfindere.bosons().size()+wfinderm.bosons().size() == 1) { + if (wfindere.bosons().size()+wfinderm.bosons().size() == 1 && _runW) { const double weight = event.weight(); Particle lep; if (_mode !=2 && wfindere.bosons().size() == 1 ) { lep = wfindere.constituentLeptons()[0]; } else if (_mode !=1 && wfinderm.bosons().size() == 1 ) { lep = wfinderm.constituentLeptons()[0]; } if (lep.charge3() > 0) _h_Wp_eta->fill(lep.abseta(), weight); else _h_Wm_eta->fill(lep.abseta(), weight); } // now the Z stuff. const ZFinder& zfindere = apply(event, "ZFindere"); const ZFinder& zfinderm = apply(event, "ZFinderm"); // must be one and only one candidate. - if (zfindere.bosons().size()+zfinderm.bosons().size() == 1) { + if (zfindere.bosons().size()+zfinderm.bosons().size() == 1 && _runZ) { const double weight = event.weight(); Particle Zboson; ParticleVector leptons; // candidate is e+e- if (_mode != 2 && zfindere.bosons().size() == 1 ) { Zboson = zfindere.boson(); leptons = zfindere.constituents(); } // candidate is mu+mu- else if (_mode !=1 && zfinderm.bosons().size() == 1 ) { Zboson = zfinderm.boson(); leptons = zfinderm.constituents(); } const double zrap = Zboson.absrap(); const double zmass = Zboson.mass(); const double eta1 = leptons[0].abseta(); const double eta2 = leptons[1].abseta(); // separation into central/forward and three mass bins if (eta1 < 2.5 && eta2 < 2.5) { if (zmass < 66.0*GeV) _h_Zcenlow_y_dressed->fill(zrap, weight); else if (zmass < 116.0*GeV) _h_Zcenpeak_y_dressed->fill(zrap, weight); else _h_Zcenhigh_y_dressed->fill(zrap, weight); } else if ((eta1 < 2.5 && 2.5 < eta2 && eta2 < 4.9) || (eta2 < 2.5 && 2.5 < eta1 && eta1 < 4.9)) { if (zmass < 66.0*GeV) vetoEvent; if (zmass < 116.0*GeV) _h_Zfwdpeak_y_dressed->fill(zrap, weight); else _h_Zfwdhigh_y_dressed->fill(zrap, weight); } } } /// Normalise histograms etc., after the run void finalize() { // Construct asymmetry: (dsig+/deta - dsig-/deta) / (dsig+/deta + dsig-/deta) //divide(*_h_Wp_eta - *_h_Wm_eta, *_h_Wp_eta + *_h_Wm_eta, _h_W_asym); - for (size_t i = 0; i < _h_Wp_eta->numBins(); ++i) { - YODA::HistoBin1D& bp = _h_Wp_eta->bin(i); - YODA::HistoBin1D& bm = _h_Wm_eta->bin(i); - const double sum = bp.height() + bm.height(); - //const double xerr = 0.5 * bp.xWidth(); - double val = 0., yerr = 0.; + if (_runW) { + for (size_t i = 0; i < _h_Wp_eta->numBins(); ++i) { + YODA::HistoBin1D& bp = _h_Wp_eta->bin(i); + YODA::HistoBin1D& bm = _h_Wm_eta->bin(i); + const double sum = bp.height() + bm.height(); + //const double xerr = 0.5 * bp.xWidth(); + double val = 0., yerr = 0.; - if (sum) { - const double pos2 = bp.height() * bp.height(); - const double min2 = bm.height() * bm.height(); - const double errp2 = bp.heightErr() * bp.heightErr(); - const double errm2 = bm.heightErr() * bm.heightErr(); - val = (bp.height() - bm.height()) / sum; - yerr = 2. * sqrt(errm2 * pos2 + errp2 * min2) / (sum * sum); - } - - _h_W_asym->addPoint(bp.midpoint(), val, 0.5*bp.xWidth(), yerr); + if (sum) { + const double pos2 = bp.height() * bp.height(); + const double min2 = bm.height() * bm.height(); + const double errp2 = bp.heightErr() * bp.heightErr(); + const double errm2 = bm.heightErr() * bm.heightErr(); + val = (bp.height() - bm.height()) / sum; + yerr = 2. * sqrt(errm2 * pos2 + errp2 * min2) / (sum * sum); + } + _h_W_asym->addPoint(bp.midpoint(), val, 0.5*bp.xWidth(), yerr); + } } // Print summary info const double xs_pb(crossSection() / picobarn); const double sumw(sumOfWeights()); MSG_DEBUG( "Cross-section/pb : " << xs_pb ); MSG_DEBUG( "Sum of weights : " << sumw ); MSG_DEBUG( "nEvents : " << numEvents() ); /// Normalise, scale and otherwise manipulate histograms here double lfac = 1.0; // If we have been running on both electrons and muons, need to divide by two to // get the xsec for one flavour if (_mode == 0) lfac = 0.5; const double sf = lfac * 0.5 * xs_pb / sumw; // 0.5 accounts for rapidity bin width + if (_runW){ + scale(_h_Wp_eta, sf); + scale(_h_Wm_eta, sf); + } - scale(_h_Wp_eta, sf); - scale(_h_Wm_eta, sf); - - scale(_h_Zcenlow_y_dressed, sf); - scale(_h_Zcenpeak_y_dressed, sf); - scale(_h_Zcenhigh_y_dressed, sf); - scale(_h_Zfwdpeak_y_dressed, sf); - scale(_h_Zfwdhigh_y_dressed, sf); - + if (_runZ){ + scale(_h_Zcenlow_y_dressed, sf); + scale(_h_Zcenpeak_y_dressed, sf); + scale(_h_Zcenhigh_y_dressed, sf); + scale(_h_Zfwdpeak_y_dressed, sf); + scale(_h_Zfwdhigh_y_dressed, sf); + } } //@} protected: size_t _mode; + bool _runZ, _runW; private: /// @name Histograms //@{ Histo1DPtr _h_Wp_eta, _h_Wm_eta; Scatter2DPtr _h_W_asym; Histo1DPtr _h_Zcenlow_y_dressed; Histo1DPtr _h_Zcenpeak_y_dressed; Histo1DPtr _h_Zcenhigh_y_dressed; Histo1DPtr _h_Zfwdpeak_y_dressed; Histo1DPtr _h_Zfwdhigh_y_dressed; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2016_I1502620); } // END END END diff --git a/analyses/pluginATLAS/ATLAS_2016_I1502620.info b/analyses/pluginATLAS/ATLAS_2016_I1502620.info --- a/analyses/pluginATLAS/ATLAS_2016_I1502620.info +++ b/analyses/pluginATLAS/ATLAS_2016_I1502620.info @@ -1,58 +1,61 @@ Name: ATLAS_2016_I1502620 Year: 2016 Summary: W and Z inclusive cross sections at 7 TeV Experiment: ATLAS Collider: LHC InspireID: 1502620 Status: VALIDATED Authors: - Jan Kretzschmar - Christian Gutschow References: - Eur. Phys. J. C77 (2017) no.6, 367 - doi:10.1140/epjc/s10052-017-4911-9 - arXiv:1612.03016 [hep-ex] Keywords: - zboson RunInfo: p + p -> Z + X ( Z -> e e ) Luminosity_fb: 4.9 Beams: [p+, p+] Energies: [7000] PtCuts: [20] NeedCrossSection: True Options: - - LMODE=EL,MU + - LMODE=EL,MU,Z,W,ZEL,ZMU,WEL,WMU Description: 'High-precision measurements by the ATLAS Collaboration are presented of inclusive $W^+\to\ell^+$, $W^-\to\ell^-$, $Z/\gamma^\ast\to\ell\ell$ ($\ell=e,\mu$) Drell-Yan production cross sections at the LHC. The data were collected in proton-proton collisions at $\sqrt{s}=7$ TeV with an integrated luminosity of 4.6 fb${}^{-1}$. Differential $W^+$ and $W^-$ cross sections are measured in a lepton pseudorapidity range $|\eta_\ell| < 2.5$. Differential $Z/\gamma^\ast$ cross sections are measured as a function of the absolute dilepton rapidity, for $|y_{\ell\ell}| < 3.6$, for three intervals of dilepton mass, $m_{\ell\ell}$, extending from 46 to 150 GeV. The integrated and differential electron- and muon-channel cross sections are combined and compared to theoretical predictions using recent sets of parton distribution functions. The data, together with the final inclusive $e^\pm p$ scattering cross-section data from H1 and ZEUS, are interpreted in a next-to-next-to-leading-order QCD analysis, and a new set of parton distribution functions, ATLAS-epWZ16, is obtained. The ratio of strange-to-light sea-quark densities in the proton is determined more accurately than in previous determinations based on collider data only, and is established to be close to unity in the sensitivity range of the data. A new measurement of the CKM matrix element $|V_{cs}|$ is also provided. - N.B.: Use :LMODE to specify the decay channel directly.' + N.B.: Use :LMODE to choose specify the signature decay channel directly. + Default, run everything, assuming all decay modes are generated + Contains Z (W): fill only Z (W) signature histgrams + Contains EL (MU): assume only electron (muon) decay modes are being generated.' BibKey: Aaboud:2016btc BibTeX: '@article{Aaboud:2016btc, author = "Aaboud, Morad and others", title = "{Precision measurement and interpretation of inclusive $W^+$ , $W^-$ and $Z/\gamma ^*$ production cross sections with the ATLAS detector}", collaboration = "ATLAS", journal = "Eur. Phys. J.", volume = "C77", year = "2017", number = "6", pages = "367", doi = "10.1140/epjc/s10052-017-4911-9", eprint = "1612.03016", archivePrefix = "arXiv", primaryClass = "hep-ex", reportNumber = "CERN-EP-2016-272", SLACcitation = "%%CITATION = ARXIV:1612.03016;%%" }' diff --git a/analyses/pluginATLAS/ATLAS_2017_I1589844.cc b/analyses/pluginATLAS/ATLAS_2017_I1589844.cc --- a/analyses/pluginATLAS/ATLAS_2017_I1589844.cc +++ b/analyses/pluginATLAS/ATLAS_2017_I1589844.cc @@ -1,176 +1,180 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/Projections/DressedLeptons.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/ChargedFinalState.hh" namespace Rivet { /// kT splittings in Z events at 8 TeV class ATLAS_2017_I1589844 : public Analysis { public: /// @name Constructors etc. //@{ /// Constructors ATLAS_2017_I1589844(const string name="ATLAS_2017_I1589844", const string ref_data="ATLAS_2017_I1589844") : Analysis(name) { setRefDataName(ref_data); } //@} /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Get options from the new option system _mode = 0; - if ( getOption("ZMODE") == "EL" ) _mode = 1; - if ( getOption("ZMODE") == "MU" ) _mode = 2; + if ( getOption("LMODE") == "EL" ) _mode = 1; + if ( getOption("LMODE") == "MU" ) _mode = 2; const FinalState fs; const Cut cuts_mu = (Cuts::pT > 25*GeV) && (Cuts::abseta < 2.4); const Cut cuts_el = Cuts::pT > 25*GeV && (Cuts::abseta <= 1.37 || (Cuts::abseta >= 1.52 && Cuts::abseta < 2.47)); IdentifiedFinalState bare_mu(fs); bare_mu.acceptIdPair(PID::MUON); IdentifiedFinalState bare_el(fs); bare_el.acceptIdPair(PID::ELECTRON); const DressedLeptons muons(fs, bare_mu, 0.1, cuts_mu, true); const DressedLeptons elecs(fs, bare_el, 0.1, cuts_el, true); declare(muons, "muons"); declare(elecs, "elecs"); const ChargedFinalState cfs(Cuts::abseta < 2.5 && Cuts::pT > 0.4*GeV); VetoedFinalState jet_fs(cfs); jet_fs.addVetoOnThisFinalState(muons); jet_fs.addVetoOnThisFinalState(elecs); declare(FastJets(jet_fs, FastJets::KT, 0.4), "Kt04Jets"); declare(FastJets(jet_fs, FastJets::KT, 1.0), "Kt10Jets"); VetoedFinalState jet_fs_all(Cuts::abseta < 2.5 && Cuts::pT > 0.4*GeV); jet_fs_all.addVetoOnThisFinalState(muons); jet_fs_all.addVetoOnThisFinalState(elecs); FastJets jetpro04_all(jet_fs_all, FastJets::KT, 0.4); jetpro04_all.useInvisibles(); declare(jetpro04_all, "Kt04Jets_all"); FastJets jetpro10_all(jet_fs_all, FastJets::KT, 1.0); jetpro10_all.useInvisibles(); declare(jetpro10_all, "Kt10Jets_all"); // Histograms with data binning _ndij = 8; for (size_t i = 0; i < _ndij; ++i) { if (_mode == 0 || _mode == 1) { string label = "el_d" + to_str(i) + "_kT4"; _h[label] = bookHisto1D(i + 1, 1, 1); _h[label + "_all"] = bookHisto1D(i + 1, 1, 5); label = "el_d" + to_str(i) + "_kT10"; _h[label] = bookHisto1D(i + 1, 1, 3); _h[label + "_all"] = bookHisto1D(i + 1, 1, 7); } if (_mode == 0 || _mode == 2) { string label = "mu_d" + to_str(i) + "_kT4"; _h[label] = bookHisto1D(i + 1, 1, 2); _h[label + "_all"] = bookHisto1D(i + 1, 1, 6); label = "mu_d" + to_str(i) + "_kT10"; _h[label] = bookHisto1D(i + 1, 1, 4); _h[label + "_all"] = bookHisto1D(i + 1, 1, 8); } } } /// Perform the per-event analysis void analyze(const Event& e) { // Check we have a Z candidate: const vector& muons = apply(e, "muons").dressedLeptons(); const vector& elecs = apply(e, "elecs").dressedLeptons(); - if (_mode == 0 && (elecs.size() + muons.size()) != 2) vetoEvent; - if (_mode == 1 && !(elecs.size() == 2 && muons.empty())) vetoEvent; - if (_mode == 2 && !(elecs.empty() && muons.size() == 2)) vetoEvent; + + bool e_ok = elecs.size() == 2 && muons.empty(); + bool m_ok = elecs.empty() && muons.size() == 2; + if (_mode == 0 && !e_ok && !m_ok) vetoEvent; + if (_mode == 1 && !e_ok ) vetoEvent; + if (_mode == 2 && !m_ok ) vetoEvent; string lep_type = elecs.size()? "el_" : "mu_"; + const vector& leptons = elecs.size()? elecs : muons; + if (leptons[0].charge()*leptons[1].charge() > 0) vetoEvent; - if (leptons[0].charge()*leptons[1].charge() > 0) vetoEvent; const double dilepton_mass = (leptons[0].momentum() + leptons[1].momentum()).mass(); if (!inRange(dilepton_mass, 71*GeV, 111*GeV)) vetoEvent; const double weight = e.weight(); // Get kT splitting scales (charged particles only) const FastJets& jetpro04 = applyProjection(e, "Kt04Jets"); const shared_ptr seq04 = jetpro04.clusterSeq(); for (size_t i = 0; i < min(_ndij, (size_t)seq04->n_particles()); ++i) { const double dij = sqrt(seq04->exclusive_dmerge_max(i))/GeV; if (dij <= 0.0) continue; const string label = lep_type + "d" + to_str(i) + "_kT4"; _h[label]->fill(dij, weight); } const FastJets& jetpro10 = applyProjection(e, "Kt10Jets"); const shared_ptr seq10 = jetpro10.clusterSeq(); for (size_t i = 0; i < min(_ndij, (size_t)seq10->n_particles()); ++i) { const double dij = sqrt(seq10->exclusive_dmerge_max(i))/GeV; if (dij <= 0.0) continue; const string label = lep_type + "d" + to_str(i) + "_kT10"; _h[label]->fill(dij, weight); } // Get kT splitting scales (all particles) const FastJets& jetpro04_all = applyProjection(e, "Kt04Jets_all"); const shared_ptr seq04_all = jetpro04_all.clusterSeq(); for (size_t i = 0; i < min(_ndij, (size_t)seq04_all->n_particles()); ++i) { const double dij = sqrt(seq04_all->exclusive_dmerge_max(i))/GeV; if (dij <= 0.0) continue; const string label = lep_type + "d" + to_str(i) + "_kT4_all"; _h[label]->fill(dij, weight); } const FastJets& jetpro10_all = applyProjection(e, "Kt10Jets_all"); const shared_ptr seq10_all = jetpro10_all.clusterSeq(); for (size_t i = 0; i < min(_ndij, (size_t)seq10_all->n_particles()); ++i) { const double dij = sqrt(seq10_all->exclusive_dmerge_max(i))/GeV; if (dij <= 0.0) continue; const string label = lep_type + "d" + to_str(i) + "_kT10_all"; _h[label]->fill(dij, weight); } } /// Normalise histograms etc., after the run void finalize() { const double sf = crossSectionPerEvent(); for (auto& kv : _h) scale(kv.second, sf); } //@} protected: // Data members like post-cuts event weight counters go here size_t _mode, _ndij; private: // Histograms map _h; }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2017_I1589844); } diff --git a/analyses/pluginATLAS/ATLAS_2017_I1589844.info b/analyses/pluginATLAS/ATLAS_2017_I1589844.info --- a/analyses/pluginATLAS/ATLAS_2017_I1589844.info +++ b/analyses/pluginATLAS/ATLAS_2017_I1589844.info @@ -1,46 +1,46 @@ Name: ATLAS_2017_I1589844 Year: 2017 Summary: $k_T$ splittings in $Z$ events at 8 TeV Experiment: ATLAS Collider: LHC InspireID: 1589844 Status: VALIDATED Authors: - Christian Gutschow - Frank Siegert References: - arXiv:1704.01530 [hep-ex] - submitted to JHEP Keywords: - zboson - jets RunInfo: '$pp \to Z(\to ee/\mu\mu) +$ jets at 8 TeV' Luminosity_fb: 20.2 Beams: [p+, p+] Energies: [8000] PtCuts: [25, 25, 0.4] Options: -- ZMODE=EL,MU +- LMODE=EL,MU Description: 'A measurement of the splitting scales occuring in the $k_\text{t}$ jet-clustering algorithm is presented for final states containing a $Z$ boson. The measurement is done using 20.2 fb$^{-1}$ of proton-proton collision data collected at a centre-of-mass energy of $\sqrt{s} = 8$ TeV by the ATLAS experiment at the LHC in 2012. The measurement is based on charged-particle track information, which is measured with excellent precision in the $p_\text{T}$ region relevant for the transition between the perturbative and the non-perturbative regimes. The data distributions are corrected for detector effects, and are found to deviate from state-of-the-art predictions in various regions of the observables. If no mode specified, will try to fill both electron and muon plots. If EL or MU is specified, only the relevant plots will be filled.' BibKey: Aaboud:2017hox BibTeX: '@article{Aaboud:2017hox, author = "Aaboud, Morad and others", title = "{Measurement of the $k_\mathrm{t}$ splitting scales in $Z \to \ell\ell$ events in $pp$ collisions at $\sqrt{s} = 8$ TeV with the ATLAS detector}", collaboration = "ATLAS", year = "2017", eprint = "1704.01530", archivePrefix = "arXiv", primaryClass = "hep-ex", reportNumber = "CERN-EP-2017-033", SLACcitation = "%%CITATION = ARXIV:1704.01530;%%" }'