Rivet analyses referenceBESIII_2021_I1908066Cross section for $J/\psi$ production for energies between 3.645 and 3.8 GeVExperiment: BESIII (BEPC) Inspire ID: 1908066 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for the production of $J/\psi$ for energies between 3.645 and 3.8, i.e near the $\psi(2S)$ resonace measured by BESIII. Source code: BESIII_2021_I1908066.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief J/psi production at low energies
9 class BESIII_2021_I1908066 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1908066);
14
15
16 /// @name Analysis methods
17 ///@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(UnstableParticles(), "UFS");
24 book(_c_psi , 1, 1, 1);
25
26 for (const string& en : _c_psi.binning().edges<0>()) {
27 const double end = std::stod(en)*GeV;
28 if (isCompatibleWithSqrtS(end)) {
29 _ecms = en;
30 break;
31 }
32 }
33 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
40 unsigned int count = ufs.particles(Cuts::pid==443).size();
41 _c_psi->fill(_ecms,count);
42 }
43
44
45 /// Normalise histograms etc., after the run
46 void finalize() {
47 scale(_c_psi, crossSection()/nanobarn/sumOfWeights());
48 }
49
50 ///@}
51
52
53 /// @name Histograms
54 ///@{
55 BinnedHistoPtr<string> _c_psi;
56 string _ecms;
57 ///@}
58
59
60 };
61
62
63 RIVET_DECLARE_PLUGIN(BESIII_2021_I1908066);
64
65}
|