rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2023_I2643022

Mass distributions in $B^+\to J/\psi\eta^\prime K^+$
Experiment: LHCB (LHC)
Inspire ID: 2643022
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: * *
Beam energies: ANY
Run details:
  • Any process producing B+, originally pp

Mass distributions in $B^+\to J/\psi\eta^\prime K^+$. Background subtracted data extracted from figure 2 in the paper.

Source code: LHCB_2023_I2643022.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4#include "Rivet/Projections/DecayedParticles.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// @brief B+ -> J/psi eta' K+
10  class LHCB_2023_I2643022 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2023_I2643022);
15
16
17    /// @name Analysis methods
18    /// @{
19
20    /// Book histograms and initialise projections before the run
21    void init() {
22      // projection
23      UnstableParticles ufs = UnstableParticles(Cuts::abspid==521);
24      declare(ufs, "UFS");
25      DecayedParticles BP(ufs);
26      BP.addStable(PID::ETAPRIME);
27      BP.addStable(PID::JPSI);
28      declare(BP, "BP");
29      // histos
30      for (unsigned int ix=0; ix<3; ++ix) {
31        book(_h[ix], 1, 1, 1+ix);
32      }
33    }
34
35
36    /// Perform the per-event analysis
37    void analyze(const Event& event) {
38      static const map<PdgId,unsigned int> mode   = { { 321,1}, { 331,1},{ 443,1}};
39      static const map<PdgId,unsigned int> modeCC = { {-321,1}, { 331,1},{ 443,1}};
40      DecayedParticles BP = apply<DecayedParticles>(event, "BP");
41      // loop over particles
42      for (unsigned int ix=0; ix<BP.decaying().size(); ++ix) {
43      	int sign = 1;
44      	if (BP.decaying()[ix].pid()>0 && BP.modeMatches(ix,3,mode)) {
45      	  sign=1;
46      	}
47      	else if (BP.decaying()[ix].pid()<0 && BP.modeMatches(ix,3,modeCC)) {
48      	  sign=-1;
49      	}
50      	else {
51      	  continue;
52        }
53        const Particle& Kp  = BP.decayProducts()[ix].at( sign*321)[0];
54        const Particle& eta = BP.decayProducts()[ix].at(      331)[0];
55        const Particle& psi = BP.decayProducts()[ix].at(      443)[0];
56        _h[0]->fill((Kp .mom()+eta.mom()).mass());
57        _h[1]->fill((psi.mom()+eta.mom()).mass());
58        _h[2]->fill((psi.mom()+Kp .mom()).mass());
59      }
60    }
61
62
63    /// Normalise histograms etc., after the run
64    void finalize() {
65      normalize(_h, 1.0, false);
66    }
67
68    /// @}
69
70
71    /// @name Histograms
72    /// @{
73    Histo1DPtr _h[3];
74    /// @}
75
76
77  };
78
79
80  RIVET_DECLARE_PLUGIN(LHCB_2023_I2643022);
81
82}