Rivet analyses referenceBESIII_2015_I1406939Cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeVExperiment: BESIII (BEPC) Inspire ID: 1406939 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV by the BESIII collaboration. Source code: BESIII_2015_I1406939.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_{c(1,2)}$ at energies between 4.42 and 4.6 GeV
10 class BESIII_2015_I1406939 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1406939);
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(_nChi1, "TMP/chi1");
25 book(_nChi2, "TMP/chi2");
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 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 const FinalState& fs = apply<FinalState>(event, "FS");
42 map<long,int> nCount;
43 int ntotal(0);
44 for (const Particle& p : fs.particles()) {
45 nCount[p.pid()] += 1;
46 ++ntotal;
47 }
48 const FinalState& ufs = apply<FinalState>(event, "UFS");
49 bool matched = false;
50 for (const Particle& p : ufs.particles(Cuts::pid==20443 or Cuts::pid==445)) {
51 if(p.children().empty()) continue;
52 map<long,int> nRes = nCount;
53 int ncount = ntotal;
54 findChildren(p,nRes,ncount);
55 for (const Particle& p2 : ufs.particles(Cuts::pid==223)) {
56 map<long,int> nRes2 = nRes;
57 int ncount2 = ncount;
58 findChildren(p2,nRes2,ncount2);
59 if(ncount2!=0) continue;
60 matched=true;
61 for(auto const & val : nRes2) {
62 if(val.second!=0) {
63 matched = false;
64 break;
65 }
66 }
67 if(matched) {
68 if(p.pid()==20443)
69 _nChi1->fill();
70 else if(p.pid()==445)
71 _nChi2->fill();
72 break;
73 }
74 }
75 if(matched) break;
76 }
77 }
78
79
80 /// Normalise histograms etc., after the run
81 void finalize() {
82
83 double fact = crossSection()/ sumOfWeights() /picobarn;
84 for(unsigned int ix=2;ix<4;++ix) {
85 double sigma(0.),error(0.);
86 if(ix==2) {
87 sigma = _nChi1->val()*fact;
88 error = _nChi1->err()*fact;
89 }
90 else if(ix==3) {
91 sigma = _nChi2->val()*fact;
92 error = _nChi2->err()*fact;
93 }
94 Estimate1DPtr mult;
95 book(mult, ix, 1, 6);
96 for (auto& b : mult->bins()) {
97 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
98 b.set(sigma, error);
99 }
100 }
101 }
102
103 }
104
105 /// @}
106
107
108 /// @name Histograms
109 /// @{
110 CounterPtr _nChi1,_nChi2;
111 /// @}
112
113
114 };
115
116
117 RIVET_DECLARE_PLUGIN(BESIII_2015_I1406939);
118
119
120}
|