Rivet analyses referenceDM1_1982_I169382Cross section for $e^+e^-\to K^+K^-\pi^+\pi^-$ between 1.3 and 2.2 GeVExperiment: DM1 (DCI) Inspire ID: 169382 Status: VALIDATED Authors:
Beam energies: ANY Run details:
1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class DM1_1982_I169382 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(DM1_1982_I169382);
14
15
16 /// @name Analysis methods
17 //@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(FinalState(), "FS");
23 book(_cKpKmpippim, "TMP/KpKmpippim");
24 }
25
26
27 /// Perform the per-event analysis
28 void analyze(const Event& event) {
29 const FinalState& fs = apply<FinalState>(event, "FS");
30
31 map<long,int> nCount;
32 int ntotal(0);
33 for (const Particle& p : fs.particles()) {
34 nCount[p.pid()] += 1;
35 ++ntotal;
36 }
37
38 if(ntotal!=4) vetoEvent;
39 if(nCount[321]==1 && nCount[-321]==1 && nCount[211]==1 && nCount[-211]==1)
40 _cKpKmpippim->fill();
41 }
42
43
44 /// Normalise histograms etc., after the run
45 void finalize() {
46 double sigma = _cKpKmpippim->val();
47 double error = _cKpKmpippim->err();
48 sigma *= crossSection()/ sumOfWeights() /nanobarn;
49 error *= crossSection()/ sumOfWeights() /nanobarn;
50 Scatter2D temphisto(refData(1, 1, 1));
51 Scatter2DPtr mult;
52 book(mult, 1, 1, 1);
53 for (size_t b = 0; b < temphisto.numPoints(); b++) {
54 const double x = temphisto.point(b).x();
55 pair<double,double> ex = temphisto.point(b).xErrs();
56 pair<double,double> ex2 = ex;
57 if(ex2.first ==0.) ex2. first=0.0001;
58 if(ex2.second==0.) ex2.second=0.0001;
59 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
60 mult->addPoint(x, sigma, ex, make_pair(error,error));
61 }
62 else {
63 mult->addPoint(x, 0., ex, make_pair(0.,.0));
64 }
65 }
66 }
67
68 //@}
69
70
71 /// @name Histograms
72 //@{
73 CounterPtr _cKpKmpippim;
74 //@}
75
76
77 };
78
79
80 // The hook for the plugin system
81 RIVET_DECLARE_PLUGIN(DM1_1982_I169382);
82
83
84}
|