rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2017_I1485195

$B^+$ meson production at 13 TeV
Experiment: CMS (LHC)
Inspire ID: 1485195
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • bottom hadron production

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

Source code: CMS_2017_I1485195.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B+ meson at 13 TeV
 9  class CMS_2017_I1485195 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2017_I1485195);
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_pT, 5, 1, 3);
25      book(_h_y, 6, 1, 3);
26    }
27
28
29    /// Perform the per-event analysis
30    void analyze(const Event& event) {
31      // Final state of unstable particles to get particle spectra
32      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
33      // loop over B+ states
34      for (const Particle& p : ufs.particles(Cuts::abspid==521)) {
35        // cuts on pT and rapidity
36        const double y  = p.absrap();
37        const double pT = p.perp();
38        if ( (pT<17. && y<1.45) || (pT>=17. && y<2.1) ) {
39          _h_pT->fill(pT);
40        }
41        if ( (pT>10. && pT<100. && y<1.45) || (pT>17. && pT<100. && y>=1.45 && y<2.1)) {
42          _h_y->fill(y);
43        }
44      }
45    }
46
47
48    /// Normalise histograms etc., after the run
49    void finalize() {
50      // @todo Why 0.5 twice?
51      const double fact = 0.5*crossSection()/microbarn/sumOfWeights();
52      scale(_h_pT, fact);
53      // 0.5 from +/- y
54      scale(_h_y, 0.5*fact);
55    }
56
57    /// @}
58
59
60    /// @name Histograms
61    /// @{
62    Histo1DPtr _h_pT,_h_y;
63    /// @}
64
65
66  };
67
68
69  RIVET_DECLARE_PLUGIN(CMS_2017_I1485195);
70
71}