Rivet analyses referenceBESIII_2017_I1596897Cross Section for $e^+e^-\to\eta h_c$ for energies between 4.085 and 4.6 GeVExperiment: BESIII (BEPC) Inspire ID: 1596897 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for $e^+e^-\to\eta h_c$ for energies between 4.085 and 4.6 GeV measured by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2017_I1596897.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief e+ e- > eta h_c
10 class BESIII_2017_I1596897 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2017_I1596897);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(FinalState(), "FS");
23 declare(UnstableParticles(), "UFS");
24 book(_nhc, "TMP/h_c");
25 }
26
27 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
28 for (const Particle &child : p.children()) {
29 if(child.children().empty()) {
30 --nRes[child.pid()];
31 --ncount;
32 }
33 else
34 findChildren(child,nRes,ncount);
35 }
36 }
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41 map<long,int> nCount;
42 int ntotal(0);
43 for (const Particle& p : fs.particles()) {
44 nCount[p.pid()] += 1;
45 ++ntotal;
46 }
47 const FinalState& ufs = apply<FinalState>(event, "UFS");
48 // loop over h_c
49 for (const Particle& hc : ufs.particles(Cuts::pid==10443)) {
50 if(hc.children().empty()) continue;
51 map<long,int> nRes = nCount;
52 int ncount = ntotal;
53 findChildren(hc,nRes,ncount);
54 bool matched = false;
55 // loop over eta
56 for(const Particle & eta : ufs.particles(Cuts::pid==221)) {
57 // check eta not child of h_c
58 Particle parent=eta;
59 while(!parent.parents().empty()) {
60 parent=parent.parents()[0];
61 if(parent.abspid()==10443) break;
62 }
63 if(fuzzyEquals(parent.momentum(),hc.momentum())) continue;
64 map<long,int> nRes2 = nRes;
65 int ncount2 = ncount;
66 findChildren(eta,nRes2,ncount2);
67 if(ncount2!=0) continue;
68 matched=true;
69 for(auto const & val : nRes2) {
70 if(val.second!=0) {
71 matched = false;
72 break;
73 }
74 }
75 if(matched) {
76 _nhc->fill();
77 break;
78 }
79 }
80 if(matched) break;
81 }
82 }
83
84
85 /// Normalise histograms etc., after the run
86 void finalize() {
87 double sigma = _nhc->val();
88 double error = _nhc->err();
89 sigma *= crossSection()/ sumOfWeights() /picobarn;
90 error *= crossSection()/ sumOfWeights() /picobarn;
91 Estimate1DPtr mult;
92 book(mult, 1, 1, 1);
93 for (auto& b : mult->bins()) {
94 if (inRange(sqrtS()/MeV, b.xMin(), b.xMax())) {
95 b.set(sigma, error);
96 }
97 }
98 }
99
100 /// @}
101
102
103 /// @name Histograms
104 /// @{
105 CounterPtr _nhc;
106 /// @}
107
108
109 };
110
111
112 RIVET_DECLARE_PLUGIN(BESIII_2017_I1596897);
113
114}
|