Rivet analyses referenceSND_2021_I1942539Cross Section for $e^+e^-\to\eta\eta\gamma$ between 1.17 and 2 GeVExperiment: SND (VEPP-2M) Inspire ID: 1942539 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross Section for $e^+e^-\to\eta\eta\gamma$ between 1.17 and 2 GeV measured by the SND collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: SND_2021_I1942539.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 e+e- > eta eta gamma cross section
10 class SND_2021_I1942539 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(SND_2021_I1942539);
15
16
17 /// @name Analysis methods
18 ///@{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 book(_numEtaEtaGamma, "TMP/EtaEtaGamma" ,refData(1,1,1));
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
43 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49
50 Particles etas = apply<FinalState>(event, "UFS").particles(Cuts::pid==221);
51 // find the first eta
52 for(unsigned int ix=0;ix<etas.size();++ix) {
53 bool matched = false;
54 if(etas[ix].children().empty()) continue;
55 map<long,int> nRes = nCount;
56 int ncount = ntotal;
57 findChildren(etas[ix],nRes,ncount);
58 // find the second eta
59 for(unsigned int iy=ix+1;iy<etas.size();++iy) {
60 if(etas[iy].children().empty()) continue;
61 map<long,int> nResB = nRes;
62 int ncountB = ncount;
63 findChildren(etas[iy],nResB,ncountB);
64 matched = true;
65 for(auto const & val : nResB) {
66 if(val.first==22) {
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 _numEtaEtaGamma->fill(sqrtS()/GeV);
79 break;
80 }
81 }
82 if(matched) break;
83 }
84 }
85
86
87 /// Normalise histograms etc., after the run
88 void finalize() {
89 scale( _numEtaEtaGamma ,crossSection()/ sumOfWeights() /picobarn);
90 Estimate1DPtr mult;
91 book(mult, 1, 1, 1);
92 barchart( _numEtaEtaGamma, mult);
93 }
94
95 ///@}
96
97
98 /// @name Histograms
99 ///@{
100 Histo1DPtr _numEtaEtaGamma;
101 ///@}
102
103
104 };
105
106
107 RIVET_DECLARE_PLUGIN(SND_2021_I1942539);
108
109}
|