diff --git a/analyses/pluginATLAS/ATLAS_2010_S8591806.cc b/analyses/pluginATLAS/ATLAS_2010_S8591806.cc --- a/analyses/pluginATLAS/ATLAS_2010_S8591806.cc +++ b/analyses/pluginATLAS/ATLAS_2010_S8591806.cc @@ -1,73 +1,71 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ChargedFinalState.hh" namespace Rivet { /// @brief ATLAS minimum bias analysis at 900 GeV /// @author Frank Siegert class ATLAS_2010_S8591806 : public Analysis { public: ATLAS_2010_S8591806() : Analysis("ATLAS_2010_S8591806") { } void init() { ChargedFinalState cfs(-2.5, 2.5, 0.5*GeV); declare(cfs, "CFS"); book(_h_dNch_deta ,2, 1, 1); book(_h_dNch_dpT ,3, 1, 1); book(_h_dNevt_dNch ,4, 1, 1); book(_p_meanpT_Nch ,5, 1, 1); book(_Nevt_after_cuts, "nevt_pass"); } void analyze(const Event& event) { - const double; - const ChargedFinalState& charged = apply<ChargedFinalState>(event, "CFS"); if (charged.size() < 1) { vetoEvent; } _Nevt_after_cuts->fill(); _h_dNevt_dNch->fill(charged.size()); foreach (const Particle& p, charged.particles()) { double pT = p.pT()/GeV; _h_dNch_deta->fill(p.eta()); _h_dNch_dpT->fill(pT, 1.0/pT); _p_meanpT_Nch->fill(charged.size(), pT); } } void finalize() { double deta = 5.0; scale(_h_dNch_deta, 1.0/_Nevt_after_cuts->val()); scale(_h_dNch_dpT, 1.0/_Nevt_after_cuts->val()/TWOPI/deta); scale(_h_dNevt_dNch, 1.0/_Nevt_after_cuts->val()); } private: Histo1DPtr _h_dNch_deta; Histo1DPtr _h_dNch_dpT; Histo1DPtr _h_dNevt_dNch; Profile1DPtr _p_meanpT_Nch; CounterPtr _Nevt_after_cuts; }; //DECLARE_RIVET_PLUGIN(ATLAS_2010_S8591806); DECLARE_ALIASED_RIVET_PLUGIN(ATLAS_2010_S8591806, ATLAS_2010_I849050); } diff --git a/analyses/pluginATLAS/ATLAS_2011_I925932.cc b/analyses/pluginATLAS/ATLAS_2011_I925932.cc --- a/analyses/pluginATLAS/ATLAS_2011_I925932.cc +++ b/analyses/pluginATLAS/ATLAS_2011_I925932.cc @@ -1,115 +1,113 @@ // -*- C++ -*- // ATLAS W pT analysis #include "Rivet/Analysis.hh" #include "Rivet/Projections/WFinder.hh" namespace Rivet { class ATLAS_2011_I925932 : public Analysis { public: /// Constructor ATLAS_2011_I925932() : Analysis("ATLAS_2011_I925932") { } /// @name Analysis methods //@{ void init() { // Set up projections FinalState fs; Cut cuts = Cuts::abseta < 2.4 && Cuts::pT > 20*GeV; WFinder wfinder_dressed_el(fs, cuts, PID::ELECTRON, 0*GeV, 1000*GeV, 25*GeV, 0.2, WFinder::CLUSTERNODECAY); declare(wfinder_dressed_el, "WFinder_dressed_el"); WFinder wfinder_bare_el(fs, cuts, PID::ELECTRON, 0*GeV, 1000*GeV, 25*GeV, 0.0, WFinder::NOCLUSTER); declare(wfinder_bare_el, "WFinder_bare_el"); WFinder wfinder_dressed_mu(fs, cuts, PID::MUON, 0*GeV, 1000*GeV, 25*GeV, 0.2, WFinder::CLUSTERNODECAY); declare(wfinder_dressed_mu, "WFinder_dressed_mu"); WFinder wfinder_bare_mu(fs, cuts, PID::MUON, 0*GeV, 1000*GeV, 25*GeV, 0.0, WFinder::NOCLUSTER); declare(wfinder_bare_mu, "WFinder_bare_mu"); // Book histograms book(_hist_wpt_dressed_el ,1, 1, 1); book(_hist_wpt_bare_el ,1, 1, 2); book(_hist_wpt_dressed_mu ,2, 1, 1); book(_hist_wpt_bare_mu ,2, 1, 2); } /// Do the analysis void analyze(const Event& event) { - const double weight = 1.0; - const WFinder& wfinder_dressed_el = apply<WFinder>(event, "WFinder_dressed_el"); const WFinder& wfinder_bare_el = apply<WFinder>(event, "WFinder_bare_el"); const WFinder& wfinder_dressed_mu = apply<WFinder>(event, "WFinder_dressed_mu"); const WFinder& wfinder_bare_mu = apply<WFinder>(event, "WFinder_bare_mu"); if (wfinder_dressed_el.empty() && wfinder_bare_el.empty() && wfinder_dressed_mu.empty() && wfinder_bare_mu.empty()) { MSG_DEBUG("No W bosons found"); vetoEvent; } // "Dressed" electron if (!wfinder_dressed_el.particles().empty()) { const FourMomentum& nu = wfinder_dressed_el.constituentNeutrinos()[0].momentum(); if (wfinder_dressed_el.mT() > 40*GeV && nu.pT() > 25*GeV) { - _hist_wpt_dressed_el->fill(wfinder_dressed_el.bosons()[0].pT()/GeV, weight); + _hist_wpt_dressed_el->fill(wfinder_dressed_el.bosons()[0].pT()/GeV); } } // "Bare" electron if (!wfinder_bare_el.particles().empty()) { const FourMomentum& nu = wfinder_bare_el.constituentNeutrinos()[0].momentum(); if (wfinder_bare_el.mT() > 40*GeV && nu.pT() > 25*GeV) { - _hist_wpt_bare_el->fill(wfinder_bare_el.bosons()[0].pT()/GeV, weight); + _hist_wpt_bare_el->fill(wfinder_bare_el.bosons()[0].pT()/GeV); } } // "Dressed" muon if (!wfinder_dressed_mu.particles().empty()) { const FourMomentum& nu = wfinder_dressed_mu.constituentNeutrinos()[0].momentum(); if (wfinder_dressed_mu.mT() > 40*GeV && nu.pT() > 25*GeV) { - _hist_wpt_dressed_mu->fill(wfinder_dressed_mu.bosons()[0].pT()/GeV, weight); + _hist_wpt_dressed_mu->fill(wfinder_dressed_mu.bosons()[0].pT()/GeV); } } // "Bare" muon if (!wfinder_bare_mu.particles().empty()) { const FourMomentum& nu = wfinder_bare_mu.constituentNeutrinos()[0].momentum(); if (wfinder_bare_mu.mT() > 40*GeV && nu.pT() > 25*GeV) { - _hist_wpt_bare_mu->fill(wfinder_bare_mu.bosons()[0].pT()/GeV, weight); + _hist_wpt_bare_mu->fill(wfinder_bare_mu.bosons()[0].pT()/GeV); } } } // Normalize histos void finalize() { normalize(_hist_wpt_dressed_el); normalize(_hist_wpt_bare_el); normalize(_hist_wpt_dressed_mu); normalize(_hist_wpt_bare_mu); } //@} private: Histo1DPtr _hist_wpt_dressed_el; Histo1DPtr _hist_wpt_bare_el; Histo1DPtr _hist_wpt_dressed_mu; Histo1DPtr _hist_wpt_bare_mu; }; // Hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2011_I925932); } diff --git a/analyses/pluginATLAS/ATLAS_2011_I926145.cc b/analyses/pluginATLAS/ATLAS_2011_I926145.cc --- a/analyses/pluginATLAS/ATLAS_2011_I926145.cc +++ b/analyses/pluginATLAS/ATLAS_2011_I926145.cc @@ -1,172 +1,170 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/Projections/WFinder.hh" #include "Rivet/Projections/ZFinder.hh" namespace Rivet { /// @brief Measurement of electron and muon differential cross section from heavy flavour production /// /// Lepton cross sections differential in pT /// /// @author Paul Bell, Holger Schulz class ATLAS_2011_I926145 : public Analysis { public: /// Constructor ATLAS_2011_I926145() : Analysis("ATLAS_2011_I926145") { } public: /// Book histograms and initialise projections before the run void init() { ///projection for electrons Cut cuts = (Cuts::abseta < 1.37 || Cuts::absetaIn(1.52, 2.00)) && Cuts::pT > 7*GeV; IdentifiedFinalState elecs(cuts); elecs.acceptId(PID::ELECTRON); elecs.acceptId(PID::POSITRON); declare(elecs, "elecs"); //projection for muons -- same phase space as above??? Not sure if the crack region has //to be removed for the muons as well std::vector<std::pair<double, double> > eta_m; //eta_m.push_back(make_pair(-2.00,-1.52)); //eta_m.push_back(make_pair(-1.37,1.37)); //eta_m.push_back(make_pair(1.52,2.00)); //IdentifiedFinalState muons(eta_m, 7.0*GeV); IdentifiedFinalState muons(Cuts::abseta < 2 && Cuts::pT > 7*GeV); muons.acceptId(PID::MUON); muons.acceptId(PID::ANTIMUON); declare(muons, "muons"); //projection for muons full range IdentifiedFinalState muons_full(Cuts::abseta < 2.5 && Cuts::pT > 4*GeV); muons_full.acceptId(PID::MUON); muons_full.acceptId(PID::ANTIMUON); declare(muons_full, "muons_full"); Cut cut20 = Cuts::abseta < 2.0; Cut cut25 = Cuts::abseta < 2.5; const FinalState fs20(cut20); const FinalState fs25(cut25); /// @todo Bare Zs ... ZFinder zfinder_e(fs20, cut20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER); declare(zfinder_e, "ZFinder_e"); ZFinder zfinder_mu(fs20, cut20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER); declare(zfinder_mu, "ZFinder_mu"); ZFinder zfinder_mufull(fs25, cut25, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER); declare(zfinder_mufull, "ZFinder_mufull"); /// @todo ... but dressed Ws? WFinder wfinder_e(fs20, cut20, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); declare(wfinder_e, "WFinder_e"); WFinder wfinder_mu(fs20, cut20, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); declare(wfinder_mu, "WFinder_mu"); WFinder wfinder_mufull(fs25, cut25, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); declare(wfinder_mufull, "WFinder_mufull"); // Book histograms book(_histPt_elecs ,1 ,1 ,1); book(_histPt_muons ,2 ,1 ,1); book(_histPt_muons_full ,3 ,1 ,1); } /// Perform the per-event analysis void analyze(const Event& event) { - const double weight = 1.0; - const FinalState& elecs = apply<FinalState>(event, "elecs"); const FinalState& muons = apply<FinalState>(event, "muons"); const FinalState& muons_full = apply<FinalState>(event, "muons_full"); // Veto event if no lepton is present if (elecs.size() == 0 && muons.size() == 0 && muons_full.size() == 0) { vetoEvent; } // Check for W and or Z bosons in event // // Z veto const ZFinder& zfinder_e = apply<ZFinder>(event, "ZFinder_e"); const ZFinder& zfinder_mu = apply<ZFinder>(event, "ZFinder_mu"); const ZFinder& zfinder_mufull = apply<ZFinder>(event, "ZFinder_mufull"); if (zfinder_e.bosons().size() > 0 || zfinder_mu.bosons().size() > 0 || zfinder_mufull.bosons().size() > 0) { MSG_DEBUG("Num elec Z-bosons found: " << zfinder_e.bosons().size()); MSG_DEBUG("Num muon Z-bosons found: " << zfinder_mu.bosons().size()); MSG_DEBUG("Num muon Z-bosons found (|eta|<2.5): " << zfinder_mufull.bosons().size()); vetoEvent; } // W veto const WFinder& wfinder_e = apply<WFinder>(event, "WFinder_e"); const WFinder& wfinder_mu = apply<WFinder>(event, "WFinder_mu"); const WFinder& wfinder_mufull = apply<WFinder>(event, "WFinder_mufull"); if (wfinder_e.bosons().size() > 0 || wfinder_mu.bosons().size() > 0 || wfinder_mufull.bosons().size() > 0) { MSG_DEBUG("Num elec W-bosons found: " << wfinder_e.bosons().size()); MSG_DEBUG("Num muon W-bosons found: " << wfinder_mu.bosons().size()); MSG_DEBUG("Num muon W-bosons found (|eta|<2.5): " << wfinder_mufull.bosons().size()); vetoEvent; } // Electron histogram if (elecs.size() > 0) { foreach (const Particle& ele, elecs.particles()) { if (ele.pT()*GeV < 26.0) { - _histPt_elecs->fill(ele.pT()*GeV, weight); + _histPt_elecs->fill(ele.pT()*GeV); } } } // Muon histogram if (muons.size() > 0) { foreach (const Particle& muo, muons.particles()) { if (muo.pT()*GeV < 26.0) { - _histPt_muons->fill(muo.pT()*GeV, weight); + _histPt_muons->fill(muo.pT()*GeV); } } } // Muon full histogram if (muons_full.size() > 0) { foreach (const Particle& muo, muons_full.particles()) { if (muo.pT()*GeV < 100.0) { - _histPt_muons_full->fill(muo.pT()*GeV, weight); + _histPt_muons_full->fill(muo.pT()*GeV); } } } } /// Normalise histograms etc., after the run void finalize() { // Data cross-section is given in nb! x-sections in rivet are in pb! scale(_histPt_elecs, crossSection()/nanobarn/sumOfWeights()); scale(_histPt_muons, crossSection()/nanobarn/sumOfWeights()); scale(_histPt_muons_full, crossSection()/nanobarn/sumOfWeights()); } private: /// @name Histograms Histo1DPtr _histPt_elecs; Histo1DPtr _histPt_muons; Histo1DPtr _histPt_muons_full; }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2011_I926145); } diff --git a/analyses/pluginATLAS/ATLAS_2011_I928289_W.cc b/analyses/pluginATLAS/ATLAS_2011_I928289_W.cc --- a/analyses/pluginATLAS/ATLAS_2011_I928289_W.cc +++ b/analyses/pluginATLAS/ATLAS_2011_I928289_W.cc @@ -1,148 +1,147 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/WFinder.hh" namespace Rivet { class ATLAS_2011_I928289_W : public Analysis { public: /// Constructor ATLAS_2011_I928289_W() : Analysis("ATLAS_2011_I928289_W") { setNeedsCrossSection(true); } /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { ///Initialise and register projections here FinalState fs; Cut cut = (Cuts::pT >= 20*GeV); WFinder wfinder_el_bare( fs, cut, PID::ELECTRON, 40.0*GeV, 7000.0*GeV, 25.0*GeV, 0.0, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); WFinder wfinder_el_dressed(fs, cut, PID::ELECTRON, 40.0*GeV, 7000.0*GeV, 25.0*GeV, 0.1, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); WFinder wfinder_mu_bare (fs, cut, PID::MUON , 40.0*GeV, 7000.0*GeV, 25.0*GeV, 0.0, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); WFinder wfinder_mu_dressed(fs, cut, PID::MUON , 40.0*GeV, 7000.0*GeV, 25.0*GeV, 0.1, WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); declare(wfinder_el_bare , "WFinder_el_bare"); declare(wfinder_el_dressed, "WFinder_el_dressed"); declare(wfinder_mu_bare , "WFinder_mu_bare"); declare(wfinder_mu_dressed, "WFinder_mu_dressed"); /// Book histograms here book(_h_Wminus_lepton_eta_el_bare ,3, 1, 1); book(_h_Wminus_lepton_eta_el_dressed ,3, 1, 2); book(_h_Wminus_lepton_eta_mu_bare ,3, 1, 3); book(_h_Wminus_lepton_eta_mu_dressed ,3, 1, 4); book(_h_Wplus_lepton_eta_el_bare ,5, 1, 1); book(_h_Wplus_lepton_eta_el_dressed ,5, 1, 2); book(_h_Wplus_lepton_eta_mu_bare ,5, 1, 3); book(_h_Wplus_lepton_eta_mu_dressed ,5, 1, 4); book(_h_W_asym_eta_el_bare ,7, 1, 1); book(_h_W_asym_eta_el_dressed ,7, 1, 2); book(_h_W_asym_eta_mu_bare ,7, 1, 3); book(_h_W_asym_eta_mu_dressed ,7, 1, 4); } /// Perform the per-event analysis void analyze(const Event& event) { const WFinder& wfinder_el_bare = apply<WFinder>(event, "WFinder_el_bare"); const WFinder& wfinder_el_dressed = apply<WFinder>(event, "WFinder_el_dressed"); const WFinder& wfinder_mu_bare = apply<WFinder>(event, "WFinder_mu_bare"); const WFinder& wfinder_mu_dressed = apply<WFinder>(event, "WFinder_mu_dressed"); - const double weight = 1.0; - fillPlots1D(wfinder_el_bare , _h_Wplus_lepton_eta_el_bare , _h_Wminus_lepton_eta_el_bare , weight); - fillPlots1D(wfinder_el_dressed, _h_Wplus_lepton_eta_el_dressed, _h_Wminus_lepton_eta_el_dressed, weight); - fillPlots1D(wfinder_mu_bare , _h_Wplus_lepton_eta_mu_bare , _h_Wminus_lepton_eta_mu_bare , weight); - fillPlots1D(wfinder_mu_dressed, _h_Wplus_lepton_eta_mu_dressed, _h_Wminus_lepton_eta_mu_dressed, weight); + fillPlots1D(wfinder_el_bare , _h_Wplus_lepton_eta_el_bare , _h_Wminus_lepton_eta_el_bare); + fillPlots1D(wfinder_el_dressed, _h_Wplus_lepton_eta_el_dressed, _h_Wminus_lepton_eta_el_dressed); + fillPlots1D(wfinder_mu_bare , _h_Wplus_lepton_eta_mu_bare , _h_Wminus_lepton_eta_mu_bare); + fillPlots1D(wfinder_mu_dressed, _h_Wplus_lepton_eta_mu_dressed, _h_Wminus_lepton_eta_mu_dressed); } - void fillPlots1D(const WFinder& wfinder, Histo1DPtr hist_plus, Histo1DPtr hist_minus, double weight) { + void fillPlots1D(const WFinder& wfinder, Histo1DPtr hist_plus, Histo1DPtr hist_minus) { if (wfinder.bosons().size() != 1) return; const Particle l = wfinder.constituentLeptons()[0]; const FourMomentum& miss = wfinder.constituentNeutrinos()[0].momentum(); if (l.pT() > 20*GeV && miss.Et() > 25*GeV && wfinder.mT() > 40*GeV) - (l.charge3() > 0 ? hist_plus : hist_minus)->fill(l.abseta(), weight); + (l.charge3() > 0 ? hist_plus : hist_minus)->fill(l.abseta()); } /// Normalise histograms etc., after the run void finalize() { // Construct asymmetry: (dsig+/deta - dsig-/deta) / (dsig+/deta + dsig-/deta) divide(*_h_Wplus_lepton_eta_el_bare - *_h_Wminus_lepton_eta_el_bare, *_h_Wplus_lepton_eta_el_bare + *_h_Wminus_lepton_eta_el_bare, _h_W_asym_eta_el_bare); divide(*_h_Wplus_lepton_eta_el_dressed - *_h_Wminus_lepton_eta_el_dressed, *_h_Wplus_lepton_eta_el_dressed + *_h_Wminus_lepton_eta_el_dressed, _h_W_asym_eta_el_dressed); divide(*_h_Wplus_lepton_eta_mu_bare - *_h_Wminus_lepton_eta_mu_bare, *_h_Wplus_lepton_eta_mu_bare + *_h_Wminus_lepton_eta_mu_bare, _h_W_asym_eta_mu_bare); divide(*_h_Wplus_lepton_eta_mu_dressed - *_h_Wminus_lepton_eta_mu_dressed, *_h_Wplus_lepton_eta_mu_dressed + *_h_Wminus_lepton_eta_mu_dressed, _h_W_asym_eta_mu_dressed); // 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 const double sf = 0.5 * xs_pb / sumw; // 0.5 accounts for rapidity bin width scale(_h_Wminus_lepton_eta_el_bare , sf); scale(_h_Wminus_lepton_eta_el_dressed, sf); scale(_h_Wminus_lepton_eta_mu_bare , sf); scale(_h_Wminus_lepton_eta_mu_dressed, sf); scale(_h_Wplus_lepton_eta_el_bare , sf); scale(_h_Wplus_lepton_eta_el_dressed , sf); scale(_h_Wplus_lepton_eta_mu_bare , sf); scale(_h_Wplus_lepton_eta_mu_dressed , sf); } //@} private: /// @name Histograms //@{ Histo1DPtr _h_Wminus_lepton_eta_el_bare; Histo1DPtr _h_Wminus_lepton_eta_el_dressed; Histo1DPtr _h_Wminus_lepton_eta_mu_bare; Histo1DPtr _h_Wminus_lepton_eta_mu_dressed; Histo1DPtr _h_Wplus_lepton_eta_el_bare; Histo1DPtr _h_Wplus_lepton_eta_el_dressed; Histo1DPtr _h_Wplus_lepton_eta_mu_bare; Histo1DPtr _h_Wplus_lepton_eta_mu_dressed; Scatter2DPtr _h_W_asym_eta_el_bare; Scatter2DPtr _h_W_asym_eta_el_dressed; Scatter2DPtr _h_W_asym_eta_mu_bare; Scatter2DPtr _h_W_asym_eta_mu_dressed; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2011_I928289_W); } diff --git a/analyses/pluginATLAS/ATLAS_2011_I928289_Z.cc b/analyses/pluginATLAS/ATLAS_2011_I928289_Z.cc --- a/analyses/pluginATLAS/ATLAS_2011_I928289_Z.cc +++ b/analyses/pluginATLAS/ATLAS_2011_I928289_Z.cc @@ -1,111 +1,110 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/ZFinder.hh" namespace Rivet { class ATLAS_2011_I928289_Z : public Analysis { public: /// Constructor ATLAS_2011_I928289_Z() : Analysis("ATLAS_2011_I928289_Z") { setNeedsCrossSection(true); } /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { FinalState fs; Cut cut = (Cuts::pT >= 20.0*GeV); ZFinder zfinder_ee_bare( fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); ZFinder zfinder_ee_dressed(fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); ZFinder zfinder_mm_bare( fs, cut, PID::MUON , 66.0*GeV, 116.0*GeV, 0.0, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); ZFinder zfinder_mm_dressed(fs, cut, PID::MUON , 66.0*GeV, 116.0*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); declare(zfinder_ee_bare , "ZFinder_ee_bare" ); declare(zfinder_ee_dressed, "ZFinder_ee_dressed"); declare(zfinder_mm_bare , "ZFinder_mm_bare" ); declare(zfinder_mm_dressed, "ZFinder_mm_dressed"); // y(Z) cross-section dependence book(_h_Z_y_ee_bare ,1, 1, 1); book(_h_Z_y_ee_dressed ,1, 1, 2); book(_h_Z_y_mm_bare ,1, 1, 3); book(_h_Z_y_mm_dressed ,1, 1, 4); } /// Perform the per-event analysis void analyze(const Event& event) { const ZFinder& zfinder_ee_bare = apply<ZFinder>(event, "ZFinder_ee_bare" ); const ZFinder& zfinder_ee_dressed = apply<ZFinder>(event, "ZFinder_ee_dressed"); const ZFinder& zfinder_mm_bare = apply<ZFinder>(event, "ZFinder_mm_bare" ); const ZFinder& zfinder_mm_dressed = apply<ZFinder>(event, "ZFinder_mm_dressed"); - const double weight = 1.0; - fillPlots1D(zfinder_ee_bare , _h_Z_y_ee_bare , weight); - fillPlots1D(zfinder_ee_dressed, _h_Z_y_ee_dressed, weight); - fillPlots1D(zfinder_mm_bare , _h_Z_y_mm_bare , weight); - fillPlots1D(zfinder_mm_dressed, _h_Z_y_mm_dressed, weight); + fillPlots1D(zfinder_ee_bare , _h_Z_y_ee_bare); + fillPlots1D(zfinder_ee_dressed, _h_Z_y_ee_dressed); + fillPlots1D(zfinder_mm_bare , _h_Z_y_mm_bare); + fillPlots1D(zfinder_mm_dressed, _h_Z_y_mm_dressed); } - void fillPlots1D(const ZFinder& zfinder, Histo1DPtr hist, double weight) { + void fillPlots1D(const ZFinder& zfinder, Histo1DPtr hist) { if (zfinder.bosons().size() != 1) return; const FourMomentum zmom = zfinder.bosons()[0].momentum(); - hist->fill(zmom.absrap(), weight); + hist->fill(zmom.absrap()); } /// Normalise histograms etc., after the run void finalize() { // 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 const double sf(0.5 * xs_pb / sumw); // 0.5 accounts for rapidity bin width scale(_h_Z_y_ee_bare , sf); scale(_h_Z_y_ee_dressed, sf); scale(_h_Z_y_mm_bare , sf); scale(_h_Z_y_mm_dressed, sf); } //@} private: /// @name Histograms //@{ Histo1DPtr _h_Z_y_ee_bare; Histo1DPtr _h_Z_y_ee_dressed; Histo1DPtr _h_Z_y_mm_bare; Histo1DPtr _h_Z_y_mm_dressed; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2011_I928289_Z); } diff --git a/analyses/pluginATLAS/ATLAS_2011_I929691.cc b/analyses/pluginATLAS/ATLAS_2011_I929691.cc --- a/analyses/pluginATLAS/ATLAS_2011_I929691.cc +++ b/analyses/pluginATLAS/ATLAS_2011_I929691.cc @@ -1,103 +1,102 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/ChargedFinalState.hh" namespace Rivet { /// Jet fragmentation at 7 TeV class ATLAS_2011_I929691 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2011_I929691); /// Initialisation void init() { const FinalState fs(Cuts::abseta < 2.0); FastJets antikt_06_jets(fs, FastJets::ANTIKT, 0.6, JetAlg::NO_MUONS, JetAlg::NO_INVISIBLES); declare(antikt_06_jets, "jets"); ChargedFinalState tracks(Cuts::pT > 0.5*GeV && Cuts::abseta < 2.0); declare(tracks, "tracks"); // Set up the histograms (each element is a binning in jet pT) for (size_t i = 0; i < 10; i++) { book(_p_F_z[i] , i+ 1, 1, 1); book(_p_rho_r[i] , i+11, 1, 1); book(_p_f_pTrel[i], i+21, 1, 1); } } // Per-event analysis void analyze(const Event& event) { const Jets alljets = apply<FastJets>(event, "jets").jetsByPt(Cuts::absrap < 1.2); const Particles& tracks = apply<ChargedFinalState>(event, "tracks").particlesByPt(); for (size_t i = 0; i < 10; ++i) { const Jets jets = filter_select(alljets, Cuts::pT > bedges[i] && Cuts::pT < bedges[i+1]); const int n_jets = jets.size(); if (n_jets == 0) continue; // First... count the tracks Histo1D h_ntracks_z(*_p_F_z[i]), h_ntracks_r(*_p_rho_r[i]), h_ntracks_pTrel(*_p_f_pTrel[i]); for (const Jet& j : jets) { for (const Particle& p : tracks) { const double dr = deltaR(j, p, RAPIDITY); if (dr > 0.6) continue; // The paper uses pseudorapidity, but this is a requirement for filling the histogram h_ntracks_z.fill(z(j, p), 1.0/n_jets); h_ntracks_r.fill(dr, 1.0/n_jets); h_ntracks_pTrel.fill(pTrel(j, p), 1.0/n_jets); } } // Then... calculate the observable and fill the profiles - const double weight = 1.0; for (const HistoBin1D& b : h_ntracks_z.bins()) - _p_F_z[i]->fill(b.xMid(), b.height(), weight); + _p_F_z[i]->fill(b.xMid(), b.height()); for (const HistoBin1D& b : h_ntracks_r.bins()) - _p_rho_r[i]->fill(b.xMid(), b.area()/annulus_area(b.xMin(), b.xMax()), weight); + _p_rho_r[i]->fill(b.xMid(), b.area()/annulus_area(b.xMin(), b.xMax())); for (const HistoBin1D& b : h_ntracks_pTrel.bins()) - _p_f_pTrel[i]->fill(b.xMid(), b.height(), weight); + _p_f_pTrel[i]->fill(b.xMid(), b.height()); } } double z (const Jet& jet, const Particle& ch) { return dot(jet.p3(), ch.p3()) / jet.p3().mod2(); } double pTrel (const Jet& jet, const Particle& ch) { return (ch.p3().cross(jet.p3())).mod()/(jet.p3().mod()); } // To calculate the area of the annulus in an r bin double annulus_area(double r1, double r2) { return M_PI*(sqr(r2) - sqr(r1)); } private: Profile1DPtr _p_F_z[10], _p_rho_r[10], _p_f_pTrel[10]; const vector<double> bedges = { 25., 40., 60., 80., 110., 160., 210., 260., 310., 400., 500. }; }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2011_I929691); }