rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2023_I2637232

$K^0_S$ momentum spectrum in $D\to K^0_SX$ decays
Experiment: BESIII (BEPC)
Inspire ID: 2637232
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (1.9, 1.9) GeV
Run details:
  • e+e- to D Dbat at psi(3770)

Measurement of $K^0_S$ momentum spectrum in $D\to K^0_SX$ decays. The uncorrected data was read from the figures in the paper and the background given subtracted.

Source code: BESIII_2023_I2637232.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief D -> KS0 X
 9  class BESIII_2023_I2637232 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2637232);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      // projections
22      declare(UnstableParticles(Cuts::pid==30443), "UFS");
23      // histos
24      for (unsigned int ix=0; ix<2; ++ix) {
25        book(_h[ix], 1, 1, 1+ix);
26      }
27    }
28
29    void findChildren(const Particle& p, Particles& K0) {
30      for (const Particle& child : p.children()) {
31        if (child.pid()==310) {
32          K0.push_back(child);
33        }
34        else if (!child.children().empty()) {
35          findChildren(child,K0);
36        }
37      }
38    }
39
40    /// Perform the per-event analysis
41    void analyze(const Event& event) {
42      const Particles& psi = apply<UnstableParticles>(event, "UFS").particles();
43      if (psi.size()!=1) vetoEvent;
44      for (const Particle& D : psi[0].children()) {
45        int ih=-1;
46        if      (D.abspid()==411) ih=0;
47        else if (D.abspid()==421) ih=1;
48        else {
49          continue;
50        }
51        Particles K0;
52        findChildren(D, K0);
53        for (const Particle& p : K0) {
54          _h[ih]->fill(p.mom().p3().mod());
55        }
56      }
57    }
58
59
60    /// Normalise histograms etc., after the run
61    void finalize() {
62      normalize(_h, 1.0, false);
63    }
64
65    /// @}
66
67
68    /// @name Histograms
69    /// @{
70    Histo1DPtr _h[2];
71    /// @}
72
73
74  };
75
76
77  RIVET_DECLARE_PLUGIN(BESIII_2023_I2637232);
78
79}