Page MenuHomeHEPForge

No OneTemporary

diff --git a/include/Rivet/Projections/WFinder.hh b/include/Rivet/Projections/WFinder.hh
--- a/include/Rivet/Projections/WFinder.hh
+++ b/include/Rivet/Projections/WFinder.hh
@@ -1,188 +1,138 @@
// -*- C++ -*-
#ifndef RIVET_WFinder_HH
#define RIVET_WFinder_HH
#include "Rivet/Tools/Logging.hh"
#include "Rivet/Rivet.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
#include "Rivet/Projection.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/LeptonClusters.hh"
namespace Rivet {
/// @brief Convenience finder of leptonically decaying Ws
///
/// Chain together different projections as convenience for finding W's
/// from two leptons in the final state, including photon clustering.
class WFinder : public FinalState {
public:
/// @name Constructors
//@{
/// Constructor taking single eta/pT bounds
/// @param inputfs Input final state
/// @param etaMin,etaMax,pTmin charged lepton cuts
/// @param pid type of the charged lepton
/// @param minmass,maxmass (transverse) mass window
/// @param missingET minimal amount of missing ET (neutrinos) required
/// @param dRmax maximum dR of photons around charged lepton to take into account
/// for W reconstruction (only relevant if one of the following are true)
/// @param clusterPhotons whether such photons are supposed to be
/// clustered to the lepton object and thus W mom
/// @param trackPhotons whether such photons should be added to _theParticles
/// (cf. _trackPhotons)
/// @param useTransverseMass whether mass window should be applied using mT
WFinder(const FinalState& inputfs,
double etaMin, double etaMax,
double pTmin,
PdgId pid,
double minmass, double maxmass,
double missingET,
double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
double masstarget=80.4,
bool useTransverseMass=false);
WFinder(const FinalState& inputfs,
Cut cuts,
PdgId pid,
double minmass, double maxmass,
double missingET,
double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
double masstarget=80.4,
bool useTransverseMass=false);
-
- /// Constructor taking multiple eta/pT bounds
- /// @param inputfs Input final state
- /// @param etaRanges,pTmin charged lepton cuts
- /// @param pid type of the charged lepton
- /// @param minmass,maxmass (transverse) mass window
- /// @param missingET minimal amount of missing ET (neutrinos) required
- /// @param dRmax maximum dR of photons around charged lepton to take into account
- /// for W reconstruction (only relevant if one of the following are true)
- /// @param clusterPhotons whether such photons are supposed to be
- /// clustered to the lepton object and thus W mom
- /// @param trackPhotons whether such photons should be added to _theParticles
- /// (cf. _trackPhotons)
- /// @param useTransverseMass whether mass window should be applied using mT
- // WFinder(const FinalState& inputfs,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, const double maxmass,
- // double missingET,
- // double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
- // double masstarget=80.4,
- // bool useTransverseMass=false);
-
-
- // /// @deprecated Constructors without inputfs -- only for backwards compatibility
- // WFinder(double, double, double, PdgId, double, double, double, double,
- // bool clusterPhotons=true, bool trackPhotons=false,
- // double masstarget=80.4, bool useTransverseMass=false);
- // /// @deprecated Constructors without inputfs -- only for backwards compatibility
- // WFinder(const std::vector<std::pair<double, double> >&, double,
- // PdgId, double, double, double, double,
- // bool clusterPhotons=true, bool trackPhotons=false,
- // double masstarget=80.4, bool useTransverseMass=false);
-
/// Clone on the heap.
virtual const Projection* clone() const {
return new WFinder(*this);
}
//@}
/// Access to the found bosons (currently either 0 or 1)
const Particles& bosons() const { return _bosons; }
/// Access to the W constituent clustered leptons (currently either of
/// size 0 if no boson was found or 1 if one boson was found)
const vector<Particle>& constituentLeptons() const { return _constituentLeptons; }
/// Access to the W constituent neutrinos (currently either of size 0 if no
/// boson was found or 1 if one boson was found)
const vector<Particle>& constituentNeutrinos() const { return _constituentNeutrinos; }
/// Access to the remaining particles, after the W and clustered photons
/// have been removed from the full final state
/// (e.g. for running a jet finder on it)
const FinalState& remainingFinalState() const;
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
public:
/// Clear the projection
void clear() {
_theParticles.clear();
_bosons.clear();
_constituentLeptons.clear();
_constituentNeutrinos.clear();
}
-
- private:
-
- /// Common implementation of constructor operation, taking FS params.
- void _init(const FinalState& inputfs, Cut fsCut,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double missingET,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget,
- bool useTransverseMass);
-
-
private:
/// Transverse mass cuts
double _minmass, _maxmass, _masstarget;
bool _useTransverseMass;
/// Missing ET cut
double _etMiss;
/// Switch for tracking of photons (whether to add them to _theParticles)
/// This is relevant when the ZFinder::_theParticles are to be excluded
/// from e.g. the input to a jet finder, to specify whether the clustered
/// photons are to be excluded as well.
/// (Yes, some experiments make a difference between clusterPhotons and
/// trackPhotons!)
bool _trackPhotons;
/// Lepton flavour
PdgId _pid;
/// Neutrino flavour
PdgId _nu_pid;
/// list of found bosons (currently either 0 or 1)
Particles _bosons;
/// Constituent leptons (currently either 0 or 1)
Particles _constituentLeptons;
/// Constituent neutrinos (currently either 0 or 1)
Particles _constituentNeutrinos;
};
}
#endif
diff --git a/include/Rivet/Projections/ZFinder.hh b/include/Rivet/Projections/ZFinder.hh
--- a/include/Rivet/Projections/ZFinder.hh
+++ b/include/Rivet/Projections/ZFinder.hh
@@ -1,159 +1,113 @@
// -*- C++ -*-
#ifndef RIVET_ZFinder_HH
#define RIVET_ZFinder_HH
#include "Rivet/Tools/Logging.hh"
#include "Rivet/Rivet.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
#include "Rivet/Projection.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/LeptonClusters.hh"
namespace Rivet {
/// @brief Convenience finder of leptonically decaying Zs
///
/// Chain together different projections as convenience for finding Z's
/// from two leptons in the final state, including photon clustering.
class ZFinder : public FinalState {
public:
/// @name Constructors
//@{
/// Constructor taking single eta/pT bounds
/// @param inputfs Input final state
/// @param etaMin,etaMax,pTmin lepton cuts
/// @param pid type of the leptons
/// @param minmass,maxmass mass window
/// @param dRmax maximum dR of photons around leptons to take into account
/// for Z reconstruction (only relevant if one of the following are true)
/// @param clusterPhotons whether such photons are supposed to be
/// clustered to the lepton objects and thus Z mom
/// @param trackPhotons whether such photons should be added to _theParticles
/// (cf. _trackPhotons)
ZFinder(const FinalState& inputfs,
Cut cuts,
PdgId pid,
double minmass, double maxmass,
double dRmax, bool clusterPhotons, bool trackPhotons,
double masstarget=91.2*GeV);
- ZFinder(const FinalState& inputfs,
- double etaMin, double etaMax,
- double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget=91.2*GeV);
-
-
- /// Constructor taking multiple eta/pT bounds
- /// @param inputfs Input final state
- /// @param etaRanges,pTmin lepton cuts
- /// @param pid type of the leptons
- /// @param minmass,maxmass mass window
- /// @param dRmax maximum dR of photons around leptons to take into account
- /// for Z reconstruction (only relevant if one of the following are true)
- /// @param clusterPhotons whether such photons are supposed to be
- /// clustered to the lepton objects and thus Z mom
- /// @param trackPhotons whether such photons should be added to _theParticles
- /// (cf. _trackPhotons)
- // ZFinder(const FinalState& inputfs,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, const double maxmass,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget=91.2*GeV);
-
-
- /// @deprecated Constructors without inputfs -- only for backwards compatibility
- // ZFinder(double, double, double, PdgId, double, double, double,
- // bool, bool, double masstarget=91.2*GeV);
- /// @deprecated Constructors without inputfs -- only for backwards compatibility
- // ZFinder(const std::vector<std::pair<double, double> >&, double, PdgId,
- // double, double, double, bool, bool, double masstarget=91.2*GeV);
-
-
/// Clone on the heap.
virtual const Projection* clone() const {
return new ZFinder(*this);
}
//@}
/// Access to the found bosons (currently either 0 or 1)
const Particles& bosons() const { return _bosons; }
/// Access to the Z constituent clustered leptons
/// (e.g. for more fine-grained cuts on the clustered leptons)
/// The order is going to be: positive charge constituent 1st, negative 2nd
const vector<Particle>& constituents() const { return _constituents; }
/// Access to the remaining particles, after the Z and clustered photons
/// have been removed from the full final state
/// (e.g. for running a jet finder on it)
const FinalState& remainingFinalState() const;
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
public:
/// Clear the projection
void clear() {
_theParticles.clear();
_bosons.clear();
_constituents.clear();
}
private:
- /// Common implementation of constructor operation, taking FS params.
- void _init(const FinalState& inputfs, Cut fsCut,
- //const std::vector<std::pair<double, double> >& etaRanges,
- //double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget);
-
/// Mass cuts to apply to clustered leptons (cf. InvMassFinalState)
double _minmass, _maxmass, _masstarget;
/// Switch for tracking of photons (whether to add them to _theParticles)
/// This is relevant when the ZFinder::_theParticles are to be excluded
/// from e.g. the input to a jet finder, to specify whether the clustered
/// photons are to be excluded as well.
/// (Yes, some experiments make a difference between clusterPhotons and
/// trackPhotons!)
bool _trackPhotons;
/// Lepton flavour
PdgId _pid;
/// list of found bosons (currently either 0 or 1)
Particles _bosons;
/// Clustered leptons
vector<Particle> _constituents;
};
}
#endif
diff --git a/src/Analyses/ATLAS_2011_S9131140.cc b/src/Analyses/ATLAS_2011_S9131140.cc
--- a/src/Analyses/ATLAS_2011_S9131140.cc
+++ b/src/Analyses/ATLAS_2011_S9131140.cc
@@ -1,108 +1,113 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief ATLAS Z pT in Drell-Yan events at 7 TeV
/// @author Elena Yatsenko, Judith Katzy
class ATLAS_2011_S9131140 : public Analysis {
public:
/// Constructor
ATLAS_2011_S9131140()
: Analysis("ATLAS_2011_S9131140")
{
_sumw_el_bare = 0;
_sumw_el_dressed = 0;
_sumw_mu_bare = 0;
_sumw_mu_dressed = 0;
}
/// @name Analysis methods
//@{
void init() {
// Set up projections
FinalState fs;
- ZFinder zfinder_dressed_el(fs, -2.4, 2.4, 20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ Cut cut = EtaIn(-2.4,2.4) & (Cuts::pT >= 20.0*GeV);
+
+ ZFinder zfinder_dressed_el(fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder_dressed_el, "ZFinder_dressed_el");
- ZFinder zfinder_bare_el(fs, -2.4, 2.4, 20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, true, false);
+
+ ZFinder zfinder_bare_el(fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, true, false);
addProjection(zfinder_bare_el, "ZFinder_bare_el");
- ZFinder zfinder_dressed_mu(fs, -2.4, 2.4, 20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+
+ ZFinder zfinder_dressed_mu(fs, cut, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder_dressed_mu, "ZFinder_dressed_mu");
- ZFinder zfinder_bare_mu(fs, -2.4, 2.4, 20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.0, true, false);
+
+ ZFinder zfinder_bare_mu(fs, cut, PID::MUON, 66.0*GeV, 116.0*GeV, 0.0, true, false);
addProjection(zfinder_bare_mu, "ZFinder_bare_mu");
// Book histograms
_hist_zpt_el_dressed = bookHisto1D(1, 1, 2); // electron "dressed"
_hist_zpt_el_bare = bookHisto1D(1, 1, 3); // electron "bare"
_hist_zpt_mu_dressed = bookHisto1D(2, 1, 2); // muon "dressed"
_hist_zpt_mu_bare = bookHisto1D(2, 1, 3); // muon "bare"
}
/// Do the analysis
void analyze(const Event& evt) {
const double weight = evt.weight();
const ZFinder& zfinder_dressed_el = applyProjection<ZFinder>(evt, "ZFinder_dressed_el");
if (!zfinder_dressed_el.bosons().empty()) {
_sumw_el_dressed += weight;
const FourMomentum pZ = zfinder_dressed_el.bosons()[0].momentum();
_hist_zpt_el_dressed->fill(pZ.pT()/GeV, weight);
}
const ZFinder& zfinder_bare_el = applyProjection<ZFinder>(evt, "ZFinder_bare_el");
if (!zfinder_bare_el.bosons().empty()) {
_sumw_el_bare += weight;
const FourMomentum pZ = zfinder_bare_el.bosons()[0].momentum();
_hist_zpt_el_bare->fill(pZ.pT()/GeV, weight);
}
const ZFinder& zfinder_dressed_mu = applyProjection<ZFinder>(evt, "ZFinder_dressed_mu");
if (!zfinder_dressed_mu.bosons().empty()) {
_sumw_mu_dressed += weight;
const FourMomentum pZ = zfinder_dressed_mu.bosons()[0].momentum();
_hist_zpt_mu_dressed->fill(pZ.pT()/GeV, weight);
}
const ZFinder& zfinder_bare_mu = applyProjection<ZFinder>(evt, "ZFinder_bare_mu");
if (!zfinder_bare_mu.bosons().empty()) {
_sumw_mu_bare += weight;
const FourMomentum pZ = zfinder_bare_mu.bosons()[0].momentum();
_hist_zpt_mu_bare->fill(pZ.pT()/GeV, weight);
}
}
void finalize() {
if (_sumw_el_dressed != 0) scale(_hist_zpt_el_dressed, 1/_sumw_el_dressed);
if (_sumw_el_bare != 0) scale(_hist_zpt_el_bare, 1/_sumw_el_bare);
if (_sumw_mu_dressed != 0) scale(_hist_zpt_mu_dressed, 1/_sumw_mu_dressed);
if (_sumw_mu_bare != 0) scale(_hist_zpt_mu_bare, 1/_sumw_mu_bare);
}
//@}
private:
double _sumw_el_bare, _sumw_el_dressed;
double _sumw_mu_bare, _sumw_mu_dressed;
Histo1DPtr _hist_zpt_el_dressed;
Histo1DPtr _hist_zpt_el_bare;
Histo1DPtr _hist_zpt_mu_dressed;
Histo1DPtr _hist_zpt_mu_bare;
};
// Hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9131140);
}
diff --git a/src/Analyses/CDF_2000_S4155203.cc b/src/Analyses/CDF_2000_S4155203.cc
--- a/src/Analyses/CDF_2000_S4155203.cc
+++ b/src/Analyses/CDF_2000_S4155203.cc
@@ -1,72 +1,72 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief CDF Run I Z \f$ p_\perp \f$ in Drell-Yan events
/// @author Hendrik Hoeth
class CDF_2000_S4155203 : public Analysis {
public:
/// Constructor
CDF_2000_S4155203()
: Analysis("CDF_2000_S4155203")
{ }
/// @name Analysis methods
//@{
void init() {
// Set up projections
FinalState fs;
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
66.0*GeV, 116.0*GeV, 0.0, false, false);
addProjection(zfinder, "ZFinder");
// Book histogram
_hist_zpt = bookHisto1D(1, 1, 1);
}
/// Do the analysis
void analyze(const Event& e) {
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size() != 1) {
MSG_DEBUG("Num e+ e- pairs found = " << zfinder.bosons().size());
vetoEvent;
}
FourMomentum pZ = zfinder.bosons()[0].momentum();
if (pZ.mass2() < 0) {
MSG_DEBUG("Negative Z mass**2 = " << pZ.mass2()/GeV2 << "!");
vetoEvent;
}
MSG_DEBUG("Dilepton mass = " << pZ.mass()/GeV << " GeV");
MSG_DEBUG("Dilepton pT = " << pZ.pT()/GeV << " GeV");
_hist_zpt->fill(pZ.pT()/GeV, e.weight());
}
void finalize() {
scale(_hist_zpt, crossSection()/picobarn/sumOfWeights());
}
//@}
private:
Histo1DPtr _hist_zpt;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(CDF_2000_S4155203);
}
diff --git a/src/Analyses/CDF_2009_S8383952.cc b/src/Analyses/CDF_2009_S8383952.cc
--- a/src/Analyses/CDF_2009_S8383952.cc
+++ b/src/Analyses/CDF_2009_S8383952.cc
@@ -1,91 +1,91 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief CDF Z boson rapidity measurement
class CDF_2009_S8383952 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
CDF_2009_S8383952()
: Analysis("CDF_2009_S8383952")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
/// Initialise and register projections here
// this seems to have been corrected completely for all selection cuts,
// i.e. eta cuts and pT cuts on leptons.
FinalState fs;
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
66.0*GeV, 116.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
/// Book histograms here
_h_xs = bookHisto1D(1, 1, 1);
_h_yZ = bookHisto1D(2, 1, 1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
if (zfinder.bosons().size() == 1) {
double yZ = fabs(zfinder.bosons()[0].rapidity());
_h_yZ->fill(yZ, weight);
_h_xs->fill(1960.0, weight);
}
else {
MSG_DEBUG("no unique lepton pair found.");
}
}
/// Normalise histograms etc., after the run
void finalize() {
scale(_h_xs, crossSection()/sumOfWeights());
// Data seems to have been normalized for the avg of the two sides
// (+ve & -ve rapidity) rather than the sum, hence the 0.5:
scale(_h_yZ, 0.5*crossSection()/sumOfWeights());
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_yZ;
Histo1DPtr _h_xs;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(CDF_2009_S8383952);
}
diff --git a/src/Analyses/CMS_2012_I1107658.cc b/src/Analyses/CMS_2012_I1107658.cc
--- a/src/Analyses/CMS_2012_I1107658.cc
+++ b/src/Analyses/CMS_2012_I1107658.cc
@@ -1,166 +1,167 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/ParticleName.hh"
namespace Rivet {
class CMS_2012_I1107658 : public Analysis {
public:
/// Constructor
CMS_2012_I1107658() : Analysis("CMS_2012_I1107658") {}
void init() {
FinalState fs;
- ZFinder zfinder(fs, -2.4, 2.4, 20.0*GeV, PID::MUON, 4.0*GeV, 140.0*GeV, 0.2, false, false);
+ Cut cut = EtaIn(-2.4,2.4) & (Cuts::pT >= 20.0*GeV);
+ ZFinder zfinder(fs, cut, PID::MUON, 4.0*GeV, 140.0*GeV, 0.2, false, false);
addProjection(zfinder, "ZFinder");
ChargedFinalState cfs(-2.0, 2.0, 500*MeV); // For charged particles
VetoedFinalState nonmuons(cfs);
nonmuons.addVetoPairId(PID::MUON);
addProjection(nonmuons, "nonmuons");
_h_Nchg_towards_pTmumu = bookProfile1D(1, 1, 1);
_h_Nchg_transverse_pTmumu = bookProfile1D(2, 1, 1);
_h_Nchg_away_pTmumu = bookProfile1D(3, 1, 1);
_h_pTsum_towards_pTmumu = bookProfile1D(4, 1, 1);
_h_pTsum_transverse_pTmumu = bookProfile1D(5, 1, 1);
_h_pTsum_away_pTmumu = bookProfile1D(6, 1, 1);
_h_avgpT_towards_pTmumu = bookProfile1D(7, 1, 1);
_h_avgpT_transverse_pTmumu = bookProfile1D(8, 1, 1);
_h_avgpT_away_pTmumu = bookProfile1D(9, 1, 1);
_h_Nchg_towards_plus_transverse_Mmumu = bookProfile1D(10, 1, 1);
_h_pTsum_towards_plus_transverse_Mmumu = bookProfile1D(11, 1, 1);
_h_avgpT_towards_plus_transverse_Mmumu = bookProfile1D(12, 1, 1);
_h_Nchg_towards_zmass_81_101 = bookHisto1D(13, 1, 1);
_h_Nchg_transverse_zmass_81_101 = bookHisto1D(14, 1, 1);
_h_Nchg_away_zmass_81_101 = bookHisto1D(15, 1, 1);
_h_pT_towards_zmass_81_101 = bookHisto1D(16, 1, 1);
_h_pT_transverse_zmass_81_101 = bookHisto1D(17, 1, 1);
_h_pT_away_zmass_81_101 = bookHisto1D(18, 1, 1);
_h_Nchg_transverse_zpt_5 = bookHisto1D(19, 1, 1);
_h_pT_transverse_zpt_5 = bookHisto1D(20, 1, 1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
if (zfinder.bosons().size() != 1) vetoEvent;
double Zpt = zfinder.bosons()[0].pT()/GeV;
double Zphi = zfinder.bosons()[0].momentum().phi();
double Zmass = zfinder.bosons()[0].momentum().mass()/GeV;
Particles particles = applyProjection<VetoedFinalState>(event, "nonmuons").particles();
int nTowards = 0;
int nTransverse = 0;
int nAway = 0;
double ptSumTowards = 0.0;
double ptSumTransverse = 0.0;
double ptSumAway = 0.0;
foreach (const Particle& p, particles) {
double dphi = fabs(deltaPhi(Zphi, p.momentum().phi()));
double pT = p.pT();
if ( dphi < M_PI/3.0 ) {
nTowards++;
ptSumTowards += pT;
if (Zmass > 81. && Zmass < 101.) _h_pT_towards_zmass_81_101->fill(pT, weight);
} else if ( dphi < 2.*M_PI/3.0 ) {
nTransverse++;
ptSumTransverse += pT;
if (Zmass > 81. && Zmass < 101.) _h_pT_transverse_zmass_81_101->fill(pT, weight);
if (Zpt < 5.) _h_pT_transverse_zpt_5->fill(pT, weight);
} else {
nAway++;
ptSumAway += pT;
if (Zmass > 81. && Zmass < 101.) _h_pT_away_zmass_81_101->fill(pT, weight);
}
} // Loop over particles
const double area = 8./3.*M_PI;
if (Zmass > 81. && Zmass < 101.) {
_h_Nchg_towards_pTmumu-> fill(Zpt, 1./area * nTowards, weight);
_h_Nchg_transverse_pTmumu-> fill(Zpt, 1./area * nTransverse, weight);
_h_Nchg_away_pTmumu-> fill(Zpt, 1./area * nAway, weight);
_h_pTsum_towards_pTmumu-> fill(Zpt, 1./area * ptSumTowards, weight);
_h_pTsum_transverse_pTmumu-> fill(Zpt, 1./area * ptSumTransverse, weight);
_h_pTsum_away_pTmumu-> fill(Zpt, 1./area * ptSumAway, weight);
if (nTowards > 0) _h_avgpT_towards_pTmumu-> fill(Zpt, ptSumTowards/nTowards, weight);
if (nTransverse > 0) _h_avgpT_transverse_pTmumu-> fill(Zpt, ptSumTransverse/nTransverse, weight);
if (nAway > 0) _h_avgpT_away_pTmumu-> fill(Zpt, ptSumAway/nAway, weight);
_h_Nchg_towards_zmass_81_101-> fill(nTowards, weight);
_h_Nchg_transverse_zmass_81_101->fill(nTransverse, weight);
_h_Nchg_away_zmass_81_101-> fill(nAway, weight);
}
if (Zpt < 5.) {
_h_Nchg_towards_plus_transverse_Mmumu->fill(Zmass, (nTowards + nTransverse)/(2.*area), weight);
_h_pTsum_towards_plus_transverse_Mmumu->fill(Zmass, (ptSumTowards + ptSumTransverse)/(2.*area), weight);
if ((nTowards + nTransverse) > 0) _h_avgpT_towards_plus_transverse_Mmumu->fill(Zmass, (ptSumTowards + ptSumTransverse)/(nTowards + nTransverse), weight);
_h_Nchg_transverse_zpt_5->fill(nTransverse, weight);
}
}
/// Normalise histograms etc., after the run
void finalize() {
if (integral(_h_Nchg_towards_zmass_81_101) > 0) scale(_h_pT_towards_zmass_81_101, 1.0/integral(_h_Nchg_towards_zmass_81_101));
if (integral(_h_Nchg_transverse_zmass_81_101) > 0) scale(_h_pT_transverse_zmass_81_101, 1.0/integral(_h_Nchg_transverse_zmass_81_101));
if (integral(_h_Nchg_away_zmass_81_101) > 0) scale(_h_pT_away_zmass_81_101, 1.0/integral(_h_Nchg_away_zmass_81_101));
if (integral(_h_Nchg_transverse_zpt_5) > 0) scale(_h_pT_transverse_zpt_5, 1.0/integral(_h_Nchg_transverse_zpt_5));
normalize(_h_Nchg_towards_zmass_81_101);
normalize(_h_Nchg_transverse_zmass_81_101);
normalize(_h_Nchg_away_zmass_81_101);
normalize(_h_Nchg_transverse_zpt_5);
}
private:
/// @name Histogram objects
//@{
Profile1DPtr _h_Nchg_towards_pTmumu;
Profile1DPtr _h_Nchg_transverse_pTmumu;
Profile1DPtr _h_Nchg_away_pTmumu;
Profile1DPtr _h_pTsum_towards_pTmumu;
Profile1DPtr _h_pTsum_transverse_pTmumu;
Profile1DPtr _h_pTsum_away_pTmumu;
Profile1DPtr _h_avgpT_towards_pTmumu;
Profile1DPtr _h_avgpT_transverse_pTmumu;
Profile1DPtr _h_avgpT_away_pTmumu;
Profile1DPtr _h_Nchg_towards_plus_transverse_Mmumu;
Profile1DPtr _h_pTsum_towards_plus_transverse_Mmumu;
Profile1DPtr _h_avgpT_towards_plus_transverse_Mmumu;
Histo1DPtr _h_Nchg_towards_zmass_81_101;
Histo1DPtr _h_Nchg_transverse_zmass_81_101;
Histo1DPtr _h_Nchg_away_zmass_81_101;
Histo1DPtr _h_pT_towards_zmass_81_101;
Histo1DPtr _h_pT_transverse_zmass_81_101;
Histo1DPtr _h_pT_away_zmass_81_101;
Histo1DPtr _h_Nchg_transverse_zpt_5;
Histo1DPtr _h_pT_transverse_zpt_5;
//@}
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(CMS_2012_I1107658);
}
diff --git a/src/Analyses/D0_2007_S7075677.cc b/src/Analyses/D0_2007_S7075677.cc
--- a/src/Analyses/D0_2007_S7075677.cc
+++ b/src/Analyses/D0_2007_S7075677.cc
@@ -1,79 +1,79 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief Measurement of D0 Run II Z \f$ p_\perp \f$ diff cross-section shape
/// @author Andy Buckley
/// @author Gavin Hesketh
/// @author Frank Siegert
class D0_2007_S7075677 : public Analysis {
public:
/// Default constructor.
D0_2007_S7075677() : Analysis("D0_2007_S7075677")
{
// Run II Z rapidity
}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
71.0*GeV, 111.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
_h_yZ = bookHisto1D(1, 1, 1);
}
/// Do the analysis
void analyze(const Event & e) {
const double weight = e.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size() == 1) {
const Particles& el(zfinder.constituents());
if (el[0].pT() > 25.0*GeV || el[1].pT() > 25.0*GeV) {
double yZ = fabs(zfinder.bosons()[0].rapidity());
_h_yZ->fill(yZ, weight);
}
}
else {
MSG_DEBUG("No unique lepton pair found.");
}
}
// Finalize
void finalize() {
// Data seems to have been normalized for the avg of the two sides
// (+ve & -ve rapidity) rather than the sum, hence the 0.5:
normalize(_h_yZ, 0.5);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_yZ;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2007_S7075677);
}
diff --git a/src/Analyses/D0_2008_S6879055.cc b/src/Analyses/D0_2008_S6879055.cc
--- a/src/Analyses/D0_2008_S6879055.cc
+++ b/src/Analyses/D0_2008_S6879055.cc
@@ -1,126 +1,126 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief D0 measurement of the ratio \f$ \sigma(Z/\gamma^* + n \text{ jets})/\sigma(Z/\gamma^*) \f$
class D0_2008_S6879055 : public Analysis {
public:
/// Default constructor.
D0_2008_S6879055() : Analysis("D0_2008_S6879055")
{
}
/// @name Analysis methods
//@{
// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
40.0*GeV, 200.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
addProjection(conefinder, "ConeFinder");
_crossSectionRatio = bookHisto1D(1, 1, 1);
_pTjet1 = bookHisto1D(2, 1, 1);
_pTjet2 = bookHisto1D(3, 1, 1);
_pTjet3 = bookHisto1D(4, 1, 1);
}
/// Do the analysis
void analyze(const Event& event) {
const double weight = event.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
if (zfinder.bosons().size()!=1) {
vetoEvent;
}
FourMomentum e0 = zfinder.constituents()[0].momentum();
FourMomentum e1 = zfinder.constituents()[1].momentum();
const double e0eta = e0.eta();
const double e0phi = e0.phi();
const double e1eta = e1.eta();
const double e1phi = e1.phi();
vector<FourMomentum> finaljet_list;
foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
const double jeta = j.eta();
const double jphi = j.momentum().phi();
if (fabs(jeta) < 2.5) {
if (deltaR(e0eta, e0phi, jeta, jphi) > 0.4 &&
deltaR(e1eta, e1phi, jeta, jphi) > 0.4) {
finaljet_list.push_back(j.momentum());
}
}
}
// For normalisation of crossSection data (includes events with no jets passing cuts)
_crossSectionRatio->fill(0, weight);
// Fill jet pT and multiplicities
if (finaljet_list.size() >= 1) {
_crossSectionRatio->fill(1, weight);
_pTjet1->fill(finaljet_list[0].pT(), weight);
}
if (finaljet_list.size() >= 2) {
_crossSectionRatio->fill(2, weight);
_pTjet2->fill(finaljet_list[1].pT(), weight);
}
if (finaljet_list.size() >= 3) {
_crossSectionRatio->fill(3, weight);
_pTjet3->fill(finaljet_list[2].pT(), weight);
}
if (finaljet_list.size() >= 4) {
_crossSectionRatio->fill(4, weight);
}
}
/// Finalize
void finalize() {
// Now divide by the inclusive result
scale(_crossSectionRatio,1.0/_crossSectionRatio->bin(0).area());
// Normalise jet pTs to integrals of data
// NB. There is no other way to do this, because these quantities are not
// detector-corrected
normalize(_pTjet1, 10439.0); // fixed norm OK
normalize(_pTjet2, 1461.5); // fixed norm OK
normalize(_pTjet3, 217.0); // fixed norm OK
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _crossSectionRatio;
Histo1DPtr _pTjet1;
Histo1DPtr _pTjet2;
Histo1DPtr _pTjet3;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2008_S6879055);
}
diff --git a/src/Analyses/D0_2008_S7554427.cc b/src/Analyses/D0_2008_S7554427.cc
--- a/src/Analyses/D0_2008_S7554427.cc
+++ b/src/Analyses/D0_2008_S7554427.cc
@@ -1,85 +1,85 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief D0 Run II Z \f$ p_\perp \f$ differential cross-section shape
/// @author Andy Buckley
/// @author Gavin Hesketh
/// @author Frank Siegert
class D0_2008_S7554427 : public Analysis {
public:
/// Default constructor.
D0_2008_S7554427() : Analysis("D0_2008_S7554427")
{
// Run II Z pT
}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
40.0*GeV, 200.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
_h_ZpT = bookHisto1D(1, 1, 1);
_h_forward_ZpT = bookHisto1D(3, 1, 1);
}
/// Do the analysis
void analyze(const Event & e) {
const double weight = e.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size() == 1) {
double yZ = fabs(zfinder.bosons()[0].rapidity());
double pTZ = zfinder.bosons()[0].pT();
_h_ZpT->fill(pTZ, weight);
if (yZ > 2.0) {
_h_forward_ZpT->fill(pTZ, weight);
}
}
else {
MSG_DEBUG("No unique lepton pair found.");
}
}
// Finalize
void finalize() {
normalize(_h_ZpT);
normalize(_h_forward_ZpT);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_ZpT;
Histo1DPtr _h_forward_ZpT;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2008_S7554427);
}
diff --git a/src/Analyses/D0_2008_S7863608.cc b/src/Analyses/D0_2008_S7863608.cc
--- a/src/Analyses/D0_2008_S7863608.cc
+++ b/src/Analyses/D0_2008_S7863608.cc
@@ -1,137 +1,138 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief D0 differential Z/\f$ \gamma^* \f$ + jet + \f$ X \f$ cross sections
/// @author Gavin Hesketh, Andy Buckley, Frank Siegert
class D0_2008_S7863608 : public Analysis {
public:
/// @name Construction
//@{
/// Constructor
D0_2008_S7863608()
: Analysis("D0_2008_S7863608")
{ }
//@}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
+ Cut cut = EtaIn(-1.7,1.7) & (Cuts::pT >= 15.0*GeV);
+ ZFinder zfinder(fs, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
addProjection(zfinder, "ZFinder");
FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
addProjection(conefinder, "ConeFinder");
_sum_of_weights_inclusive=0.0;
_h_jet_pT_cross_section = bookHisto1D(1, 1, 1);
_h_jet_pT_normalised = bookHisto1D(1, 1, 2);
_h_jet_y_cross_section = bookHisto1D(2, 1, 1);
_h_jet_y_normalised = bookHisto1D(2, 1, 2);
_h_Z_pT_cross_section = bookHisto1D(3, 1, 1);
_h_Z_pT_normalised = bookHisto1D(3, 1, 2);
_h_Z_y_cross_section = bookHisto1D(4, 1, 1);
_h_Z_y_normalised = bookHisto1D(4, 1, 2);
_h_total_cross_section = bookHisto1D(5, 1, 1);
}
// Do the analysis
void analyze(const Event& e) {
const double weight = e.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()==1) {
_sum_of_weights_inclusive += weight;
const JetAlg& jetpro = applyProjection<JetAlg>(e, "ConeFinder");
const Jets& jets = jetpro.jetsByPt(20.0*GeV);
Jets jets_cut;
foreach (const Jet& j, jets) {
if (fabs(j.momentum().pseudorapidity()) < 2.8) {
jets_cut.push_back(j);
}
}
// Return if there are no jets:
if(jets_cut.size()<1) {
MSG_DEBUG("Skipping event " << numEvents() << " because no jets pass cuts ");
vetoEvent;
}
const FourMomentum Zmom = zfinder.bosons()[0].momentum();
// In jet pT
_h_jet_pT_cross_section->fill( jets_cut[0].pT(), weight);
_h_jet_pT_normalised->fill( jets_cut[0].pT(), weight);
_h_jet_y_cross_section->fill( fabs(jets_cut[0].rapidity()), weight);
_h_jet_y_normalised->fill( fabs(jets_cut[0].rapidity()), weight);
// In Z pT
_h_Z_pT_cross_section->fill(Zmom.pT(), weight);
_h_Z_pT_normalised->fill(Zmom.pT(), weight);
_h_Z_y_cross_section->fill(fabs(Zmom.rapidity()), weight);
_h_Z_y_normalised->fill(fabs(Zmom.rapidity()), weight);
_h_total_cross_section->fill(1960.0, weight);
}
}
/// Finalize
void finalize() {
const double invlumi = crossSection()/sumOfWeights();
scale(_h_total_cross_section, invlumi);
scale(_h_jet_pT_cross_section, invlumi);
scale(_h_jet_y_cross_section, invlumi);
scale(_h_Z_pT_cross_section, invlumi);
scale(_h_Z_y_cross_section, invlumi);
double factor=1.0/_sum_of_weights_inclusive;
if (_sum_of_weights_inclusive==0.0) factor=0.0;
scale(_h_jet_pT_normalised, factor);
scale(_h_jet_y_normalised, factor);
scale(_h_Z_pT_normalised, factor);
scale(_h_Z_y_normalised, factor);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_jet_pT_cross_section;
Histo1DPtr _h_jet_y_cross_section;
Histo1DPtr _h_Z_pT_cross_section;
Histo1DPtr _h_Z_y_cross_section;
Histo1DPtr _h_total_cross_section;
Histo1DPtr _h_jet_pT_normalised;
Histo1DPtr _h_jet_y_normalised;
Histo1DPtr _h_Z_pT_normalised;
Histo1DPtr _h_Z_y_normalised;
//@}
double _sum_of_weights_inclusive;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2008_S7863608);
}
diff --git a/src/Analyses/D0_2009_S8349509.cc b/src/Analyses/D0_2009_S8349509.cc
--- a/src/Analyses/D0_2009_S8349509.cc
+++ b/src/Analyses/D0_2009_S8349509.cc
@@ -1,173 +1,174 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief D0 Z+jets angular distributions
class D0_2009_S8349509 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
D0_2009_S8349509()
: Analysis("D0_2009_S8349509"),
_inclusive_Z_sumofweights(0.0)
{ }
//@}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
+ Cut cut = EtaIn(-1.7,1.7) & (Cuts::pT >= 15.0*GeV);
+ ZFinder zfinder(fs, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
addProjection(zfinder, "ZFinder");
FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
addProjection(conefinder, "ConeFinder");
_h_dphi_jet_Z25 = bookHisto1D(1, 1, 1);
_h_dphi_jet_Z45 = bookHisto1D(2, 1, 1);
_h_dy_jet_Z25 = bookHisto1D(3, 1, 1);
_h_dy_jet_Z45 = bookHisto1D(4, 1, 1);
_h_yboost_jet_Z25 = bookHisto1D(5, 1, 1);
_h_yboost_jet_Z45 = bookHisto1D(6, 1, 1);
_h_dphi_jet_Z25_xs = bookHisto1D(1, 1, 2);
_h_dphi_jet_Z45_xs = bookHisto1D(2, 1, 2);
_h_dy_jet_Z25_xs = bookHisto1D(3, 1, 2);
_h_dy_jet_Z45_xs = bookHisto1D(4, 1, 2);
_h_yboost_jet_Z25_xs = bookHisto1D(5, 1, 2);
_h_yboost_jet_Z45_xs = bookHisto1D(6, 1, 2);
_inclusive_Z_sumofweights = 0.0;
}
void analyze(const Event& event) {
const double weight = event.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
if (zfinder.bosons().size()==1) {
// count inclusive sum of weights for histogram normalisation
_inclusive_Z_sumofweights += weight;
const FourMomentum Zmom = zfinder.bosons()[0].momentum();
if (Zmom.pT()<25.0*GeV) {
vetoEvent;
}
Jets jets;
foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
if (fabs(j.momentum().pseudorapidity()) < 2.8) {
jets.push_back(j);
break;
}
}
// Return if there are no jets:
if (jets.size() < 1) {
MSG_DEBUG("Skipping event " << numEvents() << " because no jets pass cuts ");
vetoEvent;
}
const FourMomentum jetmom = jets[0].momentum();
double yZ = Zmom.rapidity();
double yjet = jetmom.rapidity();
double dphi = deltaPhi(Zmom.phi(), jetmom.phi());
double dy = fabs(yZ-yjet);
double yboost = fabs(yZ+yjet)/2.0;
if (Zmom.pT() > 25.0*GeV) {
_h_dphi_jet_Z25->fill(dphi,weight);
_h_dy_jet_Z25->fill(dy, weight);
_h_yboost_jet_Z25->fill(yboost, weight);
_h_dphi_jet_Z25_xs->fill(dphi,weight);
_h_dy_jet_Z25_xs->fill(dy, weight);
_h_yboost_jet_Z25_xs->fill(yboost, weight);
}
if (Zmom.pT() > 45.0*GeV) {
_h_dphi_jet_Z45->fill(dphi,weight);
_h_dy_jet_Z45->fill(dy, weight);
_h_yboost_jet_Z45->fill(yboost, weight);
_h_dphi_jet_Z45_xs->fill(dphi,weight);
_h_dy_jet_Z45_xs->fill(dy, weight);
_h_yboost_jet_Z45_xs->fill(yboost, weight);
}
}
}
void finalize() {
if (_inclusive_Z_sumofweights == 0.0) return;
scale(_h_dphi_jet_Z25, 1.0/_inclusive_Z_sumofweights);
scale(_h_dphi_jet_Z45, 1.0/_inclusive_Z_sumofweights);
scale(_h_dy_jet_Z25, 1.0/_inclusive_Z_sumofweights);
scale(_h_dy_jet_Z45, 1.0/_inclusive_Z_sumofweights);
scale(_h_yboost_jet_Z25, 1.0/_inclusive_Z_sumofweights);
scale(_h_yboost_jet_Z45, 1.0/_inclusive_Z_sumofweights);
scale(_h_dphi_jet_Z25_xs, crossSectionPerEvent());
scale(_h_dphi_jet_Z45_xs, crossSectionPerEvent());
scale(_h_dy_jet_Z25_xs, crossSectionPerEvent());
scale(_h_dy_jet_Z45_xs, crossSectionPerEvent());
scale(_h_yboost_jet_Z25_xs, crossSectionPerEvent());
scale(_h_yboost_jet_Z45_xs, crossSectionPerEvent());
}
//@}
private:
// Data members like post-cuts event weight counters go here
private:
/// @name Histograms (normalised)
//@{
Histo1DPtr _h_dphi_jet_Z25;
Histo1DPtr _h_dphi_jet_Z45;
Histo1DPtr _h_dy_jet_Z25;
Histo1DPtr _h_dy_jet_Z45;
Histo1DPtr _h_yboost_jet_Z25;
Histo1DPtr _h_yboost_jet_Z45;
//@}
/// @name Histograms (absolute cross sections)
//@{
Histo1DPtr _h_dphi_jet_Z25_xs;
Histo1DPtr _h_dphi_jet_Z45_xs;
Histo1DPtr _h_dy_jet_Z25_xs;
Histo1DPtr _h_dy_jet_Z45_xs;
Histo1DPtr _h_yboost_jet_Z25_xs;
Histo1DPtr _h_yboost_jet_Z45_xs;
//@}
double _inclusive_Z_sumofweights;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2009_S8349509);
}
diff --git a/src/Analyses/D0_2010_S8671338.cc b/src/Analyses/D0_2010_S8671338.cc
--- a/src/Analyses/D0_2010_S8671338.cc
+++ b/src/Analyses/D0_2010_S8671338.cc
@@ -1,72 +1,73 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief Measurement of Z(->muon muon) pT differential cross-section
/// @author Flavia Dias
class D0_2010_S8671338 : public Analysis {
public:
/// @name Construction
//@{
/// Constructor
D0_2010_S8671338() : Analysis("D0_2010_S8671338")
{ }
//@}
///@name Analysis methods
//@{
/// Add projections and book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
+ Cut cut = EtaIn(-1.7,1.7) & (Cuts::pT >= 15.0*GeV);
+ ZFinder zfinder(fs, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
addProjection(zfinder, "ZFinder");
_h_Z_pT_normalised = bookHisto1D(1, 1, 1);
_h_Z_pT_xs = bookHisto1D(2, 1, 1);
}
// Do the analysis
void analyze(const Event& e) {
const double weight = e.weight();
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()==1) {
double ZpT = zfinder.bosons()[0].pT()/GeV;
_h_Z_pT_normalised->fill(ZpT, weight);
_h_Z_pT_xs->fill(ZpT, weight);
}
}
/// Finalize
void finalize() {
normalize(_h_Z_pT_normalised, 1.0);
scale(_h_Z_pT_xs, crossSectionPerEvent());
}
//@}
private:
/// @name Histogram
Histo1DPtr _h_Z_pT_normalised;
Histo1DPtr _h_Z_pT_xs;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2010_S8671338);
}
diff --git a/src/Analyses/MC_HINC.cc b/src/Analyses/MC_HINC.cc
--- a/src/Analyses/MC_HINC.cc
+++ b/src/Analyses/MC_HINC.cc
@@ -1,93 +1,94 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief MC validation analysis for higgs [-> tau tau] events
class MC_HINC : public Analysis {
public:
/// Default constructor
MC_HINC()
: Analysis("MC_HINC")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder hfinder(fs, -3.5, 3.5, 25.0*GeV, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder hfinder(fs, cut, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
addProjection(hfinder, "Hfinder");
_h_H_mass = bookHisto1D("H_mass", 50, 119.7, 120.3);
_h_H_pT = bookHisto1D("H_pT", logspace(100, 1.0, 0.5*sqrtS()));
_h_H_pT_peak = bookHisto1D("H_pT_peak", 25, 0.0, 25.0);
_h_H_y = bookHisto1D("H_y", 40, -4.0, 4.0);
_h_H_phi = bookHisto1D("H_phi", 25, 0.0, TWOPI);
_h_lepton_pT = bookHisto1D("lepton_pT", logspace(100, 10.0, 0.25*sqrtS()));
_h_lepton_eta = bookHisto1D("lepton_eta", 40, -4.0, 4.0);
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& hfinder = applyProjection<ZFinder>(e, "Hfinder");
if (hfinder.bosons().size()!=1) {
vetoEvent;
}
const double weight = e.weight();
FourMomentum hmom(hfinder.bosons()[0].momentum());
_h_H_mass->fill(hmom.mass(),weight);
_h_H_pT->fill(hmom.pT(),weight);
_h_H_pT_peak->fill(hmom.pT(),weight);
_h_H_y->fill(hmom.rapidity(),weight);
_h_H_phi->fill(hmom.azimuthalAngle(),weight);
foreach (const Particle& l, hfinder.constituents()) {
_h_lepton_pT->fill(l.pT(), weight);
_h_lepton_eta->fill(l.eta(), weight);
}
}
/// Finalize
void finalize() {
scale(_h_H_mass, crossSection()/sumOfWeights());
scale(_h_H_pT, crossSection()/sumOfWeights());
scale(_h_H_pT_peak, crossSection()/sumOfWeights());
scale(_h_H_y, crossSection()/sumOfWeights());
scale(_h_H_phi, crossSection()/sumOfWeights());
scale(_h_lepton_pT, crossSection()/sumOfWeights());
scale(_h_lepton_eta, crossSection()/sumOfWeights());
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_H_mass;
Histo1DPtr _h_H_pT;
Histo1DPtr _h_H_pT_peak;
Histo1DPtr _h_H_y;
Histo1DPtr _h_H_phi;
Histo1DPtr _h_lepton_pT;
Histo1DPtr _h_lepton_eta;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_HINC);
}
diff --git a/src/Analyses/MC_HJETS.cc b/src/Analyses/MC_HJETS.cc
--- a/src/Analyses/MC_HJETS.cc
+++ b/src/Analyses/MC_HJETS.cc
@@ -1,83 +1,84 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetAnalysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief MC validation analysis for higgs [-> tau tau] + jets events
class MC_HJETS : public MC_JetAnalysis {
public:
/// Default constructor
MC_HJETS()
: MC_JetAnalysis("MC_HJETS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder hfinder(fs, -3.5, 3.5, 25.0*GeV, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder hfinder(fs, cut, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
addProjection(hfinder, "Hfinder");
FastJets jetpro(hfinder.remainingFinalState(), FastJets::ANTIKT, 0.4);
addProjection(jetpro, "Jets");
_h_H_jet1_deta = bookHisto1D("H_jet1_deta", 50, -5.0, 5.0);
_h_H_jet1_dR = bookHisto1D("H_jet1_dR", 25, 0.5, 7.0);
MC_JetAnalysis::init();
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& hfinder = applyProjection<ZFinder>(e, "Hfinder");
if (hfinder.bosons().size()!=1) {
vetoEvent;
}
const double weight = e.weight();
FourMomentum hmom(hfinder.bosons()[0].momentum());
const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(m_jetptcut);
if (jets.size() > 0) {
_h_H_jet1_deta->fill(hmom.eta()-jets[0].eta(), weight);
_h_H_jet1_dR->fill(deltaR(hmom, jets[0].momentum()), weight);
}
MC_JetAnalysis::analyze(e);
}
/// Finalize
void finalize() {
scale(_h_H_jet1_deta, crossSection()/sumOfWeights());
scale(_h_H_jet1_dR, crossSection()/sumOfWeights());
MC_JetAnalysis::finalize();
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_H_jet1_deta;
Histo1DPtr _h_H_jet1_dR;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_HJETS);
}
diff --git a/src/Analyses/MC_HKTSPLITTINGS.cc b/src/Analyses/MC_HKTSPLITTINGS.cc
--- a/src/Analyses/MC_HKTSPLITTINGS.cc
+++ b/src/Analyses/MC_HKTSPLITTINGS.cc
@@ -1,60 +1,61 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetSplittings.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief MC validation analysis for higgs [-> tau tau] + jets events
class MC_HKTSPLITTINGS : public MC_JetSplittings {
public:
/// Default constructor
MC_HKTSPLITTINGS()
: MC_JetSplittings("MC_HKTSPLITTINGS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder hfinder(fs, -3.5, 3.5, 25.0*GeV, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder hfinder(fs, cut, PID::TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false);
addProjection(hfinder, "Hfinder");
FastJets jetpro(hfinder.remainingFinalState(), FastJets::KT, 0.6);
addProjection(jetpro, "Jets");
MC_JetSplittings::init();
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& hfinder = applyProjection<ZFinder>(e, "Hfinder");
if (hfinder.bosons().size()!=1) {
vetoEvent;
}
MC_JetSplittings::analyze(e);
}
/// Finalize
void finalize() {
MC_JetSplittings::finalize();
}
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_HKTSPLITTINGS);
}
diff --git a/src/Analyses/MC_VH2BB.cc b/src/Analyses/MC_VH2BB.cc
--- a/src/Analyses/MC_VH2BB.cc
+++ b/src/Analyses/MC_VH2BB.cc
@@ -1,278 +1,279 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/WFinder.hh"
#include "Rivet/Projections/UnstableFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Math/LorentzTrans.hh"
#include "Rivet/Math/Constants.hh"
#include <cmath>
#include <vector>
namespace Rivet {
class MC_VH2BB : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
MC_VH2BB()
: Analysis("MC_VH2BB")
{ }
//@}
public:
/// @name Analysis methods
//@{
vector<double> boostAngles(const FourMomentum& b1, const FourMomentum& b2, const FourMomentum& vb){
// This should take in the four-momenta of two b's (jets/hadrons) and a vector boson, for the process VB*->VBH with H->bb
// It should return the smallest angle between the virtual vector boson and one of the b's, in the rest frame of the Higgs boson.
// It should also return (as the second element of the vector) the angle between the b's, in the rest frame of the Higgs boson.
FourMomentum higgsMomentum = b1 + b2;
FourMomentum virtualVBMomentum = higgsMomentum + vb;
LorentzTransform lt( -higgsMomentum.boostVector() );
FourMomentum virtualVBMomentumBOOSTED = lt.transform(virtualVBMomentum);
FourMomentum b1BOOSTED = lt.transform(b1);
FourMomentum b2BOOSTED = lt.transform(b2);
double angle1 = b1BOOSTED.angle(virtualVBMomentumBOOSTED);
double angle2 = b2BOOSTED.angle(virtualVBMomentumBOOSTED);
double anglebb = b1BOOSTED.angle(b2BOOSTED);
vector<double> toReturn;
toReturn.push_back(angle1 < angle2 ? angle1 : angle2);
toReturn.push_back(anglebb);
return toReturn;
}
/// Book histograms and initialise projections before the run
void init() {
FinalState fs;
- ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zeefinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zeefinder, "ZeeFinder");
- ZFinder zmmfinder(fs, -3.5, 3.5, 25.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ ZFinder zmmfinder(fs, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zmmfinder, "ZmmFinder");
- WFinder wefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
+ WFinder wefinder(fs, cut, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
addProjection(wefinder, "WeFinder");
- WFinder wmfinder(fs, -3.5, 3.5, 25.0*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
+ WFinder wmfinder(fs, cut, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
addProjection(wmfinder, "WmFinder");
addProjection(fs, "FinalState");
addProjection(FastJets(fs, FastJets::ANTIKT, 0.4), "AntiKT04");
addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "AntiKT05");
addProjection(FastJets(fs, FastJets::ANTIKT, 0.6), "AntiKT06");
/// Book histograms
_h_jet_bb_Delta_eta = bookHisto1D("jet_bb_Delta_eta", 50, 0, 4);
_h_jet_bb_Delta_phi = bookHisto1D("jet_bb_Delta_phi", 50, 0, M_PI);
_h_jet_bb_Delta_pT = bookHisto1D("jet_bb_Delta_pT", 50,0, 500);
_h_jet_bb_Delta_R = bookHisto1D("jet_bb_Delta_R", 50, 0, 5);
_h_jet_b_jet_eta = bookHisto1D("jet_b_jet_eta", 50, -4, 4);
_h_jet_b_jet_multiplicity = bookHisto1D("jet_b_jet_multiplicity", 11, -0.5, 10.5);
_h_jet_b_jet_phi = bookHisto1D("jet_b_jet_phi", 50, 0, 2.*M_PI);
_h_jet_b_jet_pT = bookHisto1D("jet_b_jet_pT", 50, 0, 500);
_h_jet_H_eta_using_bb = bookHisto1D("jet_H_eta_using_bb", 50, -4, 4);
_h_jet_H_mass_using_bb = bookHisto1D("jet_H_mass_using_bb", 50, 50, 200);
_h_jet_H_phi_using_bb = bookHisto1D("jet_H_phi_using_bb", 50, 0, 2.*M_PI);
_h_jet_H_pT_using_bb = bookHisto1D("jet_H_pT_using_bb", 50, 0, 500);
_h_jet_eta = bookHisto1D("jet_eta", 50, -4, 4);
_h_jet_multiplicity = bookHisto1D("jet_multiplicity", 11, -0.5, 10.5);
_h_jet_phi = bookHisto1D("jet_phi", 50, 0, 2.*M_PI);
_h_jet_pT = bookHisto1D("jet_pT", 50, 0, 500);
_h_jet_VBbb_Delta_eta = bookHisto1D("jet_VBbb_Delta_eta", 50, 0, 4);
_h_jet_VBbb_Delta_phi = bookHisto1D("jet_VBbb_Delta_phi", 50, 0, M_PI);
_h_jet_VBbb_Delta_pT = bookHisto1D("jet_VBbb_Delta_pT", 50, 0, 500);
_h_jet_VBbb_Delta_R = bookHisto1D("jet_VBbb_Delta_R", 50, 0, 8);
_h_VB_eta = bookHisto1D("VB_eta", 50, -4, 4);
_h_VB_mass = bookHisto1D("VB_mass", 50, 60, 110);
_h_Z_multiplicity = bookHisto1D("Z_multiplicity", 11, -0.5, 10.5);
_h_W_multiplicity = bookHisto1D("W_multiplicity", 11, -0.5, 10.5);
_h_VB_phi = bookHisto1D("VB_phi", 50, 0, 2.*M_PI);
_h_VB_pT = bookHisto1D("VB_pT", 50, 0, 500);
_h_jet_bVB_angle_Hframe = bookHisto1D("jet_bVB_angle_Hframe", 50, 0, M_PI);
_h_jet_bVB_cosangle_Hframe = bookHisto1D("jet_bVB_cosangle_Hframe", 50, -1, 1);
_h_jet_bb_angle_Hframe = bookHisto1D("jet_bb_angle_Hframe", 50, 0, M_PI);
_h_jet_bb_cosangle_Hframe = bookHisto1D("jet_bb_cosangle_Hframe", 50, -1, 1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const double JETPTCUT = 30*GeV;
const ZFinder& zeefinder = applyProjection<ZFinder>(event, "ZeeFinder");
const ZFinder& zmmfinder = applyProjection<ZFinder>(event, "ZmmFinder");
const WFinder& wefinder = applyProjection<WFinder>(event, "WeFinder");
const WFinder& wmfinder = applyProjection<WFinder>(event, "WmFinder");
Jets jets = applyProjection<FastJets>(event, "AntiKT04").jetsByPt(JETPTCUT);
Particles vectorBosons = zeefinder.bosons();
/// @todo Don't we have a neater vector concatenation?
vectorBosons.insert(vectorBosons.end(), zmmfinder.bosons().begin(), zmmfinder.bosons().end());
vectorBosons.insert(vectorBosons.end(), wefinder.bosons().begin(), wefinder.bosons().end());
vectorBosons.insert(vectorBosons.end(), wmfinder.bosons().begin(), wmfinder.bosons().end());
_h_Z_multiplicity->fill(zeefinder.bosons().size() + zmmfinder.bosons().size(), weight);
_h_W_multiplicity->fill(wefinder.bosons().size() + wmfinder.bosons().size(), weight);
_h_jet_multiplicity->fill(jets.size(), weight);
// Identify the b-jets
Jets bjets;
foreach (const Jet& jet, jets) {
const double jetEta = jet.eta();
const double jetPhi = jet.momentum().phi();
const double jetPt = jet.pT();
_h_jet_eta->fill(jetEta, weight);
_h_jet_phi->fill(jetPhi, weight);
_h_jet_pT->fill(jetPt/GeV, weight);
if (jet.containsBottom() && jet.pT() > JETPTCUT) {
bjets.push_back(jet);
_h_jet_b_jet_eta->fill( jetEta , weight );
_h_jet_b_jet_phi->fill( jetPhi , weight );
_h_jet_b_jet_pT->fill( jetPt , weight );
}
}
_h_jet_b_jet_multiplicity->fill(bjets.size(), weight);
// Plot vector boson properties
foreach (const Particle& v, vectorBosons) {
_h_VB_phi->fill(v.momentum().phi(), weight);
_h_VB_pT->fill(v.pT(), weight);
_h_VB_eta->fill(v.eta(), weight);
_h_VB_mass->fill(v.momentum().mass(), weight);
}
// rest of analysis requires at least 1 b jets
if(bjets.empty()) vetoEvent;
// Construct Higgs candidates from pairs of b-jets
for (size_t i = 0; i < bjets.size()-1; ++i) {
for (size_t j = i+1; j < bjets.size(); ++j) {
const Jet& jet1 = bjets[i];
const Jet& jet2 = bjets[j];
const double deltaEtaJJ = fabs(jet1.eta() - jet2.eta());
const double deltaPhiJJ = deltaPhi(jet1.momentum(), jet2.momentum());
const double deltaRJJ = deltaR(jet1.momentum(), jet2.momentum());
const double deltaPtJJ = fabs(jet1.pT() - jet2.pT());
_h_jet_bb_Delta_eta->fill(deltaEtaJJ, weight);
_h_jet_bb_Delta_phi->fill(deltaPhiJJ, weight);
_h_jet_bb_Delta_pT->fill(deltaPtJJ, weight);
_h_jet_bb_Delta_R->fill(deltaRJJ, weight);
const FourMomentum phiggs = jet1.momentum() + jet2.momentum();
_h_jet_H_eta_using_bb->fill(phiggs.eta(), weight);
_h_jet_H_mass_using_bb->fill(phiggs.mass(), weight);
_h_jet_H_phi_using_bb->fill(phiggs.phi(), weight);
_h_jet_H_pT_using_bb->fill(phiggs.pT(), weight);
foreach (const Particle& v, vectorBosons) {
const double deltaEtaVH = fabs(phiggs.eta() - v.eta());
const double deltaPhiVH = deltaPhi(phiggs, v.momentum());
const double deltaRVH = deltaR(phiggs, v.momentum());
const double deltaPtVH = fabs(phiggs.pT() - v.pT());
_h_jet_VBbb_Delta_eta->fill(deltaEtaVH, weight);
_h_jet_VBbb_Delta_phi->fill(deltaPhiVH, weight);
_h_jet_VBbb_Delta_pT->fill(deltaPtVH, weight);
_h_jet_VBbb_Delta_R->fill(deltaRVH, weight);
// Calculate boost angles
const vector<double> angles = boostAngles(jet1.momentum(), jet2.momentum(), v.momentum());
_h_jet_bVB_angle_Hframe->fill(angles[0], weight);
_h_jet_bb_angle_Hframe->fill(angles[1], weight);
_h_jet_bVB_cosangle_Hframe->fill(cos(angles[0]), weight);
_h_jet_bb_cosangle_Hframe->fill(cos(angles[1]), weight);
}
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
scale(_h_jet_bb_Delta_eta, crossSection()/sumOfWeights());
scale(_h_jet_bb_Delta_phi, crossSection()/sumOfWeights());
scale(_h_jet_bb_Delta_pT, crossSection()/sumOfWeights());
scale(_h_jet_bb_Delta_R, crossSection()/sumOfWeights());
scale(_h_jet_b_jet_eta, crossSection()/sumOfWeights());
scale(_h_jet_b_jet_multiplicity, crossSection()/sumOfWeights());
scale(_h_jet_b_jet_phi, crossSection()/sumOfWeights());
scale(_h_jet_b_jet_pT, crossSection()/sumOfWeights());
scale(_h_jet_H_eta_using_bb, crossSection()/sumOfWeights());
scale(_h_jet_H_mass_using_bb, crossSection()/sumOfWeights());
scale(_h_jet_H_phi_using_bb, crossSection()/sumOfWeights());
scale(_h_jet_H_pT_using_bb, crossSection()/sumOfWeights());
scale(_h_jet_eta, crossSection()/sumOfWeights());
scale(_h_jet_multiplicity, crossSection()/sumOfWeights());
scale(_h_jet_phi, crossSection()/sumOfWeights());
scale(_h_jet_pT, crossSection()/sumOfWeights());
scale(_h_jet_VBbb_Delta_eta, crossSection()/sumOfWeights());
scale(_h_jet_VBbb_Delta_phi, crossSection()/sumOfWeights());
scale(_h_jet_VBbb_Delta_pT, crossSection()/sumOfWeights());
scale(_h_jet_VBbb_Delta_R, crossSection()/sumOfWeights());
scale(_h_VB_eta, crossSection()/sumOfWeights());
scale(_h_VB_mass, crossSection()/sumOfWeights());
scale(_h_Z_multiplicity, crossSection()/sumOfWeights());
scale(_h_W_multiplicity, crossSection()/sumOfWeights());
scale(_h_VB_phi, crossSection()/sumOfWeights());
scale(_h_VB_pT, crossSection()/sumOfWeights());
scale(_h_jet_bVB_angle_Hframe, crossSection()/sumOfWeights());
scale(_h_jet_bb_angle_Hframe, crossSection()/sumOfWeights());
scale(_h_jet_bVB_cosangle_Hframe, crossSection()/sumOfWeights());
scale(_h_jet_bb_cosangle_Hframe, crossSection()/sumOfWeights());
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_Z_multiplicity, _h_W_multiplicity;
Histo1DPtr _h_jet_bb_Delta_eta, _h_jet_bb_Delta_phi, _h_jet_bb_Delta_pT, _h_jet_bb_Delta_R;
Histo1DPtr _h_jet_b_jet_eta, _h_jet_b_jet_multiplicity, _h_jet_b_jet_phi, _h_jet_b_jet_pT;
Histo1DPtr _h_jet_H_eta_using_bb, _h_jet_H_mass_using_bb, _h_jet_H_phi_using_bb, _h_jet_H_pT_using_bb;
Histo1DPtr _h_jet_eta, _h_jet_multiplicity, _h_jet_phi, _h_jet_pT;
Histo1DPtr _h_jet_VBbb_Delta_eta, _h_jet_VBbb_Delta_phi, _h_jet_VBbb_Delta_pT, _h_jet_VBbb_Delta_R;
Histo1DPtr _h_VB_eta, _h_VB_mass, _h_VB_phi, _h_VB_pT;
Histo1DPtr _h_jet_bVB_angle_Hframe, _h_jet_bb_angle_Hframe, _h_jet_bVB_cosangle_Hframe, _h_jet_bb_cosangle_Hframe;
//Histo1DPtr _h_jet_cuts_bb_deltaR_v_HpT;
//@}
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_VH2BB);
}
diff --git a/src/Analyses/MC_ZINC.cc b/src/Analyses/MC_ZINC.cc
--- a/src/Analyses/MC_ZINC.cc
+++ b/src/Analyses/MC_ZINC.cc
@@ -1,94 +1,95 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
/// @brief MC validation analysis for Z events
class MC_ZINC : public Analysis {
public:
/// Default constructor
MC_ZINC()
: Analysis("MC_ZINC")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zfinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
_h_Z_mass = bookHisto1D("Z_mass", 50, 66.0, 116.0);
_h_Z_pT = bookHisto1D("Z_pT", logspace(100, 1.0, 0.5*sqrtS()));
_h_Z_pT_peak = bookHisto1D("Z_pT_peak", 25, 0.0, 25.0);
_h_Z_y = bookHisto1D("Z_y", 40, -4.0, 4.0);
_h_Z_phi = bookHisto1D("Z_phi", 25, 0.0, TWOPI);
_h_lepton_pT = bookHisto1D("lepton_pT", logspace(100, 10.0, 0.25*sqrtS()));
_h_lepton_eta = bookHisto1D("lepton_eta", 40, -4.0, 4.0);
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()!=1) {
vetoEvent;
}
const double weight = e.weight();
FourMomentum zmom(zfinder.bosons()[0].momentum());
_h_Z_mass->fill(zmom.mass(),weight);
_h_Z_pT->fill(zmom.pT(),weight);
_h_Z_pT_peak->fill(zmom.pT(),weight);
_h_Z_y->fill(zmom.rapidity(),weight);
_h_Z_phi->fill(zmom.azimuthalAngle(),weight);
foreach (const Particle& l, zfinder.constituents()) {
_h_lepton_pT->fill(l.pT(), weight);
_h_lepton_eta->fill(l.eta(), weight);
}
}
/// Finalize
void finalize() {
scale(_h_Z_mass, crossSection()/sumOfWeights());
scale(_h_Z_pT, crossSection()/sumOfWeights());
scale(_h_Z_pT_peak, crossSection()/sumOfWeights());
scale(_h_Z_y, crossSection()/sumOfWeights());
scale(_h_Z_phi, crossSection()/sumOfWeights());
scale(_h_lepton_pT, crossSection()/sumOfWeights());
scale(_h_lepton_eta, crossSection()/sumOfWeights());
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_Z_mass;
Histo1DPtr _h_Z_pT;
Histo1DPtr _h_Z_pT_peak;
Histo1DPtr _h_Z_y;
Histo1DPtr _h_Z_phi;
Histo1DPtr _h_lepton_pT;
Histo1DPtr _h_lepton_eta;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZINC);
}
diff --git a/src/Analyses/MC_ZJETS.cc b/src/Analyses/MC_ZJETS.cc
--- a/src/Analyses/MC_ZJETS.cc
+++ b/src/Analyses/MC_ZJETS.cc
@@ -1,84 +1,85 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetAnalysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief MC validation analysis for Z + jets events
class MC_ZJETS : public MC_JetAnalysis {
public:
/// Default constructor
MC_ZJETS()
: MC_JetAnalysis("MC_ZJETS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zfinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
FastJets jetpro(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.4);
addProjection(jetpro, "Jets");
_h_Z_jet1_deta = bookHisto1D("Z_jet1_deta", 50, -5.0, 5.0);
_h_Z_jet1_dR = bookHisto1D("Z_jet1_dR", 25, 0.5, 7.0);
MC_JetAnalysis::init();
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()!=1) {
vetoEvent;
}
const double weight = e.weight();
FourMomentum zmom(zfinder.bosons()[0].momentum());
const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(m_jetptcut);
if (jets.size() > 0) {
_h_Z_jet1_deta->fill(zmom.eta()-jets[0].eta(), weight);
_h_Z_jet1_dR->fill(deltaR(zmom, jets[0].momentum()), weight);
}
MC_JetAnalysis::analyze(e);
}
/// Finalize
void finalize() {
scale(_h_Z_jet1_deta, crossSection()/sumOfWeights());
scale(_h_Z_jet1_dR, crossSection()/sumOfWeights());
MC_JetAnalysis::finalize();
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_Z_jet1_deta;
Histo1DPtr _h_Z_jet1_dR;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZJETS);
}
diff --git a/src/Analyses/MC_ZKTSPLITTINGS.cc b/src/Analyses/MC_ZKTSPLITTINGS.cc
--- a/src/Analyses/MC_ZKTSPLITTINGS.cc
+++ b/src/Analyses/MC_ZKTSPLITTINGS.cc
@@ -1,60 +1,61 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetSplittings.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @brief MC validation analysis for Z + jets events
class MC_ZKTSPLITTINGS : public MC_JetSplittings {
public:
/// Default constructor
MC_ZKTSPLITTINGS()
: MC_JetSplittings("MC_ZKTSPLITTINGS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zfinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zfinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
FastJets jetpro(zfinder.remainingFinalState(), FastJets::KT, 0.6);
addProjection(jetpro, "Jets");
MC_JetSplittings::init();
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()!=1) {
vetoEvent;
}
MC_JetSplittings::analyze(e);
}
/// Finalize
void finalize() {
MC_JetSplittings::finalize();
}
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZKTSPLITTINGS);
}
diff --git a/src/Analyses/MC_ZZINC.cc b/src/Analyses/MC_ZZINC.cc
--- a/src/Analyses/MC_ZZINC.cc
+++ b/src/Analyses/MC_ZZINC.cc
@@ -1,186 +1,187 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @brief MC validation analysis for Z[ee]Z[mumu] events
class MC_ZZINC : public Analysis {
public:
/// Default constructor
MC_ZZINC()
: Analysis("MC_ZZINC")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zeefinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zeefinder, "ZeeFinder");
VetoedFinalState zmminput;
zmminput.addVetoOnThisFinalState(zeefinder);
- ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ ZFinder zmmfinder(zmminput, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zmmfinder, "ZmmFinder");
// properties of the pair momentum
_h_ZZ_pT = bookHisto1D("ZZ_pT", logspace(100, 1.0, 0.5*sqrtS()));
_h_ZZ_pT_peak = bookHisto1D("ZZ_pT_peak", 25, 0.0, 25.0);
_h_ZZ_eta = bookHisto1D("ZZ_eta", 40, -7.0, 7.0);
_h_ZZ_phi = bookHisto1D("ZZ_phi", 25, 0.0, TWOPI);
_h_ZZ_m = bookHisto1D("ZZ_m", logspace(100, 150.0, 180.0+0.25*sqrtS()));
// correlations between the ZZ
_h_ZZ_dphi = bookHisto1D("ZZ_dphi", 25, 0.0, PI); /// @todo non-linear?
_h_ZZ_deta = bookHisto1D("ZZ_deta", 25, -7.0, 7.0);
_h_ZZ_dR = bookHisto1D("ZZ_dR", 25, 0.5, 7.0);
_h_ZZ_dpT = bookHisto1D("ZZ_dpT", logspace(100, 1.0, 0.5*sqrtS()));
_h_ZZ_costheta_planes = bookHisto1D("ZZ_costheta_planes", 25, -1.0, 1.0);
// properties of the Z bosons
_h_Z_pT = bookHisto1D("Z_pT", logspace(100, 10.0, 0.25*sqrtS()));
_h_Z_eta = bookHisto1D("Z_eta", 70, -7.0, 7.0);
// properties of the leptons
_h_Zl_pT = bookHisto1D("Zl_pT", logspace(100, 30.0, 0.1
*sqrtS()));
_h_Zl_eta = bookHisto1D("Zl_eta", 40, -3.5, 3.5);
// correlations between the opposite charge leptons
_h_ZeZm_dphi = bookHisto1D("ZeZm_dphi", 25, 0.0, PI);
_h_ZeZm_deta = bookHisto1D("ZeZm_deta", 25, -5.0, 5.0);
_h_ZeZm_dR = bookHisto1D("ZeZm_dR", 25, 0.5, 5.0);
_h_ZeZm_m = bookHisto1D("ZeZm_m", 100, 0.0, 300.0);
}
/// Do the analysis
void analyze(const Event & e) {
const double weight = e.weight();
const ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder");
if (zeefinder.bosons().size()!=1) {
vetoEvent;
}
const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder");
if (zmmfinder.bosons().size()!=1) {
vetoEvent;
}
FourMomentum zee(zeefinder.bosons()[0].momentum());
FourMomentum zmm(zmmfinder.bosons()[0].momentum());
FourMomentum zz(zee+zmm);
// find leptons
FourMomentum ep(zeefinder.constituents()[0].momentum()),
em(zeefinder.constituents()[1].momentum()),
mp(zmmfinder.constituents()[0].momentum()),
mm(zmmfinder.constituents()[1].momentum());
_h_ZZ_pT->fill(zz.pT(),weight);
_h_ZZ_pT_peak->fill(zz.pT(),weight);
_h_ZZ_eta->fill(zz.eta(),weight);
_h_ZZ_phi->fill(zz.azimuthalAngle(),weight);
double mzz2=zz.mass2();
if (mzz2>0.0) _h_ZZ_m->fill(sqrt(mzz2), weight);
_h_ZZ_dphi->fill(mapAngle0ToPi(zee.phi()-zmm.phi()), weight);
_h_ZZ_deta->fill(zee.eta()-zmm.eta(), weight);
_h_ZZ_dR->fill(deltaR(zee,zmm), weight);
_h_ZZ_dpT->fill(fabs(zee.pT()-zmm.pT()), weight);
Vector3 crossZee = ep.vector3().cross(em.vector3());
Vector3 crossZmm = mp.vector3().cross(mm.vector3());
double costheta = crossZee.dot(crossZmm)/crossZee.mod()/crossZmm.mod();
_h_ZZ_costheta_planes->fill(costheta, weight);
_h_Z_pT->fill(zee.pT(),weight);
_h_Z_pT->fill(zmm.pT(),weight);
_h_Z_eta->fill(zee.eta(),weight);
_h_Z_eta->fill(zmm.eta(),weight);
_h_Zl_pT->fill(ep.pT(), weight);
_h_Zl_pT->fill(em.pT(), weight);
_h_Zl_pT->fill(mp.pT(), weight);
_h_Zl_pT->fill(mm.pT(), weight);
_h_Zl_eta->fill(ep.eta(), weight);
_h_Zl_eta->fill(em.eta(), weight);
_h_Zl_eta->fill(mp.eta(), weight);
_h_Zl_eta->fill(mm.eta(), weight);
_h_ZeZm_dphi->fill(mapAngle0ToPi(ep.phi()-mm.phi()), weight);
_h_ZeZm_deta->fill(ep.eta()-mm.eta(), weight);
_h_ZeZm_dR->fill(deltaR(ep,mm), weight);
double m2=FourMomentum(ep+mm).mass2();
if (m2 < 0) m2 = 0.0;
_h_ZeZm_m->fill(sqrt(m2), weight);
}
/// Finalize
void finalize() {
double norm=crossSection()/sumOfWeights();
scale(_h_ZZ_pT, norm);
scale(_h_ZZ_pT_peak, norm);
scale(_h_ZZ_eta, norm);
scale(_h_ZZ_phi, norm);
scale(_h_ZZ_m, norm);
scale(_h_ZZ_dphi, norm);
scale(_h_ZZ_deta, norm);
scale(_h_ZZ_dR, norm);
scale(_h_ZZ_dpT, norm);
scale(_h_ZZ_costheta_planes, norm);
scale(_h_Z_pT, norm);
scale(_h_Z_eta, norm);
scale(_h_Zl_pT, norm);
scale(_h_Zl_eta, norm);
scale(_h_ZeZm_dphi, norm);
scale(_h_ZeZm_deta, norm);
scale(_h_ZeZm_dR, norm);
scale(_h_ZeZm_m, norm);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_ZZ_pT;
Histo1DPtr _h_ZZ_pT_peak;
Histo1DPtr _h_ZZ_eta;
Histo1DPtr _h_ZZ_phi;
Histo1DPtr _h_ZZ_m;
Histo1DPtr _h_ZZ_dphi;
Histo1DPtr _h_ZZ_deta;
Histo1DPtr _h_ZZ_dR;
Histo1DPtr _h_ZZ_dpT;
Histo1DPtr _h_ZZ_costheta_planes;
Histo1DPtr _h_Z_pT;
Histo1DPtr _h_Z_eta;
Histo1DPtr _h_Zl_pT;
Histo1DPtr _h_Zl_eta;
Histo1DPtr _h_ZeZm_dphi;
Histo1DPtr _h_ZeZm_deta;
Histo1DPtr _h_ZeZm_dR;
Histo1DPtr _h_ZeZm_m;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZZINC);
}
diff --git a/src/Analyses/MC_ZZJETS.cc b/src/Analyses/MC_ZZJETS.cc
--- a/src/Analyses/MC_ZZJETS.cc
+++ b/src/Analyses/MC_ZZJETS.cc
@@ -1,117 +1,118 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetAnalysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @brief MC validation analysis for Z[ee]Z[mumu] + jets events
class MC_ZZJETS : public MC_JetAnalysis {
public:
/// Default constructor
MC_ZZJETS()
: MC_JetAnalysis("MC_ZZJETS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zeefinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zeefinder, "ZeeFinder");
VetoedFinalState zmminput;
zmminput.addVetoOnThisFinalState(zeefinder);
- ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ ZFinder zmmfinder(zmminput, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zmmfinder, "ZmmFinder");
VetoedFinalState jetinput;
jetinput
.addVetoOnThisFinalState(zeefinder)
.addVetoOnThisFinalState(zmmfinder);
FastJets jetpro(jetinput, FastJets::ANTIKT, 0.4);
addProjection(jetpro, "Jets");
// correlations with jets
_h_ZZ_jet1_deta = bookHisto1D("ZZ_jet1_deta", 70, -7.0, 7.0);
_h_ZZ_jet1_dR = bookHisto1D("ZZ_jet1_dR", 25, 1.5, 7.0);
_h_Ze_jet1_dR = bookHisto1D("Ze_jet1_dR", 25, 0.0, 7.0);
// global stuff
_h_HT = bookHisto1D("HT", logspace(100, 100.0, 0.5*sqrtS()));
MC_JetAnalysis::init();
}
/// Do the analysis
void analyze(const Event & e) {
const double weight = e.weight();
const ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder");
if (zeefinder.bosons().size() != 1) vetoEvent;
const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder");
if (zmmfinder.bosons().size() != 1) vetoEvent;
FourMomentum zee = zeefinder.bosons()[0].momentum();
FourMomentum zmm = zmmfinder.bosons()[0].momentum();
FourMomentum zz = zee + zmm;
// find leptons
FourMomentum ep = zeefinder.constituents()[0].momentum();
FourMomentum em = zeefinder.constituents()[1].momentum();
FourMomentum mp = zmmfinder.constituents()[0].momentum();
FourMomentum mm = zmmfinder.constituents()[1].momentum();
const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(m_jetptcut);
if (jets.size() > 0) {
_h_ZZ_jet1_deta->fill(zz.eta()-jets[0].eta(), weight);
_h_ZZ_jet1_dR->fill(deltaR(zz, jets[0].momentum()), weight);
_h_Ze_jet1_dR->fill(deltaR(ep, jets[0].momentum()), weight);
}
double HT = ep.pT() + em.pT() + mp.pT() + mm.pT();
foreach (const Jet& jet, jets) HT += jet.pT();
if (HT > 0.0) _h_HT->fill(HT/GeV, weight);
MC_JetAnalysis::analyze(e);
}
/// Finalize
void finalize() {
const double norm = crossSection()/sumOfWeights();
scale(_h_ZZ_jet1_deta, norm);
scale(_h_ZZ_jet1_dR, norm);
scale(_h_Ze_jet1_dR, norm);
scale(_h_HT, norm);
MC_JetAnalysis::finalize();
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_ZZ_jet1_deta;
Histo1DPtr _h_ZZ_jet1_dR;
Histo1DPtr _h_Ze_jet1_dR;
Histo1DPtr _h_HT;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZZJETS);
}
diff --git a/src/Analyses/MC_ZZKTSPLITTINGS.cc b/src/Analyses/MC_ZZKTSPLITTINGS.cc
--- a/src/Analyses/MC_ZZKTSPLITTINGS.cc
+++ b/src/Analyses/MC_ZZKTSPLITTINGS.cc
@@ -1,74 +1,75 @@
// -*- C++ -*-
#include "Rivet/Analyses/MC_JetSplittings.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @brief MC validation analysis for Z[ee]Z[mumu] + jets events
class MC_ZZKTSPLITTINGS : public MC_JetSplittings {
public:
/// Default constructor
MC_ZZKTSPLITTINGS()
: MC_JetSplittings("MC_ZZKTSPLITTINGS", 4, "Jets")
{ }
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
- ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ Cut cut = EtaIn(-3.5,3.5) & (Cuts::pT >= 25.0*GeV);
+ ZFinder zeefinder(fs, cut, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zeefinder, "ZeeFinder");
VetoedFinalState zmminput;
zmminput.addVetoOnThisFinalState(zeefinder);
- ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
+ ZFinder zmmfinder(zmminput, cut, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zmmfinder, "ZmmFinder");
VetoedFinalState jetinput;
jetinput
.addVetoOnThisFinalState(zeefinder)
.addVetoOnThisFinalState(zmmfinder);
FastJets jetpro(jetinput, FastJets::KT, 0.6);
addProjection(jetpro, "Jets");
MC_JetSplittings::init();
}
/// Do the analysis
void analyze(const Event & e) {
const ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder");
if (zeefinder.bosons().size()!=1) {
vetoEvent;
}
const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder");
if (zmmfinder.bosons().size()!=1) {
vetoEvent;
}
MC_JetSplittings::analyze(e);
}
/// Finalize
void finalize() {
MC_JetSplittings::finalize();
}
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(MC_ZZKTSPLITTINGS);
}
diff --git a/src/Projections/WFinder.cc b/src/Projections/WFinder.cc
--- a/src/Projections/WFinder.cc
+++ b/src/Projections/WFinder.cc
@@ -1,227 +1,152 @@
// -*- C++ -*-
#include "Rivet/Projections/WFinder.hh"
#include "Rivet/Projections/InvMassFinalState.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/MergedFinalState.hh"
#include "Rivet/Projections/LeptonClusters.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
-
WFinder::WFinder(const FinalState& inputfs,
- double etaMin, double etaMax,
- double pTmin,
+ Cut fsCut,
PdgId pid,
double minmass, double maxmass,
double missingET,
double dRmax, bool clusterPhotons, bool trackPhotons,
double masstarget,
- bool useTransverseMass) {
- Cut eta = Range( Cuts::eta, etaMin, etaMax );
- Cut pt = Cuts::pT >= pTmin;
- _init(inputfs, eta & pt, pid, minmass, maxmass, missingET,
- dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
- }
-
- WFinder::WFinder(const FinalState& inputfs,
- Cut cuts,
- PdgId pid,
- double minmass, double maxmass,
- double missingET,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget,
- bool useTransverseMass) {
- _init(inputfs, cuts, pid, minmass, maxmass, missingET,
- dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
- }
-
-
- // WFinder::WFinder(const FinalState& inputfs,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, double maxmass,
- // double missingET,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget,
- // bool useTransverseMass) {
- // _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET,
- // dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
- // }
-
-
- // WFinder::WFinder(double etaMin, double etaMax,
- // double pTmin,
- // PdgId pid,
- // double minmass, double maxmass,
- // double missingET,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget,
- // bool useTransverseMass) {
- // Cut eta = Range( Cuts::eta, etaMin, etaMax );
- // Cut pt = Cuts::pT >= pTmin;
- // FinalState inputfs;
- // _init(inputfs, eta & pt, pTmin, pid, minmass, maxmass, missingET,
- // dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
- // }
-
-
- // WFinder::WFinder(const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, double maxmass,
- // double missingET,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget,
- // bool useTransverseMass) {
- // FinalState inputfs;
- // _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET,
- // dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
- // }
-
-
- void WFinder::_init(const FinalState& inputfs,
- Cut fsCut,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double missingET,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget,
- bool useTransverseMass)
+ bool useTransverseMass)
{
setName("WFinder");
_minmass = minmass;
_maxmass = maxmass;
_masstarget = masstarget;
_pid = pid;
_trackPhotons = trackPhotons;
_useTransverseMass = useTransverseMass;
// Check that the arguments are legal
assert(abs(_pid) == PID::ELECTRON || abs(_pid) == PID::MUON);
_nu_pid = abs(_pid) + 1;
assert(abs(_nu_pid) == PID::NU_E || abs(_nu_pid) == PID::NU_MU);
// Don't make pT or eta cuts on the neutrino
IdentifiedFinalState neutrinos(inputfs);
neutrinos.acceptNeutrinos();
addProjection(neutrinos, "Neutrinos");
// Lepton clusters
IdentifiedFinalState bareleptons(inputfs);
bareleptons.acceptIdPair(pid);
LeptonClusters leptons(inputfs, bareleptons, dRmax,
clusterPhotons, fsCut); //etaRanges, pTmin);
addProjection(leptons, "LeptonClusters");
// Add MissingMomentum proj to calc MET
MissingMomentum vismom(inputfs);
addProjection(vismom, "MissingET");
// Set ETmiss
_etMiss = missingET;
VetoedFinalState remainingFS;
remainingFS.addVetoOnThisFinalState(*this);
addProjection(remainingFS, "RFS");
}
/////////////////////////////////////////////////////
const FinalState& WFinder::remainingFinalState() const {
return getProjection<FinalState>("RFS");
}
int WFinder::compare(const Projection& p) const {
PCmp LCcmp = mkNamedPCmp(p, "LeptonClusters");
if (LCcmp != EQUIVALENT) return LCcmp;
const WFinder& other = dynamic_cast<const WFinder&>(p);
return (cmp(_minmass, other._minmass) || cmp(_maxmass, other._maxmass) ||
cmp(_useTransverseMass, other._useTransverseMass) ||
cmp(_etMiss, other._etMiss) ||
cmp(_pid, other._pid) || cmp(_trackPhotons, other._trackPhotons));
}
void WFinder::project(const Event& e) {
clear();
const LeptonClusters& leptons = applyProjection<LeptonClusters>(e, "LeptonClusters");
const FinalState& neutrinos = applyProjection<FinalState>(e, "Neutrinos");
// Make and register an invariant mass final state for the W decay leptons
vector<pair<PdgId, PdgId> > l_nu_ids;
l_nu_ids += make_pair(abs(_pid), -abs(_nu_pid));
l_nu_ids += make_pair(-abs(_pid), abs(_nu_pid));
InvMassFinalState imfs(l_nu_ids, _minmass, _maxmass, _masstarget);
imfs.useTransverseMass(_useTransverseMass);
Particles tmp;
tmp.insert(tmp.end(), leptons.clusteredLeptons().begin(), leptons.clusteredLeptons().end());
tmp.insert(tmp.end(), neutrinos.particles().begin(), neutrinos.particles().end());
imfs.calc(tmp);
if (imfs.particlePairs().size() < 1) return;
ParticlePair Wconstituents(imfs.particlePairs()[0]);
Particle p1(Wconstituents.first), p2(Wconstituents.second);
if (PID::threeCharge(p1)==0) {
_constituentLeptons += p2;
_constituentNeutrinos += p1;
} else {
_constituentLeptons += p1;
_constituentNeutrinos += p2;
}
FourMomentum pW = p1.momentum() + p2.momentum();
const int w3charge = PID::threeCharge(p1) + PID::threeCharge(p2);
assert(abs(w3charge) == 3);
const int wcharge = w3charge/3;
stringstream msg;
string wsign = (wcharge == 1) ? "+" : "-";
string wstr = "W" + wsign;
msg << wstr << " reconstructed from: " << "\n"
<< " " << p1.momentum() << " " << p1.pdgId() << "\n"
<< " + " << p2.momentum() << " " << p2.pdgId();
MSG_DEBUG(msg.str());
// Check missing ET
const MissingMomentum& vismom = applyProjection<MissingMomentum>(e, "MissingET");
/// @todo Restrict missing momentum eta range? Use vectorET()?
if (vismom.scalarEt() < _etMiss) {
MSG_DEBUG("Not enough missing ET: " << vismom.scalarEt()/GeV
<< " GeV vs. " << _etMiss/GeV << " GeV");
return;
}
// Make W Particle and insert into particles list
const PdgId wpid = (wcharge == 1) ? PID::WPLUSBOSON : PID::WMINUSBOSON;
_bosons.push_back(Particle(wpid, pW));
// Find the LeptonClusters and neutrinos which survived the IMFS cut such that we can
// extract their original particles
foreach (const Particle& p, _constituentNeutrinos) {
_theParticles.push_back(p);
}
foreach (const Particle& p, _constituentLeptons) {
foreach (const ClusteredLepton& l, leptons.clusteredLeptons()) {
if (p.pdgId()==l.pdgId() && p.momentum()==l.momentum()) {
_theParticles.push_back(l.constituentLepton());
if (_trackPhotons) {
_theParticles.insert(_theParticles.end(),
l.constituentPhotons().begin(), l.constituentPhotons().end());
}
}
}
}
}
}
diff --git a/src/Projections/ZFinder.cc b/src/Projections/ZFinder.cc
--- a/src/Projections/ZFinder.cc
+++ b/src/Projections/ZFinder.cc
@@ -1,161 +1,102 @@
// -*- C++ -*-
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/InvMassFinalState.hh"
#include "Rivet/Projections/LeptonClusters.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
ZFinder::ZFinder(const FinalState& inputfs,
- Cut cuts,
+ Cut fsCut,
PdgId pid,
double minmass, double maxmass,
double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget) {
- _init(inputfs, cuts,
- pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
- }
-
- ZFinder::ZFinder(const FinalState& inputfs,
- double etaMin, double etaMax,
- double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget) {
- Cut eta = Range( Cuts::eta, etaMin, etaMax );
- Cut pt = Cuts::pT >= pTmin;
- _init(inputfs, eta & pt, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
- }
-
-
- // ZFinder::ZFinder(const FinalState& inputfs,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, const double maxmass,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget) {
- // _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
- // }
-
-
- // ZFinder::ZFinder(double etaMin, double etaMax,
- // double pTmin,
- // PdgId pid,
- // double minmass, double maxmass,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget) {
- // vector<pair<double, double> > etaRanges;
- // etaRanges += std::make_pair(etaMin, etaMax);
- // FinalState inputfs;
- // _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
- // }
-
-
- // ZFinder::ZFinder(const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- // PdgId pid,
- // double minmass, const double maxmass,
- // double dRmax, bool clusterPhotons, bool trackPhotons,
- // double masstarget) {
- // FinalState inputfs;
- // _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
- // }
-
- void ZFinder::_init(const FinalState& inputfs, Cut fsCut,
- // const std::vector<std::pair<double, double> >& etaRanges,
- // double pTmin,
- PdgId pid,
- double minmass, double maxmass,
- double dRmax, bool clusterPhotons, bool trackPhotons,
- double masstarget)
+ double masstarget)
{
setName("ZFinder");
_minmass = minmass;
_maxmass = maxmass;
_masstarget = masstarget;
_pid = pid;
_trackPhotons = trackPhotons;
IdentifiedFinalState bareleptons(inputfs);
bareleptons.acceptIdPair(pid);
LeptonClusters leptons(inputfs, bareleptons, dRmax,
clusterPhotons, fsCut);
- // etaRanges, pTmin);
addProjection(leptons, "LeptonClusters");
VetoedFinalState remainingFS;
remainingFS.addVetoOnThisFinalState(*this);
addProjection(remainingFS, "RFS");
}
/////////////////////////////////////////////////////
const FinalState& ZFinder::remainingFinalState() const
{
return getProjection<FinalState>("RFS");
}
int ZFinder::compare(const Projection& p) const {
PCmp LCcmp = mkNamedPCmp(p, "LeptonClusters");
if (LCcmp != EQUIVALENT) return LCcmp;
const ZFinder& other = dynamic_cast<const ZFinder&>(p);
return (cmp(_minmass, other._minmass) || cmp(_maxmass, other._maxmass) ||
cmp(_pid, other._pid) || cmp(_trackPhotons, other._trackPhotons));
}
void ZFinder::project(const Event& e) {
clear();
const LeptonClusters& leptons = applyProjection<LeptonClusters>(e, "LeptonClusters");
InvMassFinalState imfs(std::make_pair(_pid, -_pid), _minmass, _maxmass, _masstarget);
Particles tmp;
tmp.insert(tmp.end(), leptons.clusteredLeptons().begin(), leptons.clusteredLeptons().end());
imfs.calc(tmp);
if (imfs.particlePairs().size() < 1) return;
ParticlePair Zconstituents(imfs.particlePairs()[0]);
Particle l1(Zconstituents.first), l2(Zconstituents.second);
if (PID::threeCharge(l1)>0.0) {
_constituents += l1, l2;
}
else {
_constituents += l2, l1;
}
FourMomentum pZ = l1.momentum() + l2.momentum();
const int z3charge = PID::threeCharge(l1.pdgId()) + PID::threeCharge(l2.pdgId());
assert(z3charge == 0);
stringstream msg;
msg << "Z reconstructed from: \n"
<< " " << l1.momentum() << " " << l1.pdgId() << "\n"
<< " + " << l2.momentum() << " " << l2.pdgId();
MSG_DEBUG(msg.str());
_bosons.push_back(Particle(PID::ZBOSON, pZ));
// Find the LeptonClusters which survived the IMFS cut such that we can
// extract their original particles
foreach (const Particle& p, _constituents) {
foreach (const ClusteredLepton& l, leptons.clusteredLeptons()) {
if (p.pdgId()==l.pdgId() && p.momentum()==l.momentum()) {
_theParticles.push_back(l.constituentLepton());
if (_trackPhotons) {
_theParticles.insert(_theParticles.end(),
l.constituentPhotons().begin(), l.constituentPhotons().end());
}
}
}
}
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 7:13 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805781
Default Alt Text
(100 KB)

Event Timeline