Commit e5f62751 authored by Andy Buckley's avatar Andy Buckley

Add new tutorial template files

parent da59b16f
This diff is collapsed.
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/FastJets.hh"
namespace Rivet {
/// Tutorial analysis with dilepton and jet observables
class TUTORIAL : public Analysis {
public:
/// Constructor
DEFAULT_RIVET_ANALYSIS_CTOR(TUTORIAL);
/// Book histograms and initialise projections before the run
void init() {
// Electron or muon mode? (default to electron)
_eemode = (getOption("LMODE") != "MU");
// Book histograms
vector<double> mll_bins = { 66., 74., 78., 82., 84., 86., 88., 89., 90., 91.,
92., 93., 94., 96., 98., 100., 104., 108., 116. };
book(_h["mll"], "mass_ll", mll_bins);
//book(_h["jets_excl"], "jets_excl", 6, -0.5, 5.5);
//book(_h["bjets_excl"], "bjets_excl", 3, -0.5, 2.5);
//book(_h["HT"], "HT", 6, 20., 110.);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
// TASKS:
// 1. Reconstruct the dilepton invariant mass to fill the histogram: difference between e/mu?
// 2. Construct an alternative dilepton invariant mass histogram using dressed leptons
// 3. Find jets -- what muon treatment? -- and histogram multiplicity and HT: e/mu difference?
// 4. Isolate the jets from leptons and look again
// 5. Count the number of b-jets, using the ATLAS pT_B > 5 GeV tag definition
// ...
_h["mll"]->fill(mll);
}
/// Post-run histogram manipulations
void finalize() {
// Normalise histograms
const double sf = crossSection() / sumW();
for (auto hist : _h) { scale(hist.second, sf); }
}
/// @name Histograms
//@{
map<string, Histo1DPtr> _h;
bool _eemode;
//@}
};
DECLARE_RIVET_PLUGIN(TUTORIAL);
}
Name: TUTORIAL
Year: 2019
Summary: Tutorial analysis with dilepton and jet observables
Authors:
- Rivet team <rivet-developers@cern.ch>
Description:
'Starting point for an analysis-writing tutorial looking at
(dressed) lepton and (b-)jet reconstruction.'
Options:
- LMODE=EL,MU
BEGIN PLOT /TUTORIAL/.*
LegendAlign=r
END PLOT
BEGIN PLOT /TUTORIAL/mass_*
Title=Dilepton invariant mass spectrum
XLabel=$m_{\ell\ell}$ [GeV]
YLabel=$\text{d}\sigma / \text{d} m_{\ell\ell}$ [pb / GeV]
LegendAlign=l
LegendXPos=0.05
LegendYPos=0.20
END PLOT
BEGIN PLOT /TUTORIAL/jets_*
Title=Exclusive jet multiplicity
XMinorTickMarks=0
XLabel=$N_\text{jets}$
YLabel=$\text{d}\sigma / \text{d} N_\text{jets}$ [pb]
END PLOT
BEGIN PLOT /TUTORIAL/bjets_*
Title=Exclusive $b$-jet multiplicity
XCustomMajorTicks=0 0 1 1 2 2
XLabel=$N_b$
YLabel=$\text{d}\sigma / \text{d} N_b$ [pb]
END PLOT
BEGIN PLOT /TUTORIAL/jet1_pT
Title=Leading jet transverse momentum
XLabel=$p_\text{T}$ [GeV]
YLabel=$\text{d}\sigma / \text{d} p_\text{T}$ [pb / GeV]
END PLOT
BEGIN PLOT /TUTORIAL/HT
Title=Scalar jet-$p_\text{T}$ sum
XLabel=$H_\text{T}$ [GeV]
YLabel=$\text{d}\sigma / \text{d} H_\text{T}$ [pb / GeV]
END PLOT
BEGIN PLOT /TUTORIAL/pTmiss
Title=Missing transverse momentum
XLabel=$p_\text{T}^\text{miss}$ [GeV]
YLabel=$\text{d}\sigma / \text{d} p_\text{T}^\text{miss}$ [pb / GeV]
LegendAlign=l
LegendXPos=0.05
LegendYPos=0.20
RatioPlotYMax=6
RatioPlotYMin=-2
END PLOT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment