rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2011_I896211

$B^0$ cross section at 7 TeV
Experiment: CMS (LHC)
Inspire ID: 896211
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • bottom meson production

Measurement of the cross section for the production of $B^0$ mesons at 7 TeV by the CMS experiment.

Source code: CMS_2011_I896211.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B0 production
 9  class CMS_2011_I896211 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2011_I896211);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      // projection
22      declare(UnstableParticles(), "UFS");
23      // histograms
24      book(_h_total,1,1,1);
25      book(_h_pT,   2,1,1);
26      book(_h_y,    3,1,1);
27    }
28
29
30    /// Perform the per-event analysis
31    void analyze(const Event& event) {
32      if (_edges.empty()) _edges = _h_total->xEdges();
33      // Final state of unstable particles to get particle spectra
34      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
35      // loop over onium states
36      for (const Particle& p : ufs.particles(Cuts::abspid==511)) {
37        // cuts on pT and rapidity
38        const double y  = p.absrap();
39        const double pT = p.perp();
40        if (pT<5. || y>2.4)  continue;
41        _h_total->fill(_edges[0]);
42        _h_pT->fill(pT);
43        _h_y->fill(y);
44      }
45    }
46
47
48    /// Normalise histograms etc., after the run
49    void finalize() {
50      double fact = 0.5*crossSection()/microbarn/sumOfWeights();
51      scale(_h_total, fact);
52      scale(_h_pT, fact);
53      // 0.5 due +/- y
54      scale(_h_y, 0.5*fact);
55    }
56
57    /// @}
58
59
60    /// @name Histograms
61    /// @{
62    BinnedHistoPtr<string> _h_total;
63    Histo1DPtr _h_pT,_h_y;
64    vector<string> _edges;
65    /// @}
66
67
68  };
69
70
71  RIVET_DECLARE_PLUGIN(CMS_2011_I896211);
72
73}