Rivet analyses referenceSND_2001_I579319Cross section for $e^+e^-2\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$ between 1 and 1.4 GeVExperiment: SND (VEPP-2M) Inspire ID: 579319 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$ between 1 and 1.4 GeV Source code: SND_2001_I579319.cc 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 SND_2001_I579319 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(SND_2001_I579319);
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(_npion1, "TMP/pion1");
27 book(_npion2, "TMP/pion2");
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 const FinalState& fs = apply<FinalState>(event, "FS");
34
35 map<long,int> nCount;
36 int ntotal(0);
37 for (const Particle& p : fs.particles()) {
38 nCount[p.pid()] += 1;
39 ++ntotal;
40 }
41 if(ntotal!=4) vetoEvent;
42 if(nCount[-211]==2&&nCount[211]==2)
43 _npion1->fill();
44 else if(nCount[-211]==1&&nCount[211]==1&&nCount[111]==2)
45 _npion2->fill();
46 }
47
48
49 /// Normalise histograms etc., after the run
50 void finalize() {
51 for(unsigned int ix=1;ix<3;++ix) {
52 double sigma,error;
53 if(ix==1) {
54 sigma = _npion1->val();
55 error = _npion1->err();
56 }
57 else {
58 sigma = _npion2->val();
59 error = _npion2->err();
60 }
61 sigma *= crossSection()/ sumOfWeights() /nanobarn;
62 error *= crossSection()/ sumOfWeights() /nanobarn;
63 Scatter2D temphisto(refData(ix, 1, 1));
64 Scatter2DPtr mult;
65 book(mult, ix, 1, 1);
66 for (size_t b = 0; b < temphisto.numPoints(); b++) {
67 const double x = temphisto.point(b).x();
68 pair<double,double> ex = temphisto.point(b).xErrs();
69 pair<double,double> ex2 = ex;
70 if(ex2.first ==0.) ex2. first=0.0001;
71 if(ex2.second==0.) ex2.second=0.0001;
72 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
73 mult->addPoint(x, sigma, ex, make_pair(error,error));
74 }
75 else {
76 mult->addPoint(x, 0., ex, make_pair(0.,.0));
77 }
78 }
79 }
80 }
81
82 //@}
83
84
85 /// @name Histograms
86 //@{
87 CounterPtr _npion1,_npion2;
88 //@}
89
90
91 };
92
93
94 // The hook for the plugin system
95 RIVET_DECLARE_PLUGIN(SND_2001_I579319);
96
97
98}
|