Rivet analyses referenceBESIII_2018_I1697377$J/\psi\to e^+e^-\eta$ decaysExperiment: BESIII () Inspire ID: 1697377 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Differential decay rates for $J/\psi\to e^+e^-\eta$ decays. Source code: BESIII_2018_I1697377.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief $J/\psi\to e^+e^-\eta$ decays
9 class BESIII_2018_I1697377 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1697377);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(UnstableParticles(), "UFS");
23 // Book histograms
24 book(_h_m, 1, 1, 1);
25 }
26
27
28 void findDecayProducts(const Particle & mother, unsigned int & nstable, unsigned int & neta,
29 unsigned int & nep, unsigned int & nem, FourMomentum & ptot) {
30 for(const Particle & p : mother.children()) {
31 int id = p.pid();
32 if (id == PID::EMINUS ) {
33 ++nem;
34 ++nstable;
35 ptot += p.momentum();
36 }
37 else if (id == PID::EPLUS) {
38 ++nep;
39 ++nstable;
40 ptot += p.momentum();
41 }
42 else if (id == PID::ETA) {
43 ++neta;
44 ++nstable;
45 }
46 else if ( !p.children().empty() ) {
47 findDecayProducts(p, nstable, neta,nep,nem,ptot);
48 }
49 else
50 ++nstable;
51 }
52 }
53
54
55 /// Perform the per-event analysis
56 void analyze(const Event& event) {
57
58 // Loop over J/psi mesons
59 for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==443)) {
60 unsigned nstable(0),neta(0),nep(0),nem(0);
61 FourMomentum ptot;
62 findDecayProducts(p,nstable,neta,nep,nem,ptot);
63 if(nstable==3 && nem==1 && nem==1 && neta==1) {
64 _h_m->fill(ptot.mass());
65 }
66 }
67
68 }
69
70
71 /// Normalise histograms etc., after the run
72 void finalize() {
73 normalize(_h_m); // normalize to unity
74 }
75
76 /// @}
77
78
79 /// @name Histograms
80 /// @{
81 Histo1DPtr _h_m;
82 /// @}
83
84 };
85
86
87 RIVET_DECLARE_PLUGIN(BESIII_2018_I1697377);
88
89}
|