rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2011_S8941262

Production cross-sections of muons from $b$ hadron decays in $pp$ collisions
Experiment: CMS (LHC)
Inspire ID: 884811
Status: VALIDATED
Authors:
  • Wolfram Erdmann
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • Inclusive QCD at 7 TeV, with no pT cuts.

A measurement of the $b$-hadron production cross-section in proton-proton collisions at $\sqrt{s} = 7$ TeV. The dataset, corresponding to 85 inverse nanobarns, was recorded with the CMS experiment at the LHC using a low-threshold single-muon trigger. Events are selected by the presence of a muon with transverse momentum greater than 6 GeV with respect to the beam direction and pseudorapidity less than 2.1. The transverse momentum of the muon with respect to the closest jet discriminates events containing $b$ hadrons from background. The inclusive $b$-hadron production cross section is presented as a function of muon transverse momentum and pseudorapidity.

Source code: CMS_2011_S8941262.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/IdentifiedFinalState.hh"
 4#include "Rivet/Particle.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// Production cross-sections of muons from $b$ hadron decays in $pp$ collisions
10  class CMS_2011_S8941262 : public Analysis {
11  public:
12
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2011_S8941262);
14
15
16    /// Book histograms and initialise projections before the run
17    void init() {
18      book(_h_total ,1, 1, 1);
19      book(_h_mupt  ,2, 1, 1);
20      book(_h_mueta ,3, 1, 1);
21      nbtot=0.;   nbmutot=0.;
22
23      IdentifiedFinalState ifs(Cuts::abseta < 2.1 && Cuts::pT > 6*GeV);
24      ifs.acceptIdPair(PID::MUON);
25      declare(ifs, "IFS");
26    }
27
28
29    /// Perform the per-event analysis
30    void analyze(const Event& event) {
31      const double weight = 1.0;
32
33      // a b-quark must have been produced
34      /// @todo Ouch. Use hadron tagging...
35      int nb = 0;
36      for(ConstGenParticlePtr p: HepMCUtils::particles(event.genEvent())) {
37        if (abs(p->pdg_id()) == PID::BQUARK) nb += 1;
38      }
39      if (nb == 0) vetoEvent;
40      nbtot += weight;
41
42      // Event must contain a muon
43      Particles muons = apply<IdentifiedFinalState>(event, "IFS").particlesByPt();
44      if (muons.size() < 1) vetoEvent;
45      nbmutot += weight;
46
47      FourMomentum pmu = muons[0].momentum();
48      _h_total->fill(      7000/GeV, weight);
49      _h_mupt->fill(   pmu.pT()/GeV, weight);
50      _h_mueta->fill( pmu.eta()/GeV, weight);
51    }
52
53
54    /// Normalise histograms etc., after the run
55    void finalize() {
56      scale(_h_total, crossSection()/microbarn/sumOfWeights());
57      scale(_h_mupt,  crossSection()/nanobarn/sumOfWeights());
58      scale(_h_mueta, crossSection()/nanobarn/sumOfWeights());
59    }
60
61
62  private:
63
64    /// @todo Convert to counters?
65    double nbtot, nbmutot;
66
67    /// @{
68    Histo1DPtr _h_total;
69    Histo1DPtr _h_mupt;
70    Histo1DPtr _h_mueta;
71    /// @}
72
73  };
74
75
76
77  RIVET_DECLARE_ALIASED_PLUGIN(CMS_2011_S8941262, CMS_2011_I884811);
78
79}