rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2011_I878118

J/$\psi$ production at 7 TeV
Experiment: CMS (LHC)
Inspire ID: 878118
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • J/psi production in pp

Measurement of prompt and non-prompt $J/\psi$at 7 TeV by the CMS collaboration. The transverse momentum spectra are measured in a number of rapidity intervals.

Source code: CMS_2011_I878118.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief J/psi at 7 TeV
 9  class CMS_2011_I878118 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2011_I878118);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      declare(UnstableParticles(), "UFS");
22      for (unsigned int ix=0; ix<3; ++ix) {
23        book(_h_psi[ix], {0.,1.2,1.6,2.4});
24        for (unsigned int iy=1; iy<4; ++iy) {
25          if (ix<2) {
26            book(_h_psi[ix]->bin(iy), 1+iy+ix*9, 1, 1);
27          }
28          else {
29            book(_h_psi[ix]->bin(iy), "TMP/total"+toString(iy), refData(4+iy,1,1));
30          }
31        }
32      }
33    }
34
35
36    /// Perform the per-event analysis
37    void analyze(const Event& event) {
38      // Final state of unstable particles to get particle spectra
39      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
40      // loop over onium states
41      for (const Particle & p : ufs.particles(Cuts::pid==443)) {
42        // cuts on rapidity
43        const double y = p.absrap();
44        if (y>2.4) continue;
45        const double pT = p.perp();
46        // prompt
47        unsigned int iprompt = p.fromBottom();
48        _h_psi[iprompt]->fill(y,pT);
49        _h_psi[   2   ]->fill(y,pT);
50      }
51    }
52
53
54    /// Normalise histograms etc., after the run
55    void finalize() {
56      // branching ratio
57      const double br = 0.05961;
58      // 0.5 due folded rapidity
59      scale(_h_psi, 0.5*br*crossSection() / nanobarn/ sumOfWeights());
60      divByGroupWidth(_h_psi);
61      // non-prompt fraction
62      for (unsigned int iy=0; iy<_h_psi[1]->numBins(); ++iy) {
63        Estimate1DPtr tmp;
64        book(tmp, 5+iy, 1, 1);
65        efficiency(_h_psi[1]->bin(iy+1), _h_psi[2]->bin(iy+1),tmp);
66      }
67    }
68
69    /// @}
70
71
72    /// @name Histograms
73    /// @{
74    Histo1DGroupPtr _h_psi[3];
75    /// @}
76
77
78  };
79
80
81  RIVET_DECLARE_PLUGIN(CMS_2011_I878118);
82
83}