Rivet analyses referenceCMD2_1999_I483994Cross section for $e^+e^-\to2\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$ below 1.38 GeVExperiment: CMD2 (VEPP-2M) Inspire ID: 483994 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to2\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$ below 1.38 GeV Source code: CMD2_1999_I483994.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6
7namespace Rivet {
8
9
10 /// @brief Add a short analysis description here
11 class CMD2_1999_I483994 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(CMD2_1999_I483994);
16
17
18 /// @name Analysis methods
19 //@{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26 book(_ncharged, "TMP/charged");
27 book(_nneutral, "TMP/neutral");
28 book(_nomega, "TMP/omega");
29 }
30
31 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
32 for (const Particle &child : p.children()) {
33 if(child.children().empty()) {
34 --nRes[child.pid()];
35 --ncount;
36 }
37 else
38 findChildren(child,nRes,ncount);
39 }
40 }
41
42 /// Perform the per-event analysis
43 void analyze(const Event& event) {
44 const FinalState& fs = apply<FinalState>(event, "FS");
45
46 map<long,int> nCount;
47 int ntotal(0);
48 for (const Particle& p : fs.particles()) {
49 nCount[p.pid()] += 1;
50 ++ntotal;
51 }
52 if(ntotal==4) {
53 if( nCount[211] == 2 && nCount[-211] == 2 )
54 _ncharged->fill();
55 else if( nCount[211] == 1 && nCount[-211] == 1 && nCount[111] == 2)
56 _nneutral->fill();
57 }
58
59
60 const FinalState& ufs = apply<FinalState>(event, "UFS");
61 for (const Particle& p : ufs.particles()) {
62 if(p.children().empty()) continue;
63 // find the omega
64 if(p.pid()==223) {
65 map<long,int> nRes = nCount;
66 int ncount = ntotal;
67 findChildren(p,nRes,ncount);
68 // omega pi+pi-
69 if(ncount!=1) continue;
70 bool matched = true;
71 for(auto const & val : nRes) {
72 if(abs(val.first)==111) {
73 if(val.second !=1) {
74 matched = false;
75 break;
76 }
77 }
78 else if(val.second!=0) {
79 matched = false;
80 break;
81 }
82 }
83 if(matched)
84 _nomega->fill();
85 }
86 }
87 }
88
89
90 /// Normalise histograms etc., after the run
91 void finalize() {
92 for(unsigned int ix=1;ix<4;++ix) {
93 double sigma = 0., error = 0.;
94 if(ix==1) {
95 sigma = _ncharged->val();
96 error = _ncharged->err();
97 }
98 else if(ix==2) {
99 sigma = _nneutral->val();
100 error = _nneutral->err();
101 }
102 else if(ix==3) {
103 sigma = _nomega->val();
104 error = _nomega->err();
105 }
106 sigma *= crossSection()/ sumOfWeights() /nanobarn;
107 error *= crossSection()/ sumOfWeights() /nanobarn;
108 Scatter2D temphisto(refData(ix, 1, 1));
109 Scatter2DPtr mult;
110 book(mult, ix, 1, 1);
111 for (size_t b = 0; b < temphisto.numPoints(); b++) {
112 const double x = temphisto.point(b).x();
113 pair<double,double> ex = temphisto.point(b).xErrs();
114 pair<double,double> ex2 = ex;
115 if(ex2.first ==0.) ex2. first=0.0001;
116 if(ex2.second==0.) ex2.second=0.0001;
117 if (inRange(sqrtS()/MeV, x-ex2.first, x+ex2.second)) {
118 mult->addPoint(x, sigma, ex, make_pair(error,error));
119 }
120 else {
121 mult->addPoint(x, 0., ex, make_pair(0.,.0));
122 }
123 }
124 }
125 }
126
127 //@}
128
129
130 /// @name Histograms
131 //@{
132 CounterPtr _ncharged,_nneutral,_nomega;
133 //@}
134
135
136 };
137
138
139 // The hook for the plugin system
140 RIVET_DECLARE_PLUGIN(CMD2_1999_I483994);
141
142
143}
|