Rivet analyses referenceDM1_1981_I166964Cross section for $e^+e^-\to\omega\pi^+\pi^-$ at energies between 1.4 and 2.2 GeVExperiment: DM1 (DCI) Inspire ID: 166964 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\omega\pi^+\pi^-$ at energies between 1.4 and 2.2 GeV. Source code: DM1_1981_I166964.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- > omega pi+pi-
10 class DM1_1981_I166964 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(DM1_1981_I166964);
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(_nomega, "TMP/omega" ,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 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 for (const Particle& p : ufs.particles()) {
51 if(p.children().empty()) continue;
52 // find the omega
53 if(p.pid()==223) {
54 map<long,int> nRes = nCount;
55 int ncount = ntotal;
56 findChildren(p,nRes,ncount);
57 // omega pi+pi-
58 if(ncount!=2) continue;
59 bool matched = true;
60 for(auto const & val : nRes) {
61 if(abs(val.first)==211) {
62 if(val.second !=1) {
63 matched = false;
64 break;
65 }
66 }
67 else if(val.second!=0) {
68 matched = false;
69 break;
70 }
71 }
72 if(matched)
73 _nomega->fill(sqrtS()/MeV);
74 }
75 }
76 }
77
78
79 /// Normalise histograms etc., after the run
80 void finalize() {
81 double fact = crossSection()/ sumOfWeights() /nanobarn;
82 scale(_nomega,fact);
83 Estimate1DPtr tmp;
84 book(tmp,1,1,1);
85 barchart(_nomega,tmp);
86 }
87
88 /// @}
89
90
91 /// @name Histograms
92 /// @{
93 Histo1DPtr _nomega;
94 /// @}
95
96
97 };
98
99
100 RIVET_DECLARE_PLUGIN(DM1_1981_I166964);
101
102
103}
|