rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2020_I1738943

Inclusive $\Lambda_c^+$ production at 5.02 TeV
Experiment: CMS (LHC)
Inspire ID: 1738943
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: p+ p+
Beam energies: (2510.0, 2510.0) GeV
Run details:
  • hadronic events

Differential cross section in $p_\perp$ for inclusive $\Lambda_c^+$ production at 5.02 TeV.

Source code: CMS_2020_I1738943.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief Lambda_c+ at 5.02 TeV
 9  class CMS_2020_I1738943 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2020_I1738943);
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_Lambda, 1, 1, 1);
25      book(_h_D, "TMP/h_D", refData(4,1,1));
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 onium states
34      for (const Particle& p : ufs.particles(Cuts::abspid==4122 || Cuts::abspid==421)) {
35        // skip copies due mixing
36        if (p.children().size()==1 && p.children()[0].abspid()==p.abspid()) continue;
37        if (p.absrap()>1.) continue;
38        const double pT = p.perp();
39        if (p.abspid()==4122) {
40          _h_Lambda->fill(pT);
41        }
42        else {
43          _h_D->fill(pT);
44        }
45      }
46    }
47
48
49    /// Normalise histograms etc., after the run
50    void finalize() {
51      // 0.5 from particle/antiparticle
52      const double fact = 0.5*crossSection()/microbarn/sumOfWeights();
53      scale(_h_Lambda, fact);
54      scale(_h_D, fact);
55      Estimate1DPtr tmp;
56      book(tmp, 4, 1, 1);
57      divide(_h_Lambda,_h_D,tmp);
58    }
59
60    /// @}
61
62
63    /// @name Histograms
64    /// @{
65    Histo1DPtr _h_Lambda,_h_D;
66    /// @}
67
68
69  };
70
71
72  RIVET_DECLARE_PLUGIN(CMS_2020_I1738943);
73
74}