Rivet analyses referenceBESII_2007_I762901Cross-sections for light hadrons at 3.650 and 3.773 GeVExperiment: BESII (BEPC) Inspire ID: 762901 Status: VALIDATED Authors:
Beam energies: (1.8, 1.8); (1.9, 1.9) GeV Run details:
Cross section for $e^+e^-\to 2\pi^+2\pi^-K^+K^-$, $\pi^+\pi^-2K^+2K^-$, $2\pi^+2\pi^-p\bar{p}$, $3\pi^+3\pi^-$, $2\pi^+2\pi^-K^+K^-\pi^0$, $\rho^0\pi^+\pi^-$, $\rho^0K^+K^-$, $\rho^0p\bar{p}$, $K^{*0}K^-\pi^++\text{c.c.}$ at 3.650 and 3.773 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESII_2007_I762901.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-sections for light hadrons at 3.650 and 3.773 GeV
10 class BESII_2007_I762901 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2007_I762901);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 for(unsigned int ix=1;ix<11;++ix) {
29 if(ix==6) continue;
30 book(_nMeson[ix], 1,1,ix);
31 }
32 for (const string& en : _nMeson[1].binning().edges<0>()) {
33 const double end = std::stod(en)*GeV;
34 if (isCompatibleWithSqrtS(end)) {
35 _ecms = en;
36 break;
37 }
38 }
39 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
40 }
41
42 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
43 for(const Particle &child : p.children()) {
44 if(child.children().empty()) {
45 nRes[child.pid()]-=1;
46 --ncount;
47 }
48 else
49 findChildren(child,nRes,ncount);
50 }
51 }
52
53 /// Perform the per-event analysis
54 void analyze(const Event& event) {
55 const FinalState& fs = apply<FinalState>(event, "FS");
56
57 map<long,int> nCount;
58 int ntotal(0);
59 for (const Particle& p : fs.particles()) {
60 nCount[p.pid()] += 1;
61 ++ntotal;
62 }
63 if(ntotal==6) {
64 if(nCount[211]==2 && nCount[-211]==2 && nCount[321]==1 && nCount[-321]==1)
65 _nMeson[1]->fill(_ecms);
66 else if(nCount[211]==1 && nCount[-211]==1 && nCount[321]==2 && nCount[-321]==2) {
67 if(_ecms=="3.773") _nMeson[2]->fill(_ecms);
68 }
69 else if(nCount[211]==2 && nCount[-211]==2 && nCount[2212]==1 && nCount[-2212]==1)
70 _nMeson[3]->fill(_ecms);
71 else if(nCount[211]==3 && nCount[-211]==3)
72 _nMeson[4]->fill(_ecms);
73 }
74 else if(ntotal==7) {
75 if(nCount[211]==2 && nCount[-211]==2 && nCount[321]==1 && nCount[-321]==1 && nCount[111]==1)
76 _nMeson[5]->fill(_ecms);
77 }
78 const FinalState& ufs = apply<FinalState>(event, "UFS");
79 for (const Particle& p : ufs.particles()) {
80 if(p.children().empty()) continue;
81 if(p.pid()!=113 && abs(p.pid())!=313) continue;
82 map<long,int> nRes = nCount;
83 int ncount = ntotal;
84 findChildren(p,nRes,ncount);
85 if(p.pid()==113) {
86 if(ncount!=2) continue;
87 unsigned int nPi(0),nK(0),nProt(0);
88 bool matched = true;
89 for(auto const & val : nRes) {
90 if(abs(val.first)==211 && val.second==1) {
91 nPi+=1;
92 }
93 else if(abs(val.first)==321 && val.second==1) {
94 nK+=1;
95 }
96 else if(abs(val.first)==2212 && val.second==1) {
97 nProt+=1;
98 }
99 else if(val.second!=0) {
100 matched = false;
101 break;
102 }
103 }
104 if(matched) {
105 if(nProt==2 && nPi==0 && nK==0)
106 _nMeson[9]->fill(_ecms);
107 else if(nProt==0 && nPi==2 && nK==0)
108 _nMeson[7]->fill(_ecms);
109 else if(nProt==0 && nPi==0 && nK==2)
110 _nMeson[8]->fill(_ecms);
111 }
112 }
113 else if(abs(p.pid())==313) {
114 if(ncount!=2) continue;
115 unsigned int npi(0),nK(0);
116 bool matched = true;
117 int ipi = p.pid()==313 ? 211 : -211;
118 int iK = p.pid()==313 ? -321 : 321;
119 for(auto const & val : nRes) {
120 if(abs(val.first)== ipi && val.second==1) {
121 npi+=1;
122 }
123 else if(abs(val.first)==iK && val.second==1) {
124 nK+=1;
125 }
126 else if(val.second!=0) {
127 matched = false;
128 break;
129 }
130 }
131 if(matched) {
132 if(npi==1&&nK==1)
133 _nMeson[10]->fill(_ecms);
134 }
135 }
136 }
137 }
138
139
140 /// Normalise histograms etc., after the run
141 void finalize() {
142 double fact = crossSection()/ sumOfWeights() /picobarn;
143 for(unsigned int ix=1;ix<11;++ix) {
144 if(ix==6) continue;
145 scale(_nMeson[ix],fact);
146 }
147 }
148
149 /// @}
150
151
152 /// @name Histograms
153 /// @{
154 BinnedHistoPtr<string> _nMeson[11];
155 string _ecms;
156 /// @}
157
158
159 };
160
161
162 RIVET_DECLARE_PLUGIN(BESII_2007_I762901);
163
164}
|