Rivet analyses referenceBESIII_2013_I1225275$e^+e^-\to\pi^+\pi^-J/\psi$ at $\sqrt{s}=4.26\,$GeVExperiment: BESIII (BEPC) Inspire ID: 1225275 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (2.1, 2.1) GeV Run details:
Cross section and measurement of mass distributions for $e^+e^-\to\pi^+\pi^-J/\psi$ at $\sqrt{s}=4.26\,$GeV. Source code: BESIII_2013_I1225275.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- to pi+pi- J/psi
9 class BESIII_2013_I1225275 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2013_I1225275);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projections
22 declare(FinalState(), "FS");
23 // histograms
24 book(_h_sigma, 1,1,1);
25 for (unsigned int ix=0;ix<3;++ix) {
26 book(_h_mass[ix], 2, 1, 1+ix);
27 }
28 book(_h_mass[3], 3, 1, 1);
29 }
30
31
32 /// Perform the per-event analysis
33 void analyze(const Event& event) {
34 Particles fs = apply<FinalState>(event, "FS").particles();
35 Particles PSI, other;
36 for (const Particle& p : fs) {
37 Particle parent=p;
38 while (!parent.parents().empty()) {
39 parent=parent.parents()[0];
40 if (parent.abspid()==PID::JPSI) break;
41 }
42 if (parent.abspid()!=PID::JPSI) {
43 other.push_back(p);
44 continue;
45 }
46 bool found=false;
47 for (auto & p : PSI) {
48 // psi already in list
49 if (fuzzyEquals(p.mom(), parent.mom())) {
50 found=true;
51 break;
52 }
53 }
54 if (!found) PSI.push_back(parent);
55 }
56 // J/psi + 2 other particles
57 if (PSI.size()!=1 || other.size()!=2) vetoEvent;
58 // other particles pi+ pi-
59 if (!(other[0].pid()==-other[1].pid() && other[0].abspid()==PID::PIPLUS)) vetoEvent;
60 if (other[0].pid()<0) swap(other[0],other[1]);
61 // cross secrtion
62 _h_sigma->fill("4.26"s);
63 // fill the mass plots
64 double mJpsipi[2] = {(other[0].mom()+PSI[0].mom()).mass(),
65 (other[1].mom()+PSI[0].mom()).mass()};
66 for (unsigned int ix=0; ix<2; ++ix) {
67 _h_mass[ix]->fill(mJpsipi[ix]);
68 }
69 _h_mass[2]->fill((other[0].mom()+other[1].mom()).mass());
70 _h_mass[3]->fill(max(mJpsipi[0],mJpsipi[1]));
71 }
72
73
74 /// Normalise histograms etc., after the run
75 void finalize() {
76 scale(_h_sigma, crossSection()/ sumOfWeights() /picobarn);
77 normalize(_h_mass, 1.0, false);
78 }
79
80 /// @}
81
82
83 /// @name Histograms
84 /// @{
85 BinnedHistoPtr<string> _h_sigma;
86 Histo1DPtr _h_mass[4];
87 /// @}
88
89
90 };
91
92
93 RIVET_DECLARE_PLUGIN(BESIII_2013_I1225275);
94
95}
|