Rivet analyses referenceBESIII_2021_I1997451Cross Section for $e^+e^-\to\phi\pi^*\pi^-$ between 2 and $3.08$ GeVExperiment: BESIII (BEPC) Inspire ID: 1997451 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\phi\pi^*\pi^-$ for energies between 2 and $3.08$ GeV. Source code: BESIII_2021_I1997451.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/FastJets.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6#include "Rivet/Projections/DressedLeptons.hh"
7#include "Rivet/Projections/MissingMomentum.hh"
8#include "Rivet/Projections/DirectFinalState.hh"
9
10namespace Rivet {
11
12
13 /// @brief e+e- -> phi pi+ pi-
14 class BESIII_2021_I1997451 : public Analysis {
15 public:
16
17 /// Constructor
18 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1997451);
19
20
21 /// @name Analysis methods
22 /// @{
23
24 /// Book histograms and initialise projections before the run
25 void init() {
26
27 // Initialise and register projections
28 declare(FinalState(), "FS");
29 declare(UnstableParticles(), "UFS");
30 // counter
31 book(_cphipippim , "TMP/phipippim");
32 }
33
34 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
35 for (const Particle &child : p.children()) {
36 if(child.children().empty()) {
37 nRes[child.pid()]-=1;
38 --ncount;
39 }
40 else
41 findChildren(child,nRes,ncount);
42 }
43 }
44
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 const FinalState& fs = apply<FinalState>(event, "FS");
49
50 map<long,int> nCount;
51 int ntotal(0);
52 for (const Particle& p : fs.particles()) {
53 nCount[p.pid()] += 1;
54 ++ntotal;
55 }
56 const FinalState& ufs = apply<FinalState>(event, "UFS");
57 for (const Particle& p : ufs.particles(Cuts::pid==PID::PHI)) {
58 if(p.children().empty()) continue;
59 map<long,int> nRes=nCount;
60 int ncount = ntotal;
61 findChildren(p,nRes,ncount);
62 // phi pi+pi-
63 if(ncount==2) {
64 bool matched = true;
65 for(auto const & val : nRes) {
66 if(abs(val.first)==211) {
67 if(val.second!=1) {
68 matched = false;
69 break;
70 }
71 }
72 else if(val.second!=0) {
73 matched = false;
74 break;
75 }
76 }
77 if(matched) {
78 _cphipippim->fill();
79 break;
80 }
81 }
82 }
83 }
84
85
86 /// Normalise histograms etc., after the run
87 void finalize() {
88 double sigma = _cphipippim->val()* crossSection()/ sumOfWeights() /picobarn;
89 double error = _cphipippim->err()* crossSection()/ sumOfWeights() /picobarn;
90 Scatter2D temphisto(refData(1, 1, 1));
91 Scatter2DPtr mult;
92 book(mult, 1, 1, 1);
93 for (size_t b = 0; b < temphisto.numPoints(); b++) {
94 const double x = temphisto.point(b).x();
95 pair<double,double> ex = temphisto.point(b).xErrs();
96 pair<double,double> ex2 = ex;
97 if(ex2.first ==0.) ex2. first=0.0001;
98 if(ex2.second==0.) ex2.second=0.0001;
99 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
100 mult->addPoint(x, sigma, ex, make_pair(error,error));
101 }
102 else {
103 mult->addPoint(x, 0., ex, make_pair(0.,.0));
104 }
105 }
106 }
107
108 /// @}
109
110
111 /// @name Histograms
112 /// @{
113 CounterPtr _cphipippim;
114 /// @}
115
116
117 };
118
119
120 RIVET_DECLARE_PLUGIN(BESIII_2021_I1997451);
121
122}
|