Rivet analyses referenceBESIII_2021_I1859248Cross section for $e^+e^-\to\phi\Lambda\bar{\Lambda}$ from 3.51 to 4.6 GeVExperiment: BESIII (BEPC) Inspire ID: 1859248 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\phi\Lambda\bar{\Lambda}$ from 3.51 to 4.6 GeV by the BESIII collaboration. Source code: BESIII_2021_I1859248.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/FinalState.hh"
5
6namespace Rivet {
7
8
9 /// @brief e+e- -> phi lambda lambda bar
10 class BESIII_2021_I1859248 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1859248);
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 // counter
27 book(_c_phiLL, "TMP/c_phiLL");
28 }
29
30 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
31 for(const Particle &child : p.children()) {
32 if(child.children().empty()) {
33 nRes[child.pid()]-=1;
34 --ncount;
35 }
36 else
37 findChildren(child,nRes,ncount);
38 }
39 }
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 const FinalState& fs = apply<FinalState>(event, "FS");
44
45 map<long,int> nCount;
46 int ntotal(0);
47 for (const Particle& p : fs.particles()) {
48 nCount[p.pid()] += 1;
49 ++ntotal;
50 }
51 const FinalState& ufs = apply<FinalState>(event, "UFS");
52 // loop over phi mesons
53 for (const Particle& phi : ufs.particles(Cuts::pid==333)) {
54 bool matched = false;
55 map<long,int> nRes=nCount;
56 int ncount = ntotal;
57 findChildren(phi,nRes,ncount);
58 // then Lambda baryons
59 for (const Particle& lambda : ufs.particles(Cuts::pid==3122)) {
60 map<long,int> nResB = nRes;
61 int ncountB = ncount;
62 findChildren(lambda,nResB,ncountB);
63 for (const Particle& lambar : ufs.particles(Cuts::pid==-3122)) {
64 map<long,int> nResC = nResB;
65 int ncountC = ncountB;
66 findChildren(lambar,nResC,ncountC);
67 for(auto const & val : nResC) {
68 if(val.second!=0) {
69 matched = false;
70 break;
71 }
72 }
73 if(matched) {
74 _c_phiLL->fill();
75 break;
76 }
77 }
78 if(matched) break;
79 }
80 if(matched) break;
81 }
82 }
83
84
85 /// Normalise histograms etc., after the run
86 void finalize() {
87 double fact = crossSection()/ sumOfWeights() /picobarn;
88 double sigma = _c_phiLL->val()*fact;
89 double error = _c_phiLL->err()*fact;
90 Estimate1DPtr mult;
91 book(mult, 1, 1, 1);
92 for (auto& b : mult->bins()) {
93 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
94 b.set(sigma, error);
95 }
96 }
97 }
98
99 ///@}
100
101
102 /// @name Histograms
103 ///@{
104 CounterPtr _c_phiLL;
105 ///@}
106
107
108 };
109
110
111 RIVET_DECLARE_PLUGIN(BESIII_2021_I1859248);
112
113}
|