Rivet analyses referenceCMS_2011_S9086218Measurement of the inclusive jet cross-section in $pp$ collisions at $\sqrt{s} = 7$ TeVExperiment: CMS (LHC) Inspire ID: 902309 Status: VALIDATED Authors:
Beam energies: (3500.0, 3500.0) GeV Run details:
The inclusive jet cross section is measured in pp collisions with a center-of-mass energy of 7 TeV at the LHC using the CMS experiment. The data sample corresponds to an integrated luminosity of 34 inverse picobarns. The measurement is made for jet transverse momenta in the range 18-1100 GeV and for absolute values of rapidity less than 3. Jets are anti-kt with $R=0.5$, $p_\perp>18$ GeV and $|y|<3.0$. Source code: CMS_2011_S9086218.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/FastJets.hh"
5#include "Rivet/Tools/BinnedHistogram.hh"
6
7namespace Rivet {
8
9
10 // Inclusive jet pT
11 class CMS_2011_S9086218 : public Analysis {
12 public:
13
14 RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2011_S9086218);
15
16
17 /// @{
18
19 /// Book histograms and initialize projections:
20 void init() {
21 const FinalState fs;
22
23 // Initialize the projectors:
24 declare(FastJets(fs, FastJets::ANTIKT, 0.5),"Jets");
25
26 // Book histograms:
27 {Histo1DPtr tmp; _hist_sigma.add(0.0, 0.5, book(tmp, 1, 1, 1));}
28 {Histo1DPtr tmp; _hist_sigma.add(0.5, 1.0, book(tmp, 2, 1, 1));}
29 {Histo1DPtr tmp; _hist_sigma.add(1.0, 1.5, book(tmp, 3, 1, 1));}
30 {Histo1DPtr tmp; _hist_sigma.add(1.5, 2.0, book(tmp, 4, 1, 1));}
31 {Histo1DPtr tmp; _hist_sigma.add(2.0, 2.5, book(tmp, 5, 1, 1));}
32 {Histo1DPtr tmp; _hist_sigma.add(2.5, 3.0, book(tmp, 6, 1, 1));}
33 }
34
35 /// Analysis
36 void analyze(const Event &event) {
37 const double weight = 1.0;
38 const FastJets& fj = apply<FastJets>(event,"Jets");
39 const Jets& jets = fj.jets(Cuts::ptIn(18*GeV, 1100.0*GeV) && Cuts::absrap < 4.7);
40
41 // Fill the relevant histograms:
42 for(const Jet& j : jets) {
43 _hist_sigma.fill(j.absrap(), j.pT(), weight);
44 }
45 }
46
47 /// Finalize
48 void finalize() {
49 _hist_sigma.scale(crossSection()/sumOfWeights()/2.0, this);
50 }
51
52 /// @}
53
54
55 private:
56
57 BinnedHistogram _hist_sigma;
58
59 };
60
61
62
63 RIVET_DECLARE_ALIASED_PLUGIN(CMS_2011_S9086218, CMS_2011_I902309);
64
65}
|