Rivet analyses referenceBESIII_2014_I1323621Cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeVExperiment: BESIII (BEPC) Inspire ID: 1323621 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV by the BESIII collaboration. Source code: BESIII_2014_I1323621.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 Cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV
10 class BESIII_2014_I1323621 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2014_I1323621);
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(_nChi0, "TMP/chi0");
25 }
26
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for( const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 --nRes[child.pid()];
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 const FinalState& fs = apply<FinalState>(event, "FS");
43 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 bool matched = false;
51 for (const Particle& p : ufs.particles(Cuts::pid==10441)) {
52 if(p.children().empty()) continue;
53 map<long,int> nRes = nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 for (const Particle& p2 : ufs.particles(Cuts::pid==223)) {
57 map<long,int> nRes2 = nRes;
58 int ncount2 = ncount;
59 findChildren(p2,nRes2,ncount2);
60 if(ncount2!=0) continue;
61 matched=true;
62 for(auto const & val : nRes2) {
63 if(val.second!=0) {
64 matched = false;
65 break;
66 }
67 }
68 if(matched) {
69 _nChi0->fill();
70 break;
71 }
72 }
73 if(matched) break;
74 }
75 }
76
77
78 /// Normalise histograms etc., after the run
79 void finalize() {
80 double fact = crossSection()/ sumOfWeights() /picobarn;
81 double sigma = _nChi0->val()*fact;
82 double error = _nChi0->err()*fact;
83 Estimate1DPtr mult;
84 book(mult, 1, 1, 1);
85 for (auto& b : mult->bins()) {
86 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
87 b.set(sigma, error);
88 }
89 }
90 }
91
92 /// @}
93
94
95 /// @name Histograms
96 /// @{
97 CounterPtr _nChi0;
98 /// @}
99
100
101 };
102
103
104 RIVET_DECLARE_PLUGIN(BESIII_2014_I1323621);
105
106}
|