Page MenuHomeHEPForge

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/include/Rivet/Cuts.hh b/include/Rivet/Cuts.hh
--- a/include/Rivet/Cuts.hh
+++ b/include/Rivet/Cuts.hh
@@ -1,52 +1,62 @@
#ifndef RIVET_Cuts_HH
#define RIVET_Cuts_HH
#include <boost/smart_ptr.hpp>
namespace Rivet {
class Cuttable;
class CutBase {
public:
template <typename T>
bool accept(const T & t);
protected:
virtual bool accept_(const Cuttable & o) const = 0;
public:
virtual ~CutBase() {}
};
typedef boost::shared_ptr<CutBase> Cut;
/// These functions are used to build cuts
namespace Cuts {
enum Quantity {
pt, mass, rap, eta, phi
};
+
+ const Cut & open();
}
Cut operator < (Cuts::Quantity, double);
+ Cut operator > (Cuts::Quantity, double);
+ Cut operator <= (Cuts::Quantity, double);
Cut operator >= (Cuts::Quantity, double);
- Cut In(Cuts::Quantity, double n, double m);
+ Cut Range(Cuts::Quantity, double n, double m);
// overload helpers
inline Cut operator < (Cuts::Quantity qty, int i) {
return qty < double(i);
}
+ inline Cut operator > (Cuts::Quantity qty, int i) {
+ return qty > double(i);
+ }
+ inline Cut operator <= (Cuts::Quantity qty, int i) {
+ return qty <= double(i);
+ }
inline Cut operator >= (Cuts::Quantity qty, int i) {
return qty >= double(i);
}
/// operator &, operator |, operator ~, and operator ^ overloads
Cut operator & (const Cut aptr, const Cut bptr);
Cut operator | (const Cut aptr, const Cut bptr);
Cut operator ~ (const Cut cptr);
Cut operator ^ (const Cut aptr, const Cut bptr);
}
#endif
diff --git a/include/Rivet/Projections/ChargedFinalState.hh b/include/Rivet/Projections/ChargedFinalState.hh
--- a/include/Rivet/Projections/ChargedFinalState.hh
+++ b/include/Rivet/Projections/ChargedFinalState.hh
@@ -1,53 +1,53 @@
// -*- C++ -*-
#ifndef RIVET_ChargedFinalState_HH
#define RIVET_ChargedFinalState_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"
namespace Rivet {
/// @brief Project only charged final state particles.
class ChargedFinalState : public FinalState {
public:
/// @name Constructors
//@{
ChargedFinalState(const FinalState& fsp);
/// Single eta-range constructor.
ChargedFinalState(double mineta = -MAXRAPIDITY,
double maxeta = MAXRAPIDITY,
double minpt = 0.0*GeV);
- /// A constructor which allows to specify multiple eta ranges
- /// and the min \f$ p_T \f$.
- ChargedFinalState(const vector<pair<double, double> >& etaRanges,
- double minpt = 0.0*GeV);
+ // /// A constructor which allows to specify multiple eta ranges
+ // /// and the min \f$ p_T \f$.
+ // ChargedFinalState(const vector<pair<double, double> >& etaRanges,
+ // double minpt = 0.0*GeV);
/// Clone on the heap.
virtual const Projection* clone() const {
return new ChargedFinalState(*this);
}
//@}
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
};
}
#endif
diff --git a/include/Rivet/Projections/FinalState.hh b/include/Rivet/Projections/FinalState.hh
--- a/include/Rivet/Projections/FinalState.hh
+++ b/include/Rivet/Projections/FinalState.hh
@@ -1,139 +1,147 @@
// -*- C++ -*-
#ifndef RIVET_FinalState_HH
#define RIVET_FinalState_HH
#include "Rivet/Projection.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
+#include "Rivet/Cuts.hh"
+
namespace Rivet {
/// @brief Project out all final-state particles in an event.
/// Probably the most important projection in Rivet!
class FinalState : public Projection {
public:
/// @name Standard constructors and destructors.
//@{
/// The default constructor. May specify the minimum and maximum
/// pseudorapidity \f$ \eta \f$ and the min \f$ p_T \f$ (in GeV).
FinalState(double mineta = -MAXRAPIDITY,
double maxeta = MAXRAPIDITY,
double minpt = 0.0*GeV);
- /// A constructor which allows to specify multiple eta ranges
- /// and the min \f$ p_T \f$ (in GeV).
- FinalState(const vector<pair<double, double> >& etaRanges,
- double minpt = 0.0*GeV);
+ /// Testing construction using Cuts object
+ FinalState(Cut c); // = Cuts::open());
+
+ // /// A constructor which allows to specify multiple eta ranges
+ // /// and the min \f$ p_T \f$ (in GeV).
+ // FinalState(const vector<pair<double, double> >& etaRanges,
+ // double minpt = 0.0*GeV);
/// Clone on the heap.
virtual const Projection* clone() const {
return new FinalState(*this);
}
//@}
/// Get the final-state particles.
virtual const Particles& particles() const { return _theParticles; }
/// Get the final-state particles, ordered by supplied sorting function object.
template <typename F>
const Particles& particles(F sorter) const {
std::sort(_theParticles.begin(), _theParticles.end(), sorter);
return _theParticles;
}
/// Get the final-state particles, ordered by decreasing \f$ p_T \f$.
const Particles& particlesByPt() const {
return particles(cmpParticleByPt);
}
/// Get the final-state particles, ordered by decreasing \f$ p \f$.
const Particles& particlesByP() const {
return particles(cmpParticleByP);
}
/// Get the final-state particles, ordered by decreasing \f$ E \f$.
const Particles& particlesByE() const {
return particles(cmpParticleByE);
}
/// Get the final-state particles, ordered by decreasing \f$ E_T \f$.
const Particles& particlesByEt() const {
return particles(cmpParticleByEt);
}
/// Get the final-state particles, ordered by increasing \f$ \eta \f$.
const Particles& particlesByEta() const {
return particles(cmpParticleByAscPseudorapidity);
}
/// Get the final-state particles, ordered by increasing \f$ |\eta| \f$.
const Particles& particlesByModEta() const {
return particles(cmpParticleByAscAbsPseudorapidity);
}
/// Get the final-state particles, ordered by increasing \f$ y \f$.
const Particles& particlesByRapidity() const {
return particles(cmpParticleByAscRapidity);
}
/// Get the final-state particles, ordered by increasing \f$ |y| \f$.
const Particles& particlesByModRapidity() const {
return particles(cmpParticleByAscAbsRapidity);
}
/// Access the projected final-state particles.
virtual size_t size() const { return _theParticles.size(); }
/// Is this final state empty?
virtual bool empty() const { return _theParticles.empty(); }
/// @deprecated Is this final state empty?
virtual bool isEmpty() const { return _theParticles.empty(); }
/// Minimum-\f$ p_\perp \f$ requirement.
virtual double ptMin() const { return _ptmin; }
public:
typedef Particle entity_type;
typedef Particles collection_type;
/// Template-usable interface common to JetAlg.
const collection_type& entities() const {
return particles();
}
protected:
/// Apply the projection to the event.
virtual void project(const Event& e);
/// Compare projections.
virtual int compare(const Projection& p) const;
/// Decide if a particle is to be accepted or not.
bool accept(const Particle& p) const;
protected:
/// The ranges allowed for pseudorapidity.
vector<pair<double,double> > _etaRanges;
/// The minimum allowed transverse momentum.
double _ptmin;
+ /// The applicable cuts
+ Cut _cuts;
+
/// The final-state particles.
mutable Particles _theParticles;
};
}
#endif
diff --git a/include/Rivet/Projections/IdentifiedFinalState.hh b/include/Rivet/Projections/IdentifiedFinalState.hh
--- a/include/Rivet/Projections/IdentifiedFinalState.hh
+++ b/include/Rivet/Projections/IdentifiedFinalState.hh
@@ -1,121 +1,121 @@
// -*- C++ -*-
#ifndef RIVET_IdentifiedFinalState_HH
#define RIVET_IdentifiedFinalState_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"
namespace Rivet {
/// @brief Produce a final state which only contains specified particle IDs.
class IdentifiedFinalState : public FinalState {
public:
/// @name Constructors
//@{
/// Constructor with specific FinalState.
IdentifiedFinalState(const FinalState& fsp);
/// Constructor with a single eta range argument.
IdentifiedFinalState(double etamin=-MAXRAPIDITY,
double etamax=MAXRAPIDITY,
double ptMin=0.0*GeV);
- /// Constructor which allows to specify multiple eta ranges
- /// and the min \f$ p_T \f$.
- IdentifiedFinalState(const vector<pair<double, double> >& etaRanges,
- double ptMin=0.0*GeV);
+ // /// Constructor which allows to specify multiple eta ranges
+ // /// and the min \f$ p_T \f$.
+ // IdentifiedFinalState(const vector<pair<double, double> >& etaRanges,
+ // double ptMin=0.0*GeV);
/// Clone on the heap.
virtual const Projection* clone() const {
return new IdentifiedFinalState(*this);
}
//@}
public:
/// Get the list of particle IDs to accept.
const set<PdgId>& acceptedIds() const {
return _pids;
}
/// Add an accepted particle ID.
IdentifiedFinalState& acceptId(PdgId pid) {
_pids.insert(pid);
return *this;
}
/// Add a set of accepted particle IDs.
IdentifiedFinalState& acceptIds(const vector<PdgId>& pids) {
foreach (const PdgId pid, pids) {
_pids.insert(pid);
}
return *this;
}
/// Add an accepted particle ID and its antiparticle.
IdentifiedFinalState& acceptIdPair(PdgId pid) {
_pids.insert(pid);
_pids.insert(-pid);
return *this;
}
/// Add a set of accepted particle IDs and their antiparticles.
IdentifiedFinalState& acceptIdPairs(const vector<PdgId>& pids) {
foreach (const PdgId pid, pids) {
_pids.insert(pid);
_pids.insert(-pid);
}
return *this;
}
/// Accept all neutrinos (convenience method).
IdentifiedFinalState& acceptNeutrinos() {
acceptIdPair(PID::NU_E);
acceptIdPair(PID::NU_MU);
acceptIdPair(PID::NU_TAU);
return *this;
}
/// Accept all charged leptons (convenience method).
IdentifiedFinalState& acceptChLeptons() {
acceptIdPair(PID::ELECTRON);
acceptIdPair(PID::MUON);
acceptIdPair(PID::TAU);
return *this;
}
/// Reset the list of particle IDs to accept.
void reset() {
_pids.clear();
}
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
private:
/// The final-state particles.
set<PdgId> _pids;
};
}
#endif
diff --git a/include/Rivet/Projections/LeptonClusters.hh b/include/Rivet/Projections/LeptonClusters.hh
--- a/include/Rivet/Projections/LeptonClusters.hh
+++ b/include/Rivet/Projections/LeptonClusters.hh
@@ -1,82 +1,83 @@
// -*- C++ -*-
#ifndef RIVET_LeptonClusters_HH
#define RIVET_LeptonClusters_HH
#include "Rivet/Tools/Logging.hh"
#include "Rivet/Rivet.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
#include "Rivet/Projection.hh"
+#include "Rivet/Cuts.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
namespace Rivet {
class ClusteredLepton : public Particle {
public:
ClusteredLepton(Particle lepton) :
Particle(lepton.pdgId(), lepton.momentum()),
_constituentLepton(lepton) {}
void addPhoton(const Particle& p, bool cluster) {
_constituentPhotons.push_back(p);
if (cluster) setMomentum(momentum() + p.momentum());
}
const Particle& constituentLepton() const { return _constituentLepton; }
const Particles& constituentPhotons() const { return _constituentPhotons; }
private:
Particles _constituentPhotons;
Particle _constituentLepton;
};
/// @brief Cluster photons from a given FS to all charged particles (typically
/// leptons) from signal and store the original charged particles and photons
/// as particles() while the newly created clustered lepton objects are
/// accessible as clusteredLeptons()
class LeptonClusters : public FinalState {
public:
LeptonClusters(const FinalState& photons, const FinalState& signal,
- double dRmax, bool cluster,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin);
+ double dRmax, bool cluster, Cut c);
+ // const std::vector<std::pair<double, double> >& etaRanges,
+ // double pTmin);
virtual const Projection* clone() const {
return new LeptonClusters(*this);
}
const vector<ClusteredLepton>& clusteredLeptons() const { return _clusteredLeptons; }
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
private:
/// Maximum cone radius to find photons in
double _dRmax;
/// Whether to actually add the photon momenta to clusteredLeptons
bool _cluster;
/// Container which stores the clustered lepton objects
vector<ClusteredLepton> _clusteredLeptons;
};
}
#endif
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,178 +1,188 @@
// -*- 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);
+ // 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);
+ // /// @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,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin, PdgId pid,
+ 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,151 +1,159 @@
// -*- 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);
+ // 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);
+ // 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);
+ // 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,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin, PdgId pid,
+ 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_2010_S8919674.cc b/src/Analyses/ATLAS_2010_S8919674.cc
--- a/src/Analyses/ATLAS_2010_S8919674.cc
+++ b/src/Analyses/ATLAS_2010_S8919674.cc
@@ -1,204 +1,201 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/ClusteredPhotons.hh"
#include "Rivet/Projections/LeadingParticlesFinalState.hh"
namespace Rivet {
class ATLAS_2010_S8919674 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2010_S8919674()
: Analysis("ATLAS_2010_S8919674")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
/// Initialise and register projections (selections on the final state)
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,-1.52));
- eta_e.push_back(make_pair(-1.37,1.37));
- eta_e.push_back(make_pair(1.52,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ Cut cuts = ( Range(Cuts::eta, -2.47, -1.52)
+ | Range(Cuts::eta, -1.37, 1.37)
+ | Range(Cuts::eta, 1.52, 2.47) ) & (Cuts::pt >= 20.0*GeV);
+ IdentifiedFinalState elecs(cuts);
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection for finding the photons which have to be clustered into
// the lepton later
ClusteredPhotons cphotons_e(FinalState(), elecs, 0.1);
addProjection(cphotons_e, "cphotons_e");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 20.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta,-2.4,2.4) & (Cuts::pt >= 20.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// projection for finding the photons which have to be clustered into
// the lepton later
ClusteredPhotons cphotons_m(FinalState(), muons, 0.1);
addProjection(cphotons_m, "cphotons_m");
// Leading neutrinos for Etmiss
FinalState fs;
LeadingParticlesFinalState muon_neutrino(fs);
muon_neutrino.addParticleIdPair(PID::NU_MU);
muon_neutrino.setLeadingOnly(true);
addProjection(muon_neutrino, "muon_neutrino");
LeadingParticlesFinalState elec_neutrino(fs);
elec_neutrino.addParticleIdPair(PID::NU_E);
elec_neutrino.setLeadingOnly(true);
addProjection(elec_neutrino, "elec_neutrino");
// Input for the jets: No neutrinos, no muons, and no electron which
// passed the electron cuts ("elecs" finalstate from above)
VetoedFinalState veto;
veto.addVetoOnThisFinalState(elecs);
veto.addVetoPairId(PID::MUON);
veto.vetoNeutrinos();
FastJets jets(veto, FastJets::ANTIKT, 0.4);
addProjection(jets, "jets");
/// book histograms
_h_el_njet_inclusive = bookHisto1D(1,1,1);
_h_mu_njet_inclusive = bookHisto1D(2,1,1);
_h_el_pT_jet1 = bookHisto1D(5,1,1);
_h_mu_pT_jet1 = bookHisto1D(6,1,1);
_h_el_pT_jet2 = bookHisto1D(7,1,1);
_h_mu_pT_jet2 = bookHisto1D(8,1,1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const FinalState& elecs = applyProjection<FinalState>(event, "elecs");
Particles elec_neutrino=applyProjection<FinalState>(event, "elec_neutrino").particles();
if (elecs.size()==1 && elec_neutrino.size()>0) {
FourMomentum lepton=elecs.particles()[0].momentum();
foreach (const Particle& photon,
applyProjection<FinalState>(event, "cphotons_e").particles()) {
lepton+=photon.momentum();
}
FourMomentum p_miss = elec_neutrino[0].momentum();
double mT=sqrt(2.0*lepton.pT()*p_miss.Et()*(1.0-cos(lepton.phi()-p_miss.phi())));
if (p_miss.Et()>25.0*GeV && mT>40.0*GeV) {
Jets jets;
foreach (const Jet& jet, applyProjection<FastJets>(event, "jets").jetsByPt(20.0*GeV)) {
if (fabs(jet.eta())<2.8 && deltaR(lepton, jet.momentum())>0.5) {
jets.push_back(jet);
}
}
_h_el_njet_inclusive->fill(0, weight);
if (jets.size()>=1) {
_h_el_njet_inclusive->fill(1, weight);
_h_el_pT_jet1->fill(jets[0].pT(), weight);
}
if (jets.size()>=2) {
_h_el_njet_inclusive->fill(2, weight);
_h_el_pT_jet2->fill(jets[1].pT(), weight);
}
if (jets.size()>=3) {
_h_el_njet_inclusive->fill(3, weight);
}
}
}
const FinalState& muons = applyProjection<FinalState>(event, "muons");
Particles muon_neutrino=applyProjection<FinalState>(event, "muon_neutrino").particles();
if (muons.size()==1 && muon_neutrino.size()>0) {
FourMomentum lepton=muons.particles()[0].momentum();
foreach (const Particle& photon,
applyProjection<FinalState>(event, "cphotons_m").particles()) {
lepton+=photon.momentum();
}
FourMomentum p_miss = muon_neutrino[0].momentum();
double mT=sqrt(2.0*lepton.pT()*p_miss.Et()*(1.0-cos(lepton.phi()-p_miss.phi())));
if (p_miss.Et()>25.0*GeV && mT>40.0*GeV) {
Jets jets;
foreach (const Jet& jet, applyProjection<FastJets>(event, "jets").jetsByPt(20.0*GeV)) {
if (fabs(jet.eta())<2.8 && deltaR(lepton, jet.momentum())>0.5) {
jets.push_back(jet);
}
}
_h_mu_njet_inclusive->fill(0, weight);
if (jets.size()>=1) {
_h_mu_njet_inclusive->fill(1, weight);
_h_mu_pT_jet1->fill(jets[0].pT(), weight);
}
if (jets.size()>=2) {
_h_mu_njet_inclusive->fill(2, weight);
_h_mu_pT_jet2->fill(jets[1].pT(), weight);
}
if (jets.size()>=3) {
_h_mu_njet_inclusive->fill(3, weight);
}
if (jets.size()>=4) {
_h_mu_njet_inclusive->fill(4, weight);
}
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
double normfac=crossSection()/sumOfWeights();
scale(_h_el_njet_inclusive, normfac);
scale(_h_mu_njet_inclusive, normfac);
scale(_h_el_pT_jet1, normfac);
scale(_h_mu_pT_jet1, normfac);
scale(_h_el_pT_jet2, normfac);
scale(_h_mu_pT_jet2, normfac);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_el_njet_inclusive;
Histo1DPtr _h_mu_njet_inclusive;
Histo1DPtr _h_el_pT_jet1;
Histo1DPtr _h_mu_pT_jet1;
Histo1DPtr _h_el_pT_jet2;
Histo1DPtr _h_mu_pT_jet2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2010_S8919674);
}
diff --git a/src/Analyses/ATLAS_2011_CONF_2011_090.cc b/src/Analyses/ATLAS_2011_CONF_2011_090.cc
--- a/src/Analyses/ATLAS_2011_CONF_2011_090.cc
+++ b/src/Analyses/ATLAS_2011_CONF_2011_090.cc
@@ -1,370 +1,366 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
class ATLAS_2011_CONF_2011_090 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_CONF_2011_090()
: Analysis("ATLAS_2011_CONF_2011_090")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// veto region electrons (from 2010 arXiv:1102.2357v2)
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.37));
- eta_v_e.push_back(make_pair( 1.37, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.37) | Range(Cuts::eta, 1.37, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & (Cuts::pt >= 10.0*GeV));
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
/// Book histograms
_count_mu_channel = bookHisto1D("count_muon_channel", 1, 0., 1.);
_count_e_channel = bookHisto1D("count_electron_channel", 1, 0., 1.);
_hist_eTmiss_e = bookHisto1D("Et_miss_e", 50, 0., 500.);
_hist_eTmiss_mu = bookHisto1D("Et_miss_mu", 50, 0., 500.);
_hist_m_eff_e = bookHisto1D("m_eff_e", 60, 0., 1500.);
_hist_m_eff_mu = bookHisto1D("m_eff_mu", 60, 0., 1500.);
_hist_m_eff_e_final = bookHisto1D("m_eff_e_final", 15, 0., 1500.);
_hist_m_eff_mu_final = bookHisto1D("m_eff_mu_final", 15, 0., 1500.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
Particles candtemp_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
Particles candtemp_mu =
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
Particles cand_mu;
Particles cand_e;
// pTcone around muon track
foreach ( const Particle & mu, candtemp_mu ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// pTcone around electron
foreach ( const Particle e, candtemp_e ) {
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.10 * e.pT() )
cand_e.push_back(e);
}
// discard jets that overlap with electrons
Jets cand_jets_2;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
cand_jets_2.push_back( jet );
}
// only consider leptons far from jet
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool e_near_jet = false;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 &&
deltaR(e.momentum(),jet.momentum()) > 0.2 )
e_near_jet = true;
}
if ( ! e_near_jet )
recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool mu_near_jet = false;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
mu_near_jet = true;
}
if ( ! mu_near_jet )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// final jet filter
Jets recon_jets;
foreach ( const Jet& jet, cand_jets_2 ) {
recon_jets.push_back( jet );
}
// ==================== observables ====================
// Njets
int Njets = 0;
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( fabs(jet.eta()) < 2.8 )
Njets+=1;
}
if ( Njets < 3 ) {
MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
vetoEvent;
}
if ( recon_jets[0].pT() <= 60.0 * GeV ) {
MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
vetoEvent;
}
for ( int i = 1; i < 3; ++i ) {
if ( recon_jets[i].pT() <= 25*GeV ) {
vetoEvent;
}
}
for ( int i = 0; i < 3; ++i ) {
double dPhi = deltaPhi( pTmiss_phi, recon_jets[i].momentum().phi() );
if ( dPhi <= 0.2 ) {
MSG_DEBUG("dPhi too small");
vetoEvent;
break;
}
}
Particles lepton;
if ( recon_mu.empty() && recon_e.empty() ) {
MSG_DEBUG("No leptons");
vetoEvent;
}
else {
foreach ( const Particle & mu, recon_mu )
lepton.push_back(mu);
foreach ( const Particle & e, recon_e )
lepton.push_back(e);
}
std::sort(lepton.begin(), lepton.end(), cmpParticleByPt);
double e_id = 11;
double mu_id = 13;
// one hard leading lepton cut
if ( fabs(lepton[0].pdgId()) == e_id &&
lepton[0].pT() <= 25*GeV ) {
vetoEvent;
}
else if ( fabs(lepton[0].pdgId()) == mu_id &&
lepton[0].pT() <= 20*GeV ) {
vetoEvent;
}
// exactly one hard leading lepton cut
if(lepton.size()>1) {
if ( fabs(lepton[1].pdgId()) == e_id &&
lepton[1].pT() > 20*GeV ) {
vetoEvent;
}
else if ( fabs(lepton[1].pdgId()) == mu_id &&
lepton[1].pT() > 10*GeV ) {
vetoEvent;
}
}
// ==================== FILL ====================
FourMomentum pT_l = lepton[0].momentum();
double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
// effective mass
double m_eff = eTmiss + pT_l.pT()
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT();
// Electron channel signal region
if ( fabs( lepton[0].pdgId() ) == e_id ) {
_hist_eTmiss_e->fill(eTmiss, weight);
_hist_m_eff_e->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 125*GeV ) {
_hist_m_eff_e_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
_count_e_channel->fill(0.5,weight);
}
}
}
// Muon channel signal region
else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
_hist_eTmiss_mu->fill(eTmiss, weight);
_hist_m_eff_mu->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 125*GeV ) {
_hist_m_eff_mu_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
_count_mu_channel->fill(0.5,weight);
}
}
}
}
//@}
void finalize() {
scale( _hist_eTmiss_e , 10. * 165. * crossSection()/picobarn/sumOfWeights() );
scale( _hist_eTmiss_mu , 10. * 165. * crossSection()/picobarn/sumOfWeights() );
scale( _hist_m_eff_e , 25. * 165. * crossSection()/picobarn/sumOfWeights() );
scale( _hist_m_eff_mu , 25. * 165. * crossSection()/picobarn/sumOfWeights() );
scale( _hist_m_eff_e_final , 100. * 165. * crossSection()/picobarn/sumOfWeights() );
scale( _hist_m_eff_mu_final, 100. * 165. * crossSection()/picobarn/sumOfWeights() );
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_e_channel;
Histo1DPtr _count_mu_channel;
Histo1DPtr _hist_eTmiss_e;
Histo1DPtr _hist_eTmiss_mu;
Histo1DPtr _hist_m_eff_e;
Histo1DPtr _hist_m_eff_mu;
Histo1DPtr _hist_m_eff_e_final;
Histo1DPtr _hist_m_eff_mu_final;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_CONF_2011_090);
}
diff --git a/src/Analyses/ATLAS_2011_CONF_2011_098.cc b/src/Analyses/ATLAS_2011_CONF_2011_098.cc
--- a/src/Analyses/ATLAS_2011_CONF_2011_098.cc
+++ b/src/Analyses/ATLAS_2011_CONF_2011_098.cc
@@ -1,337 +1,335 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
// #include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2011_CONF_2011_098 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_CONF_2011_098()
: Analysis("ATLAS_2011_CONF_2011_098"),
//debug variables
threeJA(0), threeJB(0), threeJC(0), threeJD(0), bj(0), jets(0), zerolept(0), eTmisscut(0)
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
/// Jet finder
addProjection(FastJets(FinalState(), FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
/// Book histograms
_count_threeJA = bookHisto1D("count_threeJA", 1, 0., 1.);
_count_threeJB = bookHisto1D("count_threeJB", 1, 0., 1.);
_count_threeJC = bookHisto1D("count_threeJC", 1, 0., 1.);
_count_threeJD = bookHisto1D("count_threeJD", 1, 0., 1.);
_hist_meff_1bjet = bookHisto1D("meff_1bjet", 32, 0., 1600.);
_hist_eTmiss_1bjet = bookHisto1D("eTmiss_1bjet", 6, 0., 600.);
_hist_pTj_1bjet = bookHisto1D("pTjet_1bjet", 20, 0., 800.);
_hist_meff_2bjet = bookHisto1D("meff_2bjet", 32, 0., 1600.);
_hist_eTmiss_2bjet = bookHisto1D("eTmiss_2bjet", 6, 0., 600.);
_hist_pTj_2bjet = bookHisto1D("pTjet_2bjet", 20, 0., 800.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// Temp: calorimeter module failure with 10% acceptance loss;
// region unknown ==> randomly choose 10% of events to be vetoed
if ( rand()/static_cast<double>(RAND_MAX) < 0.1 )
vetoEvent;
Jets tmp_cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
tmp_cand_jets.push_back(jet);
}
}
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
Particles cand_mu =
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
//cerr << "cand_e.size(): " << cand_e.size() << " cand_mu.size(): " << cand_mu.size() << '\n';
Jets cand_jets;
foreach ( const Jet& jet, tmp_cand_jets ) {
if ( fabs( jet.eta() ) >= 2.8 )
cand_jets.push_back( jet );
else {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
cand_jets.push_back( jet );
}
}
Particles cand_lept;
bool isolated_e;
foreach ( const Particle & e, cand_e ) {
isolated_e = true;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 )
isolated_e = false;
}
if ( isolated_e == true )
cand_lept.push_back( e );
}
bool isolated_mu;
foreach ( const Particle & mu, cand_mu ) {
isolated_mu = true;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
isolated_mu = false;
}
if ( isolated_mu == true)
cand_lept.push_back( mu );
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// bjets
Jets bjets,recon_jets;
foreach (const Jet& j, cand_jets) {
if(fabs( j.eta() ) <= 2.8) {
recon_jets.push_back(j);
if ( fabs( j.eta() ) <= 2.5 && j.momentum().perp()>50. &&
j.containsBottom() && rand()/static_cast<double>(RAND_MAX) < 0.5 )
bjets.push_back(j);
}
}
if (bjets.empty()) {
MSG_DEBUG("No b-jet axes in acceptance");
vetoEvent;
}
++bj;
// Jets event selection
if ( recon_jets.size() < 3 )
vetoEvent;
if ( recon_jets[0].pT() <= 130*GeV )
vetoEvent;
if ( recon_jets[1].pT() <= 50*GeV ||
recon_jets[2].pT() <= 50*GeV )
vetoEvent;
++jets;
// eTmiss cut
if ( eTmiss <= 130*GeV )
vetoEvent;
++eTmisscut;
// 0-lepton requirement
if ( !cand_lept.empty() )
vetoEvent;
++zerolept;
// m_eff cut
double m_eff = eTmiss
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT();
if ( eTmiss / m_eff <= 0.25 )
vetoEvent;
// min_dPhi
double min_dPhi = 999.999;
for ( int i = 0; i < 3; ++i ) {
double dPhi = deltaPhi( pTmiss.phi(), recon_jets[i].momentum().phi() );
min_dPhi = min( min_dPhi, dPhi );
}
if ( min_dPhi <= 0.4 )
vetoEvent;
// ==================== FILL ====================
// 1 bjet
if ( bjets.size() >= 1 ) {
_hist_meff_1bjet->fill(m_eff, weight);
_hist_eTmiss_1bjet->fill(eTmiss, weight);
_hist_pTj_1bjet->fill(recon_jets[0].pT(), weight);
// 3JA region
if ( m_eff > 200*GeV ) {
++threeJA;
_count_threeJA->fill(0.5, weight);
}
// 3JB region
if ( m_eff > 700*GeV ) {
++threeJB;
_count_threeJB->fill(0.5, weight);
}
}
// 2 bjets
if ( bjets.size() >= 2 ) {
_hist_meff_2bjet->fill(m_eff, weight);
_hist_eTmiss_2bjet->fill(eTmiss, weight);
_hist_pTj_2bjet->fill(recon_jets[0].pT(), weight);
// 3JC region
if ( m_eff > 500*GeV ) {
++threeJC;
_count_threeJC->fill(0.5, weight);
}
// 3JD region
if ( m_eff > 700*GeV ) {
++threeJD;
_count_threeJD->fill(0.5, weight);
}
}
}
//@}
void finalize() {
scale( _hist_meff_1bjet, 50. * 830. * crossSection()/sumOfWeights() );
scale( _hist_eTmiss_1bjet, 100. * 830. * crossSection()/sumOfWeights() );
scale( _hist_pTj_1bjet, 40. * 830. * crossSection()/sumOfWeights() );
scale( _hist_meff_2bjet, 50. * 830. * crossSection()/sumOfWeights() );
scale( _hist_eTmiss_2bjet, 100. * 830. * crossSection()/sumOfWeights() );
scale( _hist_pTj_2bjet, 40. * 830. * crossSection()/sumOfWeights() );
// cerr<< '\n'<<'\n'
// << "Saw "
// << bj << " events aft bjets cut, "
// << jets << " events aft jet cuts, "
// << eTmisscut << " events aft eTmiss cut, "
// << zerolept << " events after 0-lept cut. "
// << '\n'
// << threeJA << " 3JA events, "
// << threeJB << " 3JB events, "
// << threeJC << " 3JC events, "
// << threeJD << " 3JD events. "
// << '\n'
// ;
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_threeJA;
Histo1DPtr _count_threeJB;
Histo1DPtr _count_threeJC;
Histo1DPtr _count_threeJD;
Histo1DPtr _hist_meff_1bjet;
Histo1DPtr _hist_eTmiss_1bjet;
Histo1DPtr _hist_pTj_1bjet;
Histo1DPtr _hist_meff_2bjet;
Histo1DPtr _hist_eTmiss_2bjet;
Histo1DPtr _hist_pTj_2bjet;
//@}
// debug variables
int threeJA;
int threeJB;
int threeJC;
int threeJD;
int bj;
int jets;
int zerolept;
int eTmisscut;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_CONF_2011_098);
}
diff --git a/src/Analyses/ATLAS_2011_I926145.cc b/src/Analyses/ATLAS_2011_I926145.cc
--- a/src/Analyses/ATLAS_2011_I926145.cc
+++ b/src/Analyses/ATLAS_2011_I926145.cc
@@ -1,179 +1,185 @@
// -*- 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
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.00,-1.52));
- eta_e.push_back(make_pair(-1.37,1.37));
- eta_e.push_back(make_pair(1.52,2.00));
- IdentifiedFinalState elecs(eta_e, 7.0*GeV);
+ Cut cuts = ( Range(Cuts::eta, -2.00, -1.52)
+ | Range(Cuts::eta, -1.37, 1.37)
+ | Range(Cuts::eta, 1.52, 2.00) ) & (Cuts::pt >= 7.0*GeV);
+ IdentifiedFinalState elecs(cuts);
elecs.acceptId(PID::ELECTRON);
elecs.acceptId(PID::POSITRON);
addProjection(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(-2.0, 2.0, 7.0*GeV);
+
+ IdentifiedFinalState muons(Range(Cuts::eta,-2.0,2.0) & (Cuts::pt >= 7.0*GeV));
muons.acceptId(PID::MUON);
muons.acceptId(PID::ANTIMUON);
addProjection(muons, "muons");
//projection for muons full range
- IdentifiedFinalState muons_full(-2.5, 2.5, 4.0*GeV);
+ IdentifiedFinalState muons_full(Range(Cuts::eta,-2.5,2.5) & (Cuts::pt >= 4.0*GeV));
muons_full.acceptId(PID::MUON);
muons_full.acceptId(PID::ANTIMUON);
addProjection(muons_full, "muons_full");
//// ZFinder: etaMin, etaMax, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons
- ZFinder zfinder_e(-2.0, 2.0, 0.0, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
+ ZFinder zfinder_e(FinalState(), Range(Cuts::eta,-2.0,2.0),
+ PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
addProjection(zfinder_e, "ZFinder_e");
- ZFinder zfinder_mu(-2.0, 2.0, 0.0, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
+ ZFinder zfinder_mu(FinalState(), Range(Cuts::eta,-2.0,2.0),
+ PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
addProjection(zfinder_mu, "ZFinder_mu");
- ZFinder zfinder_mufull(-2.5, 2.5, 0.0, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
+ ZFinder zfinder_mufull(FinalState(), Range(Cuts::eta,-2.5,2.5),
+ PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false);
addProjection(zfinder_mufull, "ZFinder_mufull");
//// WFinder: etaMin, etaMax, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons
- WFinder wfinder_e(-2.0, 2.0, 0.0*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
+ WFinder wfinder_e(FinalState(), Range(Cuts::eta,-2.0,2.0),
+ PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
addProjection(wfinder_e, "WFinder_e");
- WFinder wfinder_mu(-2.0, 2.0, 0.0*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
+ WFinder wfinder_mu(FinalState(), Range(Cuts::eta,-2.0,2.0),
+ PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
addProjection(wfinder_mu, "WFinder_mu");
- WFinder wfinder_mufull(-2.5, 2.5, 0.0*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
+ WFinder wfinder_mufull(FinalState(), Range(Cuts::eta,-2.5,2.5),
+ PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
addProjection(wfinder_mufull, "WFinder_mufull");
// Book histograms - use autobooking
_histPt_elecs = bookHisto1D(1 ,1 ,1);
_histPt_muons = bookHisto1D(2 ,1 ,1);
_histPt_muons_full = bookHisto1D(3 ,1 ,1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const FinalState& elecs = applyProjection<FinalState>(event, "elecs");
const FinalState& muons = applyProjection<FinalState>(event, "muons");
const FinalState& muons_full = applyProjection<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 = applyProjection<ZFinder>(event, "ZFinder_e");
const ZFinder& zfinder_mu = applyProjection<ZFinder>(event, "ZFinder_mu");
const ZFinder& zfinder_mufull = applyProjection<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 = applyProjection<WFinder>(event, "WFinder_e");
const WFinder& wfinder_mu = applyProjection<WFinder>(event, "WFinder_mu");
const WFinder& wfinder_mufull = applyProjection<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);
}
}
}
// 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);
}
}
}
// 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);
}
}
}
}
/// 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/src/Analyses/ATLAS_2011_I944826.cc b/src/Analyses/ATLAS_2011_I944826.cc
--- a/src/Analyses/ATLAS_2011_I944826.cc
+++ b/src/Analyses/ATLAS_2011_I944826.cc
@@ -1,263 +1,262 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/UnstableFinalState.hh"
namespace Rivet {
class ATLAS_2011_I944826 : public Analysis {
public:
/// Constructor
ATLAS_2011_I944826()
: Analysis("ATLAS_2011_I944826")
{
_sum_w_ks = 0.0;
_sum_w_lambda = 0.0;
_sum_w_passed = 0.0;
}
/// Book histograms and initialise projections before the run
void init() {
UnstableFinalState ufs(-MAXRAPIDITY, MAXRAPIDITY, 100*MeV);
addProjection(ufs, "UFS");
- vector<pair<double, double> > etaRanges;
- etaRanges.push_back(make_pair(-3.84, -2.09));
- etaRanges.push_back(make_pair(2.09, 3.84));
- ChargedFinalState mbts(etaRanges);
+ ChargedFinalState mbts( Range(Cuts::eta, -3.84, -2.09)
+ | Range(Cuts::eta, 2.09, 3.84) );
addProjection(mbts, "MBTS");
- IdentifiedFinalState nstable(-2.5, 2.5, 100*MeV);
+ IdentifiedFinalState nstable( Range(Cuts::eta, -2.5, 2.5)
+ & (Cuts::pt >= 100*MeV) );
nstable.acceptIdPair(PID::ELECTRON)
.acceptIdPair(PID::MUON)
.acceptIdPair(PID::PIPLUS)
.acceptIdPair(PID::KPLUS)
.acceptIdPair(PID::PROTON);
addProjection(nstable, "nstable");
if (fuzzyEquals(sqrtS()*GeV, 7000, 1e-3)) {
_hist_Ks_pT = bookHisto1D(1, 1, 1);
_hist_Ks_y = bookHisto1D(2, 1, 1);
_hist_Ks_mult = bookHisto1D(3, 1, 1);
_hist_L_pT = bookHisto1D(7, 1, 1);
_hist_L_y = bookHisto1D(8, 1, 1);
_hist_L_mult = bookHisto1D(9, 1, 1);
_hist_Ratio_v_y = bookScatter2D(13, 1, 1);
_hist_Ratio_v_pT = bookScatter2D(14, 1, 1);
//
_temp_lambda_v_y = Histo1D(10, 0.0, 2.5);
_temp_lambdabar_v_y = Histo1D(10, 0.0, 2.5);
_temp_lambda_v_pT = Histo1D(18, 0.5, 4.1);
_temp_lambdabar_v_pT = Histo1D(18, 0.5, 4.1);
}
else if (fuzzyEquals(sqrtS()*GeV, 900, 1E-3)) {
_hist_Ks_pT = bookHisto1D(4, 1, 1);
_hist_Ks_y = bookHisto1D(5, 1, 1);
_hist_Ks_mult = bookHisto1D(6, 1, 1);
_hist_L_pT = bookHisto1D(10, 1, 1);
_hist_L_y = bookHisto1D(11, 1, 1);
_hist_L_mult = bookHisto1D(12, 1, 1);
_hist_Ratio_v_y = bookScatter2D(15, 1, 1);
_hist_Ratio_v_pT = bookScatter2D(16, 1, 1);
//
_temp_lambda_v_y = Histo1D(5, 0.0, 2.5);
_temp_lambdabar_v_y = Histo1D(5, 0.0, 2.5);
_temp_lambda_v_pT = Histo1D(8, 0.5, 3.7);
_temp_lambdabar_v_pT = Histo1D(8, 0.5, 3.7);
}
}
// This function is required to impose the flight time cuts on Kaons and Lambdas
double getPerpFlightDistance(const Rivet::Particle& p) {
const HepMC::GenParticle* genp = p.genParticle();
HepMC::GenVertex* prodV = genp->production_vertex();
HepMC::GenVertex* decV = genp->end_vertex();
const HepMC::ThreeVector prodPos = prodV->point3d();
if (decV) {
const HepMC::ThreeVector decPos = decV->point3d();
double dy = prodPos.y() - decPos.y();
double dx = prodPos.x() - decPos.x();
return add_quad(dx, dy);
}
return numeric_limits<double>::max();
}
bool daughtersSurviveCuts(const Rivet::Particle& p) {
// We require the Kshort or Lambda to decay into two charged
// particles with at least pT = 100 MeV inside acceptance region
const HepMC::GenParticle* genp = p.genParticle();
HepMC::GenVertex* decV = genp->end_vertex();
bool decision = true;
if (!decV) return false;
if (decV->particles_out_size() == 2) {
std::vector<double> pTs;
std::vector<int> charges;
std::vector<double> etas;
foreach (HepMC::GenParticle* gp, particles(decV, HepMC::children)) {
pTs.push_back(gp->momentum().perp());
etas.push_back(fabs(gp->momentum().eta()));
charges.push_back( Rivet::PID::threeCharge(gp->pdg_id()) );
// gp->print();
}
if ( (pTs[0]/Rivet::GeV < 0.1) || (pTs[1]/Rivet::GeV < 0.1) ) {
decision = false;
MSG_DEBUG("Failed pT cut: " << pTs[0]/Rivet::GeV << " " << pTs[1]/Rivet::GeV);
}
if ( etas[0] > 2.5 || etas[1] > 2.5 ) {
decision = false;
MSG_DEBUG("Failed eta cut: " << etas[0] << " " << etas[1]);
}
if ( charges[0] * charges[1] >= 0 ) {
decision = false;
MSG_DEBUG("Failed opposite charge cut: " << charges[0] << " " << charges[1]);
}
}
else {
decision = false;
MSG_DEBUG("Failed nDaughters cut: " << decV->particles_out_size());
}
return decision;
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// ATLAS MBTS trigger requirement of at least one hit in either hemisphere
if (applyProjection<FinalState>(event, "MBTS").size() < 1) {
MSG_DEBUG("Failed trigger cut");
vetoEvent;
}
// Veto event also when we find less than 2 particles in the acceptance region of type 211,2212,11,13,321
if (applyProjection<FinalState>(event, "nstable").size() < 2) {
MSG_DEBUG("Failed stable particle cut");
vetoEvent;
}
_sum_w_passed += weight;
// This ufs holds all the Kaons and Lambdas
const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS");
// Some conters
int n_KS0 = 0;
int n_LAMBDA = 0;
// Particle loop
foreach (const Particle& p, ufs.particles()) {
// General particle quantities
const double pT = p.pT();
const double y = p.rapidity();
const PdgId apid = abs(p.pdgId());
double flightd = 0.0;
// Look for Kaons, Lambdas
switch (apid) {
case PID::K0S:
flightd = getPerpFlightDistance(p);
if (!inRange(flightd/mm, 4., 450.) ) {
MSG_DEBUG("Kaon failed flight distance cut:" << flightd);
break;
}
if (daughtersSurviveCuts(p) ) {
_hist_Ks_y ->fill(y, weight);
_hist_Ks_pT->fill(pT/GeV, weight);
_sum_w_ks += weight;
n_KS0++;
}
break;
case PID::LAMBDA:
if (pT < 0.5*GeV) { // Lambdas have an additional pT cut of 500 MeV
MSG_DEBUG("Lambda failed pT cut:" << pT/GeV << " GeV");
break;
}
flightd = getPerpFlightDistance(p);
if (!inRange(flightd/mm, 17., 450.)) {
MSG_DEBUG("Lambda failed flight distance cut:" << flightd/mm << " mm");
break;
}
if ( daughtersSurviveCuts(p) ) {
if (p.pdgId() == PID::LAMBDA) {
_temp_lambda_v_y.fill(fabs(y), weight);
_temp_lambda_v_pT.fill(pT/GeV, weight);
_hist_L_y->fill(y, weight);
_hist_L_pT->fill(pT/GeV, weight);
_sum_w_lambda += weight;
n_LAMBDA++;
} else if (p.pdgId() == -PID::LAMBDA) {
_temp_lambdabar_v_y.fill(fabs(y), weight);
_temp_lambdabar_v_pT.fill(pT/GeV, weight);
}
}
break;
}
}
// Fill multiplicity histos
_hist_Ks_mult->fill(n_KS0, weight);
_hist_L_mult->fill(n_LAMBDA, weight);
}
/// Normalise histograms etc., after the run
void finalize() {
MSG_DEBUG("# Events that pass the trigger: " << _sum_w_passed);
MSG_DEBUG("# Kshort events: " << _sum_w_ks);
MSG_DEBUG("# Lambda events: " << _sum_w_lambda);
/// @todo Replace with normalize()?
scale(_hist_Ks_pT, 1.0/_sum_w_ks);
scale(_hist_Ks_y, 1.0/_sum_w_ks);
scale(_hist_Ks_mult, 1.0/_sum_w_passed);
/// @todo Replace with normalize()?
scale(_hist_L_pT, 1.0/_sum_w_lambda);
scale(_hist_L_y, 1.0/_sum_w_lambda);
scale(_hist_L_mult, 1.0/_sum_w_passed);
// Division of histograms to obtain lambda_bar/lambda ratios
divide(_temp_lambdabar_v_y, _temp_lambda_v_y, _hist_Ratio_v_y);
divide(_temp_lambdabar_v_pT, _temp_lambda_v_pT, _hist_Ratio_v_pT);
}
private:
/// Counters
double _sum_w_ks, _sum_w_lambda, _sum_w_passed;
/// @name Persistent histograms
//@{
Histo1DPtr _hist_Ks_pT, _hist_Ks_y, _hist_Ks_mult;
Histo1DPtr _hist_L_pT, _hist_L_y, _hist_L_mult;
Scatter2DPtr _hist_Ratio_v_pT, _hist_Ratio_v_y;
//@}
/// @name Temporary histograms
//@{
Histo1D _temp_lambda_v_y, _temp_lambdabar_v_y;
Histo1D _temp_lambda_v_pT, _temp_lambdabar_v_pT;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_I944826);
}
diff --git a/src/Analyses/ATLAS_2011_I945498.cc b/src/Analyses/ATLAS_2011_I945498.cc
--- a/src/Analyses/ATLAS_2011_I945498.cc
+++ b/src/Analyses/ATLAS_2011_I945498.cc
@@ -1,286 +1,288 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/LeadingParticlesFinalState.hh"
#include "Rivet/Projections/ClusteredPhotons.hh"
namespace Rivet {
class ATLAS_2011_I945498 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_I945498()
: Analysis("ATLAS_2011_I945498")
{
setNeedsCrossSection(true);
for (size_t chn = 0; chn < 3; ++chn) {
weights_nj0[chn] = 0.0;
weights_nj1[chn] = 0.0;
weights_nj2[chn] = 0.0;
weights_nj3[chn] = 0.0;
weights_nj4[chn] = 0.0;
}
}
//@}
public:
/// Book histograms and initialise projections before the run
void init() {
// Set up projections
- ZFinder zfinder_mu(-2.4, 2.4, 20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ ZFinder zfinder_mu(FinalState(), Range(Cuts::eta, -2.4, 2.4) & (Cuts::pt >= 20),
+ PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder_mu, "ZFinder_mu");
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47, -1.52));
- eta_e.push_back(make_pair(-1.37, 1.37));
- eta_e.push_back(make_pair(1.52, 2.47));
- ZFinder zfinder_el(eta_e, 20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ Cut cuts = ( Range(Cuts::eta, -2.47, -1.52)
+ | Range(Cuts::eta, -1.37, 1.37)
+ | Range(Cuts::eta, 1.52, 2.47) ) & (Cuts::pt >= 20.0*GeV);
+
+ ZFinder zfinder_el(FinalState(), cuts,
+ PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder_el, "ZFinder_el");
// Define veto FS in order to prevent Z-decay products entering the jet algorithm
VetoedFinalState remfs;
remfs.addVetoOnThisFinalState(zfinder_el);
remfs.addVetoOnThisFinalState(zfinder_mu);
FastJets jets(remfs, FastJets::ANTIKT, 0.4);
jets.useInvisibles();
addProjection(jets, "jets");
// 0=el, 1=mu, 2=comb
for (size_t chn = 0; chn < 3; ++chn) {
_h_njet_incl[chn] = bookHisto1D(1, 1, chn+1);
_h_njet_ratio[chn] = bookScatter2D(2, 1, chn+1);
_h_ptjet[chn] = bookHisto1D(3, 1, chn+1);
_h_ptlead[chn] = bookHisto1D(4, 1, chn+1);
_h_ptseclead[chn] = bookHisto1D(5, 1, chn+1);
_h_yjet[chn] = bookHisto1D(6, 1, chn+1);
_h_ylead[chn] = bookHisto1D(7, 1, chn+1);
_h_yseclead[chn] = bookHisto1D(8, 1, chn+1);
_h_mass[chn] = bookHisto1D(9, 1, chn+1);
_h_deltay[chn] = bookHisto1D(10, 1, chn+1);
_h_deltaphi[chn] = bookHisto1D(11, 1, chn+1);
_h_deltaR[chn] = bookHisto1D(12, 1, chn+1);
}
}
// Jet selection criteria universal for electron and muon channel
/// @todo Replace with a Cut passed to jetsByPt
Jets selectJets(const ZFinder* zf, const Event& event) {
FourMomentum l1 = zf->constituents()[0].momentum();
FourMomentum l2 = zf->constituents()[1].momentum();
Jets jets;
foreach (const Jet& jet, applyProjection<FastJets>(event, "jets").jetsByPt(30.0*GeV)) {
FourMomentum jmom = jet.momentum();
if (fabs(jmom.rapidity()) < 4.4 && deltaR(l1, jmom) > 0.5 && deltaR(l2, jmom) > 0.5) {
jets.push_back(jet);
}
}
return jets;
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
vector<const ZFinder*> zfs;
zfs.push_back(& (applyProjection<ZFinder>(event, "ZFinder_el")));
zfs.push_back(& (applyProjection<ZFinder>(event, "ZFinder_mu")));
// Require exactly one electronic or muonic Z-decay in the event
if (!( (zfs[0]->bosons().size() == 1 && zfs[1]->bosons().size() != 1) ||
(zfs[1]->bosons().size() == 1 && zfs[0]->bosons().size() != 1) )) vetoEvent;
int chn = zfs[0]->bosons().size() == 1 ? 0 : 1;
Jets jets = selectJets(zfs[chn], event);
/// @todo Holger wrote in his commit message that the njet_ratio
/// histograms need fixing/checking, and therefore the analysis
/// is marked unvalidated!
// Some silly weight counters for the njet-ratio histo
// --- not sure about the njet=0 case, the Figure caption says
// that selected events require at least one jet with 20 GeV
switch (jets.size()) {
case 0:
weights_nj0[chn] += weight;
break;
case 1:
weights_nj0[chn] += weight;
weights_nj1[chn] += weight;
break;
case 2:
weights_nj0[chn] += weight;
weights_nj1[chn] += weight;
weights_nj2[chn] += weight;
break;
case 3:
weights_nj0[chn] += weight;
weights_nj1[chn] += weight;
weights_nj2[chn] += weight;
weights_nj3[chn] += weight;
break;
default: // >= 4
weights_nj0[chn] += weight;
weights_nj1[chn] += weight;
weights_nj2[chn] += weight;
weights_nj3[chn] += weight;
weights_nj4[chn] += weight;
}
// Require at least one jet
if (jets.size() < 1) vetoEvent;
// Fill jet multiplicities
_h_njet_incl[chn]->fill(jets.size(), weight);
_h_njet_incl[2]->fill(jets.size(), weight);
// Loop over selected jets, fill inclusive jet distributions
for (size_t ijet = 0; ijet < jets.size(); ++ijet) {
_h_ptjet[chn]->fill(jets[ijet].pT()/GeV, weight);
_h_ptjet[2] ->fill(jets[ijet].pT()/GeV, weight);
_h_yjet[chn] ->fill(fabs(jets[ijet].rapidity()), weight);
_h_yjet[2] ->fill(fabs(jets[ijet].rapidity()), weight);
}
// Leading jet histos
const double ptlead = jets[0].pT()/GeV;
const double yabslead = fabs(jets[0].rapidity());
_h_ptlead[chn]->fill(ptlead, weight);
_h_ptlead[2] ->fill(ptlead, weight);
_h_ylead[chn] ->fill(yabslead, weight);
_h_ylead[2] ->fill(yabslead, weight);
if (jets.size() >= 2) {
// Second jet histos
const double pt2ndlead = jets[1].pT()/GeV;
const double yabs2ndlead = fabs(jets[1].rapidity());
_h_ptseclead[chn] ->fill(pt2ndlead, weight);
_h_ptseclead[2] ->fill(pt2ndlead, weight);
_h_yseclead[chn] ->fill(yabs2ndlead, weight);
_h_yseclead[2] ->fill(yabs2ndlead, weight);
// Dijet histos
const double deltaphi = fabs(deltaPhi(jets[1], jets[0]));
const double deltarap = fabs(jets[0].rapidity() - jets[1].rapidity()) ;
const double deltar = fabs(deltaR(jets[0], jets[1], RAPIDITY));
const double mass = (jets[0].momentum() + jets[1].momentum()).mass();
_h_mass[chn] ->fill(mass, weight);
_h_mass[2] ->fill(mass, weight);
_h_deltay[chn] ->fill(deltarap, weight);
_h_deltay[2] ->fill(deltarap, weight);
_h_deltaphi[chn]->fill(deltaphi, weight);
_h_deltaphi[2] ->fill(deltaphi, weight);
_h_deltaR[chn] ->fill(deltar, weight);
_h_deltaR[2] ->fill(deltar, weight);
}
}
/// @name Ratio calculator util functions
//@{
/// Calculate the ratio, being careful about div-by-zero
double ratio(double a, double b) {
return (b != 0) ? a/b : 0;
}
/// Calculate the ratio error, being careful about div-by-zero
double ratio_err(double a, double b) {
return (b != 0) ? sqrt(a/sqr(b) + sqr(a)/(b*b*b)) : 0;
}
/// Calculate combined ratio from muon and electron channels
double comb_ratio(double* as, double* bs) {
return ratio(as[0]+as[1], bs[0]+bs[1]);
}
/// Calculate combined ratio error from muon and electron channels
double comb_ratio_err(double* as, double* bs) {
return ratio_err(as[0]+as[1], bs[0]+bs[1]);
}
//@}
void finalize() {
// Fill ratio histograms
for (size_t chn = 0; chn < 2; ++chn) {
_h_njet_ratio[chn]->addPoint(1, ratio(weights_nj1[chn], weights_nj0[chn]), 0, ratio_err(weights_nj1[chn], weights_nj0[chn]));
_h_njet_ratio[chn]->addPoint(2, ratio(weights_nj2[chn], weights_nj1[chn]), 0, ratio_err(weights_nj2[chn], weights_nj1[chn]));
_h_njet_ratio[chn]->addPoint(3, ratio(weights_nj3[chn], weights_nj2[chn]), 0, ratio_err(weights_nj3[chn], weights_nj2[chn]));
_h_njet_ratio[chn]->addPoint(4, ratio(weights_nj4[chn], weights_nj3[chn]), 0, ratio_err(weights_nj4[chn], weights_nj3[chn]));
}
_h_njet_ratio[2]->addPoint(1, comb_ratio(weights_nj1, weights_nj0), 0, comb_ratio_err(weights_nj1, weights_nj0));
_h_njet_ratio[2]->addPoint(2, comb_ratio(weights_nj2, weights_nj1), 0, comb_ratio_err(weights_nj2, weights_nj1));
_h_njet_ratio[2]->addPoint(3, comb_ratio(weights_nj3, weights_nj2), 0, comb_ratio_err(weights_nj3, weights_nj2));
_h_njet_ratio[2]->addPoint(4, comb_ratio(weights_nj4, weights_nj3), 0, comb_ratio_err(weights_nj4, weights_nj3));
// Scale other histos
const double xs = crossSectionPerEvent()/picobarn;
for (size_t chn = 0; chn < 3; ++chn) {
scale(_h_njet_incl[chn], xs);
scale(_h_ptjet[chn] , xs);
scale(_h_ptlead[chn] , xs);
scale(_h_ptseclead[chn], xs);
scale(_h_yjet[chn] , xs);
scale(_h_ylead[chn] , xs);
scale(_h_yseclead[chn] , xs);
scale(_h_deltaphi[chn] , xs);
scale(_h_deltay[chn] , xs);
scale(_h_deltaR[chn] , xs);
scale(_h_mass[chn] , xs);
}
}
//@}
private:
double weights_nj0[3];
double weights_nj1[3];
double weights_nj2[3];
double weights_nj3[3];
double weights_nj4[3];
Scatter2DPtr _h_njet_ratio[3];
Histo1DPtr _h_njet_incl[3];
Histo1DPtr _h_ptjet[3];
Histo1DPtr _h_ptlead[3];
Histo1DPtr _h_ptseclead[3];
Histo1DPtr _h_yjet[3];
Histo1DPtr _h_ylead[3];
Histo1DPtr _h_yseclead[3];
Histo1DPtr _h_deltaphi[3];
Histo1DPtr _h_deltay[3];
Histo1DPtr _h_deltaR[3];
Histo1DPtr _h_mass[3];
};
DECLARE_RIVET_PLUGIN(ATLAS_2011_I945498);
}
diff --git a/src/Analyses/ATLAS_2011_I954993.cc b/src/Analyses/ATLAS_2011_I954993.cc
--- a/src/Analyses/ATLAS_2011_I954993.cc
+++ b/src/Analyses/ATLAS_2011_I954993.cc
@@ -1,137 +1,145 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/WFinder.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @brief MC validation analysis for WZ events
class ATLAS_2011_I954993 : public Analysis {
public:
/// Default constructor
ATLAS_2011_I954993()
: Analysis("ATLAS_2011_I954993")
{
setNeedsCrossSection(true);
}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
//// ZFinder: etaMin,etaMax,pTmin,pid,m2_min,m2_max,dRmax,clusterPhotons,excludePhotonsFromRFS
- ZFinder zfinder_e( -2.5, 2.5, 15.0*GeV, PID::ELECTRON, 81.1876*GeV, 101.1876*GeV, 0.1, true, true);
+ ZFinder zfinder_e( FinalState(),
+ Range(Cuts::eta, -2.5, 2.5) & (Cuts::pt >= 15*GeV),
+ PID::ELECTRON, 81.1876*GeV, 101.1876*GeV, 0.1, true, true);
addProjection(zfinder_e, "ZFinder_e");
- ZFinder zfinder_mu(-2.5, 2.5, 15.0*GeV, PID::MUON, 81.1876*GeV, 101.1876*GeV, 0.1, true, true);
+ ZFinder zfinder_mu(FinalState(),
+ Range(Cuts::eta, -2.5, 2.5) & (Cuts::pt >= 15*GeV),
+ PID::MUON, 81.1876*GeV, 101.1876*GeV, 0.1, true, true);
addProjection(zfinder_mu, "ZFinder_mu");
//// WFinder: etaRanges,pTmin,pid,m2_min,m2_max,missingET,dRmax
VetoedFinalState weinput;
weinput.addVetoOnThisFinalState(zfinder_e);
- WFinder wfinder_e(weinput, -2.5, 2.5, 15.0*GeV, PID::ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.1);
+ WFinder wfinder_e(weinput,
+ Range(Cuts::eta, -2.5, 2.5) & (Cuts::pt >= 15*GeV),
+ PID::ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.1);
addProjection(wfinder_e, "WFinder_e");
VetoedFinalState wminput;
wminput.addVetoOnThisFinalState(zfinder_mu);
- WFinder wfinder_mu(wminput,-2.5, 2.5, 15.0*GeV, PID::MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.1);
+ WFinder wfinder_mu(wminput,
+ Range(Cuts::eta, -2.5, 2.5) & (Cuts::pt >= 15*GeV),
+ PID::MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.1);
addProjection(wfinder_mu, "WFinder_mu");
//// Histograms
_h_fiducial = bookHisto1D(1,1,1);
}
/// Do the analysis
void analyze(const Event & e) {
const double weight = e.weight();
const ZFinder& zfinder_e = applyProjection<ZFinder>(e, "ZFinder_e");
const ZFinder& zfinder_mu = applyProjection<ZFinder>(e, "ZFinder_mu");
const WFinder& wfinder_e = applyProjection<WFinder>(e, "WFinder_e");
const WFinder& wfinder_mu = applyProjection<WFinder>(e, "WFinder_mu");
// Looking for a Z
if (zfinder_e.bosons().size()!= 1 && zfinder_mu.bosons().size() != 1) {
MSG_DEBUG("No Z boson found, vetoing event");
vetoEvent;
}
// Looking for a W
if (wfinder_e.bosons().size()!= 1 && wfinder_mu.bosons().size() != 1) {
MSG_DEBUG("No W boson found, vetoing event");
vetoEvent;
}
// If we find a W...
FourMomentum wmom_e(0.0,0.0,0.0,0.0), We(0.0,0.0,0.0,0.0), Wenu(0.0,0.0,0.0,0.0);
FourMomentum wmom_mu(0.0,0.0,0.0,0.0), Wmu(0.0,0.0,0.0,0.0), Wmunu(0.0,0.0,0.0,0.0);
if(wfinder_e.bosons().size()== 1){
wmom_e = wfinder_e.bosons().front().momentum();
We = wfinder_e.constituentLeptons()[0].momentum();
Wenu = wfinder_e.constituentNeutrinos()[0].momentum();
}
if(wfinder_mu.bosons().size()== 1){
wmom_mu = wfinder_mu.bosons().front().momentum();
Wmu = wfinder_mu.constituentLeptons()[0].momentum();
Wmunu = wfinder_mu.constituentNeutrinos()[0].momentum();
}
// Applying remaining fiducial phase space requirements
double mT = 0;
if(wfinder_e.bosons().size() == 1){
mT = sqrt(2*We.pT()*Wenu.Et()*(1.0-cos(We.phi()-Wenu.phi())));
if (Wenu.pT()/GeV < 25.0 || We.pT()/GeV < 20.0 || mT/GeV < 20.0) {
MSG_DEBUG(" Wnu.pT()/GeV:" << Wenu.pT()/GeV<<" Wl.pT()/GeV:" << We.pT()/GeV<<" mT/GeV:" << mT/GeV);
vetoEvent;
}
}
else if(wfinder_mu.bosons().size() == 1){
mT = sqrt(2*Wmu.pT()*Wmunu.Et()*(1.0-cos(Wmu.phi()-Wmunu.phi())));
if (Wmunu.pT()/GeV < 25.0 || Wmu.pT()/GeV < 20.0 || mT/GeV < 20.0) {
MSG_DEBUG(" Wnu.pT()/GeV:" << Wmunu.pT()/GeV<<" Wl.pT()/GeV:" << Wmu.pT()/GeV<<" mT/GeV:" << mT/GeV);
vetoEvent;
}
}
else{
MSG_DEBUG("No W boson found, can't make a transverse mass, vetoing event");
vetoEvent;
}
_h_fiducial->fill(7000.0, weight);
}
/// Finalize
void finalize() {
scale(_h_fiducial, crossSection()/femtobarn/sumOfWeights());
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_fiducial;
//@}
};
//// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_I954993);
}
diff --git a/src/Analyses/ATLAS_2011_S8983313.cc b/src/Analyses/ATLAS_2011_S8983313.cc
--- a/src/Analyses/ATLAS_2011_S8983313.cc
+++ b/src/Analyses/ATLAS_2011_S8983313.cc
@@ -1,336 +1,332 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2011_S8983313 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S8983313()
: Analysis("ATLAS_2011_S8983313")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ Cut pt10 = Cuts::pt > 10.0*GeV;
+
+ IdentifiedFinalState elecs( Range(Cuts::eta, -2.47, 2.47) & pt10 );
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// veto region electrons
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.37));
- eta_v_e.push_back(make_pair( 1.37, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.37) | Range(Cuts::eta, 1.37, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & pt10);
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons( Range(Cuts::eta, -2.4, 2.4) & pt10 );
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
/// Book histograms
_count_A = bookHisto1D("count_A", 1, 0., 1.);
_count_B = bookHisto1D("count_B", 1, 0., 1.);
_count_C = bookHisto1D("count_C", 1, 0., 1.);
_count_D = bookHisto1D("count_D", 1, 0., 1.);
_hist_meff_A = bookHisto1D("m_eff_A", 30, 0., 3000.);
_hist_mT2_B = bookHisto1D("m_T2", 25, 0., 1000.);
_hist_meff_CD = bookHisto1D("m_eff_C_D", 30, 0., 3000.);
_hist_eTmiss = bookHisto1D("Et_miss", 20, 0., 1000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 4.9 ) {
cand_jets.push_back(jet);
}
}
Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
Particles cand_mu;
Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
Jets cand_jets_2;
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) >= 2.5 )
cand_jets_2.push_back( jet );
else {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
cand_jets_2.push_back( jet );
}
}
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// final jet filter
Jets recon_jets;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( fabs( jet.eta() ) <= 2.5 )
recon_jets.push_back( jet );
}
// now only use recon_jets, recon_mu, recon_e
if ( ! ( recon_mu.empty() && recon_e.empty() ) ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
if ( eTmiss <= 100 * GeV ) {
MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 100");
vetoEvent;
}
if ( recon_jets.empty() || recon_jets[0].pT() <= 120.0 * GeV ) {
MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
vetoEvent;
}
// ==================== observables ====================
// Njets, min_dPhi
int Njets = 0;
double min_dPhi = 999.999;
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40 * GeV ) {
if ( Njets < 3 )
min_dPhi = min( min_dPhi,
deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
++Njets;
}
}
if ( Njets < 2 ) {
MSG_DEBUG("Only " << Njets << " >40 GeV jets left");
vetoEvent;
}
if ( min_dPhi <= 0.4 ) {
MSG_DEBUG("dPhi too small");
vetoEvent;
}
// m_eff
double m_eff_2j = eTmiss
+ recon_jets[0].pT()
+ recon_jets[1].pT();
double m_eff_3j = recon_jets.size() < 3 ? -999.0 : m_eff_2j + recon_jets[2].pT();
// etmiss / m_eff
double et_meff_2j = eTmiss / m_eff_2j;
double et_meff_3j = eTmiss / m_eff_3j;
FourMomentum a = recon_jets[0].momentum();
FourMomentum b = recon_jets[1].momentum();
double m_T2 = mT2::mT2( a,
b,
pTmiss,
0.0 ); // zero mass invisibles
// ==================== FILL ====================
MSG_DEBUG( "Trying to fill "
<< Njets << ' '
<< m_eff_2j << ' '
<< et_meff_2j << ' '
<< m_eff_3j << ' '
<< et_meff_3j << ' '
<< m_T2 );
_hist_eTmiss->fill(eTmiss, weight);
// AAAAAAAAAA
if ( et_meff_2j > 0.3 ) {
_hist_meff_A->fill(m_eff_2j, weight);
if ( m_eff_2j > 500 * GeV ) {
MSG_DEBUG("Hits A");
_count_A->fill(0.5, weight);
}
}
// BBBBBBBBBB
_hist_mT2_B->fill(m_T2, weight);
if ( m_T2 > 300 * GeV ) {
MSG_DEBUG("Hits B");
_count_B->fill(0.5, weight);
}
// need 3 jets for C and D
if ( Njets >= 3 && et_meff_3j > 0.25 ) {
_hist_meff_CD->fill(m_eff_3j, weight);
// CCCCCCCCCC
if ( m_eff_3j > 500 * GeV ) {
MSG_DEBUG("Hits C");
_count_C->fill(0.5, weight);
}
// DDDDDDDDDD
if ( m_eff_3j > 1000 * GeV ) {
MSG_DEBUG("Hits D");
_count_D->fill(0.5, weight);
}
}
}
//@}
void finalize() {
double norm = crossSection()/picobarn*35.0/sumOfWeights();
scale(_hist_meff_A ,100.*norm);
scale(_hist_mT2_B ,100.*norm);
scale(_hist_meff_CD, 40.*norm);
scale(_hist_eTmiss , 50.*norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_A;
Histo1DPtr _count_B;
Histo1DPtr _count_C;
Histo1DPtr _count_D;
Histo1DPtr _hist_meff_A;
Histo1DPtr _hist_mT2_B;
Histo1DPtr _hist_meff_CD;
Histo1DPtr _hist_eTmiss;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S8983313);
}
diff --git a/src/Analyses/ATLAS_2011_S9019561.cc b/src/Analyses/ATLAS_2011_S9019561.cc
--- a/src/Analyses/ATLAS_2011_S9019561.cc
+++ b/src/Analyses/ATLAS_2011_S9019561.cc
@@ -1,323 +1,319 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
class ATLAS_2011_S9019561 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S9019561()
: Analysis("ATLAS_2011_S9019561")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs( Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV) );
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// veto region electrons
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.37));
- eta_v_e.push_back(make_pair( 1.37, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.37) | Range(Cuts::eta, 1.37, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & (Cuts::pt >= 10.0*GeV));
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 20.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 20.0*GeV) );
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
/// book histograms
_count_OS_e_mu = bookHisto1D("count_OS_e+-mu-+", 1, 0., 1.);
_count_OS_e_e = bookHisto1D("count_OS_e+e-", 1, 0., 1.);
_count_OS_mu_mu = bookHisto1D("count_OS_mu+mu-", 1, 0., 1.);
_count_SS_e_mu = bookHisto1D("count_SS_e+-mu+-", 1, 0., 1.);
_count_SS_e_e = bookHisto1D("count_SS_e+-e+-", 1, 0., 1.);
_count_SS_mu_mu = bookHisto1D("count_SS_mu+-mu+-", 1, 0., 1.);
_hist_eTmiss_OS = bookHisto1D("Et_miss_OS", 20, 0., 400.);
_hist_eTmiss_SS = bookHisto1D("Et_miss_SS", 20, 0., 400.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.5 ) {
cand_jets.push_back(jet);
}
}
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// charged particle for isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// apply muon isolation
Particles cand_mu;
// pTcone around muon track
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// Discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// Leptons far from jet
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
bool e_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
e_near_jet = true;
break;
}
}
// Electron isolation criterion
if ( ! e_near_jet ) {
double EtinCone = -e.momentum().Et();
foreach ( const Particle & track, chg_tracks) {
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
EtinCone += track.momentum().Et();
}
if ( EtinCone/e.pT() <= 0.15 )
recon_e.push_back( e );
}
}
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
bool mu_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( ! mu_near_jet )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// Exactly two leptons for each event
if ( recon_mu.size() + recon_e.size() != 2)
vetoEvent;
// Lepton pair mass
FourMomentum p_leptons;
foreach ( Particle e, recon_e ) {
p_leptons += e.momentum();
}
foreach ( Particle mu, recon_mu) {
p_leptons += mu.momentum();
}
if ( p_leptons.mass() <= 5.0 * GeV)
vetoEvent;
// ==================== FILL ====================
// electron, electron
if (recon_e.size() == 2 ) {
// SS ee
if ( recon_e[0].pdgId() * recon_e[1].pdgId() > 0 ) {
_hist_eTmiss_SS->fill(eTmiss, weight);
if ( eTmiss > 100 ) {
MSG_DEBUG("Hits SS e+/-e+/-");
_count_SS_e_e->fill(0.5, weight);
}
}
// OS ee
else if ( recon_e[0].pdgId() * recon_e[1].pdgId() < 0) {
_hist_eTmiss_OS->fill(eTmiss, weight);
if ( eTmiss > 150 ) {
MSG_DEBUG("Hits OS e+e-");
_count_OS_e_e->fill(0.5, weight);
}
}
}
// muon, electron
else if ( recon_e.size() == 1 ) {
// SS mu_e
if ( recon_e[0].pdgId() * recon_mu[0].pdgId() > 0 ) {
_hist_eTmiss_SS->fill(eTmiss, weight);
if ( eTmiss > 100 ) {
MSG_DEBUG("Hits SS e+/-mu+/-");
_count_SS_e_mu->fill(0.5, weight);
}
}
// OS mu_e
else if ( recon_e[0].pdgId() * recon_mu[0].pdgId() < 0) {
_hist_eTmiss_OS->fill(eTmiss, weight);
if ( eTmiss > 150 ) {
MSG_DEBUG("Hits OS e+mu-");
_count_OS_e_mu->fill(0.5, weight);
}
}
}
// muon, muon
else if ( recon_mu.size() == 2 ) {
// SS mu_mu
if ( recon_mu[0].pdgId() * recon_mu[1].pdgId() > 0 ) {
_hist_eTmiss_SS->fill(eTmiss, weight);
if ( eTmiss > 100 ) {
MSG_DEBUG("Hits SS mu+/-mu+/-");
_count_SS_mu_mu->fill(0.5, weight);
}
}
// OS mu_mu
else if ( recon_mu[0].pdgId() * recon_mu[1].pdgId() < 0) {
_hist_eTmiss_OS->fill(eTmiss, weight);
if ( eTmiss > 150 ) {
MSG_DEBUG("Hits OS mu+mu-");
_count_OS_mu_mu->fill(0.5, weight);
}
}
}
}
//@}
void finalize() {
double norm = crossSection()/picobarn*35./sumOfWeights();
// event counts
scale(_count_OS_e_mu ,norm);
scale(_count_OS_e_e ,norm);
scale(_count_OS_mu_mu,norm);
scale(_count_SS_e_mu ,norm);
scale(_count_SS_e_e ,norm);
scale(_count_SS_mu_mu,norm);
scale(_hist_eTmiss_OS,10.*norm);
scale(_hist_eTmiss_SS,10.*norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_OS_e_mu;
Histo1DPtr _count_OS_e_e;
Histo1DPtr _count_OS_mu_mu;
Histo1DPtr _count_SS_e_mu;
Histo1DPtr _count_SS_e_e;
Histo1DPtr _count_SS_mu_mu;
Histo1DPtr _hist_eTmiss_OS;
Histo1DPtr _hist_eTmiss_SS;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9019561);
}
diff --git a/src/Analyses/ATLAS_2011_S9041966.cc b/src/Analyses/ATLAS_2011_S9041966.cc
--- a/src/Analyses/ATLAS_2011_S9041966.cc
+++ b/src/Analyses/ATLAS_2011_S9041966.cc
@@ -1,691 +1,687 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// 1-lepton and 2-lepton search for first or second generation leptoquarks
/// @todo Clean up the debug stuff
class ATLAS_2011_S9041966 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S9041966()
: Analysis("ATLAS_2011_S9041966"),
// DEBUG
count(0), vetoe(0), Njetscut(0), dilept(0),
candmumujj(0), candeejj(0), onelept(0),
eTmisscut(0), candmvjj(0), candevjj(0),
mumujj(0), eejj(0),
mTonelept(0), MLQonelept(0), MtLQonelept(0), Stvonelept(0),
mTev(0), MLQev(0), MtLQev(0), Stvev(0),
muvjj(0), evjj(0), emuvjj(0),
cande(0), candmu(0),
tmpe(0), tmpmu(0),
mumuZCR(0), eeZCR(0),
munuW2CR(0), munuttCR(0),
enuW2CR(0), enuttCR(0)
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// veto region electrons
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.35));
- eta_v_e.push_back(make_pair( 1.35, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.35) | Range(Cuts::eta, 1.35, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & (Cuts::pt >= 10.0*GeV));
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
///DEBUG
// projection to find all leptons
IdentifiedFinalState all_mu_e;
all_mu_e.acceptIdPair(PID::MUON);
all_mu_e.acceptIdPair(PID::ELECTRON);
addProjection(all_mu_e, "all_mu_e"); //debug
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 20.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 20.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairDetail(PID::MUON,20*GeV,7000*GeV);
vfs.addVetoPairDetail(PID::ELECTRON,20*GeV,7000*GeV);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
/// Book histograms
_count_mumujj = bookHisto1D("count_2muons_dijet", 1, 0., 1.);
_count_eejj = bookHisto1D("count_2elecs_dijet", 1, 0., 1.);
_count_muvjj = bookHisto1D("count_muon_neutrino_dijet", 1, 0., 1.);
_count_evjj = bookHisto1D("count_elec_neutrino_dijet", 1, 0., 1.);
_hist_St_mumu = bookHisto1D("hist_mumujj_St", 10, 450., 1650.);
_hist_St_ee = bookHisto1D("hist_eejj_St", 10, 450., 1650.);
_hist_MLQ_muv = bookHisto1D("hist_munujj_MLQ", 9, 150., 600.);
_hist_MLQ_ev = bookHisto1D("hist_enujj_MLQ", 9, 150., 600.);
_hist_St_mumu_ZCR = bookHisto1D("CR_Zjets_St_mumu", 40, 0., 800.);
_hist_St_ee_ZCR = bookHisto1D("CR_Zjets_Stee", 40, 0., 800.);
_hist_MLQ_munu_W2CR = bookHisto1D("CR_W2jets_MLQ_munu", 20, 0., 400.);
_hist_MLQ_enu_W2CR = bookHisto1D("CR_W2jets_MLQ_enu", 20, 0., 400.);
_hist_MLQ_munu_ttCR = bookHisto1D("CR_tt_MLQ_munu", 35, 0., 700.);
_hist_MLQ_enu_ttCR = bookHisto1D("CR_tt_MLQ_enu", 35, 0., 700.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
///DEBUG
count +=1; //cerr<< "Event " << count << '\n';
// debug
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
++vetoe;
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
Particles candtemp_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
Particles candtemp_mu =
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
Particles cand_mu;
Particles cand_e;
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
// pTcone around muon track
foreach ( const Particle & mu, candtemp_mu ) {
++tmpmu;
double pTinCone = -mu.pT();
foreach ( const Particle & track, vfs_particles ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone/mu.pT() < 0.25 )
++candmu;
cand_mu.push_back(mu);
}
// pTcone around electron
foreach ( const Particle e, candtemp_e ) {
++tmpe;
double pTinCone = -e.pT();
foreach ( const Particle & track, vfs_particles ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone/e.pT() < 0.2 )
++cande;
cand_e.push_back(e);
}
if ( cand_e.empty() && cand_mu.empty() ) {
//cerr<<" ->Event vetoed. No candidate lept"<<'\n';
vetoEvent;
}
//DEBUG
// else{
// foreach (const Particle & mu, cand_mu) {
// cerr << "cand mu: " << "Id " << mu.pdgId() << " eta " << mu.eta() << " pT " << mu.pT() << '\n';
// }
// foreach (const Particle & lepton, cand_e) {
// cerr << "cand e: " << "Id " << lepton.pdgId() << " eta " << lepton.eta() << " pT " << lepton.pT() << '\n';
// }} // debug
// pTmiss
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// discard jets that overlap with leptons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_lept = true;
foreach ( const Particle e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.5 ) {
away_from_lept = false;
break;
}
}
foreach ( const Particle & mu, cand_mu ) {
if ( deltaR(mu.momentum(),jet.momentum()) <= 0.5 ) {
away_from_lept = false;
break;
}
}
if ( away_from_lept )
recon_jets.push_back( jet );
}
//DEBUG
// cerr << " Num of recon jets: " << recon_jets.size() << '\n';
// cerr << " Num of cand e: " << cand_e.size() << '\n';
// cerr << " Num of cand mu: " << cand_mu.size() << '\n';
//debug
// ================ OBSERVABLES ================
// At least 2 hard jets
if ( recon_jets.size() < 2 ) {
//cerr << " ->Event vetoed. Not enough hard jets." << '\n';
vetoEvent;
}
++Njetscut;
// Initialize variables for observables
double M_ll=0., M_LQ=0., St_ll=0., Mt_LQ=0., St_v=0., mT=0.;
FourMomentum p_l, p_l1, p_l2, p_j[2];
p_j[0] = recon_jets[0].momentum();
p_j[1] = recon_jets[1].momentum();
Particles dilept_pair;
bool single_lept = false;
if ( cand_mu.size() == 2 && cand_e.empty() ) {
++candmumujj;
foreach ( const Particle& mu, cand_mu )
dilept_pair.push_back(mu);
}
else if ( cand_e.size() == 2 && cand_mu.empty() ) {
++candeejj;
foreach ( const Particle& e, cand_e )
dilept_pair.push_back(e);
}
else if ( cand_mu.size() == 1 && cand_e.empty() ) {
++candmvjj;
p_l = cand_mu[0].momentum();
single_lept = true;
}
else if ( cand_e.size() == 1 && cand_mu.empty() ) {
++candevjj;
p_l = cand_e[0].momentum();
single_lept = true;
}
// Dilepton channel observables
if ( ! dilept_pair.empty() ) {
double E_l1, E_l2, E_j1, E_j2;
double tmpM_LQ1[2], tmpM_LQ2[2], M_LQDiff1, M_LQDiff2;
p_l1 = dilept_pair[0].momentum();
p_l2 = dilept_pair[1].momentum();
E_l1 = p_l1.E();
E_l2 = p_l2.E();
E_j1 = p_j[0].E();
E_j2 = p_j[1].E();
// Calculate possible leptoquark mass M_LQ and reconstruct average M_LQ
tmpM_LQ1[0] = E_l1 + E_j1;
tmpM_LQ1[1] = E_l2 + E_j2;
M_LQDiff1 = abs( tmpM_LQ1[0] - tmpM_LQ1[1] );
tmpM_LQ2[0] = E_l1 + E_j2;
tmpM_LQ2[1] = E_l2 + E_j1;
M_LQDiff2 = abs( tmpM_LQ2[0] - tmpM_LQ2[1] );
if ( M_LQDiff1 > M_LQDiff2 )
M_LQ = ( tmpM_LQ2[0] + tmpM_LQ2[1] ) / 2;
else
M_LQ = ( tmpM_LQ1[0] + tmpM_LQ1[1] ) / 2;
// Calculate event transverse energy St
St_ll = p_l1.pT() + p_l2.pT() + p_j[0].pT() + p_j[1].pT();
// Dilept pair invariant mass M_ll
M_ll = E_l1 + E_l2;
}
// 1-lepton channel observables
else if ( single_lept ) {
double tmpM_LQ[2], tmpMt_LQ[2], dPhi_j[2], M_LQDiff1, M_LQDiff2;
// List of possible M_LQ, Mt_LQ pairings
for ( int i = 0; i < 2; ++i ) {
tmpM_LQ[i] = p_l.E() + p_j[i].E();
dPhi_j[1-i] = deltaPhi( p_j[1-i].phi(), pTmiss.phi() );
tmpMt_LQ[i] = sqrt( 2 * p_j[1-i].pT() * eTmiss * (1 - cos( dPhi_j[1-i] )) );
}
// Choose pairing that gives smallest absolute difference
M_LQDiff1 = abs( tmpM_LQ[0] - tmpMt_LQ[0] );
M_LQDiff2 = abs( tmpM_LQ[1] - tmpMt_LQ[1] );
if ( M_LQDiff1 > M_LQDiff2 ) {
M_LQ = tmpM_LQ[1];
Mt_LQ = tmpMt_LQ[1];
}
else {
M_LQ = tmpM_LQ[0];
Mt_LQ = tmpMt_LQ[0];
}
// Event transverse energy
St_v = p_l.pT() + eTmiss + p_j[0].pT() + p_j[1].pT();
// Transverse mass mT
double dPhi_l = deltaPhi( p_l.phi(), pTmiss.phi());
mT = sqrt( 2 * p_l.pT() * eTmiss * (1 - cos(dPhi_l)) );
}
// ============== CONTROL REGIONS ===============
// mumujj, Z control region
if ( cand_mu.size() == 2 ) {
if ( M_ll >= 81*GeV && M_ll <= 101*GeV ) {
++mumuZCR;
_hist_St_mumu_ZCR->fill(St_ll, weight);
}
}
// eejj, Z control region
else if ( cand_e.size() == 2 ) {
if ( M_ll >= 81*GeV && M_ll <= 101*GeV ) {
++eeZCR;
_hist_St_ee_ZCR->fill(St_ll, weight);
}
}
if ( cand_mu.size() == 1 ) {
// munujj, W+2jets control region
if ( recon_jets.size() == 2 &&
mT >= 40*GeV && mT <= 150*GeV ) {
++munuW2CR;
_hist_MLQ_munu_W2CR->fill(M_LQ, weight);
}
// munujj, tt control region
if ( recon_jets.size() >= 4 &&
recon_jets[0].pT() > 50*GeV && recon_jets[1].pT() > 40*GeV && recon_jets[2].pT() > 30*GeV ) {
++munuttCR;
_hist_MLQ_munu_ttCR->fill(M_LQ, weight);
}
}
if ( cand_e.size() == 1 ) {
// enujj, W+2jets control region
if ( recon_jets.size() == 2 &&
mT >= 40*GeV && mT <= 150*GeV ) {
++enuW2CR;
_hist_MLQ_enu_W2CR->fill(M_LQ, weight);
}
// enujj, tt control region
if ( recon_jets.size() >= 4 &&
recon_jets[0].pT() > 50*GeV && recon_jets[1].pT() > 40*GeV && recon_jets[2].pT() > 30*GeV ) {
++enuttCR;
_hist_MLQ_enu_ttCR->fill(M_LQ, weight);
}
}
// ========= PRESELECTION =======================
// Single lepton channel cuts
if ( single_lept ) {
if ( eTmiss <= 25*GeV ) {
//cerr << " ->Event vetoed. eTmiss=" << eTmiss << '\n';
vetoEvent;
}
++eTmisscut;
if ( mT <= 40*GeV )
vetoEvent;
//++mTcut;
// enujj channel
if ( cand_e.size() == 1 && cand_mu.empty() ) {
// Triangle cut
double dPhi_jet1 = deltaPhi( recon_jets[0].phi(), pTmiss.phi() );
double dPhi_jet2 = deltaPhi( recon_jets[1].phi(), pTmiss.phi() );
if ( dPhi_jet1 <= 1.5 * (1 - eTmiss/45) ||
dPhi_jet2 <= 1.5 * (1 - eTmiss/45) ) {
++emuvjj;
vetoEvent;
}
}
}
// ==================== FILL ====================
// mumujj channel
if ( cand_mu.size() == 2 ) {
if ( M_ll <= 120*GeV ||
M_LQ <= 150*GeV ||
p_l1.pT() <= 30*GeV || p_l2.pT() <= 30*GeV ||
p_j[0].pT() <= 30*GeV || p_j[1].pT() <= 30*GeV ||
St_ll <= 450*GeV ) {
//cerr<<" ->Dilept event vetoed. Table 4 cuts." << '\n';
vetoEvent;
}
else {
++mumujj;
// cerr<< " ->MUMUJJ event selected." << '\n';
_hist_St_mumu->fill(St_ll, weight);
_count_mumujj->fill(0.5, weight);
}
}
// eejj channel
else if ( cand_e.size() == 2 ) {
if ( M_ll <= 120*GeV ||
M_LQ <= 150*GeV ||
p_l1.pT() <= 30*GeV || p_l2.pT() <= 30*GeV ||
p_j[0].pT() <= 30*GeV || p_j[1].pT() <= 30*GeV ||
St_ll <= 450*GeV ) {
//cerr<<" ->Dilept event vetoed. Table 4 cuts." << '\n';
vetoEvent;
}
else {
++eejj;
//cerr<< " ->EEJJ event selected." << '\n';
_hist_St_ee->fill(St_ll, weight);
_count_eejj->fill(0.5, weight);
}
}
// muvjj channel
else if ( cand_mu.size() == 1 ) {
if (M_LQ<=150*GeV) {
//cerr<<" ->muvjj event vetoed. Not enough M_LQ: " << M_LQ<< '\n';
vetoEvent;
}
++MLQonelept;
if (Mt_LQ<=150*GeV) {
//cerr<<" ->muvjj event vetoed. Not enough Mt_LQ: " << Mt_LQ<< '\n';
vetoEvent;
}
++MtLQonelept;
if (St_v<=400*GeV) {
//cerr<<" ->muvjj event vetoed. Not enough St_v: " << St_v<< '\n';
vetoEvent;
}
++Stvonelept;
if (mT<=160*GeV) {
//cerr<<" ->muvjj event vetoed. Not enough mT: " << mT<<'\n';
vetoEvent;
}
++mTonelept;
//else {
++muvjj;
//cerr<< " ->MUVJJ event selected." << '\n';
_hist_MLQ_muv->fill(M_LQ, weight);
_count_muvjj->fill(0.5, weight);
//}
}
// evjj channel
else if ( cand_e.size() == 1 ) {
if (M_LQ<=180*GeV) {
//cerr<<" ->evjj event vetoed. Not enough M_LQ: " << M_LQ<< '\n';
vetoEvent;
}
++MLQev;
if (Mt_LQ<=180*GeV) {
//cerr<<" ->evjj event vetoed. Not enough Mt_LQ: " << Mt_LQ<< '\n';
vetoEvent;
}
++MtLQev;
if (St_v<=410*GeV) {
//cerr<<" ->evjj event vetoed. Not enough St_v: " << St_v<< '\n';
vetoEvent;
}
++Stvev;
if (mT<=200*GeV) {
//cerr<<" ->evjj event vetoed. Not enough mT: " << mT<<'\n';
vetoEvent;
}
++mTev;
//else {
++evjj;
//cerr<< " ->EVJJ event selected." << '\n';
_hist_MLQ_ev->fill(M_LQ, weight);
_count_evjj->fill(0.5, weight);
// if ( mT <= 200*GeV ||
// M_LQ <= 180*GeV ||
// Mt_LQ <= 180*GeV ||
// St_v <= 410*GeV ) {
// cerr<<" ->evjj event vetoed. Doesn't pass table 4 cuts." << '\n';
// vetoEvent;
// }
// else {
// ++evjj;
// cerr<< " ->EVJJ event selected." << '\n';
// _hist_MLQ_ev->fill(M_LQ, weight);
// _count_evjj->fill(0.5, weight);
// }
}
}
//@}
void finalize() {
// cerr << '\n' << "Of " << count << " events, saw "
// << vetoe << " (after veto region cut), "
// << Njetscut << " (after 2jet req). "
// << '\n'
// << "For " << dilept << " dilept events: "
// << candmumujj << " cand mumujj events, "
// << candeejj << " cand eejj events."
// << '\n'
// << "For " << onelept << " onelept events: "
// << candmvjj << " preselected mvjj events, "
// << candevjj << " preselected evjj events; "
// << eTmisscut << " (eTmiss req); "
// << emuvjj << " leftover; "
// << MLQonelept << " (muvjj M_LQ cut), "
// << MtLQonelept << " (muvjj Mt_LQ cut), "
// << Stvonelept << " (muvjj St_v cut), "
// << mTonelept << " (muvjj mT cut); "
// << MLQev << " (evjj M_LQ cut), "
// << MtLQev << " (evjj Mt_LQ cut), "
// << Stvev << " (evjj St_v cut), "
// << mTev << " (evjj mT cut). "
// << '\n'<<'\n'
// ;
// cerr << "CR - " << "mumu Z: " << mumuZCR << " ee Z: " << eeZCR << " munu W+2jets: " << munuW2CR << " munu tt: " << munuttCR << " enu W+2jets: " << enuW2CR << " enu tt: " << enuttCR << '\n';
// cerr << "mumujj: " << mumujj << " eejj: " << eejj << " muvjj: " << muvjj << " evjj: " << evjj << '\n';
scale( _hist_St_ee, 120. * 35. * crossSection()/sumOfWeights() );
scale( _hist_St_mumu, 120. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_muv, 50. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_ev, 50. * 35. * crossSection()/sumOfWeights() );
scale( _hist_St_mumu_ZCR, 20. * 35. * crossSection()/sumOfWeights() );
scale( _hist_St_ee_ZCR, 20. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_munu_W2CR, 20. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_enu_W2CR, 20. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_munu_ttCR, 20. * 35. * crossSection()/sumOfWeights() );
scale( _hist_MLQ_enu_ttCR, 20. * 35. * crossSection()/sumOfWeights() );
/*
scale( _hist_eTmiss_mu, binwidth*luminosity* crossSection()/sumOfWeights() );
*/
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_mumujj;
Histo1DPtr _count_eejj;
Histo1DPtr _count_muvjj;
Histo1DPtr _count_evjj;
Histo1DPtr _hist_St_mumu;
Histo1DPtr _hist_St_ee;
Histo1DPtr _hist_MLQ_muv;
Histo1DPtr _hist_MLQ_ev;
Histo1DPtr _hist_St_mumu_ZCR;
Histo1DPtr _hist_St_ee_ZCR;
Histo1DPtr _hist_MLQ_munu_W2CR;
Histo1DPtr _hist_MLQ_enu_W2CR;
Histo1DPtr _hist_MLQ_munu_ttCR;
Histo1DPtr _hist_MLQ_enu_ttCR;
//@}
// DEBUG VARIABLES
int count;
int vetoe;
int Njetscut;
int dilept;
int candmumujj;
int candeejj;
int onelept;
int eTmisscut;
int candmvjj;
int candevjj;
int mumujj;
int eejj;
int mTonelept;
int MLQonelept;
int MtLQonelept;
int Stvonelept;
int mTev;
int MLQev;
int MtLQev;
int Stvev;
int muvjj;
int evjj;
int emuvjj;
int cande;
int candmu;
int tmpe;
int tmpmu;
int mumuZCR;
int eeZCR;
int munuW2CR;
int munuttCR;
int enuW2CR;
int enuttCR;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9041966);
}
diff --git a/src/Analyses/ATLAS_2011_S9212183.cc b/src/Analyses/ATLAS_2011_S9212183.cc
--- a/src/Analyses/ATLAS_2011_S9212183.cc
+++ b/src/Analyses/ATLAS_2011_S9212183.cc
@@ -1,333 +1,331 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @author Chris Wymant
class ATLAS_2011_S9212183 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S9212183()
: Analysis("ATLAS_2011_S9212183")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs( Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV) );
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// Projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons( Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV) );
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
addProjection(FastJets(FinalState(), FastJets::ANTIKT, 0.4), "AntiKtJets04");
// All tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
addProjection(VisibleFinalState(-4.5,4.5),"vfs");
// Book histograms
_count_2j = bookHisto1D("count_2j", 1, 0., 1.);
_count_3j = bookHisto1D("count_3j", 1, 0., 1.);
_count_4j5 = bookHisto1D("count_4j5", 1, 0., 1.);
_count_4j10 = bookHisto1D("count_4j10", 1, 0., 1.);
_count_HM = bookHisto1D("count_HM", 1, 0., 1.);
_hist_meff_2j = bookHisto1D(1, 1, 1);
_hist_meff_3j = bookHisto1D(2, 1, 1);
_hist_meff_4j = bookHisto1D(3, 1, 1);
_hist_meff_HM = bookHisto1D(4, 1, 1);
_hist_eTmiss = bookHisto1D("Et_miss", 20, 0., 1000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Jets cand_jets;
const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
foreach (const Jet& jet, jets) {
if ( fabs( jet.eta() ) < 4.9 ) {
cand_jets.push_back(jet);
}
}
const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// Muon isolation not mentioned in hep-exp 1109.6572, unlike in 1102.5290,
// but assumed to still be applicable
Particles cand_mu;
const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
foreach (const Particle& mu, muons) {
double pTinCone = -mu.pT();
foreach (const Particle& track, chg_tracks) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
pTinCone += track.pT();
}
}
if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
}
// Resolve jet-lepton overlap for jets with |eta| < 2.8
Jets cand_jets_2;
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) >= 2.8 ) {
cand_jets_2.push_back( jet );
} else {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) cand_jets_2.push_back( jet );
}
}
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_mu.push_back( mu );
}
// pTmiss
// Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
// i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
foreach ( const Jet& jet, cand_jets_2 ) {
if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum();
}
double eTmiss = pTmiss.pT();
// Final jet filter
Jets recon_jets;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( fabs( jet.eta() ) <= 2.8 ) recon_jets.push_back( jet );
}
// NB. It seems that jets with |eta| > 2.8 could have been thrown away at
// the start; we don't do so, in order to follow both the structure of
// the paper and the similar Rivet analysis ATLAS_2011_S8983313
// 'candidate' muons needed only 10 GeV, to cause a veto they need 20 GeV
Particles veto_mu;
foreach ( const Particle & mu, cand_mu ) {
if ( mu.pT() >= 20.0*GeV ) veto_mu.push_back(mu);
}
if ( ! ( veto_mu.empty() && recon_e.empty() ) ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
if ( eTmiss <= 130 * GeV ) {
MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
vetoEvent;
}
if ( recon_jets.empty() || recon_jets[0].pT() <= 130.0 * GeV ) {
MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
vetoEvent;
}
// ==================== observables ====================
int Njets = 0;
double min_dPhi = 999.999;
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40 * GeV ) {
if ( Njets < 3 ) {
min_dPhi = min( min_dPhi, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
}
++Njets;
}
}
int NjetsHighMass = 0;
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 80.0 * GeV ) {
++NjetsHighMass;
}
}
if ( Njets < 2 ) {
MSG_DEBUG("Only " << Njets << " >40 GeV jets left");
vetoEvent;
}
if ( min_dPhi <= 0.4 ) {
MSG_DEBUG("dPhi too small");
vetoEvent;
}
// m_eff
double m_eff_2j = eTmiss + recon_jets[0].pT() + recon_jets[1].pT();
double m_eff_3j = recon_jets.size() < 3 ? -999.0 : m_eff_2j + recon_jets[2].pT();
double m_eff_4j = recon_jets.size() < 4 ? -999.0 : m_eff_3j + recon_jets[3].pT();
double m_eff_HM = eTmiss;
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40.0 * GeV ) m_eff_HM += jet.pT();
}
double et_meff_2j = eTmiss / m_eff_2j;
double et_meff_3j = eTmiss / m_eff_3j;
double et_meff_4j = eTmiss / m_eff_4j;
double et_meff_HM = eTmiss / m_eff_HM;
// ==================== FILL ====================
MSG_DEBUG( "Trying to fill "
<< Njets << ' '
<< m_eff_2j << ' '
<< et_meff_2j << ' '
<< m_eff_3j << ' '
<< et_meff_3j << ' '
<< m_eff_4j << ' '
<< et_meff_4j << ' '
<< m_eff_HM << ' '
<< et_meff_HM );
_hist_eTmiss->fill(eTmiss, weight);
// 2j region
if ( et_meff_2j > 0.3 ) {
_hist_meff_2j->fill(m_eff_2j, weight);
if ( m_eff_2j > 1000 * GeV ) {
MSG_DEBUG("Hits 2j");
_count_2j->fill(0.5, weight);
}
}
// 3j region
if ( Njets >= 3 && et_meff_3j > 0.25 ) {
_hist_meff_3j->fill(m_eff_3j, weight);
if ( m_eff_3j > 1000 * GeV ) {
MSG_DEBUG("Hits 3j");
_count_3j->fill(0.5, weight);
}
}
// 4j5 & 4j10 regions
if ( Njets >= 4 && et_meff_4j > 0.25 ) {
_hist_meff_4j->fill(m_eff_4j, weight);
if ( m_eff_4j > 500 * GeV ) {
MSG_DEBUG("Hits 4j5");
_count_4j5->fill(0.5, weight);
}
if ( m_eff_4j > 1000 * GeV ) {
MSG_DEBUG("Hits 4j10");
_count_4j10->fill(0.5, weight);
}
}
// High mass region
if ( NjetsHighMass >= 4 && et_meff_HM > 0.2 ) {
_hist_meff_HM->fill(m_eff_HM, weight);
if ( m_eff_HM > 1100 * GeV ) {
MSG_DEBUG("Hits HM");
_count_HM->fill(0.5, weight);
}
}
}
void finalize() {
// Two, three and four jet channels have bin width = 100 (GeV)
// High mass channel has bin width = 150 (GeV)
// Integrated luminosity = 1040 (pb)
scale( _hist_meff_2j, 100. * 1040 * crossSection()/sumOfWeights() );
scale( _hist_meff_3j, 100. * 1040 * crossSection()/sumOfWeights() );
scale( _hist_meff_4j, 100. * 1040 * crossSection()/sumOfWeights() );
scale( _hist_meff_HM, 150. * 1040 * crossSection()/sumOfWeights() );
}
//@}
private:
Histo1DPtr _count_2j;
Histo1DPtr _count_3j;
Histo1DPtr _count_4j5;
Histo1DPtr _count_4j10;
Histo1DPtr _count_HM;
Histo1DPtr _hist_meff_2j;
Histo1DPtr _hist_meff_3j;
Histo1DPtr _hist_meff_4j;
Histo1DPtr _hist_meff_HM;
Histo1DPtr _hist_eTmiss;
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9212183);
}
diff --git a/src/Analyses/ATLAS_2011_S9212353.cc b/src/Analyses/ATLAS_2011_S9212353.cc
--- a/src/Analyses/ATLAS_2011_S9212353.cc
+++ b/src/Analyses/ATLAS_2011_S9212353.cc
@@ -1,517 +1,513 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
class ATLAS_2011_S9212353 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S9212353()
: Analysis("ATLAS_2011_S9212353")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// veto region electrons (from 2010 arXiv:1102.2357v2)
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.37));
- eta_v_e.push_back(make_pair( 1.37, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.37) | Range(Cuts::eta, 1.37, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & (Cuts::pt >= 10.0*GeV));
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.5,4.5),"vfs");
/// Book histograms
_3jl_count_mu_channel = bookHisto1D("3jl_count_muon_channel", 1, 0., 1.);
_3jl_count_e_channel = bookHisto1D("3jl_count_electron_channel", 1, 0., 1.);
_3jt_count_mu_channel = bookHisto1D("3jt_count_muon_channel", 1, 0., 1.);
_3jt_count_e_channel = bookHisto1D("3jt_count_electron_channel", 1, 0., 1.);
_3j_hist_eTmiss_e = bookHisto1D("3j_Et_miss_e", 65, 0., 650.);
_3j_hist_eTmiss_mu = bookHisto1D("3j_Et_miss_mu", 65, 0., 650.);
_3j_hist_mT_e = bookHisto1D("3j_mT_e", 58, 0., 580.);
_3j_hist_mT_mu = bookHisto1D("3j_mT_mu", 58, 0., 580.);
_3j_hist_m_eff_e = bookHisto1D("3j_m_eff_e", 46, 0., 2300.);
_3j_hist_m_eff_mu = bookHisto1D("3j_m_eff_mu", 46, 0., 2300.);
_3jl_hist_m_eff_e_final = bookHisto1D("3jl_m_eff_e_final", 15, 0., 1500.);
_3jl_hist_m_eff_mu_final = bookHisto1D("3jl_m_eff_mu_final", 15, 0., 1500.);
_3jt_hist_m_eff_e_final = bookHisto1D("3jt_m_eff_e_final", 15, 0., 1500.);
_3jt_hist_m_eff_mu_final = bookHisto1D("3jt_m_eff_mu_final", 15, 0., 1500.);
_4jl_count_mu_channel = bookHisto1D("4jl_count_muon_channel", 1, 0., 1.);
_4jl_count_e_channel = bookHisto1D("4jl_count_electron_channel", 1, 0., 1.);
_4jt_count_mu_channel = bookHisto1D("4jt_count_muon_channel", 1, 0., 1.);
_4jt_count_e_channel = bookHisto1D("4jt_count_electron_channel", 1, 0., 1.);
_4j_hist_eTmiss_e = bookHisto1D("4j_Et_miss_e", 65, 0., 650.);
_4j_hist_eTmiss_mu = bookHisto1D("4j_Et_miss_mu", 65, 0., 650.);
_4j_hist_mT_e = bookHisto1D("4j_mT_e", 58, 0., 580.);
_4j_hist_mT_mu = bookHisto1D("4j_mT_mu", 58, 0., 580.);
_4j_hist_m_eff_e = bookHisto1D("4j_m_eff_e", 46, 0., 2300.);
_4j_hist_m_eff_mu = bookHisto1D("4j_m_eff_mu", 46, 0., 2300.);
_4jl_hist_m_eff_e_final = bookHisto1D("4jl_m_eff_e_final", 15, 0., 1500.);
_4jl_hist_m_eff_mu_final = bookHisto1D("4jl_m_eff_mu_final", 15, 0., 1500.);
_4jt_hist_m_eff_e_final = bookHisto1D("4jt_m_eff_e_final", 15, 0., 1500.);
_4jt_hist_m_eff_mu_final = bookHisto1D("4jt_m_eff_mu_final", 15, 0., 1500.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
Particles candtemp_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
Particles candtemp_mu =
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
Particles cand_mu;
Particles cand_e;
// pTcone around muon track
foreach ( const Particle & mu, candtemp_mu ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// pTcone around electron
foreach ( const Particle e, candtemp_e ) {
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1 * e.pT() )
cand_e.push_back(e);
}
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// only consider leptons far from jet
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool e_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 &&
deltaR(e.momentum(),jet.momentum()) > 0.2 )
e_near_jet = true;
}
if ( ! e_near_jet )
recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool mu_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
mu_near_jet = true;
}
if ( ! mu_near_jet )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// ==================== observables ====================
// Njets
int Njets = 0;
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( fabs(jet.eta()) < 2.8 )
Njets+=1;
}
if ( Njets < 3 ) {
MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
vetoEvent;
}
Particles lepton;
if ( recon_mu.empty() && recon_e.empty() ) {
MSG_DEBUG("No leptons");
vetoEvent;
}
else {
foreach ( const Particle & mu, recon_mu )
lepton.push_back(mu);
foreach ( const Particle & e, recon_e )
lepton.push_back(e);
}
std::sort(lepton.begin(), lepton.end(), cmpParticleByPt);
double e_id = 11;
double mu_id = 13;
// one hard leading lepton cut
if ( fabs(lepton[0].pdgId()) == e_id &&
lepton[0].pT() <= 25*GeV ) {
vetoEvent;
}
else if ( fabs(lepton[0].pdgId()) == mu_id &&
lepton[0].pT() <= 20*GeV ) {
vetoEvent;
}
// exactly one hard leading lepton cut
if(lepton.size()>1) {
if ( fabs(lepton[1].pdgId()) == e_id &&
lepton[1].pT() > 20*GeV ) {
vetoEvent;
}
else if ( fabs(lepton[1].pdgId()) == mu_id &&
lepton[1].pT() > 10*GeV ) {
vetoEvent;
}
}
// 3JL
if ( recon_jets[0].pT() > 60.0*GeV &&
recon_jets[1].pT() > 25.0*GeV &&
recon_jets[2].pT() > 25.0*GeV &&
deltaPhi( pTmiss_phi, recon_jets[0].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[1].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[2].momentum().phi() ) > 0.2 ) {
FourMomentum pT_l = lepton[0].momentum();
double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
double m_eff = eTmiss + pT_l.pT()
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT();
if ( fabs( lepton[0].pdgId() ) == e_id ) {
_3j_hist_mT_e->fill(mT, weight);
_3j_hist_eTmiss_e->fill(eTmiss, weight);
_3j_hist_m_eff_e->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 125*GeV ) {
_3jl_hist_m_eff_e_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
_3jl_count_e_channel->fill(0.5,weight);
}
}
}
else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
_3j_hist_mT_mu->fill(mT, weight);
_3j_hist_eTmiss_mu->fill(eTmiss, weight);
_3j_hist_m_eff_mu->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 125*GeV ) {
_3jl_hist_m_eff_mu_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
_3jl_count_mu_channel->fill(0.5,weight);
}
}
}
}
// 3JT
if ( recon_jets[0].pT() > 80.0*GeV &&
recon_jets[1].pT() > 25.0*GeV &&
recon_jets[2].pT() > 25.0*GeV &&
deltaPhi( pTmiss_phi, recon_jets[0].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[1].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[2].momentum().phi() ) > 0.2 ) {
FourMomentum pT_l = lepton[0].momentum();
double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
double m_eff = eTmiss + pT_l.pT()
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT();
if ( fabs( lepton[0].pdgId() ) == e_id ) {
if ( mT > 100*GeV && eTmiss > 240*GeV ) {
_3jt_hist_m_eff_e_final->fill(m_eff, weight);
if ( m_eff > 600*GeV && eTmiss > 0.15*m_eff ) {
_3jt_count_e_channel->fill(0.5,weight);
}
}
}
else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
if ( mT > 100*GeV && eTmiss > 240*GeV ) {
_3jt_hist_m_eff_mu_final->fill(m_eff, weight);
if ( m_eff > 600*GeV && eTmiss > 0.15*m_eff ) {
_3jt_count_mu_channel->fill(0.5,weight);
}
}
}
}
if ( Njets < 4 ) {
MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
vetoEvent;
}
// 4JL
if ( recon_jets[0].pT() > 60.0*GeV &&
recon_jets[1].pT() > 25.0*GeV &&
recon_jets[2].pT() > 25.0*GeV &&
recon_jets[3].pT() > 25.0*GeV &&
deltaPhi( pTmiss_phi, recon_jets[0].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[1].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[2].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[3].momentum().phi() ) > 0.2 ) {
FourMomentum pT_l = lepton[0].momentum();
double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
double m_eff = eTmiss + pT_l.pT()
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT()
+ recon_jets[3].pT();
if ( fabs( lepton[0].pdgId() ) == e_id ) {
_4j_hist_mT_e->fill(mT, weight);
_4j_hist_eTmiss_e->fill(eTmiss, weight);
_4j_hist_m_eff_e->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 140*GeV ) {
_4jl_hist_m_eff_e_final->fill(m_eff, weight);
if ( m_eff > 300*GeV && eTmiss > 0.3*m_eff ) {
_4jl_count_e_channel->fill(0.5,weight);
}
}
}
// Muon channel signal region
else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
_4j_hist_mT_mu->fill(mT, weight);
_4j_hist_eTmiss_mu->fill(eTmiss, weight);
_4j_hist_m_eff_mu->fill(m_eff, weight);
if ( mT > 100*GeV && eTmiss > 140*GeV ) {
_4jl_hist_m_eff_mu_final->fill(m_eff, weight);
if ( m_eff > 300*GeV && eTmiss > 0.3*m_eff ) {
_4jl_count_mu_channel->fill(0.5,weight);
}
}
}
}
// 4JT
if ( recon_jets[0].pT() > 60.0*GeV &&
recon_jets[1].pT() > 40.0*GeV &&
recon_jets[2].pT() > 40.0*GeV &&
recon_jets[3].pT() > 40.0*GeV &&
deltaPhi( pTmiss_phi, recon_jets[0].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[1].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[2].momentum().phi() ) > 0.2 &&
deltaPhi( pTmiss_phi, recon_jets[3].momentum().phi() ) > 0.2 ) {
FourMomentum pT_l = lepton[0].momentum();
double m_eff = eTmiss + pT_l.pT()
+ recon_jets[0].pT()
+ recon_jets[1].pT()
+ recon_jets[2].pT()
+ recon_jets[3].pT();
if ( fabs( lepton[0].pdgId() ) == e_id ) {
if ( eTmiss > 200*GeV ) {
_4jt_hist_m_eff_e_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.15*m_eff ) {
_4jt_count_e_channel->fill(0.5,weight);
}
}
}
// Muon channel signal region
else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
if ( eTmiss > 200*GeV ) {
_4jt_hist_m_eff_mu_final->fill(m_eff, weight);
if ( m_eff > 500*GeV && eTmiss > 0.15*m_eff ) {
_4jt_count_mu_channel->fill(0.5,weight);
}
}
}
}
}
//@}
void finalize() {
scale( _3j_hist_eTmiss_e, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3j_hist_eTmiss_mu, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3j_hist_m_eff_e, 50. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3j_hist_m_eff_mu, 50. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3j_hist_mT_e, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3j_hist_mT_mu, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3jl_hist_m_eff_e_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3jl_hist_m_eff_mu_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3jt_hist_m_eff_e_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _3jt_hist_m_eff_mu_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_eTmiss_e, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_eTmiss_mu, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_m_eff_e, 50. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_m_eff_mu, 50. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_mT_e, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4j_hist_mT_mu, 10. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4jl_hist_m_eff_e_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4jl_hist_m_eff_mu_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4jt_hist_m_eff_e_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
scale( _4jt_hist_m_eff_mu_final, 100. * 1.04e3 * crossSection()/sumOfWeights() );
}
private:
/// @name Histograms
//@{
Histo1DPtr _3jl_count_e_channel;
Histo1DPtr _3jl_count_mu_channel;
Histo1DPtr _3jt_count_e_channel;
Histo1DPtr _3jt_count_mu_channel;
Histo1DPtr _3j_hist_eTmiss_e;
Histo1DPtr _3j_hist_eTmiss_mu;
Histo1DPtr _3j_hist_m_eff_e;
Histo1DPtr _3j_hist_m_eff_mu;
Histo1DPtr _3j_hist_mT_e;
Histo1DPtr _3j_hist_mT_mu;
Histo1DPtr _3jl_hist_m_eff_e_final;
Histo1DPtr _3jl_hist_m_eff_mu_final;
Histo1DPtr _3jt_hist_m_eff_e_final;
Histo1DPtr _3jt_hist_m_eff_mu_final;
Histo1DPtr _4jl_count_e_channel;
Histo1DPtr _4jl_count_mu_channel;
Histo1DPtr _4jt_count_e_channel;
Histo1DPtr _4jt_count_mu_channel;
Histo1DPtr _4j_hist_eTmiss_e;
Histo1DPtr _4j_hist_eTmiss_mu;
Histo1DPtr _4j_hist_m_eff_e;
Histo1DPtr _4j_hist_m_eff_mu;
Histo1DPtr _4j_hist_mT_e;
Histo1DPtr _4j_hist_mT_mu;
Histo1DPtr _4jl_hist_m_eff_e_final;
Histo1DPtr _4jl_hist_m_eff_mu_final;
Histo1DPtr _4jt_hist_m_eff_e_final;
Histo1DPtr _4jt_hist_m_eff_mu_final;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9212353);
}
diff --git a/src/Analyses/ATLAS_2011_S9225137.cc b/src/Analyses/ATLAS_2011_S9225137.cc
--- a/src/Analyses/ATLAS_2011_S9225137.cc
+++ b/src/Analyses/ATLAS_2011_S9225137.cc
@@ -1,457 +1,453 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2011_S9225137 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2011_S9225137()
: Analysis("ATLAS_2011_S9225137")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// veto region electrons
- std::vector<std::pair<double, double> > eta_v_e;
- eta_v_e.push_back(make_pair(-1.52,-1.37));
- eta_v_e.push_back(make_pair( 1.37, 1.52));
- IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
+ Cut vetocut = Range(Cuts::eta, -1.52, -1.37) | Range(Cuts::eta, 1.37, 1.52);
+ IdentifiedFinalState veto_elecs(vetocut & (Cuts::pt >= 10.0*GeV));
veto_elecs.acceptIdPair(PID::ELECTRON);
addProjection(veto_elecs, "veto_elecs");
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs( Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV) );
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV) );
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
/// Book histograms
_etmisspT_55_NJ_6_obs = bookHisto1D( 1,1,1);
_etmisspT_55_NJ_6_bac = bookHisto1D( 1,1,2);
_etmisspT_55_NJ_6_sig = bookHisto1D( 1,1,3);
_etmisspT_55_NJ_7_obs = bookHisto1D(13,1,1);
_etmisspT_55_NJ_7_bac = bookHisto1D(13,1,2);
_etmisspT_55_NJ_7_sig = bookHisto1D(13,1,3);
_etmisspT_55_NJ_8_obs = bookHisto1D(15,1,1);
_etmisspT_55_NJ_8_bac = bookHisto1D(15,1,2);
_etmisspT_55_NJ_8_sig = bookHisto1D(15,1,3);
_etmisspT_80_NJ_5_obs = bookHisto1D( 2,1,1);
_etmisspT_80_NJ_5_bac = bookHisto1D( 2,1,2);
_etmisspT_80_NJ_5_sig = bookHisto1D( 2,1,3);
_etmisspT_80_NJ_6_obs = bookHisto1D(14,1,1);
_etmisspT_80_NJ_6_bac = bookHisto1D(14,1,2);
_etmisspT_80_NJ_6_sig = bookHisto1D(14,1,3);
_etmisspT_80_NJ_7_obs = bookHisto1D(16,1,1);
_etmisspT_80_NJ_7_bac = bookHisto1D(16,1,2);
_etmisspT_80_NJ_7_sig = bookHisto1D(16,1,3);
_njet55A_obs = bookHisto1D( 3,1,1);
_njet55A_bac = bookHisto1D( 3,1,2);
_njet55A_sig = bookHisto1D( 3,1,3);
_njet55B_obs = bookHisto1D( 4,1,1);
_njet55B_bac = bookHisto1D( 4,1,2);
_njet55B_sig = bookHisto1D( 4,1,3);
_njet55C_obs = bookHisto1D(17,1,1);
_njet55C_bac = bookHisto1D(17,1,2);
_njet55C_sig = bookHisto1D(17,1,3);
_njet80A_obs = bookHisto1D( 5,1,1);
_njet80A_bac = bookHisto1D( 5,1,2);
_njet80A_sig = bookHisto1D( 5,1,3);
_njet80B_obs = bookHisto1D( 6,1,1);
_njet80B_bac = bookHisto1D( 6,1,2);
_njet80B_sig = bookHisto1D( 6,1,3);
_njet80C_obs = bookHisto1D(18,1,1);
_njet80C_bac = bookHisto1D(18,1,2);
_njet80C_sig = bookHisto1D(18,1,3);
_count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.);
_count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.);
_count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.);
_count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// apply electron veto region
Particles veto_e
= applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
if ( ! veto_e.empty() ) {
MSG_DEBUG("electrons in veto region");
vetoEvent;
}
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 4.9 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// candidate electrons
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// resolve jet/lepton ambiguity
Jets cand_jets_2;
foreach ( const Jet& jet, cand_jets ) {
// candidates above eta=2.8 are jets
if ( fabs( jet.eta() ) >= 2.8 )
cand_jets_2.push_back( jet );
// otherwise more the R=0.2 from an electrons
else {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
cand_jets_2.push_back( jet );
}
}
// only keep electrons more than R=0.4 from jets
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_e.push_back( e );
}
// only keep muons more than R=0.4 from jets
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// final jet filter
Jets recon_jets;
foreach ( const Jet& jet, cand_jets_2 ) {
if ( fabs( jet.eta() ) <= 2.8 )
recon_jets.push_back( jet );
}
// now only use recon_jets, recon_mu, recon_e
// reject events with electrons and muons
if ( ! ( recon_mu.empty() && recon_e.empty() ) ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
// calculate H_T
double HT=0;
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40 * GeV )
HT += jet.pT() ;
}
// number of jets and deltaR
bool pass55DeltaR=true;
unsigned int njet55=0;
bool pass80DeltaR=true;
unsigned int njet80=0;
for (unsigned int ix=0;ix<recon_jets.size();++ix) {
if(recon_jets[ix].pT()>80.*GeV) ++njet80;
if(recon_jets[ix].pT()>55.*GeV) ++njet55;
for (unsigned int iy=ix+1;iy<recon_jets.size();++iy) {
if(recon_jets[ix].pT()>55.*GeV &&
recon_jets[iy].pT()>55.*GeV &&
deltaR(recon_jets[ix],recon_jets[iy]) <0.6 )
pass55DeltaR = false;
if(recon_jets[ix].pT()>80.*GeV &&
recon_jets[iy].pT()>80.*GeV &&
deltaR(recon_jets[ix],recon_jets[iy]) <0.6 )
pass80DeltaR = false;
}
}
// require at least four jets with et > 55
if(njet55<=3) vetoEvent;
// plots of etmiss/ht
double etht = eTmiss/sqrt(HT);
if(njet55==6) {
_etmisspT_55_NJ_6_obs->fill(etht,weight);
_etmisspT_55_NJ_6_bac->fill(etht,weight);
_etmisspT_55_NJ_6_sig->fill(etht,weight);
}
else if(njet55==7) {
_etmisspT_55_NJ_7_obs->fill(etht,weight);
_etmisspT_55_NJ_7_bac->fill(etht,weight);
_etmisspT_55_NJ_7_sig->fill(etht,weight);
}
else if(njet55==8) {
_etmisspT_55_NJ_8_obs->fill(etht,weight);
_etmisspT_55_NJ_8_bac->fill(etht,weight);
_etmisspT_55_NJ_8_sig->fill(etht,weight);
}
if(njet80==5) {
_etmisspT_80_NJ_5_obs->fill(etht,weight);
_etmisspT_80_NJ_5_bac->fill(etht,weight);
_etmisspT_80_NJ_5_sig->fill(etht,weight);
}
else if(njet80==6) {
_etmisspT_80_NJ_6_obs->fill(etht,weight);
_etmisspT_80_NJ_6_bac->fill(etht,weight);
_etmisspT_80_NJ_6_sig->fill(etht,weight);
}
else if(njet80==7) {
_etmisspT_80_NJ_7_obs->fill(etht,weight);
_etmisspT_80_NJ_7_bac->fill(etht,weight);
_etmisspT_80_NJ_7_sig->fill(etht,weight);
}
if(etht>1.5&&etht<2. ) {
if(njet55>3) {
_njet55A_obs->fill(njet55,weight);
_njet55A_bac->fill(njet55,weight);
_njet55A_sig->fill(njet55,weight);
}
if(njet80>3) {
_njet80A_obs->fill(njet80,weight);
_njet80A_bac->fill(njet80,weight);
_njet80A_sig->fill(njet80,weight);
}
}
else if(etht>2. &&etht<3. ) {
if(njet55>3) {
_njet55B_obs->fill(njet55,weight);
_njet55B_bac->fill(njet55,weight);
_njet55B_sig->fill(njet55,weight);
}
if(njet80>3) {
_njet80B_obs->fill(njet80,weight);
_njet80B_bac->fill(njet80,weight);
_njet80B_sig->fill(njet80,weight);
}
}
else {
if(njet55>3) {
_njet55C_obs->fill(njet55,weight);
_njet55C_bac->fill(njet55,weight);
_njet55C_sig->fill(njet55,weight);
}
if(njet80>3) {
_njet80C_obs->fill(njet80,weight);
_njet80C_bac->fill(njet80,weight);
_njet80C_sig->fill(njet80,weight);
}
}
// apply E_T/sqrt(H_T) cut
if(etht<=3.5*GeV) {
MSG_DEBUG("Fails ET/sqrt(HT) cut ");
vetoEvent;
}
// check passes at least one delta5/ njet number cut
if(!(pass55DeltaR && njet55 >= 7) &&
!(pass80DeltaR && njet80 >= 6) ) {
MSG_DEBUG("Fails DeltaR cut or jet number cuts");
vetoEvent;
}
// 7j55
if(njet55>=7&&pass55DeltaR)
_count_7j55->fill( 0.5, weight) ;
// 8j55
if(njet55>=8&&pass55DeltaR)
_count_8j55->fill( 0.5, weight) ;
// 6j80
if(njet80>=6&&pass80DeltaR)
_count_6j80->fill( 0.5, weight) ;
// 7j80
if(njet80>=7&&pass80DeltaR)
_count_7j80->fill( 0.5, weight) ;
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*1.34/sumOfWeights();
scale(_etmisspT_55_NJ_6_obs,norm);
scale(_etmisspT_55_NJ_6_bac,norm);
scale(_etmisspT_55_NJ_6_sig,norm);
scale(_etmisspT_55_NJ_7_obs,norm);
scale(_etmisspT_55_NJ_7_bac,norm);
scale(_etmisspT_55_NJ_7_sig,norm);
scale(_etmisspT_55_NJ_8_obs,norm);
scale(_etmisspT_55_NJ_8_bac,norm);
scale(_etmisspT_55_NJ_8_sig,norm);
scale(_etmisspT_80_NJ_5_obs,norm);
scale(_etmisspT_80_NJ_5_bac,norm);
scale(_etmisspT_80_NJ_5_sig,norm);
scale(_etmisspT_80_NJ_6_obs,norm);
scale(_etmisspT_80_NJ_6_bac,norm);
scale(_etmisspT_80_NJ_6_sig,norm);
scale(_etmisspT_80_NJ_7_obs,norm);
scale(_etmisspT_80_NJ_7_bac,norm);
scale(_etmisspT_80_NJ_7_sig,norm);
scale(_njet55A_obs,norm);
scale(_njet55A_bac,norm);
scale(_njet55A_sig,norm);
scale(_njet55B_obs,norm);
scale(_njet55B_bac,norm);
scale(_njet55B_sig,norm);
scale(_njet55C_obs,norm);
scale(_njet55C_bac,norm);
scale(_njet55C_sig,norm);
scale(_njet80A_obs,norm);
scale(_njet80A_bac,norm);
scale(_njet80A_sig,norm);
scale(_njet80B_obs,norm);
scale(_njet80B_bac,norm);
scale(_njet80B_sig,norm);
scale(_njet80C_obs,norm);
scale(_njet80C_bac,norm);
scale(_njet80C_sig,norm);
scale(_count_7j55,norm);
scale(_count_8j55,norm);
scale(_count_6j80,norm);
scale(_count_7j80,norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _etmisspT_55_NJ_6_obs;
Histo1DPtr _etmisspT_55_NJ_6_bac;
Histo1DPtr _etmisspT_55_NJ_6_sig;
Histo1DPtr _etmisspT_55_NJ_7_obs;
Histo1DPtr _etmisspT_55_NJ_7_bac;
Histo1DPtr _etmisspT_55_NJ_7_sig;
Histo1DPtr _etmisspT_55_NJ_8_obs;
Histo1DPtr _etmisspT_55_NJ_8_bac;
Histo1DPtr _etmisspT_55_NJ_8_sig;
Histo1DPtr _etmisspT_80_NJ_5_obs;
Histo1DPtr _etmisspT_80_NJ_5_bac;
Histo1DPtr _etmisspT_80_NJ_5_sig;
Histo1DPtr _etmisspT_80_NJ_6_obs;
Histo1DPtr _etmisspT_80_NJ_6_bac;
Histo1DPtr _etmisspT_80_NJ_6_sig;
Histo1DPtr _etmisspT_80_NJ_7_obs;
Histo1DPtr _etmisspT_80_NJ_7_bac;
Histo1DPtr _etmisspT_80_NJ_7_sig;
Histo1DPtr _njet55A_obs;
Histo1DPtr _njet55A_bac;
Histo1DPtr _njet55A_sig;
Histo1DPtr _njet55B_obs;
Histo1DPtr _njet55B_bac;
Histo1DPtr _njet55B_sig;
Histo1DPtr _njet55C_obs;
Histo1DPtr _njet55C_bac;
Histo1DPtr _njet55C_sig;
Histo1DPtr _njet80A_obs;
Histo1DPtr _njet80A_bac;
Histo1DPtr _njet80A_sig;
Histo1DPtr _njet80B_obs;
Histo1DPtr _njet80B_bac;
Histo1DPtr _njet80B_sig;
Histo1DPtr _njet80C_obs;
Histo1DPtr _njet80C_bac;
Histo1DPtr _njet80C_sig;
Histo1DPtr _count_7j55;
Histo1DPtr _count_8j55;
Histo1DPtr _count_6j80;
Histo1DPtr _count_7j80;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2011_S9225137);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_001.cc b/src/Analyses/ATLAS_2012_CONF_2012_001.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_001.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_001.cc
@@ -1,406 +1,404 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_CONF_2012_001 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_001()
: Analysis("ATLAS_2012_CONF_2012_001")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 10.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Book histograms
_hist_leptonpT.push_back(bookHisto1D(1,1,1));
_hist_leptonpT.push_back(bookHisto1D(2,1,1));
_hist_leptonpT.push_back(bookHisto1D(3,1,1));
_hist_leptonpT.push_back(bookHisto1D(4,1,1));
_hist_njet = bookHisto1D(5,1,1);
_hist_etmiss = bookHisto1D(6,1,1);
_hist_mSFOS = bookHisto1D(7,1,1);
_hist_meff = bookHisto1D(8,1,1);
_hist_leptonpT_MC.push_back(bookHisto1D("hist_lepton_pT_1", 26, 0., 260));
_hist_leptonpT_MC.push_back(bookHisto1D("hist_lepton_pT_2", 15, 0., 150));
_hist_leptonpT_MC.push_back(bookHisto1D("hist_lepton_pT_3", 20, 0., 100));
_hist_leptonpT_MC.push_back(bookHisto1D("hist_lepton_pT_4", 20, 0., 100));
_hist_njet_MC = bookHisto1D("hist_njet", 7, -0.5, 6.5);
_hist_etmiss_MC = bookHisto1D("hist_etmiss",11,0.,220.);
_hist_mSFOS_MC = bookHisto1D("hist_m_SFOS",13,0.,260.);
_hist_meff_MC = bookHisto1D("hist_m_eff",19,0.,950.);
_count_SR1 = bookHisto1D("count_SR1", 1, 0., 1.);
_count_SR2 = bookHisto1D("count_SR2", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// candidate electrons
Particles cand_e;
foreach ( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt() ) {
double eta = e.eta();
// remove electrons with pT<15 in old veto region
if( fabs(eta)>1.37 && fabs(eta) < 1.52 && e.momentum().perp()< 15.*GeV)
continue;
double pTinCone = -e.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if (pTinCone/e.momentum().perp()<0.1) {
cand_e.push_back(e);
}
}
// resolve jet/lepton ambiguity
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles cand2_e;
for(unsigned int ie=0;ie<cand_e.size();++ie) {
const Particle & e = cand_e[ie];
// at least 0.4 from any jets
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any muons
if ( away ) {
foreach ( const Particle & mu, cand_mu ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
// and 0.1 from electrons
for(unsigned int ie2=0;ie2<cand_e.size();++ie2) {
if(ie==ie2) continue;
if ( deltaR(e.momentum(),cand_e[ie2].momentum()) < 0.1 ) {
away = false;
break;
}
}
// if isolated keep it
if ( away ) cand2_e.push_back( e );
}
// remove e+e- pairs with mass < 20.
Particles recon_e;
for(unsigned int ie=0;ie<cand2_e.size();++ie) {
bool pass = true;
for(unsigned int ie2=0;ie2<cand2_e.size();++ie2) {
if(cand2_e[ie].pdgId()*cand2_e[ie2].pdgId()>0) continue;
double mtest = (cand2_e[ie].momentum()+cand2_e[ie2].momentum()).mass();
if(mtest<=20.) {
pass = false;
break;
}
}
if(pass) recon_e.push_back(cand2_e[ie]);
}
// only keep muons more than R=0.4 from jets
Particles cand2_mu;
for(unsigned int imu=0;imu<cand_mu.size();++imu) {
const Particle & mu = cand_mu[imu];
bool away = true;
// at least 0.4 from any jets
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any electrona
if ( away ) {
foreach ( const Particle & e, cand_e ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
// and 0.1 from muons
for(unsigned int imu2=0;imu2<cand_mu.size();++imu2) {
if(imu==imu2) continue;
if ( deltaR(mu.momentum(),cand_mu[imu2].momentum()) < 0.1 ) {
away = false;
break;
}
}
if ( away )
cand2_mu.push_back( mu );
}
// remove mu+mu- pairs with mass < 20.
Particles recon_mu;
for(unsigned int imu=0;imu<cand2_mu.size();++imu) {
bool pass = true;
for(unsigned int imu2=0;imu2<cand2_mu.size();++imu2) {
if(cand2_mu[imu].pdgId()*cand2_mu[imu2].pdgId()>0) continue;
double mtest = (cand2_mu[imu].momentum()+cand2_mu[imu2].momentum()).mass();
if(mtest<=20.) {
pass = false;
break;
}
}
if(pass) recon_mu.push_back(cand2_mu[imu]);
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// now only use recon_jets, recon_mu, recon_e
// reject events with less than 4 electrons and muons
if ( recon_mu.size() + recon_e.size() < 4 ) {
MSG_DEBUG("To few charged leptons left after selection");
vetoEvent;
}
// ATLAS calo problem
if(rand()/static_cast<double>(RAND_MAX)<=0.42) {
foreach ( const Particle & e, recon_e ) {
double eta = e.eta();
double phi = e.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
foreach ( const Jet & jet, recon_jets ) {
double eta = jet.rapidity();
double phi = jet.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(jet.momentum().perp()>40 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
}
// check at least one e/mu passing trigger
if( !( !recon_e .empty() && recon_e[0] .momentum().perp()>25.) &&
!( !recon_mu.empty() && recon_mu[0].momentum().perp()>20.) ) {
MSG_DEBUG("Hardest lepton fails trigger");
vetoEvent;
}
// calculate meff
double meff = eTmiss;
foreach ( const Particle & e , recon_e )
meff += e.momentum().perp();
foreach ( const Particle & mu, recon_mu )
meff += mu.momentum().perp();
foreach ( const Jet & jet, recon_jets ) {
double pT = jet.momentum().perp();
if(pT>40.) meff += pT;
}
double mSFOS=1e30, mdiff=1e30;
// mass of SFOS pairs closest to the Z mass
for(unsigned int ix=0;ix<recon_e.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_e.size();++iy) {
if(recon_e[ix].pdgId()*recon_e[iy].pdgId()>0) continue;
double mtest = (recon_e[ix].momentum()+recon_e[iy].momentum()).mass();
if(fabs(mtest-90.)<mdiff) {
mSFOS = mtest;
mdiff = fabs(mtest-90.);
}
}
}
for(unsigned int ix=0;ix<recon_mu.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_mu.size();++iy) {
if(recon_mu[ix].pdgId()*recon_mu[iy].pdgId()>0) continue;
double mtest = (recon_mu[ix].momentum()+recon_mu[iy].momentum()).mass();
if(fabs(mtest-91.118)<mdiff) {
mSFOS = mtest;
mdiff = fabs(mtest-91.118);
}
}
}
// make the control plots
// lepton pT
unsigned int ie=0,imu=0;
for(unsigned int ix=0;ix<4;++ix) {
double pTe = ie <recon_e .size() ?
recon_e [ie ].momentum().perp() : -1*GeV;
double pTmu = imu<recon_mu.size() ?
recon_mu[imu].momentum().perp() : -1*GeV;
if(pTe>pTmu) {
_hist_leptonpT [ix]->fill(pTe ,weight);
_hist_leptonpT_MC[ix]->fill(pTe ,weight);
++ie;
}
else {
_hist_leptonpT [ix]->fill(pTmu,weight);
_hist_leptonpT_MC[ix]->fill(pTmu,weight);
++imu;
}
}
// njet
_hist_njet ->fill(recon_jets.size(),weight);
_hist_njet_MC->fill(recon_jets.size(),weight);
// etmiss
_hist_etmiss ->fill(eTmiss,weight);
_hist_etmiss_MC->fill(eTmiss,weight);
if(mSFOS<1e30) {
_hist_mSFOS ->fill(mSFOS,weight);
_hist_mSFOS_MC->fill(mSFOS,weight);
}
_hist_meff ->fill(meff,weight);
_hist_meff_MC->fill(meff,weight);
// finally the counts
if(eTmiss>50.) {
_count_SR1->fill(0.5,weight);
if(mdiff>10.) _count_SR2->fill(0.5,weight);
}
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*2.06/sumOfWeights();
// these are number of events at 2.06fb^-1 per 10 GeV
scale(_hist_leptonpT [0],norm*10.);
scale(_hist_leptonpT [1],norm*10.);
scale(_hist_leptonpT_MC[0],norm*10.);
scale(_hist_leptonpT_MC[1],norm*10.);
// these are number of events at 2.06fb^-1 per 5 GeV
scale(_hist_leptonpT [2],norm*5.);
scale(_hist_leptonpT [3],norm*5.);
scale(_hist_leptonpT_MC[2],norm*5.);
scale(_hist_leptonpT_MC[3],norm*5.);
// these are number of events at 2.06fb^-1 per 20 GeV
scale(_hist_etmiss ,norm*20.);
scale(_hist_mSFOS ,norm*20.);
scale(_hist_etmiss_MC ,norm*20.);
scale(_hist_mSFOS_MC ,norm*20.);
// these are number of events at 2.06fb^-1 per 50 GeV
scale(_hist_meff ,norm*50.);
scale(_hist_meff_MC ,norm*50.);
// these are number of events at 2.06fb^-1
scale(_hist_njet ,norm);
scale(_hist_njet_MC ,norm);
scale(_count_SR1,norm);
scale(_count_SR2,norm);
}
private:
/// @name Histograms
//@{
vector<Histo1DPtr> _hist_leptonpT,_hist_leptonpT_MC;
Histo1DPtr _hist_njet;
Histo1DPtr _hist_njet_MC;
Histo1DPtr _hist_etmiss;
Histo1DPtr _hist_etmiss_MC;
Histo1DPtr _hist_mSFOS;
Histo1DPtr _hist_mSFOS_MC;
Histo1DPtr _hist_meff;
Histo1DPtr _hist_meff_MC;
Histo1DPtr _count_SR1;
Histo1DPtr _count_SR2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_001);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_103.cc b/src/Analyses/ATLAS_2012_CONF_2012_103.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_103.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_103.cc
@@ -1,274 +1,272 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2012_CONF_2012_103 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_103()
: Analysis("ATLAS_2012_CONF_2012_103")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
/// Book histograms
_etmiss_HT_7j55 = bookHisto1D("etmiss_HT_7j55", 8, 0., 16.);
_etmiss_HT_8j55 = bookHisto1D("etmiss_HT_8j55", 8, 0., 16.);
_etmiss_HT_9j55 = bookHisto1D("etmiss_HT_9j55", 8, 0., 16.);
_etmiss_HT_6j80 = bookHisto1D("etmiss_HT_6j80", 8, 0., 16.);
_etmiss_HT_7j80 = bookHisto1D("etmiss_HT_7j80", 8, 0., 16.);
_etmiss_HT_8j80 = bookHisto1D("etmiss_HT_8j80", 8, 0., 16.);
_hist_njet55 = bookHisto1D("hist_njet55", 4, 5.5, 9.5);
_hist_njet80 = bookHisto1D("hist_njet80", 4, 4.5, 8.5);
_count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.);
_count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.);
_count_9j55 = bookHisto1D("count_9j55", 1, 0., 1.);
_count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.);
_count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.);
_count_8j80 = bookHisto1D("count_8j80", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu =
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
// candidate electrons
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// resolve jet/lepton ambiguity
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
// candidates after |eta| < 2.8
if ( fabs( jet.eta() ) >= 2.8 ) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_e.push_back( e );
}
// only keep muons more than R=0.4 from jets
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// now only use recon_jets, recon_mu, recon_e
// reject events with electrons and muons
if ( ! ( recon_mu.empty() && recon_e.empty() ) ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
// calculate H_T
double HT=0;
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40 * GeV )
HT += jet.pT() ;
}
// number of jets
unsigned int njet55=0, njet80=0;
for (unsigned int ix=0;ix<recon_jets.size();++ix) {
if(recon_jets[ix].pT()>80.*GeV) ++njet80;
if(recon_jets[ix].pT()>55.*GeV) ++njet55;
}
double ratio = eTmiss/sqrt(HT);
if(ratio>4.) {
if(njet55>9) njet55 = 9;
if(njet80>8) njet80 = 8;
_hist_njet55->fill(njet55,weight);
_hist_njet80->fill(njet80,weight);
// 7j55
if(njet55>=7)
_count_7j55->fill( 0.5, weight);
// 8j55
if(njet55>=8)
_count_8j55->fill( 0.5, weight) ;
// 8j55
if(njet55==9)
_count_9j55->fill( 0.5, weight) ;
// 6j80
if(njet80>=6)
_count_6j80->fill( 0.5, weight) ;
// 7j80
if(njet80>=7)
_count_7j80->fill( 0.5, weight) ;
// 8j80
if(njet80==8)
_count_8j80->fill( 0.5, weight) ;
}
if(njet55>=7)
_etmiss_HT_7j55->fill( ratio, weight);
// 8j55
if(njet55>=8)
_etmiss_HT_8j55->fill( ratio, weight) ;
// 8j55
if(njet55>=9)
_etmiss_HT_9j55->fill( ratio, weight) ;
// 6j80
if(njet80>=6)
_etmiss_HT_6j80->fill( ratio, weight) ;
// 7j80
if(njet80>=7)
_etmiss_HT_7j80->fill( ratio, weight) ;
// 8j80
if(njet80>=8)
_etmiss_HT_8j80->fill( ratio, weight) ;
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*5.8/sumOfWeights();
scale(_etmiss_HT_7j55,2.*norm);
scale(_etmiss_HT_8j55,2.*norm);
scale(_etmiss_HT_9j55,2.*norm);
scale(_etmiss_HT_6j80,2.*norm);
scale(_etmiss_HT_7j80,2.*norm);
scale(_etmiss_HT_8j80,2.*norm);
scale(_hist_njet55,norm);
scale(_hist_njet80,norm);
scale(_count_7j55,norm);
scale(_count_8j55,norm);
scale(_count_9j55,norm);
scale(_count_6j80,norm);
scale(_count_7j80,norm);
scale(_count_8j80,norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _etmiss_HT_7j55;
Histo1DPtr _etmiss_HT_8j55;
Histo1DPtr _etmiss_HT_9j55;
Histo1DPtr _etmiss_HT_6j80;
Histo1DPtr _etmiss_HT_7j80;
Histo1DPtr _etmiss_HT_8j80;
Histo1DPtr _hist_njet55;
Histo1DPtr _hist_njet80;
Histo1DPtr _count_7j55;
Histo1DPtr _count_8j55;
Histo1DPtr _count_9j55;
Histo1DPtr _count_6j80;
Histo1DPtr _count_7j80;
Histo1DPtr _count_8j80;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_103);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_104.cc b/src/Analyses/ATLAS_2012_CONF_2012_104.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_104.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_104.cc
@@ -1,237 +1,235 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
class ATLAS_2012_CONF_2012_104 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_104()
: Analysis("ATLAS_2012_CONF_2012_104")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- vector<pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 10.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- vector<pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
// Book histograms
_count_e = bookHisto1D("count_e" , 1, 0., 1.);
_count_mu = bookHisto1D("count_mu", 1, 0., 1.);
_hist_eTmiss_e = bookHisto1D("hist_eTmiss_e" , 25, 0., 1000.);
_hist_eTmiss_mu = bookHisto1D("hist_eTmiss_mu" , 25, 0., 1000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the candiate jets
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// get the candidate "medium" leptons without isolation
Particles cand_e;
foreach( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool e_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
double dR = deltaR(e.momentum(),jet.momentum());
if ( dR < 0.4 && dR > 0.2 ) {
e_near_jet = true;
break;
}
}
if ( ! e_near_jet ) cand_e.push_back(e);
}
Particles cand_mu;
foreach( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool mu_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( ! mu_near_jet ) cand_mu.push_back(mu);
}
// apply the isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// pTcone around muon track (hard)
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
double pTinCone = -mu.pT();
if(-pTinCone<25.) continue;
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV ) recon_mu.push_back(mu);
}
// pTcone around electron track (hard)
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
double pTinCone = -e.pT();
if(-pTinCone<25.) continue;
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1 * e.pT() ) recon_e.push_back(e);
}
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if(fabs(jet.eta())>2.5||
jet.momentum().perp()<25.) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// pTmiss
FourMomentum pTmiss;
foreach ( const Particle & p,
applyProjection<VisibleFinalState>(event, "vfs").particles() ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// at least 4 jets with pT>80.
if(recon_jets.size()<4 || recon_jets[3].momentum().perp()<80.) vetoEvent;
// only 1 signal lepton
if( recon_e.size() + recon_mu.size() != 1 )
vetoEvent;
if( cand_e .size() + cand_mu .size() != 1 )
vetoEvent;
// start of meff calculation
double HT=0.;
foreach( const Jet & jet, recon_jets) {
double pT = jet.momentum().perp();
if(pT>40.) HT += pT;
}
// get the lepton
Particle lepton = recon_e.empty() ? recon_mu[0] : recon_e[0];
// lepton variables
double pT = lepton.momentum().perp();
double mT = 2.*(pT*eTmiss -
lepton.momentum().x()*pTmiss.x() -
lepton.momentum().y()*pTmiss.y());
mT = sqrt(mT);
HT += pT;
double m_eff_inc = HT + eTmiss + pT;
double m_eff_4 = eTmiss + pT;
for(unsigned int ix=0;ix<4;++ix)
m_eff_4 += recon_jets[ix].momentum().perp();
// four jet selecton
if(mT>100.&& eTmiss/m_eff_4>0.2 &&
m_eff_inc > 800.) {
if( eTmiss > 250. ) {
if(abs(lepton.pdgId())==PID::ELECTRON)
_count_e->fill(0.5,weight);
else if(abs(lepton.pdgId())==PID::MUON)
_count_mu->fill(0.5,weight);
}
if(abs(lepton.pdgId())==PID::ELECTRON)
_hist_eTmiss_e ->fill(eTmiss,weight);
else if(abs(lepton.pdgId())==PID::MUON)
_hist_eTmiss_mu->fill(eTmiss,weight);
}
}
//@}
void finalize() {
double norm = 5.8* crossSection()/sumOfWeights()/femtobarn;
scale(_count_e ,norm);
scale(_count_mu,norm);
scale(_hist_eTmiss_e ,40.*norm);
scale(_hist_eTmiss_mu ,40.*norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_e ;
Histo1DPtr _count_mu;
Histo1DPtr _hist_eTmiss_e ;
Histo1DPtr _hist_eTmiss_mu;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_104);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_105.cc b/src/Analyses/ATLAS_2012_CONF_2012_105.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_105.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_105.cc
@@ -1,236 +1,234 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
class ATLAS_2012_CONF_2012_105 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_105()
: Analysis("ATLAS_2012_CONF_2012_105")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 20.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 20.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.5,4.5),"vfs");
// book histograms
// counts in signal regions
_count_ee = bookHisto1D("count_ee" , 1, 0., 1.);
_count_emu = bookHisto1D("count_emu" , 1, 0., 1.);
_count_mumu = bookHisto1D("count_mumu", 1, 0., 1.);
_count_ll = bookHisto1D("count_ll" , 1, 0., 1.);
// histograms from paper
_hist_eTmiss_ee = bookHisto1D("eTmiss_ee" , 8, 0., 400.);
_hist_eTmiss_emu = bookHisto1D("eTmiss_emu" , 8, 0., 400.);
_hist_eTmiss_mumu = bookHisto1D("eTmiss_mumu", 8, 0., 400.);
_hist_eTmiss_ll = bookHisto1D("eTmiss_ll" , 8, 0., 400.);
}
/// Perform the event analysis
void analyze(const Event& event) {
// event weight
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// electron candidates
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// Discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// get the charged tracks for isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// Reconstructed electrons
Particles recon_leptons;
foreach ( const Particle & e, cand_e ) {
// check not near a jet
bool e_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
e_near_jet = true;
break;
}
}
if ( e_near_jet ) continue;
// check the isolation
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1*e.momentum().perp() )
recon_leptons.push_back(e);
}
// Reconstructed Muons
Particles cand_mu =
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
foreach ( const Particle & mu, cand_mu ) {
// check not near a jet
bool mu_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( mu_near_jet ) continue;
// isolation
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
recon_leptons.push_back(mu);
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// Exactly two leptons for each event
if ( recon_leptons.size() != 2) vetoEvent;
// ensure 1st hardest
if(recon_leptons[0].momentum().perp()<recon_leptons[1].momentum().perp())
std::swap(recon_leptons[0],recon_leptons[1]);
// only keep same sign
if(recon_leptons[0].pdgId()*recon_leptons[1].pdgId()<0)
vetoEvent;
// at least 4 jets pt>50
if(recon_jets.size()<4||recon_jets[3].momentum().perp()<50.)
vetoEvent;
if(recon_leptons[0].pdgId()!=recon_leptons[1].pdgId())
_hist_eTmiss_emu ->fill(eTmiss,weight);
else if(abs(recon_leptons[0].pdgId())==PID::ELECTRON)
_hist_eTmiss_ee ->fill(eTmiss,weight);
else if(abs(recon_leptons[0].pdgId())==PID::MUON)
_hist_eTmiss_mumu->fill(eTmiss,weight);
_hist_eTmiss_ll->fill(eTmiss,weight);
if(eTmiss>150.) {
if(recon_leptons[0].pdgId()!=recon_leptons[1].pdgId())
_count_emu ->fill(0.5,weight);
else if(abs(recon_leptons[0].pdgId())==PID::ELECTRON)
_count_ee ->fill(0.5,weight);
else if(abs(recon_leptons[0].pdgId())==PID::MUON)
_count_mumu->fill(0.5,weight);
_count_ll->fill(0.5,weight);
}
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*5.8/sumOfWeights();
// event counts
scale(_count_ee ,norm);
scale(_count_emu ,norm);
scale(_count_mumu,norm);
scale(_count_ll ,norm);
// histograms
scale(_hist_eTmiss_ee ,norm*50.);
scale(_hist_eTmiss_emu ,norm*50.);
scale(_hist_eTmiss_mumu,norm*50.);
scale(_hist_eTmiss_ll ,norm*50.);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_ee ;
Histo1DPtr _count_emu ;
Histo1DPtr _count_mumu;
Histo1DPtr _count_ll ;
Histo1DPtr _hist_eTmiss_ee;
Histo1DPtr _hist_eTmiss_emu;
Histo1DPtr _hist_eTmiss_mumu;
Histo1DPtr _hist_eTmiss_ll;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_105);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_109.cc b/src/Analyses/ATLAS_2012_CONF_2012_109.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_109.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_109.cc
@@ -1,373 +1,371 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_CONF_2012_109 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_109()
: Analysis("ATLAS_2012_CONF_2012_109")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
- elecs.acceptIdPair(PID::ELECTRON);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
+ elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// Projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
// All tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
addProjection(VisibleFinalState(-4.5,4.5),"vfs");
// Book histograms
_count_A_tight = bookHisto1D("count_A_tight" , 1, 0., 1.);
_count_A_medium = bookHisto1D("count_A_medium" , 1, 0., 1.);
_count_A_loose = bookHisto1D("count_A_loose" , 1, 0., 1.);
_count_B_tight = bookHisto1D("count_B_tight" , 1, 0., 1.);
_count_B_medium = bookHisto1D("count_B_medium" , 1, 0., 1.);
_count_C_tight = bookHisto1D("count_C_tight" , 1, 0., 1.);
_count_C_medium = bookHisto1D("count_C_medium" , 1, 0., 1.);
_count_C_loose = bookHisto1D("count_C_loose" , 1, 0., 1.);
_count_D_tight = bookHisto1D("count_D_tight" , 1, 0., 1.);
_count_E_tight = bookHisto1D("count_E_tight" , 1, 0., 1.);
_count_E_medium = bookHisto1D("count_E_medium" , 1, 0., 1.);
_count_E_loose = bookHisto1D("count_E_loose" , 1, 0., 1.);
_hist_meff_A_medium = bookHisto1D("meff_A_medium" , 40, 0., 4000.);
_hist_meff_A_tight = bookHisto1D("meff_A_tight" , 40, 0., 4000.);
_hist_meff_B_medium = bookHisto1D("meff_B_medium" , 40, 0., 4000.);
_hist_meff_B_tight = bookHisto1D("meff_B_tight" , 40, 0., 4000.);
_hist_meff_C_medium = bookHisto1D("meff_C_medium" , 40, 0., 4000.);
_hist_meff_C_tight = bookHisto1D("meff_C_tight" , 40, 0., 4000.);
_hist_meff_D = bookHisto1D("meff_D" , 40, 0., 4000.);
_hist_meff_E_loose = bookHisto1D("meff_E_loose" , 40, 0., 4000.);
_hist_meff_E_medium = bookHisto1D("meff_E_medium" , 40, 0., 4000.);
_hist_meff_E_tight = bookHisto1D("meff_E_tight" , 40, 0., 4000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Jets cand_jets;
const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
foreach (const Jet& jet, jets) {
if ( fabs( jet.eta() ) < 4.9 ) {
cand_jets.push_back(jet);
}
}
const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable
Particles cand_mu;
const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
foreach (const Particle& mu, muons) {
double pTinCone = -mu.pT();
foreach (const Particle& track, chg_tracks) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
pTinCone += track.pT();
}
}
if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
}
// Resolve jet-lepton overlap for jets with |eta| < 2.8
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) >= 2.8 ) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_mu.push_back( mu );
}
// pTmiss
// Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
// i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum();
}
double eTmiss = pTmiss.pT();
// no electron pT> 20 or muons pT>10
if ( !recon_mu.empty() || !recon_e.empty() ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
if ( eTmiss <= 160 * GeV ) {
MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
vetoEvent;
}
// check the hardest two jets
if ( recon_jets.size()<2 ||
recon_jets[0].pT() <= 130.0 * GeV ||
recon_jets[0].pT() <= 60.0 * GeV ) {
MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
vetoEvent;
}
// check the charged and EM fractions of the hard jets to avoid photons
for (unsigned int ix = 0; ix < 2; ++ix) {
// jets over 100 GeV
if (recon_jets[ix].pT() < 100*GeV ||
recon_jets[ix].eta() > 2.) continue; //< @todo Should be |eta|?
double fch(0.), fem(0.), eTotal(0.);
foreach(const Particle & part, recon_jets[ix].particles()) {
long id = abs(part.pdgId());
if(PID::threeCharge(id)!=0)
fch += part.momentum().E();
if (id == PID::PHOTON || id == PID::ELECTRON || id == PID::PI0)
fem += part.momentum().E();
}
fch /= eTotal;
fem /= eTotal;
// remove events with hard photon
if (fch < 0.02 || (fch < 0.05 && fem > 0.09)) vetoEvent;
}
// ==================== observables ====================
int Njets = 0;
double min_dPhi_All = 999.999; //< @todo Use std::numeric_limits!
double min_dPhi_2 = 999.999; //< @todo Use std::numeric_limits!
double min_dPhi_3 = 999.999; //< @todo Use std::numeric_limits!
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() < 40*GeV ) continue;
double dPhi = deltaPhi( pTmiss_phi, jet.momentum().phi());
if ( Njets < 2 ) min_dPhi_2 = min( min_dPhi_2, dPhi );
if ( Njets < 3 ) min_dPhi_3 = min( min_dPhi_3, dPhi );
min_dPhi_All = min( min_dPhi_All, dPhi );
++Njets;
}
// inclusive meff
double m_eff_inc = eTmiss;
foreach ( const Jet& jet, recon_jets ) {
double perp = jet.pT();
if(perp>40.) m_eff_inc += perp;
}
// region A
double m_eff_Nj = eTmiss + recon_jets[0].pT() + recon_jets[1].pT();
if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) {
_hist_meff_A_tight ->fill(m_eff_inc,weight);
if(eTmiss/m_eff_Nj > 0.4)
_hist_meff_A_medium->fill(m_eff_inc,weight);
if(m_eff_inc>1900.)
_count_A_tight ->fill(0.5,weight);
if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4)
_count_A_medium->fill(0.5,weight);
if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4)
_count_A_loose ->fill(0.5,weight);
}
// for rest of regions 3 jets pT> 60 needed
if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<60.)
vetoEvent;
// region B
m_eff_Nj += recon_jets[2].momentum().perp();
if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) {
_hist_meff_B_tight->fill(m_eff_inc,weight);
if(eTmiss/m_eff_Nj > 0.3)
_hist_meff_B_medium->fill(m_eff_inc,weight);
if(m_eff_inc>1900.)
_count_B_tight ->fill(0.5,weight);
if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3)
_count_B_medium->fill(0.5,weight);
}
// for rest of regions 4 jets pT> 60 needed
if(recon_jets.size()<4 || recon_jets[3].momentum().perp()<60.)
vetoEvent;
// region C
m_eff_Nj += recon_jets[3].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) {
_hist_meff_C_tight->fill(m_eff_inc,weight);
if( eTmiss/m_eff_Nj > 0.3 )
_hist_meff_C_medium->fill(m_eff_inc,weight);
if(m_eff_inc>1900.)
_count_C_tight ->fill(0.5,weight);
if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3)
_count_C_medium->fill(0.5,weight);
if(m_eff_inc>1000. && eTmiss/m_eff_Nj > 0.3)
_count_C_loose ->fill(0.5,weight);
}
// for rest of regions 5 jets pT> 40 needed
if(recon_jets.size()<5 || recon_jets[4].momentum().perp()<40.)
vetoEvent;
// region D
m_eff_Nj += recon_jets[4].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
_hist_meff_D->fill(m_eff_inc,weight);
if(m_eff_inc>1700.) _count_D_tight ->fill(0.5,weight);
}
// for rest of regions 6 jets pT> 40 needed
if(recon_jets.size()<6 || recon_jets[5].momentum().perp()<40.)
vetoEvent;
// region E
m_eff_Nj += recon_jets[5].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
_hist_meff_E_tight->fill(m_eff_inc,weight);
if( eTmiss/m_eff_Nj > 0.25 )
_hist_meff_E_medium->fill(m_eff_inc,weight);
if( eTmiss/m_eff_Nj > 0.3 )
_hist_meff_E_loose->fill(m_eff_inc,weight);
if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight);
if(m_eff_inc>1300.&& eTmiss/m_eff_Nj > 0.25 )
_count_E_medium->fill(0.5,weight);
if(m_eff_inc>1000.&& eTmiss/m_eff_Nj > 0.3 )
_count_E_loose ->fill(0.5,weight);
}
}
void finalize() {
double norm = crossSection()/femtobarn*5.8/sumOfWeights();
// these are number of events at 5.8fb^-1 per 100 GeV
scale( _hist_meff_A_medium , 100. * norm );
scale( _hist_meff_A_tight , 100. * norm );
scale( _hist_meff_B_medium , 100. * norm );
scale( _hist_meff_B_tight , 100. * norm );
scale( _hist_meff_C_medium , 100. * norm );
scale( _hist_meff_C_tight , 100. * norm );
scale( _hist_meff_D , 100. * norm );
scale( _hist_meff_E_loose , 100. * norm );
scale( _hist_meff_E_medium , 100. * norm );
scale( _hist_meff_E_tight , 100. * norm );
// these are number of events at 5.8fb^-1
scale(_count_A_tight ,norm);
scale(_count_A_medium ,norm);
scale(_count_A_loose ,norm);
scale(_count_B_tight ,norm);
scale(_count_B_medium ,norm);
scale(_count_C_tight ,norm);
scale(_count_C_medium ,norm);
scale(_count_C_loose ,norm);
scale(_count_D_tight ,norm);
scale(_count_E_tight ,norm);
scale(_count_E_medium ,norm);
scale(_count_E_loose ,norm);
}
//@}
private:
Histo1DPtr _count_A_tight;
Histo1DPtr _count_A_medium;
Histo1DPtr _count_A_loose;
Histo1DPtr _count_B_tight;
Histo1DPtr _count_B_medium;
Histo1DPtr _count_C_tight;
Histo1DPtr _count_C_medium;
Histo1DPtr _count_C_loose;
Histo1DPtr _count_D_tight;
Histo1DPtr _count_E_tight;
Histo1DPtr _count_E_medium;
Histo1DPtr _count_E_loose;
Histo1DPtr _hist_meff_A_medium;
Histo1DPtr _hist_meff_A_tight;
Histo1DPtr _hist_meff_B_medium;
Histo1DPtr _hist_meff_B_tight;
Histo1DPtr _hist_meff_C_medium;
Histo1DPtr _hist_meff_C_tight;
Histo1DPtr _hist_meff_D;
Histo1DPtr _hist_meff_E_loose;
Histo1DPtr _hist_meff_E_medium;
Histo1DPtr _hist_meff_E_tight;
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_109);
}
diff --git a/src/Analyses/ATLAS_2012_CONF_2012_153.cc b/src/Analyses/ATLAS_2012_CONF_2012_153.cc
--- a/src/Analyses/ATLAS_2012_CONF_2012_153.cc
+++ b/src/Analyses/ATLAS_2012_CONF_2012_153.cc
@@ -1,428 +1,426 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2012_CONF_2012_153 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_CONF_2012_153()
: Analysis("ATLAS_2012_CONF_2012_153")
{ }
//@}
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 10.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
vector<double> edges_meff;
edges_meff.push_back( 0);
edges_meff.push_back( 150);
edges_meff.push_back( 300);
edges_meff.push_back( 500);
edges_meff.push_back(1000);
edges_meff.push_back(1500);
vector<double> edges_eT;
edges_eT.push_back(0);
edges_eT.push_back(50);
edges_eT.push_back(150);
edges_eT.push_back(300);
edges_eT.push_back(500);
// Book histograms
_hist_electrons = bookHisto1D("hist_electrons_before", 11, -0.5,10.5);
_hist_muons = bookHisto1D("hist_muons_before" , 11, -0.5,10.5);
_hist_leptons = bookHisto1D("hist_leptons_before" , 11, -0.5,10.5);
_hist_4leptons = bookHisto1D("hist_4leptons", 1, 0.,1.);
_hist_veto = bookHisto1D("hist_veto", 1, 0., 1.);
_hist_etmiss = bookHisto1D("hist_etmiss",edges_eT);
_hist_meff = bookHisto1D("hist_m_eff",edges_meff);
_count_SR1 = bookHisto1D("count_SR1", 1, 0., 1.);
_count_SR2 = bookHisto1D("count_SR2", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.5 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
// candidate electrons
// Discard if two electrons are within R=0.1
Particles temp = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByE();
vector<bool> vetoed(temp.size(),false);
Particles cand_e;
for (unsigned int ix=0; ix<temp.size(); ++ix) {
if(vetoed[ix]) continue;
for (unsigned int iy=ix+1; iy<temp.size(); ++iy) {
if( deltaR(temp[ix].momentum(),temp[iy].momentum()) < 0.1 ) {
vetoed[iy] = true;
}
}
if(!vetoed[ix]) cand_e.push_back(temp[ix]);
}
// Sort by transverse momentum
std::sort(cand_e.begin(), cand_e.end(), cmpParticleByPt);
// resolve jet/lepton ambiguity
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles cand2_e;
foreach (const Particle & e, cand_e) {
// at least 0.4 from any jets
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// if isolated keep it
if ( away )
cand2_e.push_back( e );
}
// only keep muons more than R=0.4 from jets
Particles cand2_mu;
foreach(const Particle & mu, cand_mu ) {
bool away = true;
// at least 0.4 from any jets
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
cand2_mu.push_back( mu );
}
// electron and muon more than 0.1 apart
Particles cand3_e;
foreach ( const Particle & e, cand2_e ) {
bool away = true;
foreach( const Particle & mu, cand2_mu ) {
if( deltaR(e.momentum(),mu.momentum()) < 0.1) {
away = false;
break;
}
}
if(away) cand3_e.push_back(e);
}
Particles cand3_mu;
foreach( const Particle & mu, cand2_mu ) {
bool away = true;
foreach ( const Particle & e, cand2_e ) {
if( deltaR(e.momentum(),mu.momentum()) < 0.1) {
away = false;
break;
}
}
if(away) cand3_mu.push_back(mu);
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// apply electron isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
Particles cand4_e;
foreach ( const Particle & e, cand3_e ) {
// charge isolation
double pTinCone = -e.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if(track.momentum().perp()>0.4 &&
deltaR(e.momentum(),track.momentum()) <= 0.3 )
pTinCone += track.pT();
}
if (pTinCone/e.momentum().perp()>0.16) continue;
// all particles isolation
pTinCone = -e.momentum().perp();
foreach ( const Particle & p, vfs_particles ) {
if(abs(p.pdgId())!=PID::MUON &&
deltaR(e.momentum(),p.momentum()) <= 0.3 )
pTinCone += p.pT();
}
if (pTinCone/e.momentum().perp()<0.18) {
cand4_e.push_back(e);
}
}
// apply muon isolation
Particles cand4_mu;
foreach ( const Particle & mu, cand3_mu ) {
double pTinCone = -mu.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if(track.momentum().perp()>1.0 &&
deltaR(mu.momentum(),track.momentum()) <= 0.3 )
pTinCone += track.pT();
}
if (pTinCone/mu.momentum().perp()<0.12) {
cand4_mu.push_back(mu);
}
}
// same SOSF pairs m>12.
Particles recon_e;
foreach(const Particle & e, cand4_e) {
bool veto=false;
foreach(const Particle & e2, cand4_e) {
if(e.pdgId()*e2.pdgId()<0&&(e.momentum()+e2.momentum()).mass()<12.) {
veto=true;
break;
}
}
if(!veto) recon_e.push_back(e);
}
Particles recon_mu;
foreach(const Particle & mu, cand4_mu) {
bool veto=false;
foreach(const Particle & mu2, cand4_mu) {
if(mu.pdgId()*mu2.pdgId()<0&&(mu.momentum()+mu2.momentum()).mass()<12.) {
veto=true;
break;
}
}
if(!veto) recon_mu.push_back(mu);
}
// now only use recon_jets, recon_mu, recon_e
_hist_electrons->fill(recon_e.size(), weight);
_hist_muons->fill(recon_mu.size(), weight);
_hist_leptons->fill(recon_mu.size() + recon_e.size(), weight);
if( recon_mu.size() + recon_e.size() > 3) {
_hist_4leptons->fill(0.5, weight);
}
// reject events with less than 4 electrons and muons
if ( recon_mu.size() + recon_e.size() < 4 ) {
MSG_DEBUG("To few charged leptons left after selection");
vetoEvent;
}
// or two lepton trigger
bool passDouble =
(recon_mu.size()>=2 && ( (recon_mu[1].momentum().perp()>14.) ||
(recon_mu[0].momentum().perp()>18. && recon_mu[1].momentum().perp()>10.) )) ||
(recon_e.size() >=2 && ( (recon_e [1].momentum().perp()>14.) ||
(recon_e [0].momentum().perp()>25. && recon_e [1].momentum().perp()>10.) )) ||
(!recon_e.empty() && !recon_mu.empty() &&
( (recon_e[0].momentum().perp()>14. && recon_mu[0].momentum().perp()>10.)||
(recon_e[0].momentum().perp()>10. && recon_mu[0].momentum().perp()>18.) ));
// must pass a trigger
if(!passDouble ) {
MSG_DEBUG("Hardest lepton fails trigger");
_hist_veto->fill(0.5, weight);
vetoEvent;
}
// calculate meff
double meff = eTmiss;
foreach ( const Particle & e , recon_e )
meff += e.momentum().perp();
foreach ( const Particle & mu, recon_mu )
meff += mu.momentum().perp();
foreach ( const Jet & jet, recon_jets ) {
double pT = jet.momentum().perp();
if(pT>40.) meff += pT;
}
// 2/3 leptons --> find 1 SFOS pair in range and veto event
// 4+ leptons --> find 2 SFOS pairs and in range veto event
for(unsigned int ix=0;ix<recon_e.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_e.size();++iy) {
if(recon_e[ix].pdgId()*recon_e[iy].pdgId()>0) continue;
FourMomentum ppair = recon_e[ix].momentum()+recon_e[iy].momentum();
double mtest = ppair.mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
// check triplets with electron
for(unsigned int iz=0;iz<recon_e.size();++iz) {
if(iz==ix||iz==iy) continue;
mtest = (ppair+recon_e[iz].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
// check triplets with muon
for(unsigned int iz=0;iz<recon_mu.size();++iz) {
mtest = (ppair+recon_mu[iz].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
// check quadruplets with electrons
for(unsigned int iz=0;iz<recon_e.size();++iz) {
for(unsigned int iw=iz+1;iw<recon_e.size();++iw) {
if(iz==ix||iz==iy||iw==ix||iw==iy) continue;
if(recon_e[iz].pdgId()*recon_e[iw].pdgId()>0) continue;
mtest = (ppair+recon_e[iz].momentum()+recon_e[iw].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
}
// check quadruplets with muons
for(unsigned int iz=0;iz<recon_mu.size();++iz) {
for(unsigned int iw=iz+1;iw<recon_mu.size();++iw) {
if(recon_mu[iz].pdgId()*recon_mu[iw].pdgId()>0) continue;
mtest = (ppair+recon_mu[iz].momentum()+recon_mu[iw].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
}
}
}
// Muon pairs
for(unsigned int ix=0;ix<recon_mu.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_mu.size();++iy) {
if(recon_mu[ix].pdgId()*recon_mu[iy].pdgId()>0) continue;
FourMomentum ppair = recon_mu[ix].momentum()+recon_mu[iy].momentum();
double mtest = ppair.mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
// check triplets with muon
for(unsigned int iz=0;iz<recon_mu.size();++iz) {
if(iz==ix||iz==iy) continue;
mtest = (ppair+recon_mu[iz].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
// check triplets with electron
for(unsigned int iz=0;iz<recon_e.size();++iz) {
mtest = (ppair+recon_e[iz].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
// check muon quadruplets
for(unsigned int iz=0;iz<recon_mu.size();++iz) {
for(unsigned int iw=iz+1;iy<recon_mu.size();++iy) {
if(iz==ix||iz==iy||iw==ix||iw==iy) continue;
if(recon_mu[iz].pdgId()*recon_mu[iw].pdgId()>0) continue;
mtest = (ppair+recon_mu[iz].momentum()+recon_mu[iw].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
}
}
}
//make the control plots
_hist_etmiss ->fill(eTmiss,weight);
_hist_meff ->fill(meff ,weight);
// finally the counts
if(eTmiss>50.) _count_SR1->fill(0.5,weight);
if(meff >0. ) _count_SR2->fill(0.5,weight);
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*13./sumOfWeights();
scale(_hist_etmiss,norm*20.);
scale(_hist_meff ,norm*20.);
scale(_count_SR1,norm);
scale(_count_SR2,norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _hist_electrons;
Histo1DPtr _hist_muons;
Histo1DPtr _hist_leptons;
Histo1DPtr _hist_4leptons;
Histo1DPtr _hist_veto;
Histo1DPtr _hist_etmiss;
Histo1DPtr _hist_meff;
Histo1DPtr _count_SR1;
Histo1DPtr _count_SR2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_153);
}
diff --git a/src/Analyses/ATLAS_2012_I1083318.cc b/src/Analyses/ATLAS_2012_I1083318.cc
--- a/src/Analyses/ATLAS_2012_I1083318.cc
+++ b/src/Analyses/ATLAS_2012_I1083318.cc
@@ -1,261 +1,260 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/LeptonClusters.hh"
#include "Rivet/Projections/LeadingParticlesFinalState.hh"
namespace Rivet {
/// ATLAS W + jets production at 7 TeV
class ATLAS_2012_I1083318 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1083318()
: Analysis("ATLAS_2012_I1083318")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
FinalState fs;
IdentifiedFinalState allleptons;
allleptons.acceptIdPair(PID::ELECTRON);
allleptons.acceptIdPair(PID::MUON);
- vector< pair<double, double> > etaRanges;
- etaRanges.push_back(make_pair(-2.5, 2.5));
- LeptonClusters leptons(fs, allleptons, 0.1, true, etaRanges, 20.0*GeV);
+ Cut cuts = Range(Cuts::eta, -2.5, 2.5) & (Cuts::pt >= 20.0*GeV);
+ LeptonClusters leptons(fs, allleptons, 0.1, true, cuts);
addProjection(leptons, "leptons");
// Leading neutrinos for Etmiss
LeadingParticlesFinalState neutrinos(fs);
neutrinos.addParticleIdPair(PID::NU_E);
neutrinos.addParticleIdPair(PID::NU_MU);
neutrinos.setLeadingOnly(true);
addProjection(neutrinos, "neutrinos");
// Input for the jets: "Neutrinos, electrons, and muons from decays of the
// massive W boson were not used"
VetoedFinalState veto;
veto.addVetoOnThisFinalState(leptons);
veto.addVetoOnThisFinalState(neutrinos);
FastJets jets(veto, FastJets::ANTIKT, 0.4);
jets.useInvisibles(true);
addProjection(jets, "jets");
for (size_t i = 0; i < 2; ++i) {
_h_NjetIncl[i] = bookHisto1D(1, 1, i+1);
_h_RatioNjetIncl[i] = bookScatter2D(2, 1, i+1);
_h_FirstJetPt_1jet[i] = bookHisto1D(3, 1, i+1);
_h_FirstJetPt_2jet[i] = bookHisto1D(4, 1, i+1);
_h_FirstJetPt_3jet[i] = bookHisto1D(5, 1, i+1);
_h_FirstJetPt_4jet[i] = bookHisto1D(6, 1, i+1);
_h_SecondJetPt_2jet[i] = bookHisto1D(7, 1, i+1);
_h_SecondJetPt_3jet[i] = bookHisto1D(8, 1, i+1);
_h_SecondJetPt_4jet[i] = bookHisto1D(9, 1, i+1);
_h_ThirdJetPt_3jet[i] = bookHisto1D(10, 1, i+1);
_h_ThirdJetPt_4jet[i] = bookHisto1D(11, 1, i+1);
_h_FourthJetPt_4jet[i] = bookHisto1D(12, 1, i+1);
_h_Ht_1jet[i] = bookHisto1D(13, 1, i+1);
_h_Ht_2jet[i] = bookHisto1D(14, 1, i+1);
_h_Ht_3jet[i] = bookHisto1D(15, 1, i+1);
_h_Ht_4jet[i] = bookHisto1D(16, 1, i+1);
_h_Minv_2jet[i] = bookHisto1D(17, 1, i+1);
_h_Minv_3jet[i] = bookHisto1D(18, 1, i+1);
_h_Minv_4jet[i] = bookHisto1D(19, 1, i+1);
_h_JetRapidity[i] = bookHisto1D(20, 1, i+1);
_h_DeltaYElecJet[i] = bookHisto1D(21, 1, i+1);
_h_SumYElecJet[i] = bookHisto1D(22, 1, i+1);
_h_DeltaR_2jet[i] = bookHisto1D(23, 1, i+1);
_h_DeltaY_2jet[i] = bookHisto1D(24, 1, i+1);
_h_DeltaPhi_2jet[i] = bookHisto1D(25, 1, i+1);
}
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const vector<ClusteredLepton>& leptons = applyProjection<LeptonClusters>(event, "leptons").clusteredLeptons();
Particles neutrinos = applyProjection<FinalState>(event, "neutrinos").particlesByPt();
if (leptons.size() != 1 || (neutrinos.size() == 0)) {
vetoEvent;
}
FourMomentum lepton = leptons[0].momentum();
FourMomentum p_miss = neutrinos[0].momentum();
if (p_miss.Et() < 25.0*GeV) {
vetoEvent;
}
double mT = sqrt(2.0 * lepton.pT() * p_miss.Et() * (1.0 - cos( lepton.phi()-p_miss.phi()) ) );
if (mT < 40.0*GeV) {
vetoEvent;
}
double jetcuts[] = { 30.0*GeV, 20.0*GeV };
const FastJets& jetpro = applyProjection<FastJets>(event, "jets");
for (size_t i = 0; i < 2; ++i) {
vector<FourMomentum> jets;
double HT = lepton.pT() + p_miss.pT();
foreach (const Jet& jet, jetpro.jetsByPt(jetcuts[i])) {
if (fabs(jet.rapidity()) < 4.4 && deltaR(lepton, jet.momentum()) > 0.5) {
jets.push_back(jet.momentum());
HT += jet.pT();
}
}
_h_NjetIncl[i]->fill(0.0, weight);
// Njet>=1 observables
if (jets.size() < 1) continue;
_h_NjetIncl[i]->fill(1.0, weight);
_h_FirstJetPt_1jet[i]->fill(jets[0].pT(), weight);
_h_JetRapidity[i]->fill(jets[0].rapidity(), weight);
_h_Ht_1jet[i]->fill(HT, weight);
_h_DeltaYElecJet[i]->fill(lepton.rapidity()-jets[0].rapidity(), weight);
_h_SumYElecJet[i]->fill(lepton.rapidity()+jets[0].rapidity(), weight);
// Njet>=2 observables
if (jets.size() < 2) continue;
_h_NjetIncl[i]->fill(2.0, weight);
_h_FirstJetPt_2jet[i]->fill(jets[0].pT(), weight);
_h_SecondJetPt_2jet[i]->fill(jets[1].pT(), weight);
_h_Ht_2jet[i]->fill(HT, weight);
double m2_2jet = FourMomentum(jets[0]+jets[1]).mass2();
_h_Minv_2jet[i]->fill(m2_2jet>0.0 ? sqrt(m2_2jet) : 0.0, weight);
_h_DeltaR_2jet[i]->fill(deltaR(jets[0], jets[1]), weight);
_h_DeltaY_2jet[i]->fill(jets[0].rapidity()-jets[1].rapidity(), weight);
_h_DeltaPhi_2jet[i]->fill(deltaPhi(jets[0], jets[1]), weight);
// Njet>=3 observables
if (jets.size() < 3) continue;
_h_NjetIncl[i]->fill(3.0, weight);
_h_FirstJetPt_3jet[i]->fill(jets[0].pT(), weight);
_h_SecondJetPt_3jet[i]->fill(jets[1].pT(), weight);
_h_ThirdJetPt_3jet[i]->fill(jets[2].pT(), weight);
_h_Ht_3jet[i]->fill(HT, weight);
double m2_3jet = FourMomentum(jets[0]+jets[1]+jets[2]).mass2();
_h_Minv_3jet[i]->fill(m2_3jet>0.0 ? sqrt(m2_3jet) : 0.0, weight);
// Njet>=4 observables
if (jets.size() < 4) continue;
_h_NjetIncl[i]->fill(4.0, weight);
_h_FirstJetPt_4jet[i]->fill(jets[0].pT(), weight);
_h_SecondJetPt_4jet[i]->fill(jets[1].pT(), weight);
_h_ThirdJetPt_4jet[i]->fill(jets[2].pT(), weight);
_h_FourthJetPt_4jet[i]->fill(jets[3].pT(), weight);
_h_Ht_4jet[i]->fill(HT, weight);
double m2_4jet = FourMomentum(jets[0]+jets[1]+jets[2]+jets[3]).mass2();
_h_Minv_4jet[i]->fill(m2_4jet>0.0 ? sqrt(m2_4jet) : 0.0, weight);
// Njet>=5 observables
if (jets.size() < 5) continue;
_h_NjetIncl[i]->fill(5.0, weight);
}
}
/// Normalise histograms etc., after the run
void finalize() {
for (size_t i = 0; i < 2; ++i) {
// Construct jet multiplicity ratio
for (size_t n = 1; n < _h_NjetIncl[i]->numBins(); ++n) {
YODA::HistoBin1D& b0 = _h_NjetIncl[i]->bin(n-1);
YODA::HistoBin1D& b1 = _h_NjetIncl[i]->bin(n);
if (b0.height() == 0.0 || b1.height() == 0.0) continue;
_h_RatioNjetIncl[i]->addPoint(n, b1.height()/b0.height(), 0,
b1.height()/b0.height() * (b0.relErr() + b1.relErr()));
}
// Scale all histos to the cross section
const double factor = crossSection()/sumOfWeights();
scale(_h_DeltaPhi_2jet[i], factor);
scale(_h_DeltaR_2jet[i], factor);
scale(_h_DeltaY_2jet[i], factor);
scale(_h_DeltaYElecJet[i], factor);
scale(_h_FirstJetPt_1jet[i], factor);
scale(_h_FirstJetPt_2jet[i], factor);
scale(_h_FirstJetPt_3jet[i], factor);
scale(_h_FirstJetPt_4jet[i], factor);
scale(_h_FourthJetPt_4jet[i], factor);
scale(_h_Ht_1jet[i], factor);
scale(_h_Ht_2jet[i], factor);
scale(_h_Ht_3jet[i], factor);
scale(_h_Ht_4jet[i], factor);
scale(_h_JetRapidity[i], factor);
scale(_h_Minv_2jet[i], factor);
scale(_h_Minv_3jet[i], factor);
scale(_h_Minv_4jet[i], factor);
scale(_h_NjetIncl[i], factor);
scale(_h_SecondJetPt_2jet[i], factor);
scale(_h_SecondJetPt_3jet[i], factor);
scale(_h_SecondJetPt_4jet[i], factor);
scale(_h_SumYElecJet[i], factor);
scale(_h_ThirdJetPt_3jet[i], factor);
scale(_h_ThirdJetPt_4jet[i], factor);
}
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_DeltaPhi_2jet[2];
Histo1DPtr _h_DeltaR_2jet[2];
Histo1DPtr _h_DeltaY_2jet[2];
Histo1DPtr _h_DeltaYElecJet[2];
Histo1DPtr _h_FirstJetPt_1jet[2];
Histo1DPtr _h_FirstJetPt_2jet[2];
Histo1DPtr _h_FirstJetPt_3jet[2];
Histo1DPtr _h_FirstJetPt_4jet[2];
Histo1DPtr _h_FourthJetPt_4jet[2];
Histo1DPtr _h_Ht_1jet[2];
Histo1DPtr _h_Ht_2jet[2];
Histo1DPtr _h_Ht_3jet[2];
Histo1DPtr _h_Ht_4jet[2];
Histo1DPtr _h_JetRapidity[2];
Histo1DPtr _h_Minv_2jet[2];
Histo1DPtr _h_Minv_3jet[2];
Histo1DPtr _h_Minv_4jet[2];
Histo1DPtr _h_NjetIncl[2];
Scatter2DPtr _h_RatioNjetIncl[2];
Histo1DPtr _h_SecondJetPt_2jet[2];
Histo1DPtr _h_SecondJetPt_3jet[2];
Histo1DPtr _h_SecondJetPt_4jet[2];
Histo1DPtr _h_SumYElecJet[2];
Histo1DPtr _h_ThirdJetPt_3jet[2];
Histo1DPtr _h_ThirdJetPt_4jet[2];
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1083318);
}
diff --git a/src/Analyses/ATLAS_2012_I1095236.cc b/src/Analyses/ATLAS_2012_I1095236.cc
--- a/src/Analyses/ATLAS_2012_I1095236.cc
+++ b/src/Analyses/ATLAS_2012_I1095236.cc
@@ -1,337 +1,335 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_I1095236 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1095236()
: Analysis("ATLAS_2012_I1095236")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// Projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
// All tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Used for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
// Book histograms
_count_SR0_A1 = bookHisto1D("count_SR0_A1", 1, 0., 1.);
_count_SR0_B1 = bookHisto1D("count_SR0_B1", 1, 0., 1.);
_count_SR0_C1 = bookHisto1D("count_SR0_C1", 1, 0., 1.);
_count_SR0_A2 = bookHisto1D("count_SR0_A2", 1, 0., 1.);
_count_SR0_B2 = bookHisto1D("count_SR0_B2", 1, 0., 1.);
_count_SR0_C2 = bookHisto1D("count_SR0_C2", 1, 0., 1.);
_count_SR1_D = bookHisto1D("count_SR1_D" , 1, 0., 1.);
_count_SR1_E = bookHisto1D("count_SR1_E" , 1, 0., 1.);
_hist_meff_SR0_A1 = bookHisto1D("hist_m_eff_SR0_A1", 14, 400., 1800.);
_hist_meff_SR0_A2 = bookHisto1D("hist_m_eff_SR0_A2", 14, 400., 1800.);
_hist_meff_SR1_D_e = bookHisto1D("hist_meff_SR1_D_e" , 16, 600., 2200.);
_hist_meff_SR1_D_mu = bookHisto1D("hist_meff_SR1_D_mu", 16, 600., 2200.);
_hist_met_SR0_A1 = bookHisto1D("hist_met_SR0_A1", 14, 0., 700.);
_hist_met_SR0_A2 = bookHisto1D("hist_met_SR0_A2", 14, 0., 700.);
_hist_met_SR0_D_e = bookHisto1D("hist_met_SR1_D_e" , 15, 0., 600.);
_hist_met_SR0_D_mu = bookHisto1D("hist_met_SR1_D_mu", 15, 0., 600.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Jets cand_jets;
const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
foreach (const Jet& jet, jets) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
const Particles cand_mu = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
// Resolve jet-lepton overlap for jets with |eta| < 2.8
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) >= 2.8 ) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// get the loose leptons used to define the 0 lepton channel
Particles loose_e, loose_mu;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) loose_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) loose_mu.push_back( mu );
}
// tight leptons for the 1-lepton channel
Particles tight_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu, loose_mu) {
if(mu.momentum().perp()<20.) continue;
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
tight_mu.push_back(mu);
}
Particles tight_e;
foreach ( const Particle & e, loose_e ) {
if(e.momentum().perp()<25.) continue;
double pTinCone = -e.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if (pTinCone/e.momentum().perp()<0.1) {
tight_e.push_back(e);
}
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// get the number of b-tagged jets
unsigned int ntagged=0;
foreach (const Jet & jet, recon_jets ) {
if(jet.momentum().perp()>50. && abs(jet.eta())<2.5 &&
jet.containsBottom() && rand()/static_cast<double>(RAND_MAX)<=0.60)
++ntagged;
}
// ATLAS calo problem
if(rand()/static_cast<double>(RAND_MAX)<=0.42) {
foreach ( const Jet & jet, recon_jets ) {
double eta = jet.rapidity();
double phi = jet.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(jet.momentum().perp()>50 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
}
// at least 1 b tag
if(ntagged==0) vetoEvent;
// minumum Et miss
if(eTmiss<80.) vetoEvent;
// at least 3 jets pT > 50
if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<50.)
vetoEvent;
// m_eff
double m_eff = eTmiss;
for(unsigned int ix=0;ix<3;++ix)
m_eff += recon_jets[ix].momentum().perp();
// delta Phi
double min_dPhi = 999.999;
double pTmiss_phi = pTmiss.phi();
for(unsigned int ix=0;ix<3;++ix) {
min_dPhi = min( min_dPhi, deltaPhi( pTmiss_phi, recon_jets[ix].momentum().phi() ) );
}
// 0-lepton channels
if(loose_e.empty() && loose_mu.empty() &&
recon_jets[0].momentum().perp()>130. && eTmiss>130. &&
eTmiss/m_eff>0.25 && min_dPhi>0.4) {
// jet charge cut
bool jetCharge = true;
for(unsigned int ix=0;ix<3;++ix) {
if(fabs(recon_jets[ix].eta())>2.) continue;
double trackpT=0;
foreach(const Particle & p, recon_jets[ix].particles()) {
if(PID::threeCharge(p.pdgId())==0) continue;
trackpT += p.momentum().perp();
}
if(trackpT/recon_jets[ix].momentum().perp()<0.05)
jetCharge = false;
}
if(jetCharge) {
// SR0-A region
if(m_eff>500.) {
_count_SR0_A1->fill(0.5,weight);
_hist_meff_SR0_A1->fill(m_eff,weight);
_hist_met_SR0_A1 ->fill(eTmiss,weight);
if(ntagged>=2) {
_count_SR0_A2->fill(0.5,weight);
_hist_meff_SR0_A2->fill(m_eff,weight);
_hist_met_SR0_A2 ->fill(eTmiss,weight);
}
}
// SR0-B
if(m_eff>700.) {
_count_SR0_B1->fill(0.5,weight);
if(ntagged>=2) _count_SR0_B2->fill(0.5,weight);
}
// SR0-C
if(m_eff>900.) {
_count_SR0_C1->fill(0.5,weight);
if(ntagged>=2) _count_SR0_C2->fill(0.5,weight);
}
}
}
// 1-lepton channels
if(tight_e.size() + tight_mu.size() == 1 &&
recon_jets.size()>=4 && recon_jets[3].momentum().perp()>50.&&
recon_jets[0].momentum().perp()>60.) {
Particle lepton = tight_e.empty() ? tight_mu[0] : tight_e[0];
m_eff += lepton.momentum().perp() + recon_jets[3].momentum().perp();
// transverse mass cut
double mT = 2.*(lepton.momentum().perp()*eTmiss-
lepton.momentum().x()*pTmiss.x()-
lepton.momentum().y()*pTmiss.y());
mT = sqrt(mT);
if(mT>100.&&m_eff>700.) {
// D region
_count_SR1_D->fill(0.5,weight);
if(abs(lepton.pdgId())==PID::ELECTRON) {
_hist_meff_SR1_D_e->fill(m_eff,weight);
_hist_met_SR0_D_e->fill(eTmiss,weight);
}
else {
_hist_meff_SR1_D_mu->fill(m_eff,weight);
_hist_met_SR0_D_mu->fill(eTmiss,weight);
}
// E region
if(eTmiss>200.) {
_count_SR1_E->fill(0.5,weight);
}
}
}
}
void finalize() {
double norm = crossSection()/femtobarn*2.05/sumOfWeights();
// these are number of events at 2.05fb^-1 per 100 GeV
scale( _hist_meff_SR0_A1 , 100. * norm );
scale( _hist_meff_SR0_A2 , 100. * norm );
scale( _hist_meff_SR1_D_e , 100. * norm );
scale( _hist_meff_SR1_D_mu , 100. * norm );
// these are number of events at 2.05fb^-1 per 50 GeV
scale( _hist_met_SR0_A1, 50. * norm );
scale( _hist_met_SR0_A2, 40. * norm );
// these are number of events at 2.05fb^-1 per 40 GeV
scale( _hist_met_SR0_D_e , 40. * norm );
scale( _hist_met_SR0_D_mu, 40. * norm );
// these are number of events at 2.05fb^-1
scale(_count_SR0_A1,norm);
scale(_count_SR0_B1,norm);
scale(_count_SR0_C1,norm);
scale(_count_SR0_A2,norm);
scale(_count_SR0_B2,norm);
scale(_count_SR0_C2,norm);
scale(_count_SR1_D ,norm);
scale(_count_SR1_E ,norm);
}
//@}
private:
Histo1DPtr _count_SR0_A1;
Histo1DPtr _count_SR0_B1;
Histo1DPtr _count_SR0_C1;
Histo1DPtr _count_SR0_A2;
Histo1DPtr _count_SR0_B2;
Histo1DPtr _count_SR0_C2;
Histo1DPtr _count_SR1_D;
Histo1DPtr _count_SR1_E;
Histo1DPtr _hist_meff_SR0_A1;
Histo1DPtr _hist_meff_SR0_A2;
Histo1DPtr _hist_meff_SR1_D_e;
Histo1DPtr _hist_meff_SR1_D_mu;
Histo1DPtr _hist_met_SR0_A1;
Histo1DPtr _hist_met_SR0_A2;
Histo1DPtr _hist_met_SR0_D_e;
Histo1DPtr _hist_met_SR0_D_mu;
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1095236);
}
diff --git a/src/Analyses/ATLAS_2012_I1112263.cc b/src/Analyses/ATLAS_2012_I1112263.cc
--- a/src/Analyses/ATLAS_2012_I1112263.cc
+++ b/src/Analyses/ATLAS_2012_I1112263.cc
@@ -1,345 +1,343 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_I1112263 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1112263()
: Analysis("ATLAS_2012_I1112263")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 10.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Book histograms
_hist_leptonpT_SR1.push_back(bookHisto1D("hist_lepton_pT_1_SR1",11,0.,220.));
_hist_leptonpT_SR1.push_back(bookHisto1D("hist_lepton_pT_2_SR1", 7,0.,140.));
_hist_leptonpT_SR1.push_back(bookHisto1D("hist_lepton_pT_3_SR1", 8,0.,160.));
_hist_leptonpT_SR2.push_back(bookHisto1D("hist_lepton_pT_1_SR2",11,0.,220.));
_hist_leptonpT_SR2.push_back(bookHisto1D("hist_lepton_pT_2_SR2", 7,0.,140.));
_hist_leptonpT_SR2.push_back(bookHisto1D("hist_lepton_pT_3_SR2", 8,0.,160.));
_hist_etmiss_SR1_A = bookHisto1D("hist_etmiss_SR1_A",15,10.,310.);
_hist_etmiss_SR1_B = bookHisto1D("hist_etmiss_SR1_B", 9,10.,190.);
_hist_etmiss_SR2_A = bookHisto1D("hist_etmiss_SR2_A",15,10.,310.);
_hist_etmiss_SR2_B = bookHisto1D("hist_etmiss_SR2_B", 9,10.,190.);
_hist_mSFOS= bookHisto1D("hist_mSFOF",9,0.,180.);
_count_SR1 = bookHisto1D("count_SR1", 1, 0., 1.);
_count_SR2 = bookHisto1D("count_SR2", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// candidate electrons
Particles cand_e;
foreach ( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt() ) {
double eta = e.eta();
// remove electrons with pT<15 in old veto region
// (NOT EXPLICIT IN THIS PAPER BUT IN SIMILAR 4 LEPTON PAPER and THIS DESCRPITION
// IS MUCH WORSE SO ASSUME THIS IS DONE)
if( fabs(eta)>1.37 && fabs(eta) < 1.52 && e.momentum().perp()< 15.*GeV)
continue;
double pTinCone = -e.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if (pTinCone/e.momentum().perp()<0.1) {
cand_e.push_back(e);
}
}
// resolve jet/lepton ambiguity
// (NOT EXPLICIT IN THIS PAPER BUT IN SIMILAR 4 LEPTON PAPER and THIS DESCRPITION
// IS MUCH WORSE SO ASSUME THIS IS DONE)
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any muons
if ( ! away ) {
foreach ( const Particle & mu, cand_e ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
if ( away )
recon_e.push_back( e );
}
// only keep muons more than R=0.4 from jets
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any electrona
if ( ! away ) {
foreach ( const Particle & e, cand_e ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
if ( away )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// now only use recon_jets, recon_mu, recon_e
// reject events with wrong number of leptons
if ( recon_mu.size() + recon_e.size() != 3 ) {
MSG_DEBUG("To few charged leptons left after selection");
vetoEvent;
}
// ATLAS calo problem
if(rand()/static_cast<double>(RAND_MAX)<=0.42) {
foreach ( const Particle & e, recon_e ) {
double eta = e.eta();
double phi = e.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
foreach ( const Jet & jet, recon_jets ) {
double eta = jet.rapidity();
double phi = jet.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(jet.momentum().perp()>40 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
}
// check at least one e/mu passing trigger
if( !( !recon_e .empty() && recon_e[0] .momentum().perp()>25.) &&
!( !recon_mu.empty() && recon_mu[0].momentum().perp()>20.) ) {
MSG_DEBUG("Hardest lepton fails trigger");
vetoEvent;
}
// eTmiss cut
if(eTmiss<50.) vetoEvent;
// check at least 1 SFOS pair
double mSFOS=1e30, mdiff=1e30;
unsigned int nSFOS=0;
for(unsigned int ix=0;ix<recon_e.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_e.size();++iy) {
if(recon_e[ix].pdgId()*recon_e[iy].pdgId()>0) continue;
++nSFOS;
double mtest = (recon_e[ix].momentum()+recon_e[iy].momentum()).mass();
// veto is mass<20
if(mtest<20.) vetoEvent;
if(fabs(mtest-90.)<mdiff) {
mSFOS = mtest;
mdiff = fabs(mtest-90.);
}
}
}
for(unsigned int ix=0;ix<recon_mu.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_mu.size();++iy) {
if(recon_mu[ix].pdgId()*recon_mu[iy].pdgId()>0) continue;
++nSFOS;
double mtest = (recon_mu[ix].momentum()+recon_mu[iy].momentum()).mass();
// veto is mass<20
if(mtest<20.) vetoEvent;
if(fabs(mtest-90.)<mdiff) {
mSFOS = mtest;
mdiff = fabs(mtest-90.);
}
}
}
// require at least 1 SFOS pair
if(nSFOS==0) vetoEvent;
// b-jet veto in SR!
if(mdiff>10.) {
foreach (const Jet & jet, recon_jets ) {
if(jet.containsBottom() &&
rand()/static_cast<double>(RAND_MAX)<=0.60)
vetoEvent;
}
}
// region SR1, Z depleted
if(mdiff>10.) {
_count_SR1->fill(0.5,weight);
_hist_etmiss_SR1_A->fill(eTmiss,weight);
_hist_etmiss_SR1_B->fill(eTmiss,weight);
_hist_mSFOS->fill(mSFOS,weight);
}
// region SR2, Z enriched
else {
_count_SR2->fill(0.5,weight);
_hist_etmiss_SR2_A->fill(eTmiss,weight);
_hist_etmiss_SR2_B->fill(eTmiss,weight);
}
// make the control plots
// lepton pT
unsigned int ie=0,imu=0;
for(unsigned int ix=0;ix<3;++ix) {
Histo1DPtr hist = mdiff>10. ?
_hist_leptonpT_SR1[ix] : _hist_leptonpT_SR2[ix];
double pTe = ie <recon_e .size() ?
recon_e [ie ].momentum().perp() : -1*GeV;
double pTmu = imu<recon_mu.size() ?
recon_mu[imu].momentum().perp() : -1*GeV;
if(pTe>pTmu) {
hist->fill(pTe ,weight);
++ie;
}
else {
hist->fill(pTmu,weight);
++imu;
}
}
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*2.06/sumOfWeights();
// these are number of events at 2.06fb^-1 per 20 GeV
for(unsigned int ix=0;ix<3;++ix) {
scale(_hist_leptonpT_SR1[ix],norm*20.);
scale(_hist_leptonpT_SR2[ix],norm*20.);
}
scale(_hist_etmiss_SR1_A,norm*20.);
scale(_hist_etmiss_SR1_B,norm*20.);
scale(_hist_etmiss_SR2_A,norm*20.);
scale(_hist_etmiss_SR2_B,norm*20.);
scale(_hist_mSFOS ,norm*20.);
// these are number of events at 2.06fb^-1
scale(_count_SR1,norm);
scale(_count_SR2,norm);
}
private:
/// @name Histograms
//@{
vector<Histo1DPtr> _hist_leptonpT_SR1;
vector<Histo1DPtr> _hist_leptonpT_SR2;
Histo1DPtr _hist_etmiss_SR1_A;
Histo1DPtr _hist_etmiss_SR1_B;
Histo1DPtr _hist_etmiss_SR2_A;
Histo1DPtr _hist_etmiss_SR2_B;
Histo1DPtr _hist_mSFOS;
Histo1DPtr _count_SR1;
Histo1DPtr _count_SR2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1112263);
}
diff --git a/src/Analyses/ATLAS_2012_I1117704.cc b/src/Analyses/ATLAS_2012_I1117704.cc
--- a/src/Analyses/ATLAS_2012_I1117704.cc
+++ b/src/Analyses/ATLAS_2012_I1117704.cc
@@ -1,288 +1,284 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2012_I1117704 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1117704()
: Analysis("ATLAS_2012_I1117704")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47) & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4) & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
/// Book histograms
_etmiss_HT_7j55 = bookHisto1D("etmiss_HT_7j55", 8, 0., 16.);
_etmiss_HT_8j55 = bookHisto1D("etmiss_HT_8j55", 8, 0., 16.);
_etmiss_HT_9j55 = bookHisto1D("etmiss_HT_9j55", 8, 0., 16.);
_etmiss_HT_6j80 = bookHisto1D("etmiss_HT_6j80", 8, 0., 16.);
_etmiss_HT_7j80 = bookHisto1D("etmiss_HT_7j80", 8, 0., 16.);
_etmiss_HT_8j80 = bookHisto1D("etmiss_HT_8j80", 8, 0., 16.);
_hist_njet55 = bookHisto1D("hist_njet55", 11, 2.5, 13.5);
_hist_njet80 = bookHisto1D("hist_njet80", 11, 2.5, 13.5);
_count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.);
_count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.);
_count_9j55 = bookHisto1D("count_9j55", 1, 0., 1.);
_count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.);
_count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.);
_count_8j80 = bookHisto1D("count_8j80", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// candidate electrons
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// resolve jet/lepton ambiguity
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
// candidates after |eta| < 2.8
if ( fabs( jet.eta() ) >= 2.8 ) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_e.push_back( e );
}
// only keep muons more than R=0.4 from jets
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away )
recon_mu.push_back( mu );
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// now only use recon_jets, recon_mu, recon_e
// reject events with electrons and muons
if ( ! ( recon_mu.empty() && recon_e.empty() ) ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
// calculate H_T
double HT=0;
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() > 40 * GeV )
HT += jet.pT() ;
}
// number of jets
unsigned int njet55=0, njet80=0;
for (unsigned int ix=0;ix<recon_jets.size();++ix) {
if(recon_jets[ix].pT()>80.*GeV) ++njet80;
if(recon_jets[ix].pT()>55.*GeV) ++njet55;
}
if(njet55==0) vetoEvent;
double ratio = eTmiss/sqrt(HT);
if(ratio>4.) {
_hist_njet55->fill(njet55,weight);
_hist_njet80->fill(njet80,weight);
// 7j55
if(njet55>=7)
_count_7j55->fill( 0.5, weight);
// 8j55
if(njet55>=8)
_count_8j55->fill( 0.5, weight) ;
// 8j55
if(njet55>=9)
_count_9j55->fill( 0.5, weight) ;
// 6j80
if(njet80>=6)
_count_6j80->fill( 0.5, weight) ;
// 7j80
if(njet80>=7)
_count_7j80->fill( 0.5, weight) ;
// 8j80
if(njet80>=8)
_count_8j80->fill( 0.5, weight) ;
}
if(njet55>=7)
_etmiss_HT_7j55->fill( ratio, weight);
// 8j55
if(njet55>=8)
_etmiss_HT_8j55->fill( ratio, weight) ;
// 8j55
if(njet55>=9)
_etmiss_HT_9j55->fill( ratio, weight) ;
// 6j80
if(njet80>=6)
_etmiss_HT_6j80->fill( ratio, weight) ;
// 7j80
if(njet80>=7)
_etmiss_HT_7j80->fill( ratio, weight) ;
// 8j80
if(njet80>=8)
_etmiss_HT_8j80->fill( ratio, weight) ;
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*4.7/sumOfWeights();
scale(_etmiss_HT_7j55,2.*norm);
scale(_etmiss_HT_8j55,2.*norm);
scale(_etmiss_HT_9j55,2.*norm);
scale(_etmiss_HT_6j80,2.*norm);
scale(_etmiss_HT_7j80,2.*norm);
scale(_etmiss_HT_8j80,2.*norm);
scale(_hist_njet55,norm);
scale(_hist_njet80,norm);
scale(_count_7j55,norm);
scale(_count_8j55,norm);
scale(_count_9j55,norm);
scale(_count_6j80,norm);
scale(_count_7j80,norm);
scale(_count_8j80,norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _etmiss_HT_7j55;
Histo1DPtr _etmiss_HT_8j55;
Histo1DPtr _etmiss_HT_9j55;
Histo1DPtr _etmiss_HT_6j80;
Histo1DPtr _etmiss_HT_7j80;
Histo1DPtr _etmiss_HT_8j80;
Histo1DPtr _hist_njet55;
Histo1DPtr _hist_njet80;
Histo1DPtr _count_7j55;
Histo1DPtr _count_8j55;
Histo1DPtr _count_9j55;
Histo1DPtr _count_6j80;
Histo1DPtr _count_7j80;
Histo1DPtr _count_8j80;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1117704);
}
diff --git a/src/Analyses/ATLAS_2012_I1125961.cc b/src/Analyses/ATLAS_2012_I1125961.cc
--- a/src/Analyses/ATLAS_2012_I1125961.cc
+++ b/src/Analyses/ATLAS_2012_I1125961.cc
@@ -1,325 +1,323 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_I1125961 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1125961()
: Analysis("ATLAS_2012_I1125961")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// Projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
// All tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
addProjection(VisibleFinalState(-4.5,4.5),"vfs");
// Book histograms
_count_A_tight = bookHisto1D("count_A_tight" , 1, 0., 1.);
_count_A_medium = bookHisto1D("count_A_medium" , 1, 0., 1.);
_count_Ap_medium = bookHisto1D("count_Ap_medium" , 1, 0., 1.);
_count_B_tight = bookHisto1D("count_B_tight" , 1, 0., 1.);
_count_C_tight = bookHisto1D("count_C_tight" , 1, 0., 1.);
_count_C_medium = bookHisto1D("count_C_medium" , 1, 0., 1.);
_count_C_loose = bookHisto1D("count_C_loose" , 1, 0., 1.);
_count_D_tight = bookHisto1D("count_D_tight" , 1, 0., 1.);
_count_E_tight = bookHisto1D("count_E_tight" , 1, 0., 1.);
_count_E_medium = bookHisto1D("count_E_medium" , 1, 0., 1.);
_count_E_loose = bookHisto1D("count_E_loose" , 1, 0., 1.);
_hist_meff_A = bookHisto1D("hist_m_eff_A" , 30, 0., 3000.);
_hist_meff_Ap = bookHisto1D("hist_m_eff_Ap", 30, 0., 3000.);
_hist_meff_B = bookHisto1D("hist_m_eff_B" , 30, 0., 3000.);
_hist_meff_C = bookHisto1D("hist_m_eff_C" , 30, 0., 3000.);
_hist_meff_D = bookHisto1D("hist_m_eff_D" , 30, 0., 3000.);
_hist_meff_E = bookHisto1D("hist_m_eff_E" , 30, 0., 3000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
Jets cand_jets;
const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
foreach (const Jet& jet, jets) {
if ( fabs( jet.eta() ) < 4.9 ) {
cand_jets.push_back(jet);
}
}
const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable
Particles cand_mu;
const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
foreach (const Particle& mu, muons) {
double pTinCone = -mu.pT();
foreach (const Particle& track, chg_tracks) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
pTinCone += track.pT();
}
}
if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
}
// Resolve jet-lepton overlap for jets with |eta| < 2.8
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) >= 2.8 ) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
Particles recon_e, recon_mu;
foreach ( const Particle & e, cand_e ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_e.push_back( e );
}
foreach ( const Particle & mu, cand_mu ) {
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
if ( away ) recon_mu.push_back( mu );
}
// pTmiss
// Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
// i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
foreach ( const Jet& jet, cand_jets ) {
if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum();
}
double eTmiss = pTmiss.pT();
// no electron pT> 20 or muons pT>10
if ( !recon_mu.empty() || !recon_e.empty() ) {
MSG_DEBUG("Charged leptons left after selection");
vetoEvent;
}
if ( eTmiss <= 160 * GeV ) {
MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
vetoEvent;
}
if ( recon_jets.size()<2 ||
recon_jets[0].pT() <= 130.0 * GeV ||
recon_jets[0].pT() <= 60.0 * GeV ) {
MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
vetoEvent;
}
// ==================== observables ====================
int Njets = 0;
double min_dPhi_All = 999.999;
double min_dPhi_2 = 999.999;
double min_dPhi_3 = 999.999;
double pTmiss_phi = pTmiss.phi();
foreach ( const Jet& jet, recon_jets ) {
if ( jet.pT() < 40 * GeV ) continue;
if ( Njets < 2 ) {
min_dPhi_2 = min( min_dPhi_2, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
}
if( Njets < 3) {
min_dPhi_3 = min( min_dPhi_3, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
}
min_dPhi_All = min( min_dPhi_All, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
++Njets;
}
// inclusive meff
double m_eff_inc = eTmiss;
foreach ( const Jet& jet, recon_jets ) {
double perp = jet.pT();
if(perp>40.) m_eff_inc += perp;
}
// region A
double m_eff_Nj = eTmiss + recon_jets[0].pT() + recon_jets[1].pT();
if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) {
_hist_meff_A->fill(m_eff_inc,weight);
if(m_eff_inc>1900.) _count_A_tight ->fill(0.5,weight);
if(m_eff_inc>1400.) _count_A_medium->fill(0.5,weight);
}
// region A'
if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.4 ) {
_hist_meff_Ap->fill(m_eff_inc,weight);
if(m_eff_inc>1200.) _count_Ap_medium->fill(0.5,weight);
}
// for rest of regions 3 jets pT> 60 needed
if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<60.)
vetoEvent;
// region B
m_eff_Nj += recon_jets[2].momentum().perp();
if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) {
_hist_meff_B->fill(m_eff_inc,weight);
if(m_eff_inc>1900.) _count_B_tight ->fill(0.5,weight);
}
// for rest of regions 4 jets pT> 60 needed
if(recon_jets.size()<4 || recon_jets[3].momentum().perp()<60.)
vetoEvent;
// region C
m_eff_Nj += recon_jets[3].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) {
_hist_meff_C->fill(m_eff_inc,weight);
if(m_eff_inc>1500.) _count_C_tight ->fill(0.5,weight);
if(m_eff_inc>1200.) _count_C_medium->fill(0.5,weight);
if(m_eff_inc> 900.) _count_C_loose ->fill(0.5,weight);
}
// for rest of regions 5 jets pT> 40 needed
if(recon_jets.size()<5 || recon_jets[4].momentum().perp()<40.)
vetoEvent;
// region D
m_eff_Nj += recon_jets[4].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.2 ) {
_hist_meff_D->fill(m_eff_inc,weight);
if(m_eff_inc>1500.) _count_D_tight ->fill(0.5,weight);
}
// for rest of regions 6 jets pT> 40 needed
if(recon_jets.size()<6 || recon_jets[5].momentum().perp()<40.)
vetoEvent;
// region E
m_eff_Nj += recon_jets[5].momentum().perp();
if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
_hist_meff_E->fill(m_eff_inc,weight);
if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight);
if(m_eff_inc>1200.) _count_E_medium->fill(0.5,weight);
if(m_eff_inc> 900.) _count_E_loose ->fill(0.5,weight);
}
}
void finalize() {
double norm = crossSection()/femtobarn*4.7/sumOfWeights();
// these are number of events at 4.7fb^-1 per 100 GeV
scale( _hist_meff_A , 100. * norm );
scale( _hist_meff_Ap, 100. * norm );
scale( _hist_meff_B , 100. * norm );
scale( _hist_meff_C , 100. * norm );
scale( _hist_meff_D , 100. * norm );
scale( _hist_meff_E , 100. * norm );
// these are number of events at 4.7fb^-1
scale(_count_A_tight ,norm);
scale(_count_A_medium ,norm);
scale(_count_Ap_medium,norm);
scale(_count_B_tight ,norm);
scale(_count_C_tight ,norm);
scale(_count_C_medium ,norm);
scale(_count_C_loose ,norm);
scale(_count_D_tight ,norm);
scale(_count_E_tight ,norm);
scale(_count_E_medium ,norm);
scale(_count_E_loose ,norm);
}
//@}
private:
Histo1DPtr _count_A_tight;
Histo1DPtr _count_A_medium;
Histo1DPtr _count_Ap_medium;
Histo1DPtr _count_B_tight;
Histo1DPtr _count_C_tight;
Histo1DPtr _count_C_medium;
Histo1DPtr _count_C_loose;
Histo1DPtr _count_D_tight;
Histo1DPtr _count_E_tight;
Histo1DPtr _count_E_medium;
Histo1DPtr _count_E_loose;
Histo1DPtr _hist_meff_A ;
Histo1DPtr _hist_meff_Ap;
Histo1DPtr _hist_meff_B ;
Histo1DPtr _hist_meff_C ;
Histo1DPtr _hist_meff_D ;
Histo1DPtr _hist_meff_E ;
};
// This global object acts as a hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1125961);
}
diff --git a/src/Analyses/ATLAS_2012_I1126136.cc b/src/Analyses/ATLAS_2012_I1126136.cc
--- a/src/Analyses/ATLAS_2012_I1126136.cc
+++ b/src/Analyses/ATLAS_2012_I1126136.cc
@@ -1,319 +1,317 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2012_I1126136 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1126136()
: Analysis("ATLAS_2012_I1126136")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- vector<pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- vector<pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
// Book histograms
_count_SR_A = bookHisto1D("count_SR_A" , 1, 0., 1.);
_count_SR_B = bookHisto1D("count_SR_B" , 1, 0., 1.);
_hist_mjjj1 = bookHisto1D("hist_mjjj1" , 30 , 0. , 600. );
_hist_mjjj2 = bookHisto1D("hist_mjjj2" , 30 , 0. , 600. );
_hist_ETmiss = bookHisto1D("hist_ETmiss", 20 , 100. , 600. );
_hist_mT2 = bookHisto1D("hist_mT2" , 200, 0. , 1000. );
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// pTmiss
FourMomentum pTmiss;
foreach ( const Particle & p,
applyProjection<VisibleFinalState>(event, "vfs").particles() ) {
pTmiss -= p.momentum();
}
double ETmiss = pTmiss.perp();
// require eTmiss > 150
if(ETmiss<150.) vetoEvent;
// get the candiate jets
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 4.5 ) {
cand_jets.push_back(jet);
}
}
// find the electrons
Particles cand_e;
foreach( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool e_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
double dR = deltaR(e.momentum(),jet.momentum());
if ( dR < 0.4 && dR > 0.2 ) {
e_near_jet = true;
break;
}
}
if ( e_near_jet ) continue;
cand_e.push_back(e);
}
// find the muons
Particles cand_mu;
foreach( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool mu_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( mu_near_jet ) continue;
cand_mu.push_back(mu);
}
// veto events with leptons
if( ! cand_e.empty() || ! cand_mu.empty() )
vetoEvent;
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if(fabs(jet.eta())>2.8 ||
jet.momentum().perp()<30.) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// find b jets
Jets tight_bjets,loose_bjets;
foreach(const Jet & jet, recon_jets) {
if(!jet.containsBottom() && jet.eta()>2.5) continue;
double prob = rand()/static_cast<double>(RAND_MAX);
if(prob <= 0.60) tight_bjets.push_back(jet);
if(prob <= 0.75) loose_bjets.push_back(jet);
}
// require >=1 tight or >=2 loose b-jets
if( ! ( !tight_bjets.empty() || loose_bjets.size()>=2) )
vetoEvent;
// must be at least 6 jets with pT>30
if(recon_jets.size()<6 ) vetoEvent;
// hardest > 130
if(recon_jets[0].momentum().perp() < 130. ) vetoEvent;
// three hardest jets must be separated from etmiss
for(unsigned int ix=0;ix<3;++ix) {
if(deltaPhi(recon_jets[ix].momentum(),pTmiss)<0.2*PI)
vetoEvent;
}
// remove events with tau like jets
for(unsigned int ix=3;ix<recon_jets.size();++ix) {
// skip jets seperated from eTmiss
if(deltaPhi(recon_jets[ix].momentum(),pTmiss)>=0.2*PI)
continue;
// check the number of tracks between 1 and 4
unsigned int ncharged=0;
foreach ( const Particle & particle, recon_jets[ix].particles()) {
if(PID::threeCharge(particle.pdgId())!=0) ++ncharged;
}
if(ncharged==0 || ncharged>4) continue;
// calculate transverse mass and reject if < 100
double mT = 2.*recon_jets[ix].momentum().perp()*ETmiss
-recon_jets[ix].momentum().x()*pTmiss.x()
-recon_jets[ix].momentum().y()*pTmiss.y();
if(mT<100.) vetoEvent;
}
// if 2 loose b-jets apply mT cut
if(loose_bjets.size()>=2) {
// find b-jet closest to eTmiss
double minR(1e30);
unsigned int ijet(0);
for(unsigned int ix=0;ix<loose_bjets.size();++ix) {
double dR = deltaR(loose_bjets[ix].momentum(),pTmiss);
if(dR<minR) {
minR=dR;
ijet = ix;
}
}
double mT = 2.*loose_bjets[ijet].momentum().perp()*ETmiss
-loose_bjets[ijet].momentum().x()*pTmiss.x()
-loose_bjets[ijet].momentum().y()*pTmiss.y();
if(mT<170.) vetoEvent;
}
// 1 tight b-jet apply mT cut
if(tight_bjets.size()==1) {
for(unsigned int ix=0;ix<4;++ix) {
double mT = 2.*recon_jets[ix].momentum().perp()*ETmiss
-recon_jets[ix].momentum().x()*pTmiss.x()
-recon_jets[ix].momentum().y()*pTmiss.y();
if(mT<175.) vetoEvent;
}
}
// find the closest triplet of jets in (eta,phi)
unsigned int j1(0),j2(0),j3(0);
double minR2(1e30);
for(unsigned int i1=0;i1<recon_jets.size();++i1) {
for(unsigned int i2=i1+1;i2<recon_jets.size();++i2) {
for(unsigned int i3=i2+1;i3<recon_jets.size();++i3) {
double delR2 =
sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i2].momentum())) +
sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i3].momentum())) +
sqr(deltaR(recon_jets[i2].momentum(),recon_jets[i3].momentum()));
if(delR2<minR2) {
minR2=delR2;
j1=i1;
j2=i2;
j3=i3;
}
}
}
}
// 4-momentum and mass of first triplet
FourMomentum pjjj1 = recon_jets[j1].momentum() +
recon_jets[j2].momentum()+ recon_jets[j3].momentum();
double mjjj1 = pjjj1.mass();
// find the second triplet
unsigned int j4(0),j5(0),j6(0);
minR2=0.;
for(unsigned int i1=0;i1<recon_jets.size();++i1) {
if(i1==j1||i1==j2||i1==j3) continue;
for(unsigned int i2=i1+1;i2<recon_jets.size();++i2) {
if(i2==j1||i2==j2||i2==j3) continue;
for(unsigned int i3=i2+1;i3<recon_jets.size();++i3) {
if(i3==j1||i3==j2||i3==j3) continue;
double delR2 =
sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i2].momentum())) +
sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i3].momentum())) +
sqr(deltaR(recon_jets[i2].momentum(),recon_jets[i3].momentum()));
if(delR2<minR2) {
minR2=delR2;
j4=i1;
j5=i2;
j6=i3;
}
}
}
}
// 4-momentum and mass of first triplet
FourMomentum pjjj2 = recon_jets[j4].momentum() +
recon_jets[j5].momentum()+ recon_jets[j6].momentum();
double mjjj2 = pjjj2.mass();
_hist_mjjj1->fill(mjjj1,weight);
_hist_mjjj2->fill(mjjj2,weight);
// require triplets in 80<mjjj<270
if(mjjj1<80.||mjjj1>270.||mjjj2<80.||mjjj2>270.)
vetoEvent;
// counts in signal regions
_count_SR_A->fill(0.5,weight);
if(ETmiss>260.) _count_SR_B->fill(0.5,weight);
_hist_ETmiss->fill(ETmiss,weight);
double m_T2 = mT2::mT2( pjjj1,pjjj2,
pTmiss,0.0 ); // zero mass invisibles
_hist_mT2->fill(m_T2,weight);
}
//@}
void finalize() {
double norm = 4.7* crossSection()/sumOfWeights()/femtobarn;
scale(_count_SR_A , norm );
scale(_count_SR_B , norm );
scale(_hist_mjjj1 , 20.*norm );
scale(_hist_ETmiss, 50.*norm );
scale(_hist_mjjj2 , 20.*norm );
scale(_hist_mT2 , norm );
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_SR_A;
Histo1DPtr _count_SR_B;
Histo1DPtr _hist_mjjj1;
Histo1DPtr _hist_mjjj2;
Histo1DPtr _hist_ETmiss;
Histo1DPtr _hist_mT2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1126136);
}
diff --git a/src/Analyses/ATLAS_2012_I1180197.cc b/src/Analyses/ATLAS_2012_I1180197.cc
--- a/src/Analyses/ATLAS_2012_I1180197.cc
+++ b/src/Analyses/ATLAS_2012_I1180197.cc
@@ -1,431 +1,429 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
class ATLAS_2012_I1180197 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1180197()
: Analysis("ATLAS_2012_I1180197")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 7.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 7.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 6.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 6.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
// Book histograms
_count_1l_3jet_all_channel = bookHisto1D("count_1l_3jet_all_channel", 1, 0., 1.);
_count_1l_3jet_e_channel = bookHisto1D("count_1l_3jet_e_channel" , 1, 0., 1.);
_count_1l_3jet_mu_channel = bookHisto1D("count_1l_3jet_mu_channel" , 1, 0., 1.);
_count_1l_4jet_all_channel = bookHisto1D("count_1l_4jet_all_channel", 1, 0., 1.);
_count_1l_4jet_e_channel = bookHisto1D("count_1l_4jet_e_channel" , 1, 0., 1.);
_count_1l_4jet_mu_channel = bookHisto1D("count_1l_4jet_mu_channel" , 1, 0., 1.);
_count_1l_soft_all_channel = bookHisto1D("count_1l_soft_all_channel", 1, 0., 1.);
_count_1l_soft_e_channel = bookHisto1D("count_1l_soft_e_channel" , 1, 0., 1.);
_count_1l_soft_mu_channel = bookHisto1D("count_1l_soft_mu_channel" , 1, 0., 1.);
_count_2l_2jet_all_channel = bookHisto1D("count_2l_2jet_all_channel" , 1, 0., 1.);
_count_2l_2jet_ee_channel = bookHisto1D("count_2l_2jet_ee_channel" , 1, 0., 1.);
_count_2l_2jet_emu_channel = bookHisto1D("count_2l_2jet_emu_channel" , 1, 0., 1.);
_count_2l_2jet_mumu_channel = bookHisto1D("count_2l_2jet_mumu_channel", 1, 0., 1.);
_count_2l_4jet_all_channel = bookHisto1D("count_2l_4jet_all_channel" , 1, 0., 1.);
_count_2l_4jet_ee_channel = bookHisto1D("count_2l_4jet_ee_channel" , 1, 0., 1.);
_count_2l_4jet_emu_channel = bookHisto1D("count_2l_4jet_emu_channel" , 1, 0., 1.);
_count_2l_4jet_mumu_channel = bookHisto1D("count_2l_4jet_mumu_channel", 1, 0., 1.);
_hist_1l_m_eff_3jet = bookHisto1D("hist_1l_m_eff_3jet" , 6, 400., 1600.);
_hist_1l_m_eff_4jet = bookHisto1D("hist_1l_m_eff_4jet" , 4, 800., 1600.);
_hist_1l_eTmiss_m_eff_soft = bookHisto1D("hist_1l_eTmiss_m_eff_soft", 6, 0.1 , 0.7 );
_hist_2l_m_eff_2jet = bookHisto1D("hist_2l_m_eff_2jet" , 5, 700., 1700.);
_hist_2l_m_eff_4jet = bookHisto1D("hist_2l_m_eff_4jet" , 5, 600., 1600.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the candiate jets
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 4.5 ) {
cand_jets.push_back(jet);
}
}
// charged tracks for isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// find the electrons
Particles cand_soft_e,cand_hard_e;
foreach( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt()) {
double pT = e.momentum().perp();
double eta = e.eta();
// remove any leptons within 0.4 of any candidate jets
bool e_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
double dR = deltaR(e.momentum(),jet.momentum());
if ( dR < 0.4 && dR > 0.2 ) {
e_near_jet = true;
break;
}
}
if ( e_near_jet ) continue;
// soft selection
if(pT>7.&&!(fabs(eta)>1.37&&fabs(eta)<1.52)) {
cand_soft_e.push_back(e);
}
// hard selection
if(pT>10.) cand_hard_e.push_back(e);
}
Particles cand_soft_mu,cand_hard_mu;
foreach( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt()) {
double pT = mu.momentum().perp();
double eta = mu.eta();
// remove any leptons within 0.4 of any candidate jets
bool mu_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( mu_near_jet ) continue;
// soft selection
if(pT>6.&&!(fabs(eta)>1.37&&fabs(eta)<1.52)) {
cand_soft_mu.push_back(mu);
}
// hard selection
if(pT>10.) cand_hard_mu.push_back(mu);
}
// pTcone around muon track (hard)
Particles recon_hard_mu;
foreach ( const Particle & mu, cand_hard_mu ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV ) recon_hard_mu.push_back(mu);
}
// pTcone around muon track (soft)
Particles recon_soft_mu;
foreach ( const Particle & mu, cand_soft_mu ) {
double pTinCone = -mu.pT();
if(-pTinCone>20.) continue;
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV ) recon_soft_mu.push_back(mu);
}
// pTcone around electron track (hard)
Particles recon_hard_e;
foreach ( const Particle & e, cand_hard_e ) {
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1 * e.pT() ) recon_hard_e.push_back(e);
}
// pTcone around electron track (soft)
Particles recon_soft_e;
foreach ( const Particle & e, cand_soft_e ) {
double pTinCone = -e.pT();
if(-pTinCone>25.) continue;
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1 * e.pT() ) recon_soft_e.push_back(e);
}
// pTmiss
FourMomentum pTmiss;
foreach ( const Particle & p,
applyProjection<VisibleFinalState>(event, "vfs").particles() ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// hard lepton selection
if( ! recon_hard_e.empty() || !recon_hard_mu.empty() ) {
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if(fabs(jet.eta())>2.5||
jet.momentum().perp()<25.) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_hard_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// both selections require at least 2 jets
// meff calculation
double HT=0.;
foreach( const Jet & jet, recon_jets) {
HT += jet.momentum().perp();
}
double m_eff_inc = HT+eTmiss;
unsigned int njet = recon_jets.size();
// 1 lepton only
if( recon_hard_e.size() + recon_hard_mu.size() == 1 && njet >=3 ) {
// get the lepton
Particle lepton = recon_hard_e.empty() ?
recon_hard_mu[0] : recon_hard_e[0];
// lepton variables
double pT = lepton.momentum().perp();
double mT = 2.*(pT*eTmiss -
lepton.momentum().x()*pTmiss.x() -
lepton.momentum().y()*pTmiss.y());
mT = sqrt(mT);
HT += pT;
m_eff_inc += pT;
// apply the cuts on the leptons and min no. of jets
if( ( ( abs(lepton.pdgId()) == PID::ELECTRON && pT > 25. ) ||
( abs(lepton.pdgId()) == PID::MUON && pT > 20. ) ) &&
mT > 100. && eTmiss > 250. ) {
double m_eff = pT+eTmiss;
for(unsigned int ix=0;ix<3;++ix)
m_eff += recon_jets[ix].momentum().perp();
// 3 jet channel
if( (njet == 3 || recon_jets[3].momentum().perp() < 80. ) &&
recon_jets[0].momentum().perp()>100. ) {
if(eTmiss/m_eff>0.3) {
if(m_eff_inc>1200.) {
_count_1l_3jet_all_channel->fill(0.5,weight);
if(abs(lepton.pdgId()) == PID::ELECTRON )
_count_1l_3jet_e_channel->fill(0.5,weight);
else
_count_1l_3jet_mu_channel->fill(0.5,weight);
}
_hist_1l_m_eff_3jet->fill(min(1599.,m_eff_inc),weight);
}
}
// 4 jet channel
else if (njet >=4 && recon_jets[3].momentum().perp()>80.) {
m_eff += recon_jets[3].momentum().perp();
if(eTmiss/m_eff>0.2) {
if(m_eff_inc>800.) {
_count_1l_4jet_all_channel->fill(0.5,weight);
if(abs(lepton.pdgId()) == PID::ELECTRON )
_count_1l_4jet_e_channel->fill(0.5,weight);
else
_count_1l_4jet_mu_channel->fill(0.5,weight);
}
_hist_1l_m_eff_4jet->fill(min(1599.,m_eff_inc),weight);
}
}
}
}
// multi lepton
else if( recon_hard_e.size() + recon_hard_mu.size() >= 2 && njet >=2 ) {
// get all the leptons and sort them by pT
Particles leptons(recon_hard_e.begin(),recon_hard_e.end());
leptons.insert(leptons.begin(),recon_hard_mu.begin(),recon_hard_mu.end());
std::sort(leptons.begin(),leptons.end(),cmpParticleByPt);
double m_eff(0.0);
for (size_t ix = 0; ix < leptons.size(); ++ix)
m_eff += leptons[ix].momentum().perp();
m_eff_inc += m_eff;
m_eff += eTmiss;
for (size_t ix = 0; ix < (size_t) min(4, int(recon_jets.size())); ++ix)
m_eff += recon_jets[ix].momentum().perp();
// require opposite sign leptons
if(leptons[0].pdgId()*leptons[1].pdgId()<0) {
// 2 jet
if(recon_jets[1].momentum().perp()>200 &&
( njet<4 || (njet>=4 && recon_jets[3].momentum().perp()<50.)) && eTmiss>300.) {
_count_2l_2jet_all_channel->fill(0.5,weight);
if(abs(leptons[0].pdgId()) == PID::ELECTRON && abs(leptons[1].pdgId()) == PID::ELECTRON )
_count_2l_2jet_ee_channel->fill(0.5,weight);
else if (abs(leptons[0].pdgId()) == PID::MUON && abs(leptons[1].pdgId()) == PID::MUON )
_count_2l_2jet_mumu_channel->fill(0.5,weight);
else
_count_2l_2jet_emu_channel->fill(0.5,weight);
_hist_2l_m_eff_2jet->fill(min(1699.,m_eff_inc),weight);
}
// 4 jet
else if(njet>=4&& recon_jets[3].momentum().perp()>=50.&&
eTmiss>100. && eTmiss/m_eff>0.2) {
if( m_eff_inc>650. ) {
_count_2l_4jet_all_channel->fill(0.5,weight);
if(abs(leptons[0].pdgId()) == PID::ELECTRON && abs(leptons[1].pdgId()) == PID::ELECTRON )
_count_2l_4jet_ee_channel->fill(0.5,weight);
else if (abs(leptons[0].pdgId()) == PID::MUON && abs(leptons[1].pdgId()) == PID::MUON )
_count_2l_4jet_mumu_channel->fill(0.5,weight);
else
_count_2l_4jet_emu_channel->fill(0.5,weight);
}
_hist_2l_m_eff_4jet->fill(min(1599.,m_eff_inc),weight);
}
}
}
}
// soft lepton selection
if( recon_soft_e.size() + recon_soft_mu.size() == 1 ) {
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if(fabs(jet.eta())>2.5||
jet.momentum().perp()<25.) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_soft_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// meff calculation
double HT=0.;
foreach( const Jet & jet, recon_jets) {
HT += jet.momentum().perp();
}
double m_eff_inc = HT+eTmiss;
// get the lepton
Particle lepton = recon_soft_e.empty() ?
recon_soft_mu[0] : recon_soft_e[0];
// lepton variables
double pT = lepton.momentum().perp();
double mT = 2.*(pT*eTmiss -
lepton.momentum().x()*pTmiss.x() -
lepton.momentum().y()*pTmiss.y());
mT = sqrt(mT);
m_eff_inc += pT;
double m_eff = pT+eTmiss;
// apply final cuts
if(recon_jets.size() >= 2 && recon_jets[0].momentum().perp()>130. &&
mT>100. && eTmiss>250.) {
for(unsigned int ix=0;ix<2;++ix) m_eff += recon_jets[0].momentum().perp();
if( eTmiss/m_eff>0.3 ) {
_count_1l_soft_all_channel->fill(0.5,weight);
if(abs(lepton.pdgId()) == PID::ELECTRON )
_count_1l_soft_e_channel->fill(0.5,weight);
else
_count_1l_soft_mu_channel->fill(0.5,weight);
}
_hist_1l_eTmiss_m_eff_soft->fill( eTmiss/m_eff_inc,weight);
}
}
}
//@}
void finalize() {
double norm = 4.7* crossSection()/sumOfWeights()/femtobarn;
scale(_count_1l_3jet_all_channel ,norm);
scale(_count_1l_3jet_e_channel ,norm);
scale(_count_1l_3jet_mu_channel ,norm);
scale(_count_1l_4jet_all_channel ,norm);
scale(_count_1l_4jet_e_channel ,norm);
scale(_count_1l_4jet_mu_channel ,norm);
scale(_count_1l_soft_all_channel ,norm);
scale(_count_1l_soft_e_channel ,norm);
scale(_count_1l_soft_mu_channel ,norm);
scale(_count_2l_2jet_all_channel ,norm);
scale(_count_2l_2jet_ee_channel ,norm);
scale(_count_2l_2jet_emu_channel ,norm);
scale(_count_2l_2jet_mumu_channel ,norm);
scale(_count_2l_4jet_all_channel ,norm);
scale(_count_2l_4jet_ee_channel ,norm);
scale(_count_2l_4jet_emu_channel ,norm);
scale(_count_2l_4jet_mumu_channel ,norm);
scale(_hist_1l_m_eff_3jet ,200.*norm);
scale(_hist_1l_m_eff_4jet ,200.*norm);
scale(_hist_1l_eTmiss_m_eff_soft ,0.1*norm);
scale(_hist_2l_m_eff_2jet ,200.*norm);
scale(_hist_2l_m_eff_4jet ,200.*norm);
}
private:
/// @name Histos
//@{
Histo1DPtr _count_1l_3jet_all_channel;
Histo1DPtr _count_1l_3jet_e_channel;
Histo1DPtr _count_1l_3jet_mu_channel;
Histo1DPtr _count_1l_4jet_all_channel;
Histo1DPtr _count_1l_4jet_e_channel;
Histo1DPtr _count_1l_4jet_mu_channel;
Histo1DPtr _count_1l_soft_all_channel;
Histo1DPtr _count_1l_soft_e_channel;
Histo1DPtr _count_1l_soft_mu_channel;
Histo1DPtr _count_2l_2jet_all_channel;
Histo1DPtr _count_2l_2jet_ee_channel;
Histo1DPtr _count_2l_2jet_emu_channel;
Histo1DPtr _count_2l_2jet_mumu_channel;
Histo1DPtr _count_2l_4jet_all_channel;
Histo1DPtr _count_2l_4jet_ee_channel;
Histo1DPtr _count_2l_4jet_emu_channel;
Histo1DPtr _count_2l_4jet_mumu_channel;
Histo1DPtr _hist_1l_m_eff_3jet;
Histo1DPtr _hist_1l_m_eff_4jet;
Histo1DPtr _hist_1l_eTmiss_m_eff_soft;
Histo1DPtr _hist_2l_m_eff_2jet;
Histo1DPtr _hist_2l_m_eff_4jet;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1180197);
}
diff --git a/src/Analyses/ATLAS_2012_I1186556.cc b/src/Analyses/ATLAS_2012_I1186556.cc
--- a/src/Analyses/ATLAS_2012_I1186556.cc
+++ b/src/Analyses/ATLAS_2012_I1186556.cc
@@ -1,245 +1,243 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
class ATLAS_2012_I1186556 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1186556()
: Analysis("ATLAS_2012_I1186556")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialize projections before the run
void init() {
// projection to find the electrons
- vector<pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- vector<pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// Jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,1.*GeV),"cfs");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
// Book histograms
_count_SR_SF = bookHisto1D("count_SR_SF" , 1, 0., 1.);
_count_SR_OF = bookHisto1D("count_SR_OF" , 1, 0., 1.);
_hist_mT2_SF_exp = bookHisto1D("hist_mT2_SF_exp", 40 , 0., 200. );
_hist_mT2_OF_exp = bookHisto1D("hist_mT2_OF_exp", 40 , 0., 200. );
_hist_mT2_SF_MC = bookHisto1D("hist_mT2_SF_MC" , 500, 0., 1000.);
_hist_mT2_OF_MC = bookHisto1D("hist_mT2_OF_MC" , 500, 0., 1000.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the candiate jets
Jets cand_jets;
foreach ( const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 4.5 ) {
cand_jets.push_back(jet);
}
}
// charged tracks for isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// find the electrons
Particles cand_e;
foreach( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool e_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
double dR = deltaR(e.momentum(),jet.momentum());
if ( dR < 0.4 && dR > 0.2 ) {
e_near_jet = true;
break;
}
}
if ( e_near_jet ) continue;
cand_e.push_back(e);
}
Particles cand_mu;
foreach( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt()) {
// remove any leptons within 0.4 of any candidate jets
bool mu_near_jet = false;
foreach ( const Jet& jet, cand_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( mu_near_jet ) continue;
cand_mu.push_back(mu);
}
// pTcone around muon track
Particles recon_mu;
foreach ( const Particle & mu, cand_mu ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV ) recon_mu.push_back(mu);
}
// pTcone around electron track
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1 * e.pT() ) recon_e.push_back(e);
}
// pTmiss
FourMomentum pTmiss;
foreach ( const Particle & p,
applyProjection<VisibleFinalState>(event, "vfs").particles() ) {
pTmiss -= p.momentum();
}
// discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
if(fabs(jet.eta())>2.5||
jet.momentum().perp()<20.) continue;
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// put leptons into 1 vector and order by pT
Particles leptons(recon_e.begin(),recon_e.end());
leptons.insert(leptons.begin(),recon_mu.begin(),recon_mu.end());
sort(leptons.begin(),leptons.end(),cmpParticleByPt);
// exactly two leptons
if(leptons.size() !=2) vetoEvent;
// hardest lepton pT greater the 25 (20) e(mu)
if( (abs(leptons[0].pdgId())==PID::ELECTRON && leptons[0].momentum().perp()<25.) ||
(abs(leptons[0].pdgId())==PID::ELECTRON && leptons[0].momentum().perp()<20.))
vetoEvent;
// require opposite sign
if(leptons[0].pdgId()*leptons[1].pdgId()>0) vetoEvent;
// and invariant mass > 20
double mll = (leptons[0].momentum()+leptons[1].momentum()).mass();
if(mll<20.) vetoEvent;
// two jets 1st pT > 50 and second pT> 25
if(recon_jets.size()<2 || recon_jets[0].momentum().perp()<50. ||
recon_jets[1].momentum().perp()<25.) vetoEvent;
// calculate mT2
double m_T2 = mT2::mT2( leptons[0].momentum(),leptons[1].momentum(),
pTmiss,0.0 ); // zero mass invisibles
// same flavour region
if(leptons[0].pdgId()==-leptons[1].pdgId()) {
// remove Z region
if(mll>71.&&mll<111.) vetoEvent;
// require at least 1 b jet
unsigned int n_b=0;
for(unsigned int ix=0;ix<recon_jets.size();++ix) {
if(recon_jets[ix].containsBottom() && rand()/static_cast<double>(RAND_MAX)<=0.60)
++n_b;
}
if(n_b==0) vetoEvent;
_hist_mT2_SF_exp->fill(m_T2,weight);
_hist_mT2_SF_MC ->fill(m_T2,weight);
if(m_T2>120.) _count_SR_SF->fill(0.5,weight);
}
// opposite flavour region
else {
_hist_mT2_OF_exp->fill(m_T2,weight);
_hist_mT2_OF_MC ->fill(m_T2,weight);
if(m_T2>120.) _count_SR_OF->fill(0.5,weight);
}
}
//@}
void finalize() {
double norm = 4.7* crossSection()/sumOfWeights()/femtobarn;
scale(_count_SR_SF , norm);
scale(_count_SR_OF , norm);
scale(_hist_mT2_SF_exp,5.*norm);
scale(_hist_mT2_OF_exp,5.*norm);
scale(_hist_mT2_SF_MC , norm/4.7);
scale(_hist_mT2_OF_MC , norm/4.7);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_SR_SF;
Histo1DPtr _count_SR_OF;
Histo1DPtr _hist_mT2_SF_exp;
Histo1DPtr _hist_mT2_OF_exp;
Histo1DPtr _hist_mT2_SF_MC;
Histo1DPtr _hist_mT2_OF_MC;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1186556);
}
diff --git a/src/Analyses/ATLAS_2012_I1190891.cc b/src/Analyses/ATLAS_2012_I1190891.cc
--- a/src/Analyses/ATLAS_2012_I1190891.cc
+++ b/src/Analyses/ATLAS_2012_I1190891.cc
@@ -1,312 +1,310 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Tools/RivetMT2.hh"
namespace Rivet {
/// @author Peter Richardson
class ATLAS_2012_I1190891 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I1190891()
: Analysis("ATLAS_2012_I1190891")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- vector<pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 10.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47)
+ & (Cuts::pt >= 10.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- vector<pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4)
+ & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// for pTmiss
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
/// Jet finder
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
// Book histograms
_hist_etmiss = bookHisto1D("hist_etmiss",10,0.,500.);
_hist_meff = bookHisto1D("hist_m_eff",7,0.,1050.);
_count_SR1 = bookHisto1D("count_SR1", 1, 0., 1.);
_count_SR2 = bookHisto1D("count_SR2", 1, 0., 1.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.5 ) {
cand_jets.push_back(jet);
}
}
// candidate muons
Particles cand_mu;
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
foreach ( const Particle & mu,
applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
cand_mu.push_back(mu);
}
// candidate electrons
Particles cand_e;
foreach ( const Particle & e,
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt() ) {
double pTinCone = -e.momentum().perp();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
pTinCone += track.pT();
}
if (pTinCone/e.momentum().perp()<0.1) {
cand_e.push_back(e);
}
}
// resolve jet/lepton ambiguity
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e )
recon_jets.push_back( jet );
}
// only keep electrons more than R=0.4 from jets
Particles cand2_e;
for(unsigned int ie=0;ie<cand_e.size();++ie) {
const Particle & e = cand_e[ie];
// at least 0.4 from any jets
bool away = true;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any muons
if ( away ) {
foreach ( const Particle & mu, cand_mu ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
// and 0.1 from electrons ( keep higher energy)
for(unsigned int ie2=0;ie2<cand_e.size();++ie2) {
if(ie==ie2) continue;
if ( deltaR(e.momentum(),cand_e[ie2].momentum()) < 0.1 &&
e.momentum().E() < cand_e[ie2].momentum().E() ) {
away = false;
break;
}
}
// if isolated keep it
if ( away )
cand2_e.push_back( e );
}
// remove e+e- pairs with mass < 20.
Particles recon_e;
for(unsigned int ie=0;ie<cand2_e.size();++ie) {
bool pass = true;
for(unsigned int ie2=0;ie2<cand2_e.size();++ie2) {
if(cand2_e[ie].pdgId()*cand2_e[ie2].pdgId()>0) continue;
double mtest = (cand2_e[ie].momentum()+cand2_e[ie2].momentum()).mass();
if(mtest<=20.) {
pass = false;
break;
}
}
if(pass) recon_e.push_back(cand2_e[ie]);
}
// only keep muons more than R=0.4 from jets
Particles cand2_mu;
for(unsigned int imu=0;imu<cand_mu.size();++imu) {
const Particle & mu = cand_mu[imu];
bool away = true;
// at least 0.4 from any jets
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
away = false;
break;
}
}
// and 0.1 from any electrona
if ( away ) {
foreach ( const Particle & e, cand_e ) {
if ( deltaR(mu.momentum(),e.momentum()) < 0.1 ) {
away = false;
break;
}
}
}
if ( away )
cand2_mu.push_back( mu );
}
// remove mu+mu- pairs with mass < 20.
Particles recon_mu;
for(unsigned int imu=0;imu<cand2_mu.size();++imu) {
bool pass = true;
for(unsigned int imu2=0;imu2<cand2_mu.size();++imu2) {
if(cand2_mu[imu].pdgId()*cand2_mu[imu2].pdgId()>0) continue;
double mtest = (cand2_mu[imu].momentum()+cand2_mu[imu2].momentum()).mass();
if(mtest<=20.) {
pass = false;
break;
}
}
if(pass) recon_mu.push_back(cand2_mu[imu]);
}
// pTmiss
Particles vfs_particles =
applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// now only use recon_jets, recon_mu, recon_e
// reject events with less than 4 electrons and muons
if ( recon_mu.size() + recon_e.size() < 4 ) {
MSG_DEBUG("To few charged leptons left after selection");
vetoEvent;
}
// check if passes single lepton trigger
bool passSingle =
( !recon_e .empty() && recon_e[0] .momentum().perp()>25. )||
( !recon_mu.empty() && recon_mu[0].momentum().perp()>20.);
// or two lepton trigger
bool passDouble =
( recon_mu.size()>=2 && recon_mu[1].momentum().perp()>12.) ||
( recon_e .size()>=2 && recon_e [1].momentum().perp()>17.) ||
( !recon_e.empty() && !recon_mu.empty() &&
recon_e[0].momentum().perp()>15. && recon_mu[0].momentum().perp()>10.);
// must pass a trigger
if( !passSingle && !passDouble ) {
MSG_DEBUG("Hardest lepton fails trigger");
vetoEvent;
}
// calculate meff
double meff = eTmiss;
foreach ( const Particle & e , recon_e )
meff += e.momentum().perp();
foreach ( const Particle & mu, recon_mu )
meff += mu.momentum().perp();
foreach ( const Jet & jet, recon_jets ) {
double pT = jet.momentum().perp();
if(pT>40.) meff += pT;
}
// mass of SFOS pairs closest to the Z mass
for(unsigned int ix=0;ix<recon_e.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_e.size();++iy) {
if(recon_e[ix].pdgId()*recon_e[iy].pdgId()>0) continue;
double mtest = (recon_e[ix].momentum()+recon_e[iy].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
}
for(unsigned int ix=0;ix<recon_mu.size();++ix) {
for(unsigned int iy=ix+1;iy<recon_mu.size();++iy) {
if(recon_mu[ix].pdgId()*recon_mu[iy].pdgId()>0) continue;
double mtest = (recon_mu[ix].momentum()+recon_mu[iy].momentum()).mass();
if(mtest>81.2 && mtest<101.2) vetoEvent;
}
}
// make the control plots
_hist_etmiss ->fill(eTmiss,weight);
_hist_meff ->fill(meff ,weight);
// finally the counts
if(eTmiss>50.) _count_SR1->fill(0.5,weight);
if(meff >300.) _count_SR2->fill(0.5,weight);
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*4.7/sumOfWeights();
scale(_hist_etmiss,norm* 50.);
scale(_hist_meff ,norm*150.);
scale(_count_SR1,norm);
scale(_count_SR2,norm);
}
private:
/// @name Histograms
//@{
Histo1DPtr _hist_etmiss;
Histo1DPtr _hist_meff;
Histo1DPtr _count_SR1;
Histo1DPtr _count_SR2;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1190891);
}
diff --git a/src/Analyses/ATLAS_2012_I943401.cc b/src/Analyses/ATLAS_2012_I943401.cc
--- a/src/Analyses/ATLAS_2012_I943401.cc
+++ b/src/Analyses/ATLAS_2012_I943401.cc
@@ -1,470 +1,466 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
namespace Rivet {
class ATLAS_2012_I943401 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2012_I943401()
: Analysis("ATLAS_2012_I943401")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// projection to find the electrons
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47,2.47));
- IdentifiedFinalState elecs(eta_e, 20.0*GeV);
+ IdentifiedFinalState elecs(Range(Cuts::eta, -2.47, 2.47) & (Cuts::pt >= 20.0*GeV));
elecs.acceptIdPair(PID::ELECTRON);
addProjection(elecs, "elecs");
// projection to find the muons
- std::vector<std::pair<double, double> > eta_m;
- eta_m.push_back(make_pair(-2.4,2.4));
- IdentifiedFinalState muons(eta_m, 10.0*GeV);
+ IdentifiedFinalState muons(Range(Cuts::eta, -2.4, 2.4) & (Cuts::pt >= 10.0*GeV));
muons.acceptIdPair(PID::MUON);
addProjection(muons, "muons");
// jet finder
VetoedFinalState vfs;
vfs.addVetoPairId(PID::MUON);
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
"AntiKtJets04");
// all tracks (to do deltaR with leptons)
addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
// for pTmiss
- addProjection(VisibleFinalState(-4.5,4.5),"vfs");
+ addProjection(VisibleFinalState(Range(Cuts::eta, -4.5, 4.5)),"vfs");
// book histograms
// counts in signal regions
_count_OS_SR1 = bookHisto1D("count_OS_SR1", 1, 0., 1.);
_count_OS_SR2 = bookHisto1D("count_OS_SR2", 1, 0., 1.);
_count_OS_SR3 = bookHisto1D("count_OS_SR3", 1, 0., 1.);
_count_SS_SR1 = bookHisto1D("count_SS_SR1", 1, 0., 1.);
_count_SS_SR2 = bookHisto1D("count_SS_SR2", 1, 0., 1.);
_count_FS_SR1 = bookHisto1D("count_FS_SR1", 1, 0., 1.);
_count_FS_SR2 = bookHisto1D("count_FS_SR2", 1, 0., 1.);
_count_FS_SR3 = bookHisto1D("count_FS_SR3", 1, 0., 1.);
// histograms from paper
_hist_mll_SS_D = bookHisto1D( 1,1,1);
_hist_mll_SS_B = bookHisto1D( 1,1,2);
_hist_eTmiss_SS_D = bookHisto1D( 2,1,1);
_hist_eTmiss_SS_B = bookHisto1D( 2,1,2);
_hist_mll_SS_2Jet_D = bookHisto1D( 3,1,1);
_hist_mll_SS_2Jet_B = bookHisto1D( 3,1,2);
_hist_njet_SS_D = bookHisto1D( 5,1,1);
_hist_njet_SS_B = bookHisto1D( 5,1,2);
_hist_pT_j1_SS_D = bookHisto1D( 6,1,1);
_hist_pT_j1_SS_B = bookHisto1D( 6,1,2);
_hist_pT_j2_SS_D = bookHisto1D( 7,1,1);
_hist_pT_j2_SS_B = bookHisto1D( 7,1,2);
_hist_pT_l1_SS_D = bookHisto1D( 8,1,1);
_hist_pT_l1_SS_B = bookHisto1D( 8,1,2);
_hist_pT_l2_SS_D = bookHisto1D( 9,1,1);
_hist_pT_l2_SS_B = bookHisto1D( 9,1,2);
_hist_mll_OS_D = bookHisto1D(10,1,1);
_hist_mll_OS_B = bookHisto1D(10,1,2);
_hist_eTmiss_OS_D = bookHisto1D(11,1,1);
_hist_eTmiss_OS_B = bookHisto1D(11,1,2);
_hist_eTmiss_3Jet_OS_D = bookHisto1D(12,1,1);
_hist_eTmiss_3Jet_OS_B = bookHisto1D(12,1,2);
_hist_eTmiss_4Jet_OS_D = bookHisto1D(13,1,1);
_hist_eTmiss_4Jet_OS_B = bookHisto1D(13,1,2);
_hist_njet_OS_D = bookHisto1D(14,1,1);
_hist_njet_OS_B = bookHisto1D(14,1,2);
_hist_pT_j1_OS_D = bookHisto1D(15,1,1);
_hist_pT_j1_OS_B = bookHisto1D(15,1,2);
_hist_pT_j2_OS_D = bookHisto1D(16,1,1);
_hist_pT_j2_OS_B = bookHisto1D(16,1,2);
_hist_pT_l1_OS_D = bookHisto1D(17,1,1);
_hist_pT_l1_OS_B = bookHisto1D(17,1,2);
_hist_pT_l2_OS_D = bookHisto1D(18,1,1);
_hist_pT_l2_OS_B = bookHisto1D(18,1,2);
//????
// <dataPointSet name="d04-x01-y01" dimension="2" path="/REF/ATLAS_2011_I943401" title="EVENTS/10 GEV" >
// <dataPointSet name="d04-x01-y02" dimension="2" path="/REF/ATLAS_2011_I943401" title="EVENTS/10 GEV" >
}
/// Perform the event analysis
void analyze(const Event& event) {
// event weight
const double weight = event.weight();
// get the jet candidates
Jets cand_jets;
foreach (const Jet& jet,
applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
if ( fabs( jet.eta() ) < 2.8 ) {
cand_jets.push_back(jet);
}
}
// electron candidates
Particles cand_e =
applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
// Discard jets that overlap with electrons
Jets recon_jets;
foreach ( const Jet& jet, cand_jets ) {
bool away_from_e = true;
foreach ( const Particle & e, cand_e ) {
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
away_from_e = false;
break;
}
}
if ( away_from_e ) recon_jets.push_back( jet );
}
// get the charged tracks for isolation
Particles chg_tracks =
applyProjection<ChargedFinalState>(event, "cfs").particles();
// Reconstructed electrons
Particles recon_e;
foreach ( const Particle & e, cand_e ) {
// check not near a jet
bool e_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
e_near_jet = true;
break;
}
}
if ( e_near_jet ) continue;
// check the isolation
double pTinCone = -e.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 0.1*e.momentum().perp() )
recon_e.push_back(e);
}
// Reconstructed Muons
Particles recon_mu;
Particles cand_mu =
applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
foreach ( const Particle & mu, cand_mu ) {
// check not near a jet
bool mu_near_jet = false;
foreach ( const Jet& jet, recon_jets ) {
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
mu_near_jet = true;
break;
}
}
if ( mu_near_jet ) continue;
// isolation
double pTinCone = -mu.pT();
foreach ( const Particle & track, chg_tracks ) {
if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
pTinCone += track.pT();
}
if ( pTinCone < 1.8*GeV )
recon_mu.push_back(mu);
}
// pTmiss
Particles vfs_particles
= applyProjection<VisibleFinalState>(event, "vfs").particles();
FourMomentum pTmiss;
foreach ( const Particle & p, vfs_particles ) {
pTmiss -= p.momentum();
}
double eTmiss = pTmiss.pT();
// ATLAS calo problem
if(rand()/static_cast<double>(RAND_MAX)<=0.42) {
foreach ( const Particle & e, recon_e ) {
double eta = e.eta();
double phi = e.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
foreach ( const Jet & jet, recon_jets ) {
double eta = jet.rapidity();
double phi = jet.momentum().azimuthalAngle(MINUSPI_PLUSPI);
if(jet.momentum().perp()>40 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
vetoEvent;
}
}
// Exactly two leptons for each event
if ( recon_mu.size() + recon_e.size() != 2)
vetoEvent;
// two electrons highest pT > 25
Particles recon_leptons;
if(recon_e.size()==2&&recon_e[0].momentum().perp()>25.) {
recon_leptons = recon_e;
}
// two muons highest pT > 20
else if(recon_mu.size()==2&&recon_mu[0].momentum().perp()>20.) {
recon_leptons = recon_mu;
}
else if(recon_e.size()==1 && recon_mu.size()==1 &&
(recon_e[0].momentum().perp()>25. ||recon_mu[0].momentum().perp()>20. )) {
if(recon_mu[0].momentum().perp()<recon_e[0].momentum().perp()) {
recon_leptons.push_back(recon_e [0]);
recon_leptons.push_back(recon_mu[0]);
}
else {
recon_leptons.push_back(recon_mu[0]);
recon_leptons.push_back(recon_e [0]);
}
}
// fails trigger
else
vetoEvent;
double mll = (recon_leptons[0].momentum()+recon_leptons[1].momentum()).mass();
// lepton pair mass > 12.
if(mll < 12.) vetoEvent;
// same sign or opposite sign event
int sign = recon_leptons[0].pdgId()*recon_leptons[1].pdgId();
// same sign leptons
if(sign>0) {
_hist_mll_SS_D ->fill(mll ,weight);
_hist_mll_SS_B ->fill(mll ,weight);
_hist_eTmiss_SS_D->fill(eTmiss,weight);
_hist_eTmiss_SS_B->fill(eTmiss,weight);
if(recon_jets.size()>=2) {
_hist_mll_SS_2Jet_D ->fill(mll ,weight);
_hist_mll_SS_2Jet_B ->fill(mll ,weight);
}
_hist_njet_SS_D ->fill(recon_jets.size(),weight);
_hist_njet_SS_B ->fill(recon_jets.size(),weight);
if(!recon_jets.empty()) {
_hist_pT_j1_SS_D->fill(recon_jets[0].momentum().perp(),weight);
_hist_pT_j1_SS_B->fill(recon_jets[0].momentum().perp(),weight);
}
if(recon_jets.size()>2) {
_hist_pT_j2_SS_D->fill(recon_jets[1].momentum().perp(),weight);
_hist_pT_j2_SS_B->fill(recon_jets[1].momentum().perp(),weight);
}
_hist_pT_l1_SS_D->fill(recon_leptons[0].momentum().perp(),weight);
_hist_pT_l1_SS_B->fill(recon_leptons[0].momentum().perp(),weight);
_hist_pT_l2_SS_D->fill(recon_leptons[1].momentum().perp(),weight);
_hist_pT_l2_SS_B->fill(recon_leptons[1].momentum().perp(),weight);
// SS-SR1
if(eTmiss>100.) {
_count_SS_SR1->fill(0.5,weight);
}
// SS-SR2
if(eTmiss>80. && recon_jets.size()>=2 &&
recon_jets[1].momentum().perp()>50.) {
_count_SS_SR2->fill(0.5,weight);
}
}
// opposite sign
else {
_hist_mll_OS_D->fill(mll ,weight);
_hist_mll_OS_B->fill(mll ,weight);
_hist_eTmiss_OS_D->fill(eTmiss,weight);
_hist_eTmiss_OS_B->fill(eTmiss,weight);
if(recon_jets.size()>=3){
_hist_eTmiss_3Jet_OS_D->fill(eTmiss,weight);
_hist_eTmiss_3Jet_OS_B->fill(eTmiss,weight);
}
if(recon_jets.size()>=4){
_hist_eTmiss_4Jet_OS_D->fill(eTmiss,weight);
_hist_eTmiss_4Jet_OS_B->fill(eTmiss,weight);
}
_hist_njet_OS_D->fill(recon_jets.size(),weight);
_hist_njet_OS_B->fill(recon_jets.size(),weight);
if(!recon_jets.empty()) {
_hist_pT_j1_OS_D->fill(recon_jets[0].momentum().perp(),weight);
_hist_pT_j1_OS_B->fill(recon_jets[0].momentum().perp(),weight);
}
if(recon_jets.size()>2) {
_hist_pT_j2_OS_D->fill(recon_jets[1].momentum().perp(),weight);
_hist_pT_j2_OS_B->fill(recon_jets[1].momentum().perp(),weight);
}
_hist_pT_l1_OS_D->fill(recon_leptons[0].momentum().perp(),weight);
_hist_pT_l1_OS_B->fill(recon_leptons[0].momentum().perp(),weight);
_hist_pT_l2_OS_D->fill(recon_leptons[1].momentum().perp(),weight);
_hist_pT_l2_OS_B->fill(recon_leptons[1].momentum().perp(),weight);
// different signal regions
// OS-SR1
if(eTmiss>250.) {
_count_OS_SR1->fill(0.5,weight);
}
// OS-SR2
if(eTmiss>220. && recon_jets.size()>=3 &&
recon_jets[0].momentum().perp()>80. &&
recon_jets[2].momentum().perp()>40.) {
_count_OS_SR2->fill(0.5,weight);
}
// OS-SR3
if(eTmiss>100. && recon_jets.size()>=4 &&
recon_jets[0].momentum().perp()>100. &&
recon_jets[3].momentum().perp()>70.) {
_count_OS_SR3->fill(0.5,weight);
}
// same flavour analysis
static const double beta = 0.75;
static const double tau_e = 0.96;
static const double tau_mu = 0.816;
double fs_weight = weight;
if(abs(recon_leptons[0].pdgId())==PID::ELECTRON && abs(recon_leptons[1].pdgId())==PID::ELECTRON) {
fs_weight /= beta*(1.-sqr(1.-tau_e));
}
else if(abs(recon_leptons[0].pdgId())==PID::MUON && abs(recon_leptons[1].pdgId())==PID::MUON) {
fs_weight *= beta/(1.-sqr(1.-tau_mu));
}
else {
fs_weight /= -(1.-(1.-tau_e)*(1.-tau_mu));
}
// FS-SR1
if(eTmiss>80.&& (mll<80.||mll>100.)) {
_count_FS_SR1->fill(0.5,fs_weight);
}
// FS-SR2
if(eTmiss>80.&&recon_jets.size()>=2) {
_count_FS_SR2->fill(0.5,fs_weight);
}
// FS-SR3
if(eTmiss>250.) {
_count_FS_SR3->fill(0.5,fs_weight);
}
}
}
//@}
void finalize() {
double norm = crossSection()/femtobarn*1.04/sumOfWeights();
// event counts
scale(_count_OS_SR1,norm);
scale(_count_OS_SR2,norm);
scale(_count_OS_SR3,norm);
scale(_count_SS_SR1,norm);
scale(_count_SS_SR2,norm);
scale(_count_FS_SR1,norm);
scale(_count_FS_SR2,norm);
scale(_count_FS_SR3,norm);
// histograms
scale(_hist_mll_SS_D ,norm*20.);
scale(_hist_mll_SS_B ,norm*20.);
scale(_hist_eTmiss_SS_D ,norm*20.);
scale(_hist_eTmiss_SS_B ,norm*20.);
scale(_hist_mll_SS_2Jet_D,norm*50.);
scale(_hist_mll_SS_2Jet_B,norm*50.);
scale(_hist_njet_SS_D ,norm );
scale(_hist_njet_SS_B ,norm );
scale(_hist_pT_j1_SS_D ,norm*20.);
scale(_hist_pT_j1_SS_B ,norm*20.);
scale(_hist_pT_j2_SS_D ,norm*20.);
scale(_hist_pT_j2_SS_B ,norm*20.);
scale(_hist_pT_l1_SS_D ,norm*5. );
scale(_hist_pT_l1_SS_B ,norm*5. );
scale(_hist_pT_l2_SS_D ,norm*5. );
scale(_hist_pT_l2_SS_B ,norm*5. );
scale(_hist_mll_OS_D ,norm*10.);
scale(_hist_mll_OS_B ,norm*10.);
scale(_hist_eTmiss_OS_D ,norm*10.);
scale(_hist_eTmiss_OS_B ,norm*10.);
scale(_hist_eTmiss_3Jet_OS_D,norm*10.);
scale(_hist_eTmiss_3Jet_OS_B,norm*10.);
scale(_hist_eTmiss_4Jet_OS_D,norm*10.);
scale(_hist_eTmiss_4Jet_OS_B,norm*10.);
scale(_hist_njet_OS_D ,norm );
scale(_hist_njet_OS_B ,norm );
scale(_hist_pT_j1_OS_D ,norm*20.);
scale(_hist_pT_j1_OS_B ,norm*20.);
scale(_hist_pT_j2_OS_D ,norm*20.);
scale(_hist_pT_j2_OS_B ,norm*20.);
scale(_hist_pT_l1_OS_D ,norm*20.);
scale(_hist_pT_l1_OS_B ,norm*20.);
scale(_hist_pT_l2_OS_D ,norm*20.);
scale(_hist_pT_l2_OS_B ,norm*20.);
}
private:
/// @name Histograms
//@{
Histo1DPtr _count_OS_SR1;
Histo1DPtr _count_OS_SR2;
Histo1DPtr _count_OS_SR3;
Histo1DPtr _count_SS_SR1;
Histo1DPtr _count_SS_SR2;
Histo1DPtr _count_FS_SR1;
Histo1DPtr _count_FS_SR2;
Histo1DPtr _count_FS_SR3;
Histo1DPtr _hist_mll_SS_D;
Histo1DPtr _hist_mll_SS_B;
Histo1DPtr _hist_eTmiss_SS_D;
Histo1DPtr _hist_eTmiss_SS_B;
Histo1DPtr _hist_mll_SS_2Jet_D;
Histo1DPtr _hist_mll_SS_2Jet_B;
Histo1DPtr _hist_njet_SS_D;
Histo1DPtr _hist_njet_SS_B;
Histo1DPtr _hist_pT_j1_SS_D;
Histo1DPtr _hist_pT_j1_SS_B;
Histo1DPtr _hist_pT_j2_SS_D;
Histo1DPtr _hist_pT_j2_SS_B;
Histo1DPtr _hist_pT_l1_SS_D;
Histo1DPtr _hist_pT_l1_SS_B;
Histo1DPtr _hist_pT_l2_SS_D;
Histo1DPtr _hist_pT_l2_SS_B;
Histo1DPtr _hist_mll_OS_D;
Histo1DPtr _hist_mll_OS_B;
Histo1DPtr _hist_eTmiss_OS_D;
Histo1DPtr _hist_eTmiss_OS_B;
Histo1DPtr _hist_eTmiss_3Jet_OS_D;
Histo1DPtr _hist_eTmiss_3Jet_OS_B;
Histo1DPtr _hist_eTmiss_4Jet_OS_D;
Histo1DPtr _hist_eTmiss_4Jet_OS_B;
Histo1DPtr _hist_njet_OS_D ;
Histo1DPtr _hist_njet_OS_B ;
Histo1DPtr _hist_pT_j1_OS_D;
Histo1DPtr _hist_pT_j1_OS_B;
Histo1DPtr _hist_pT_j2_OS_D;
Histo1DPtr _hist_pT_j2_OS_B;
Histo1DPtr _hist_pT_l1_OS_D;
Histo1DPtr _hist_pT_l1_OS_B;
Histo1DPtr _hist_pT_l2_OS_D;
Histo1DPtr _hist_pT_l2_OS_B;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2012_I943401);
}
diff --git a/src/Analyses/ATLAS_2013_I1217867.cc b/src/Analyses/ATLAS_2013_I1217867.cc
--- a/src/Analyses/ATLAS_2013_I1217867.cc
+++ b/src/Analyses/ATLAS_2013_I1217867.cc
@@ -1,158 +1,159 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/LeptonClusters.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
class ATLAS_2013_I1217867 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2013_I1217867()
: Analysis("ATLAS_2013_I1217867")
{
m_njet=4;
_h_dI.resize(2, std::vector<Histo1DPtr>(m_njet));
_h_dI_ratio.resize(2, std::vector<Histo1DPtr>(m_njet-1));
}
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Initialise projections
FinalState fs(-5.0, 5.0, 0.0*GeV);
IdentifiedFinalState bareElectrons(fs);
bareElectrons.acceptIdPair(PID::ELECTRON);
- vector<pair<double, double> > etaRangesElectrons;
- etaRangesElectrons.push_back(make_pair(-2.47, -1.52));
- etaRangesElectrons.push_back(make_pair(-1.37, 1.37));
- etaRangesElectrons.push_back(make_pair(1.52, 2.47));
- LeptonClusters electronClusters(fs, bareElectrons, 0.1, true, etaRangesElectrons, 20.0*GeV);
+
+ Cut cuts = ( Range(Cuts::eta, -2.47, -1.52)
+ | Range(Cuts::eta, -1.37, 1.37)
+ | Range(Cuts::eta, 1.52, 2.47) ) & (Cuts::pt >= 20.0*GeV);
+
+ LeptonClusters electronClusters(fs, bareElectrons, 0.1, true, cuts);
addProjection(electronClusters, "electronClusters");
IdentifiedFinalState bareMuons(fs);
bareMuons.acceptIdPair(PID::MUON);
- vector<pair<double, double> > etaRangesMuons;
- etaRangesMuons.push_back(make_pair(-2.4, 2.4));
- LeptonClusters muonClusters(fs, bareMuons, 0.1, true, etaRangesMuons, 20.0*GeV);
+ Cut mucuts = Range(Cuts::eta,-2.4,2.4) & (Cuts::pt >= 20.0*GeV);
+
+ LeptonClusters muonClusters(fs, bareMuons, 0.1, true, mucuts);
addProjection(muonClusters, "muonClusters");
IdentifiedFinalState neutrinos(-MAXRAPIDITY, MAXRAPIDITY, 25.0*GeV);
neutrinos.acceptNeutrinos();
addProjection(neutrinos, "neutrinos");
VetoedFinalState jetFS(fs);
jetFS.addVetoOnThisFinalState(electronClusters);
jetFS.addVetoOnThisFinalState(muonClusters);
jetFS.addVetoOnThisFinalState(neutrinos);
FastJets jetpro(jetFS, FastJets::KT, 0.6);
jetpro.useInvisibles(true);
addProjection(jetpro, "jets");
// Book histograms
for (size_t flav=0; flav < 2; ++flav) {
for (size_t i=0; i < m_njet; ++i) _h_dI[flav][i] = bookHisto1D(i+1, 1, flav+1);
for (size_t i=0; i < m_njet-1; ++i) _h_dI_ratio[flav][i] = bookHisto1D(4+i+1, 1, flav+1);
}
}
/// Perform the per-event analysis
void analyze(const Event& e) {
const double weight = e.weight();
const LeptonClusters& electronClusters = applyProjection<LeptonClusters>(e, "electronClusters");
const LeptonClusters& muonClusters = applyProjection<LeptonClusters>(e, "muonClusters");
int ne = electronClusters.clusteredLeptons().size();
int nmu = muonClusters.clusteredLeptons().size();
FourMomentum lepton;
size_t flav = 2;
if (ne==1) {
lepton=electronClusters.clusteredLeptons()[0].momentum();
flav = 0;
if (nmu > 0) vetoEvent;
}
else if (nmu == 1) {
lepton=muonClusters.clusteredLeptons()[0].momentum();
flav = 1;
if (ne > 0) vetoEvent;
}
else {
vetoEvent;
}
const Particles& neutrinos = applyProjection<FinalState>(e, "neutrinos").particlesByPt();
if (neutrinos.size() < 1) vetoEvent;
FourMomentum neutrino = neutrinos[0].momentum();
double mtW=sqrt(2.0*lepton.pT()*neutrino.pT()*(1-cos(lepton.phi()-neutrino.phi())));
if (mtW<40.0*GeV) vetoEvent;
const fastjet::ClusterSequence* seq = applyProjection<FastJets>(e, "jets").clusterSeq();
if (seq != NULL) {
for (size_t i = 0; i < min(m_njet,(size_t)seq->n_particles()); ++i) {
double d_ij = sqrt(seq->exclusive_dmerge_max(i));
_h_dI[flav][i]->fill(d_ij, weight);
if (i<m_njet-1) {
if (d_ij>20.0*GeV) {
double d_ijplus1 = sqrt(seq->exclusive_dmerge_max(i+1));
_h_dI_ratio[flav][i]->fill(d_ijplus1/d_ij, weight);
}
}
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
for (size_t flav = 0; flav < 2; ++flav) {
for (size_t i = 0; i < m_njet; ++i) {
normalize(_h_dI[flav][i], 1.0, false);
if (i < m_njet-1) normalize(_h_dI_ratio[flav][i], 1.0, false);
}
}
}
//@}
private:
/// @name Histograms
//@{
std::vector<std::vector<Histo1DPtr> > _h_dI;
std::vector<std::vector<Histo1DPtr> > _h_dI_ratio;
//@}
size_t m_njet;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217867);
}
diff --git a/src/Analyses/ATLAS_2013_I1230812.cc b/src/Analyses/ATLAS_2013_I1230812.cc
--- a/src/Analyses/ATLAS_2013_I1230812.cc
+++ b/src/Analyses/ATLAS_2013_I1230812.cc
@@ -1,357 +1,361 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include<iostream>
namespace Rivet {
class ATLAS_2013_I1230812 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
ATLAS_2013_I1230812(std::string name="ATLAS_2013_I1230812")
: Analysis(name),
_weights_incl(7, 0.0),
_weights_excl(7, 0.0),
_weights_excl_pt150(7, 0.0),
_weights_excl_vbf(7, 0.0)
{
_mode = 1;
}
//@}
public:
/// Book histograms and initialise projections before the run
void init() {
if (_mode==1) {
// combined
- ZFinder zfinder(-2.5, 2.5, 20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ Cut cuts = Range(Cuts::eta,-2.5,2.5) & (Cuts::pt >= 20.0*GeV);
+ ZFinder zfinder(FinalState(), cuts,
+ PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder, "zfinder");
}
else if (_mode==2) {
// electron
- std::vector<std::pair<double, double> > eta_e;
- eta_e.push_back(make_pair(-2.47, -1.52));
- eta_e.push_back(make_pair(-1.37, 1.37));
- eta_e.push_back(make_pair( 1.52, 2.47));
- ZFinder zfinder(eta_e, 20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ Cut cuts = ( Range(Cuts::eta, -2.47, -1.52)
+ | Range(Cuts::eta, -1.37, 1.37)
+ | Range(Cuts::eta, 1.52, 2.47) ) & (Cuts::pt >= 20.0*GeV);
+ ZFinder zfinder(FinalState(), cuts,
+ PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder, "zfinder");
}
else if (_mode==3) {
// muon
- ZFinder zfinder(-2.4, 2.4, 20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
+ Cut mucuts = Range(Cuts::eta,-2.4,2.4) & (Cuts::pt >= 20.0*GeV);
+ ZFinder zfinder(FinalState(), mucuts,
+ PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false);
addProjection(zfinder, "zfinder");
}
// Define veto FS in order to prevent Z-decay products entering the jet algorithm
VetoedFinalState had_fs;
had_fs.addVetoOnThisFinalState(getProjection<ZFinder>("zfinder"));
FastJets jets(had_fs, FastJets::ANTIKT, 0.4);
jets.useInvisibles(true);
addProjection(jets, "jets");
_h_njet_incl = bookHisto1D (1, 1, _mode);
_h_njet_incl_ratio = bookScatter2D(2, 1, _mode, true);
_h_njet_excl = bookHisto1D (3, 1, _mode);
_h_njet_excl_ratio = bookScatter2D (4, 1, _mode, true);
_h_njet_excl_pt150 = bookHisto1D (5, 1, _mode);
_h_njet_excl_pt150_ratio = bookScatter2D (6, 1, _mode, true);
_h_njet_excl_vbf = bookHisto1D (7, 1, _mode);
_h_njet_excl_vbf_ratio = bookScatter2D (8, 1, _mode, true);
_h_ptlead = bookHisto1D (9, 1, _mode);
_h_ptseclead = bookHisto1D (10, 1, _mode);
_h_ptthirdlead = bookHisto1D (11, 1, _mode);
_h_ptfourthlead = bookHisto1D (12, 1, _mode);
_h_ptlead_excl = bookHisto1D (13, 1, _mode);
_h_pt_ratio = bookHisto1D (14, 1, _mode);
_h_pt_z = bookHisto1D (15, 1, _mode);
_h_pt_z_excl = bookHisto1D (16, 1, _mode);
_h_ylead = bookHisto1D (17, 1, _mode);
_h_yseclead = bookHisto1D (18, 1, _mode);
_h_ythirdlead = bookHisto1D (19, 1, _mode);
_h_yfourthlead = bookHisto1D (20, 1, _mode);
_h_deltay = bookHisto1D (21, 1, _mode);
_h_mass = bookHisto1D (22, 1, _mode);
_h_deltaphi = bookHisto1D (23, 1, _mode);
_h_deltaR = bookHisto1D (24, 1, _mode);
_h_ptthirdlead_vbf = bookHisto1D (25, 1, _mode);
_h_ythirdlead_vbf = bookHisto1D (26, 1, _mode);
_h_ht = bookHisto1D (27, 1, _mode);
_h_st = bookHisto1D (28, 1, _mode);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const ZFinder& zfinder = applyProjection<ZFinder>(event, "zfinder");
if (zfinder.constituents().size()!=2) vetoEvent;
FourMomentum z = zfinder.bosons()[0].momentum();
FourMomentum lp = zfinder.constituents()[0].momentum();
FourMomentum lm = zfinder.constituents()[1].momentum();
if (deltaR(lp, lm)<0.2) vetoEvent;
Jets jets;
/// @todo Replace with a Cut passed to jetsByPt
foreach(const Jet& jet, applyProjection<FastJets>(event, "jets").jetsByPt(30.0*GeV)) {
FourMomentum jmom = jet.momentum();
if (fabs(jmom.rapidity()) < 4.4 && deltaR(lp, jmom) > 0.5 && deltaR(lm, jmom) > 0.5) {
jets.push_back(jet);
}
}
const double weight = event.weight();
if (jets.size()<7) _weights_excl[jets.size()] += weight;
for (size_t i=0; i<7; ++i) {
if (jets.size()>=i) _weights_incl[i] += weight;
}
// Fill jet multiplicities
for (size_t ijet=1; ijet<=jets.size(); ++ijet) {
_h_njet_incl->fill(ijet, weight);
}
_h_njet_excl->fill(jets.size(), weight);
// Require at least one jet
if (jets.size() >= 1)
{
// Leading jet histos
const double ptlead = jets[0].momentum().pT()/GeV;
const double yabslead = fabs(jets[0].momentum().rapidity());
const double ptz = z.pT()/GeV;
_h_ptlead->fill(ptlead, weight);
_h_ylead ->fill(yabslead, weight);
_h_pt_z ->fill(ptz, weight);
// Fill jet multiplicities
if(ptlead>150)
{
_h_njet_excl_pt150->fill(jets.size(), weight);
if (jets.size()<7) _weights_excl_pt150[jets.size()] += weight;
}
// Loop over selected jets, fill inclusive distributions
double st=0;
double ht=lp.pT()/GeV+lm.pT()/GeV;
for (size_t ijet = 0; ijet < jets.size(); ++ijet) {
ht+=jets[ijet].momentum().pT()/GeV;
st+=jets[ijet].momentum().pT()/GeV;
}
_h_ht->fill(ht, weight);
_h_st->fill(st, weight);
// Require exactly one jet
if (jets.size() == 1)
{
_h_ptlead_excl->fill(ptlead, weight);
_h_pt_z_excl ->fill(ptz, weight);
}
}
// Require at least two jets
if (jets.size() >= 2) {
// Second jet histos
const double ptlead = jets[0].momentum().pT()/GeV;
const double pt2ndlead = jets[1].momentum().pT()/GeV;
const double ptratio = pt2ndlead/ptlead;
const double yabs2ndlead = fabs(jets[1].momentum().rapidity());
_h_ptseclead ->fill(pt2ndlead, weight);
_h_yseclead ->fill(yabs2ndlead, weight);
_h_pt_ratio ->fill(ptratio, weight);
// Dijet histos
const double deltaphi = fabs(deltaPhi(jets[1], jets[0]));
const double deltarap = fabs(jets[0].momentum().rapidity() - jets[1].momentum().rapidity()) ;
const double deltar = fabs(deltaR(jets[0], jets[1], RAPIDITY));
const double mass = (jets[0].momentum() + jets[1].momentum()).mass()/GeV;
_h_mass ->fill(mass, weight);
_h_deltay ->fill(deltarap, weight);
_h_deltaphi ->fill(deltaphi, weight);
_h_deltaR ->fill(deltar, weight);
if(mass>350&&deltarap>3.0)
{
_h_njet_excl_vbf->fill(jets.size(), weight);
if (jets.size()<7) _weights_excl_vbf[jets.size()] += weight;
}
}
// Require at least three jets
if (jets.size() >= 3) {
// Third jet histos
const double pt3rdlead = jets[2].momentum().pT()/GeV;
const double yabs3rdlead = fabs(jets[2].momentum().rapidity());
_h_ptthirdlead ->fill(pt3rdlead, weight);
_h_ythirdlead ->fill(yabs3rdlead, weight);
//Histos after VBF preselection
const double deltarap = fabs(jets[0].momentum().rapidity() - jets[1].momentum().rapidity()) ;
const double mass = (jets[0].momentum() + jets[1].momentum()).mass();
if(mass>350&&deltarap>3.0)
{
_h_ptthirdlead_vbf ->fill(pt3rdlead, weight);
_h_ythirdlead_vbf ->fill(yabs3rdlead, weight);
}
}
// Require at least four jets
if (jets.size() >= 4) {
// Fourth jet histos
const double pt4thlead = jets[3].momentum().pT()/GeV;
const double yabs4thlead = fabs(jets[3].momentum().rapidity());
_h_ptfourthlead ->fill(pt4thlead, weight);
_h_yfourthlead ->fill(yabs4thlead, weight);
}
}
/// @name Ratio calculator util functions
//@{
/// Calculate the ratio, being careful about div-by-zero
double ratio(double a, double b) {
return (b != 0) ? a/b : 0;
}
/// Calculate the ratio error, being careful about div-by-zero
double ratio_err_incl(double a, double b) {
return (b != 0) ? sqrt(a/b*(1-a/b)/b) : 0;
}
/// Calculate the ratio error, being careful about div-by-zero
double ratio_err_excl(double a, double b) {
return (b != 0) ? sqrt(a/sqr(b) + sqr(a)/(b*b*b)) : 0;
}
//@}
void finalize() {
for (size_t i=0; i<6; ++i) {
_h_njet_incl_ratio->point(i).setY(ratio(_weights_incl[i+1], _weights_incl[i]),
ratio_err_incl(_weights_incl[i+1], _weights_incl[i]));
_h_njet_excl_ratio->point(i).setY(ratio(_weights_excl[i+1], _weights_excl[i]),
ratio_err_excl(_weights_excl[i+1], _weights_excl[i]));
if (i>=1) _h_njet_excl_pt150_ratio->point(i-1).setY
(ratio(_weights_excl_pt150[i+1], _weights_excl_pt150[i]),
ratio_err_excl(_weights_excl_pt150[i+1], _weights_excl_pt150[i]));
if (i>=2) _h_njet_excl_vbf_ratio->point(i-2).setY
(ratio(_weights_excl_vbf[i+1], _weights_excl_vbf[i]),
ratio_err_excl(_weights_excl_vbf[i+1], _weights_excl_vbf[i]));
}
double xs = crossSectionPerEvent()/picobarn;
scale(_h_njet_incl , xs);
scale(_h_njet_excl , xs);
scale(_h_njet_excl_pt150, xs);
scale(_h_njet_excl_vbf , xs);
scale(_h_ptlead , xs);
scale(_h_ptseclead , xs);
scale(_h_ptthirdlead , xs);
scale(_h_ptfourthlead , xs);
scale(_h_ptlead_excl , xs);
scale(_h_pt_ratio , xs);
scale(_h_pt_z , xs);
scale(_h_pt_z_excl , xs);
scale(_h_ylead , xs);
scale(_h_yseclead , xs);
scale(_h_ythirdlead , xs);
scale(_h_yfourthlead , xs);
scale(_h_deltay , xs);
scale(_h_mass , xs);
scale(_h_deltaphi , xs);
scale(_h_deltaR , xs);
scale(_h_ptthirdlead_vbf, xs);
scale(_h_ythirdlead_vbf , xs);
scale(_h_ht , xs);
scale(_h_st , xs);
}
//@}
protected:
size_t _mode;
private:
std::vector<double> _weights_incl;
std::vector<double> _weights_excl;
std::vector<double> _weights_excl_pt150;
std::vector<double> _weights_excl_vbf;
//
Scatter2DPtr _h_njet_incl_ratio;
Scatter2DPtr _h_njet_excl_ratio;
Scatter2DPtr _h_njet_excl_pt150_ratio;
Scatter2DPtr _h_njet_excl_vbf_ratio;
Histo1DPtr _h_njet_incl;
Histo1DPtr _h_njet_excl;
Histo1DPtr _h_njet_excl_pt150;
Histo1DPtr _h_njet_excl_vbf;
Histo1DPtr _h_ptlead;
Histo1DPtr _h_ptseclead;
Histo1DPtr _h_ptthirdlead;
Histo1DPtr _h_ptfourthlead;
Histo1DPtr _h_ptlead_excl;
Histo1DPtr _h_pt_ratio;
Histo1DPtr _h_pt_z;
Histo1DPtr _h_pt_z_excl;
Histo1DPtr _h_ylead;
Histo1DPtr _h_yseclead;
Histo1DPtr _h_ythirdlead;
Histo1DPtr _h_yfourthlead;
Histo1DPtr _h_deltay;
Histo1DPtr _h_mass;
Histo1DPtr _h_deltaphi;
Histo1DPtr _h_deltaR;
Histo1DPtr _h_ptthirdlead_vbf;
Histo1DPtr _h_ythirdlead_vbf;
Histo1DPtr _h_ht;
Histo1DPtr _h_st;
};
class ATLAS_2013_I1230812_EL : public ATLAS_2013_I1230812 {
public:
ATLAS_2013_I1230812_EL()
: ATLAS_2013_I1230812("ATLAS_2013_I1230812_EL")
{
_mode = 2;
}
};
class ATLAS_2013_I1230812_MU : public ATLAS_2013_I1230812 {
public:
ATLAS_2013_I1230812_MU()
: ATLAS_2013_I1230812("ATLAS_2013_I1230812_MU")
{
_mode = 3;
}
};
DECLARE_RIVET_PLUGIN(ATLAS_2013_I1230812);
DECLARE_RIVET_PLUGIN(ATLAS_2013_I1230812_EL);
DECLARE_RIVET_PLUGIN(ATLAS_2013_I1230812_MU);
}
diff --git a/src/Analyses/D0_2009_S8202443.cc b/src/Analyses/D0_2009_S8202443.cc
--- a/src/Analyses/D0_2009_S8202443.cc
+++ b/src/Analyses/D0_2009_S8202443.cc
@@ -1,157 +1,158 @@
// -*- 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 + jet + \f$ X \f$ cross-section / \f$ p_\perp \f$ distributions
class D0_2009_S8202443 : public Analysis {
public:
/// @name Construction
//@{
/// Constructor
D0_2009_S8202443() : Analysis("D0_2009_S8202443"),
_sum_of_weights(0.0), _sum_of_weights_constrained(0.0)
{
}
//@}
/// @name Analysis methods
//@{
/// Book histograms
void init() {
FinalState fs;
// Leptons in constrained tracking acceptance
- vector<pair<double, double> > etaRanges;
- etaRanges.push_back(make_pair(-2.5, -1.5));
- etaRanges.push_back(make_pair(-1.1, 1.1));
- etaRanges.push_back(make_pair(1.5, 2.5));
- ZFinder zfinder_constrained(fs, etaRanges, 25.0*GeV, PID::ELECTRON,
+ Cut cuts = ( Range(Cuts::eta, -2.5, -1.5)
+ | Range(Cuts::eta, -1.1, 1.1)
+ | Range(Cuts::eta, 1.5, 2.5) )
+ & (Cuts::pt >= 25.0*GeV);
+
+ ZFinder zfinder_constrained(fs, cuts, PID::ELECTRON,
65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zfinder_constrained, "ZFinderConstrained");
FastJets conefinder_constrained(zfinder_constrained.remainingFinalState(),
FastJets::D0ILCONE, 0.5);
addProjection(conefinder_constrained, "ConeFinderConstrained");
// Unconstrained leptons
- ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
+ ZFinder zfinder(fs, Cuts::open(), PID::ELECTRON,
65.0*GeV, 115.0*GeV, 0.2, true, true);
addProjection(zfinder, "ZFinder");
FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
addProjection(conefinder, "ConeFinder");
_h_jet1_pT_constrained = bookHisto1D(1, 1, 1);
_h_jet2_pT_constrained = bookHisto1D(3, 1, 1);
_h_jet3_pT_constrained = bookHisto1D(5, 1, 1);
_h_jet1_pT = bookHisto1D(2, 1, 1);
_h_jet2_pT = bookHisto1D(4, 1, 1);
_h_jet3_pT = bookHisto1D(6, 1, 1);
}
// Do the analysis
void analyze(const Event& e) {
double weight = e.weight();
// unconstrained electrons first
const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
if (zfinder.bosons().size()==1) {
_sum_of_weights += 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.5) {
jets_cut.push_back(j);
}
}
if (jets_cut.size()>0) {
_h_jet1_pT->fill(jets_cut[0].pT()/GeV, weight);
}
if (jets_cut.size()>1) {
_h_jet2_pT->fill(jets_cut[1].pT()/GeV, weight);
}
if (jets_cut.size()>2) {
_h_jet3_pT->fill(jets_cut[2].pT()/GeV, weight);
}
}
else {
MSG_DEBUG("no unique lepton pair found.");
}
// constrained electrons
const ZFinder& zfinder_constrained = applyProjection<ZFinder>(e, "ZFinderConstrained");
if (zfinder_constrained.bosons().size()==1) {
_sum_of_weights_constrained += weight;
const JetAlg& jetpro = applyProjection<JetAlg>(e, "ConeFinderConstrained");
const Jets& jets = jetpro.jetsByPt(20.0*GeV);
Jets jets_cut;
foreach (const Jet& j, jets) {
if (fabs(j.momentum().pseudorapidity()) < 2.5) {
jets_cut.push_back(j);
}
}
if (jets_cut.size()>0) {
_h_jet1_pT_constrained->fill(jets_cut[0].pT()/GeV, weight);
}
if (jets_cut.size()>1) {
_h_jet2_pT_constrained->fill(jets_cut[1].pT()/GeV, weight);
}
if (jets_cut.size()>2) {
_h_jet3_pT_constrained->fill(jets_cut[2].pT()/GeV, weight);
}
}
else {
MSG_DEBUG("no unique lepton pair found.");
vetoEvent;
}
}
// Finalize
void finalize() {
scale(_h_jet1_pT, 1.0/_sum_of_weights);
scale(_h_jet2_pT, 1.0/_sum_of_weights);
scale(_h_jet3_pT, 1.0/_sum_of_weights);
scale(_h_jet1_pT_constrained, 1.0/_sum_of_weights_constrained);
scale(_h_jet2_pT_constrained, 1.0/_sum_of_weights_constrained);
scale(_h_jet3_pT_constrained, 1.0/_sum_of_weights_constrained);
}
//@}
private:
/// @name Histograms
//@{
Histo1DPtr _h_jet1_pT;
Histo1DPtr _h_jet2_pT;
Histo1DPtr _h_jet3_pT;
Histo1DPtr _h_jet1_pT_constrained;
Histo1DPtr _h_jet2_pT_constrained;
Histo1DPtr _h_jet3_pT_constrained;
//@}
double _sum_of_weights, _sum_of_weights_constrained;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2009_S8202443);
}
diff --git a/src/Analyses/D0_2010_S8821313.cc b/src/Analyses/D0_2010_S8821313.cc
--- a/src/Analyses/D0_2010_S8821313.cc
+++ b/src/Analyses/D0_2010_S8821313.cc
@@ -1,128 +1,132 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ZFinder.hh"
namespace Rivet {
class D0_2010_S8821313 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
D0_2010_S8821313()
: Analysis("D0_2010_S8821313")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
/// Initialise and register projections
FinalState fs;
- vector<pair<double, double> > etaRanges_ee;
- etaRanges_ee.push_back(make_pair(-3.0, -1.5));
- etaRanges_ee.push_back(make_pair(-1.1, 1.1));
- etaRanges_ee.push_back(make_pair(1.5, 3.0));
- ZFinder zfinder_ee(fs, etaRanges_ee, 20.0*GeV, PID::ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, true, true);
+ Cut cuts = ( Range(Cuts::eta, -3.0, -1.5)
+ | Range(Cuts::eta, -1.1, 1.1)
+ | Range(Cuts::eta, 1.5, 3.0) )
+ & (Cuts::pt >= 20.0*GeV);
+
+ ZFinder zfinder_ee(fs, cuts,
+ PID::ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, true, true);
addProjection(zfinder_ee, "zfinder_ee");
- ZFinder zfinder_mm(fs, -2.0, 2.0, 15.0*GeV, PID::MUON, 70.0*GeV, 110.0*GeV, 0.0, false, false);
+ ZFinder zfinder_mm(fs,
+ Range(Cuts::eta, -2.0, 2.0) & (Cuts::pt >= 15.0*GeV),
+ PID::MUON, 70.0*GeV, 110.0*GeV, 0.0, false, false);
addProjection(zfinder_mm, "zfinder_mm");
/// Book histograms here
_h_phistar_ee.addHistogram(0.0, 1.0, bookHisto1D(1, 1, 1));
_h_phistar_ee.addHistogram(1.0, 2.0, bookHisto1D(1, 1, 2));
_h_phistar_ee.addHistogram(2.0, 10.0, bookHisto1D(1, 1, 3));
_h_phistar_mm.addHistogram(0.0, 1.0, bookHisto1D(2, 1, 1));
_h_phistar_mm.addHistogram(1.0, 2.0, bookHisto1D(2, 1, 2));
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = event.weight();
const ZFinder& zfinder_ee = applyProjection<ZFinder>(event, "zfinder_ee");
if (zfinder_ee.bosons().size()==1) {
Particles ee=zfinder_ee.constituents();
std::sort(ee.begin(), ee.end(), cmpParticleByPt);
FourMomentum eminus=PID::threeCharge(ee[0].pdgId())<0.0?ee[0].momentum():ee[1].momentum();
FourMomentum eplus=PID::threeCharge(ee[0].pdgId())<0.0?ee[1].momentum():ee[0].momentum();
double phi_acop=M_PI-mapAngle0ToPi(eminus.phi()-eplus.phi());
double costhetastar=tanh((eminus.eta()-eplus.eta())/2.0);
double sin2thetastar=1.0-sqr(costhetastar);
if (sin2thetastar<0.0) sin2thetastar=0.0;
double phistar=tan(phi_acop/2.0)*sqrt(sin2thetastar);
FourMomentum Zmom=zfinder_ee.bosons()[0].momentum();
_h_phistar_ee.fill(Zmom.rapidity(), phistar, weight);
}
const ZFinder& zfinder_mm = applyProjection<ZFinder>(event, "zfinder_mm");
if (zfinder_mm.bosons().size()==1) {
Particles mm=zfinder_mm.constituents();
std::sort(mm.begin(), mm.end(), cmpParticleByPt);
FourMomentum mminus=PID::threeCharge(mm[0].pdgId())<0.0?mm[0].momentum():mm[1].momentum();
FourMomentum mplus=PID::threeCharge(mm[0].pdgId())<0.0?mm[1].momentum():mm[0].momentum();
double phi_acop=M_PI-mapAngle0ToPi(mminus.phi()-mplus.phi());
double costhetastar=tanh((mminus.eta()-mplus.eta())/2.0);
double sin2thetastar=1.0-sqr(costhetastar);
if (sin2thetastar<0.0) sin2thetastar=0.0;
double phistar=tan(phi_acop/2.0)*sqrt(sin2thetastar);
FourMomentum Zmom=zfinder_mm.bosons()[0].momentum();
_h_phistar_mm.fill(Zmom.rapidity(), phistar, weight);
}
}
/// Normalise histograms etc., after the run
void finalize() {
foreach (Histo1DPtr hist, _h_phistar_ee.getHistograms()) {
normalize(hist, 1.0);
}
foreach (Histo1DPtr hist, _h_phistar_mm.getHistograms()) {
normalize(hist, 1.0);
}
}
//@}
private:
// Data members like post-cuts event weight counters go here
private:
/// @name Histograms
//@{
BinnedHistogram<double> _h_phistar_ee;
BinnedHistogram<double> _h_phistar_mm;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(D0_2010_S8821313);
}
diff --git a/src/Analyses/EXAMPLE_CUTS.cc b/src/Analyses/EXAMPLE_CUTS.cc
--- a/src/Analyses/EXAMPLE_CUTS.cc
+++ b/src/Analyses/EXAMPLE_CUTS.cc
@@ -1,81 +1,81 @@
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Cuts.hh"
namespace Rivet {
/// @brief Just measures a few random things as an example.
class EXAMPLE_CUTS : public Analysis {
public:
/// Constructor
EXAMPLE_CUTS()
: Analysis("EXAMPLE_CUTS")
{
// No counters etc. to initialise, hence nothing to do here!
}
/// @name Analysis methods
//@{
/// Set up projections and book histograms
void init() {
// Projections
- const FinalState cnfs(-4, 4, 0*GeV);
+ const FinalState cnfs( Range(Cuts::eta, -4, 4) );
addProjection(cnfs, "FS");
// Histograms
_histPt = bookHisto1D("pT", 30, 0, 30);
_histMass = bookHisto1D("Mass", 20, 0, 1);
}
/// Do the analysis
void analyze(const Event& event) {
// Make sure to always include the event weight in histogram fills!
const double weight = event.weight();
const Particles ps = applyProjection<FinalState>(event, "FS").particlesByPt();
- Cut ptcut = (Cuts::pt >= 5) & (Cuts::pt < 20); //ptIn(5,20);
- Cut masscut = (Cuts::mass >= 0) & (Cuts::mass < 0.2); //massIn(0.,0.2);
+ Cut ptcut = Range( Cuts::pt, 5, 20 );
+ Cut masscut = Range( Cuts::mass, 0, 0.2);
Cut combine = ptcut & masscut; //Possible to combine cuts
foreach(const Particle& p, ps) {
if ( ptcut->accept(p) )
_histPt->fill(p.momentum().pT(), weight);
if ( combine->accept(p) )
_histMass->fill(p.momentum().mass(), weight);
}
}
/// Finalize
void finalize() {
normalize(_histPt);
normalize(_histMass);
}
//@}
private:
//@{
/// Histograms
Histo1DPtr _histPt, _histMass;
//@}
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(EXAMPLE_CUTS);
}
diff --git a/src/Core/Cuts.cc b/src/Core/Cuts.cc
--- a/src/Core/Cuts.cc
+++ b/src/Core/Cuts.cc
@@ -1,241 +1,250 @@
#include <Rivet/Particle.hh>
#include <Rivet/Jet.hh>
#include <Rivet/Math/Vectors.hh>
#include <fastjet/PseudoJet.hh>
#include <Rivet/Cuts.hh>
namespace Rivet {
class Cuttable {
public:
virtual double getValue(Cuts::Quantity) const = 0;
virtual ~Cuttable() {}
};
template <>
bool CutBase::accept<Cuttable>(const Cuttable & t) {
return accept_(t);
}
+class Open_Cut : public CutBase {
+protected:
+ bool accept_(const Cuttable &) const { return true; }
+};
+
+const Cut & Cuts::open() {
+ static const Cut open = boost::shared_ptr<Open_Cut>(new Open_Cut);
+ return open;
+}
class Cut_Gtr : public CutBase {
public:
Cut_Gtr(const Cuts::Quantity qty, const double low) : qty_(qty), low_(low) {}
protected:
bool accept_(const Cuttable & o) const { return o.getValue(qty_) >= low_; }
private:
Cuts::Quantity qty_;
double low_;
};
class Cut_Less : public CutBase {
public:
Cut_Less(const Cuts::Quantity qty, const double high) : qty_(qty), high_(high) {}
protected:
bool accept_(const Cuttable & o) const { return o.getValue(qty_) < high_; }
private:
Cuts::Quantity qty_;
double high_;
};
template <typename T>
Cut make_cut(T t) {
return boost::shared_ptr<T>(new T(t));
}
Cut operator < (Cuts::Quantity qty, double n) {
return make_cut(Cut_Less(qty, n));
}
Cut operator >= (Cuts::Quantity qty, double n) {
return make_cut(Cut_Gtr(qty, n));
}
- Cut In(Cuts::Quantity qty, double m, double n) {
+ Cut Range(Cuts::Quantity qty, double m, double n) {
if (m > n) swap(m,n);
return (qty >= m) & (qty < n);
}
//////////////
/// Combiners
/// AND, OR, NOT, and XOR objects for combining cuts
class CutsOr : public CutBase {
public:
CutsOr(const Cut c1, const Cut c2) : cut1(c1), cut2(c2) {}
protected:
bool accept_(const Cuttable & o) const {
return cut1->accept(o) || cut2->accept(o);
}
private:
const Cut cut1;
const Cut cut2;
};
class CutsAnd : public CutBase {
public:
CutsAnd(const Cut c1, const Cut c2) : cut1(c1), cut2(c2) {}
protected:
bool accept_(const Cuttable & o) const {
return cut1->accept(o) && cut2->accept(o);
}
private:
const Cut cut1;
const Cut cut2;
};
class CutInvert : public CutBase {
public:
CutInvert(const Cut c1) : poscut(c1) {}
protected:
bool accept_(const Cuttable & o) const {
return !poscut->accept(o);
}
private:
const Cut poscut;
};
class CutsXor : public CutBase {
public:
CutsXor(const Cut c1, const Cut c2) : cut1(c1), cut2(c2) {}
protected:
bool accept_(const Cuttable & o) const {
bool A_and_B = cut1->accept(o) && cut2->accept(o);
bool A_or_B = cut1->accept(o) || cut2->accept(o);
return A_or_B && (! A_and_B);
}
private:
const Cut cut1;
const Cut cut2;
};
////////////
///Operators
Cut operator & (const Cut aptr, const Cut bptr) {
return make_cut(CutsAnd(aptr,bptr));
}
Cut operator | (const Cut aptr, const Cut bptr) {
return make_cut(CutsOr(aptr,bptr));
}
Cut operator ~ (const Cut cptr) {
return make_cut(CutInvert(cptr));
}
Cut operator ^ (const Cut aptr, const Cut bptr) {
return make_cut(CutsXor(aptr,bptr));
}
///////////////////////
/// Cuts
template <typename T>
class MakeCuttable : public Cuttable {};
#define SPECIALISE_ACCEPT(TYPENAME) \
template <> \
bool CutBase::accept<TYPENAME>(const TYPENAME & t) { \
return accept_(MakeCuttable<TYPENAME>(t)); \
} \
void qty_not_found() {
throw Exception("Missing implementation for a Quantity.");
}
template<>
class MakeCuttable <Particle> : public Cuttable {
public:
MakeCuttable(const Particle& p) : p_(p) {}
double getValue(Cuts::Quantity qty) const {
switch(qty) {
case Cuts::pt: return p_.momentum().pT();
case Cuts::mass: return p_.momentum().mass();
case Cuts::rap: return p_.momentum().rapidity();
case Cuts::eta: return p_.momentum().pseudorapidity();
case Cuts::phi: return p_.momentum().phi();
default:
qty_not_found();
}
return -999.;
}
private:
const Particle & p_;
};
SPECIALISE_ACCEPT(Particle)
template<>
class MakeCuttable <FourMomentum> : public Cuttable {
public:
MakeCuttable(const FourMomentum& fm) : fm_(fm) {}
double getValue(Cuts::Quantity qty) const {
switch(qty) {
case Cuts::pt: return fm_.pT();
case Cuts::mass: return fm_.mass();
case Cuts::rap: return fm_.rapidity();
case Cuts::eta: return fm_.pseudorapidity();
case Cuts::phi: return fm_.phi();
default:
qty_not_found();
}
return -999.;
}
private:
const FourMomentum & fm_;
};
SPECIALISE_ACCEPT(FourMomentum)
template<>
class MakeCuttable <Jet> : public Cuttable {
public:
MakeCuttable(const Jet& jet) : jet_(jet) {}
double getValue(Cuts::Quantity qty) const {
switch(qty) {
case Cuts::pt: return jet_.momentum().pT();
case Cuts::mass: return jet_.momentum().mass();
case Cuts::rap: return jet_.momentum().rapidity();
case Cuts::eta: return jet_.momentum().pseudorapidity();
case Cuts::phi: return jet_.momentum().phi();
default:
qty_not_found();
}
return -999.;
}
private:
const Jet & jet_;
};
SPECIALISE_ACCEPT(Jet)
template<>
class MakeCuttable <fastjet::PseudoJet> : public Cuttable {
public:
MakeCuttable(const fastjet::PseudoJet& pjet) : pjet_(pjet) {}
double getValue(Cuts::Quantity qty) const {
switch(qty) {
case Cuts::pt: return pjet_.perp();
case Cuts::mass: return pjet_.m();
case Cuts::rap: return pjet_.rap();
case Cuts::eta: return pjet_.eta();
case Cuts::phi: return pjet_.phi();
default:
qty_not_found();
}
return -999.;
}
private:
const fastjet::PseudoJet & pjet_;
};
SPECIALISE_ACCEPT(fastjet::PseudoJet)
}
diff --git a/src/Projections/ChargedFinalState.cc b/src/Projections/ChargedFinalState.cc
--- a/src/Projections/ChargedFinalState.cc
+++ b/src/Projections/ChargedFinalState.cc
@@ -1,50 +1,50 @@
// -*- C++ -*-
#include "Rivet/Projections/ChargedFinalState.hh"
namespace Rivet {
ChargedFinalState::ChargedFinalState(const FinalState& fsp) {
setName("ChargedFinalState");
addProjection(fsp, "FS");
}
ChargedFinalState::ChargedFinalState(double mineta, double maxeta, double minpt) {
setName("ChargedFinalState");
addProjection(FinalState(mineta, maxeta, minpt), "FS");
}
- ChargedFinalState::ChargedFinalState(const vector<pair<double, double> >& etaRanges,
- double minpt) {
- setName("ChargedFinalState");
- addProjection(FinalState(etaRanges, minpt), "FS");
- }
+ // ChargedFinalState::ChargedFinalState(const vector<pair<double, double> >& etaRanges,
+ // double minpt) {
+ // setName("ChargedFinalState");
+ // addProjection(FinalState(etaRanges, minpt), "FS");
+ // }
int ChargedFinalState::compare(const Projection& p) const {
return mkNamedPCmp(p, "FS");
}
bool chargedParticleFilter(const Particle& p) {
return PID::threeCharge(p.pdgId()) == 0;
}
void ChargedFinalState::project(const Event& e) {
const FinalState& fs = applyProjection<FinalState>(e, "FS");
_theParticles.clear();
std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
std::back_inserter(_theParticles), chargedParticleFilter);
MSG_DEBUG("Number of charged final-state particles = " << _theParticles.size());
if (getLog().isActive(Log::TRACE)) {
for (vector<Particle>::iterator p = _theParticles.begin(); p != _theParticles.end(); ++p) {
MSG_TRACE("Selected: " << p->pdgId() << ", charge = " << PID::threeCharge(p->pdgId())/3.0);
}
}
}
}
diff --git a/src/Projections/FinalState.cc b/src/Projections/FinalState.cc
--- a/src/Projections/FinalState.cc
+++ b/src/Projections/FinalState.cc
@@ -1,119 +1,132 @@
// -*- C++ -*-
#include "Rivet/Projections/FinalState.hh"
namespace Rivet {
FinalState::FinalState(double mineta, double maxeta, double minpt)
: _ptmin(minpt)
{
setName("FinalState");
const bool openpt = isZero(minpt);
const bool openeta = (mineta <= -MAXRAPIDITY && maxeta >= MAXRAPIDITY);
MSG_TRACE("Check for open FS conditions:" << std::boolalpha
<< " eta=" << openeta
<< ", pt=" << openpt);
if (!openeta || !openpt) {
addProjection(FinalState(), "OpenFS");
if (!openeta) {
_etaRanges.push_back(make_pair(mineta, maxeta));
}
}
}
-
- FinalState::FinalState(const vector<pair<double, double> >& etaRanges, double minpt)
- : _etaRanges(etaRanges), _ptmin(minpt)
+ FinalState::FinalState(Cut c)
+ : _ptmin(), _cuts(c)
{
setName("FinalState");
- const bool openpt = isZero(minpt);
- /// @todo Properly check whether any of these eta ranges (or their combination) are actually open
- const bool openeta = etaRanges.empty();
- MSG_TRACE("Check for open FS conditions:" << std::boolalpha
- << " eta=" << openeta
- << ", pt=" << openpt);
- if (!openeta || !openpt) {
+ const bool open = ( c == Cuts::open() );
+ MSG_TRACE("Check for open FS conditions: " << std::boolalpha << open);
+ if ( !open ) {
addProjection(FinalState(), "OpenFS");
}
}
+ // FinalState::FinalState(const vector<pair<double, double> >& etaRanges, double minpt)
+ // : _etaRanges(etaRanges), _ptmin(minpt)
+ // {
+ // setName("FinalState");
+ // const bool openpt = isZero(minpt);
+ // /// @todo Properly check whether any of these eta ranges (or their combination) are actually open
+ // const bool openeta = etaRanges.empty();
+ // MSG_TRACE("Check for open FS conditions:" << std::boolalpha
+ // << " eta=" << openeta
+ // << ", pt=" << openpt);
+ // if (!openeta || !openpt) {
+ // addProjection(FinalState(), "OpenFS");
+ // }
+ // }
+
+
int FinalState::compare(const Projection& p) const {
const FinalState& other = dynamic_cast<const FinalState&>(p);
//MSG_TRACE("FS::compare: " << 1 << " " << this << " " << &p);
std::vector<std::pair<double, double> > eta1(_etaRanges);
std::vector<std::pair<double, double> > eta2(other._etaRanges);
std::sort(eta1.begin(), eta1.end());
std::sort(eta2.begin(), eta2.end());
//MSG_TRACE("FS::compare: " << 2 << " " << this << " " << &p);
if (eta1 < eta2) return ORDERED;
else if (eta2 < eta1) return UNORDERED;
//MSG_TRACE("FS::compare: " << 3 << " " << this << " " << &p);
return cmp(_ptmin, other._ptmin);
}
void FinalState::project(const Event& e) {
_theParticles.clear();
// Handle "open FS" special case
if (_etaRanges.empty() && _ptmin == 0) {
//MSG_TRACE("Open FS processing: should only see this once per event ("
// << e.genEvent().event_number() << ")");
foreach (const GenParticle* p, Rivet::particles(e.genEvent())) {
if (p->status() == 1) {
//MSG_TRACE("FS GV = " << p->production_vertex());
_theParticles.push_back(Particle(*p));
}
}
return;
}
// If this is not itself the "open" FS, base the calculations on the open FS' results
/// @todo In general, we'd like to calculate a restrictive FS based on the most restricted superset FS.
const Particles allstable = applyProjection<FinalState>(e, "OpenFS").particles();
foreach (const Particle& p, allstable) {
const bool passed = accept(p);
MSG_TRACE("Choosing: ID = " << p.pdgId()
<< ", pT = " << p.pT()
<< ", eta = " << p.eta()
<< ": result = " << std::boolalpha << passed);
if (passed) _theParticles.push_back(p);
}
//MSG_DEBUG("Number of final-state particles = " << _theParticles.size());
}
/// Decide if a particle is to be accepted or not.
bool FinalState::accept(const Particle& p) const {
// Not having s.c. == 1 should never happen!
assert(p.genParticle() == NULL || p.genParticle()->status() == 1);
+ if ( _cuts ) return _cuts->accept(p);
+
// Check pT cut
if (_ptmin > 0.0) {
if (p.pT() < _ptmin) return false;
}
// Check eta cuts
if (!_etaRanges.empty()) {
bool eta_pass = false;
typedef pair<double,double> EtaPair;
foreach (const EtaPair& etacuts, _etaRanges) {
if (inRange(p.eta(), etacuts.first, etacuts.second)) {
eta_pass = true;
break;
}
}
if (!eta_pass) return false;
}
return true;
}
}
diff --git a/src/Projections/IdentifiedFinalState.cc b/src/Projections/IdentifiedFinalState.cc
--- a/src/Projections/IdentifiedFinalState.cc
+++ b/src/Projections/IdentifiedFinalState.cc
@@ -1,53 +1,53 @@
// -*- C++ -*-
#include "Rivet/Projections/IdentifiedFinalState.hh"
namespace Rivet {
IdentifiedFinalState::IdentifiedFinalState(const FinalState& fsp) {
setName("IdentifiedFinalState");
addProjection(fsp, "FS");
}
IdentifiedFinalState::IdentifiedFinalState(double etamin, double etamax, double ptMin)
: FinalState(etamin, etamax, ptMin)
{
setName("IdentifiedFinalState");
addProjection(FinalState(etamin, etamax, ptMin), "FS");
}
- IdentifiedFinalState::IdentifiedFinalState(const vector<pair<double, double> >& etaRanges,
- double ptMin)
- : FinalState(etaRanges, ptMin)
- {
- setName("IdentifiedFinalState");
- addProjection(FinalState(etaRanges, ptMin), "FS");
- }
+ // IdentifiedFinalState::IdentifiedFinalState(const vector<pair<double, double> >& etaRanges,
+ // double ptMin)
+ // : FinalState(etaRanges, ptMin)
+ // {
+ // setName("IdentifiedFinalState");
+ // addProjection(FinalState(etaRanges, ptMin), "FS");
+ // }
int IdentifiedFinalState::compare(const Projection& p) const {
const PCmp fscmp = mkNamedPCmp(p, "FS");
if (fscmp != EQUIVALENT) return fscmp;
const IdentifiedFinalState& other = dynamic_cast<const IdentifiedFinalState&>(p);
int pidssize = cmp(_pids.size(), other._pids.size());
if (pidssize != EQUIVALENT) return pidssize;
return cmp(_pids, other._pids);
}
void IdentifiedFinalState::project(const Event& e) {
const FinalState& fs = applyProjection<FinalState>(e, "FS");
_theParticles.clear();
_theParticles.reserve(fs.particles().size());
foreach (const Particle& p, fs.particles()) {
if (acceptedIds().find(p.pdgId()) != acceptedIds().end()) {
_theParticles.push_back(p);
}
}
}
}
diff --git a/src/Projections/LeptonClusters.cc b/src/Projections/LeptonClusters.cc
--- a/src/Projections/LeptonClusters.cc
+++ b/src/Projections/LeptonClusters.cc
@@ -1,83 +1,83 @@
// -*- C++ -*-
#include "Rivet/Projections/LeptonClusters.hh"
namespace Rivet {
LeptonClusters::LeptonClusters(const FinalState& photons, const FinalState& signal,
- double dRmax, bool cluster,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin) :
- FinalState(etaRanges, pTmin),
+ double dRmax, bool cluster, Cut cut) :
+ // const std::vector<std::pair<double, double> >& etaRanges,
+ // double pTmin) :
+ FinalState(cut),//etaRanges, pTmin),
_dRmax(dRmax), _cluster(cluster)
{
setName("LeptonClusters");
IdentifiedFinalState photonfs(photons);
photonfs.acceptId(PID::PHOTON);
addProjection(photonfs, "Photons");
addProjection(signal, "Signal");
}
int LeptonClusters::compare(const Projection& p) const {
// Compare the two as final states (for pT and eta cuts)
const LeptonClusters& other = dynamic_cast<const LeptonClusters&>(p);
int fscmp = FinalState::compare(other);
if (fscmp != EQUIVALENT) return fscmp;
const PCmp phcmp = mkNamedPCmp(p, "Photons");
if (phcmp != EQUIVALENT) return phcmp;
const PCmp sigcmp = mkNamedPCmp(p, "Signal");
if (sigcmp != EQUIVALENT) return sigcmp;
return (cmp(_dRmax, other._dRmax) || cmp(_cluster, other._cluster));
}
void LeptonClusters::project(const Event& e) {
_theParticles.clear();
_clusteredLeptons.clear();
const FinalState& signal = applyProjection<FinalState>(e, "Signal");
Particles bareleptons = signal.particles();
if (bareleptons.empty()) return;
vector<ClusteredLepton> allClusteredLeptons;
for (size_t i = 0; i < bareleptons.size(); ++i) {
allClusteredLeptons.push_back(ClusteredLepton(bareleptons[i]));
}
const FinalState& photons = applyProjection<FinalState>(e, "Photons");
foreach (const Particle& photon, photons.particles()) {
const FourMomentum p_P = photon.momentum();
double dRmin=_dRmax;
int idx = -1;
for (size_t i = 0; i < bareleptons.size(); ++i) {
FourMomentum p_l = bareleptons[i].momentum();
// Only cluster photons around *charged* signal particles
if (PID::threeCharge(bareleptons[i].pdgId()) == 0) continue;
// Geometrically match momentum vectors
double dR = deltaR(p_l, p_P);
if (dR < dRmin) {
dRmin = dR;
idx = i;
}
}
if (idx > -1) {
if (_cluster) allClusteredLeptons[idx].addPhoton(photon, _cluster);
}
}
foreach (const ClusteredLepton& lepton, allClusteredLeptons) {
if (accept(lepton)) {
_clusteredLeptons.push_back(lepton);
_theParticles.push_back(lepton.constituentLepton());
_theParticles.insert(_theParticles.end(),
lepton.constituentPhotons().begin(),
lepton.constituentPhotons().end());
}
}
}
}
diff --git a/src/Projections/WFinder.cc b/src/Projections/WFinder.cc
--- a/src/Projections/WFinder.cc
+++ b/src/Projections/WFinder.cc
@@ -1,214 +1,227 @@
// -*- 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,
PdgId pid,
double minmass, double maxmass,
double missingET,
double dRmax, bool clusterPhotons, bool trackPhotons,
double masstarget,
bool useTransverseMass) {
- vector<pair<double, double> > etaRanges;
- etaRanges += std::make_pair(etaMin, etaMax);
- _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET,
+ 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,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin,
+ Cut cuts,
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,
+ _init(inputfs, cuts, 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) {
- vector<pair<double, double> > etaRanges;
- etaRanges += std::make_pair(etaMin, etaMax);
- FinalState inputfs;
- _init(inputfs, etaRanges, pTmin, 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(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);
- }
+ // 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,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin,
+ 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)
{
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, etaRanges, pTmin);
+ 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,149 +1,161 @@
// -*- 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,
+ 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) {
- vector<pair<double, double> > etaRanges;
- etaRanges += std::make_pair(etaMin, etaMax);
- _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, 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(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(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,
- const std::vector<std::pair<double, double> >& etaRanges,
- double pTmin, PdgId pid,
+ // 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)
{
setName("ZFinder");
_minmass = minmass;
_maxmass = maxmass;
_masstarget = masstarget;
_pid = pid;
_trackPhotons = trackPhotons;
IdentifiedFinalState bareleptons(inputfs);
bareleptons.acceptIdPair(pid);
LeptonClusters leptons(inputfs, bareleptons, dRmax,
- clusterPhotons,
- etaRanges, pTmin);
+ 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
Sat, Dec 21, 2:51 PM (23 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023179
Default Alt Text
(417 KB)

Event Timeline