rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMD3_2019_I1770428

$e^+e^-\to K^0_SK^0_S\pi^+\pi^-$ below 2 GeV
Experiment: CMD3 (VEPP-2M)
Inspire ID: 1770428
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e- e+
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to K^0_SK^0_S\pi^+\pi^-$ below 2 GeV by the CMD3 experiment

Source code: CMD3_2019_I1770428.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief CMD3 K0 K0 pi+pi-
 9  class CMD3_2019_I1770428 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2019_I1770428);
14
15
16    /// @name Analysis methods
17    //@{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21
22      // Initialise and register projections
23      declare(FinalState(), "FS");
24
25      // Book histograms
26      book(_cK0K0pippim , "TMP/K0K0pippim");
27      book( _h_pipi ,2,1,1);
28      book( _h_total,2,1,2);
29    }
30
31
32    /// Perform the per-event analysis
33    void analyze(const Event& event) {
34      const FinalState& fs = apply<FinalState>(event, "FS");
35
36      map<long,int> nCount;
37      int ntotal(0);
38      Particles pip,k0;
39      for (const Particle& p : fs.particles()) {
40	nCount[p.pid()] += 1;
41	if(p.abspid()==211)
42	  pip.push_back(p);
43	else if(p.pid()==310)
44	  k0.push_back(p);
45	++ntotal;
46      }
47      if(ntotal==4 && nCount[310]==2 && nCount[211]==1 && nCount[-211]==1) {
48	_cK0K0pippim->fill();
49	FourMomentum ppipi = pip[0].momentum()+pip[1].momentum();
50	_h_pipi->fill(ppipi.mass()/MeV);
51	for(unsigned int ix=0;ix<2;++ix)
52	  _h_total->fill((ppipi+k0[ix].momentum()).mass()/MeV);
53      }
54    }
55
56
57    /// Normalise histograms etc., after the run
58    void finalize() {
59      normalize(_h_pipi );
60      normalize(_h_total);
61      double fact = crossSection()/ sumOfWeights() /nanobarn;
62      double sigma = _cK0K0pippim->val()*fact;
63      double error = _cK0K0pippim->err()*fact;
64      Scatter2D temphisto(refData(1, 1, 6));
65      Scatter2DPtr  mult;
66      book(mult, 1, 1, 6);
67      for (size_t b = 0; b < temphisto.numPoints(); b++) {
68	const double x  = temphisto.point(b).x();
69	pair<double,double> ex = temphisto.point(b).xErrs();
70	pair<double,double> ex2 = ex;
71	if(ex2.first ==0.) ex2. first=0.0001;
72	if(ex2.second==0.) ex2.second=0.0001;
73	if (inRange(sqrtS()/MeV, x-ex2.first, x+ex2.second)) {
74	  mult->addPoint(x, sigma, ex, make_pair(error,error));
75	}
76	else {
77	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
78	}
79      }
80    }
81
82    //@}
83
84
85    /// @name Histograms
86    //@{
87    CounterPtr _cK0K0pippim;
88    Histo1DPtr _h_pipi, _h_total;
89    //@}
90
91
92  };
93
94
95  // The hook for the plugin system
96  RIVET_DECLARE_PLUGIN(CMD3_2019_I1770428);
97
98
99}