Rivet analyses referenceBABAR_2006_I709730Cross section for $e^+e^-\to$ $3\pi^+3\pi^-$, $2\pi^+2\pi^-2\pi^0$, $2\pi^+2\pi^-K^+K^-$Experiment: BABAR (PEP-II) Inspire ID: 709730 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross sections for $3\pi^+3\pi^-$, $2\pi^+2\pi^-2\pi^0$ and $2\pi^+2\pi^-K^+K^-$ measured by BaBar using radiative return. Useful to compare hadronization and other non-perturbative models at low energies between 1.3 and 4.5 GeV. Source code: BABAR_2006_I709730.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5
6namespace Rivet {
7
8
9 /// @brief e+e- -> 3pi+3pi-, 2pi+pi-2pi0, 2pi+pi-K+K-
10 class BABAR_2006_I709730 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2006_I709730);
15
16
17 /// @name Analysis methods
18 //@{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 book(_num3pip3pim, "TMP/num3pip3pim" );
26 book(_num2pip2pim2pi0, "TMP/num2pip2pim2pi0" );
27 book(_num2pip2pim2KpKm, "TMP/num2pip2pim2KpKm");
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
42 if(ntotal!=6) vetoEvent;
43 if(nCount[-211]==3 && nCount[211]==3)
44 _num3pip3pim->fill();
45 else if(nCount[-211]==2 && nCount[211]==2 && nCount[111]==2)
46 _num2pip2pim2pi0->fill();
47 else if(nCount[-211]==2 && nCount[211]==2 && nCount[321]==1 && nCount[-321]==1)
48 _num2pip2pim2KpKm->fill();
49 }
50
51
52 /// Normalise histograms etc., after the run
53 void finalize() {
54
55 for(unsigned int ix=1; ix<4; ++ix) {
56 double sigma = 0., error = 0.;
57 if(ix==1) {
58 sigma = _num3pip3pim->val();
59 error = _num3pip3pim->err();
60 }
61 else if(ix==2) {
62 sigma = _num2pip2pim2pi0->val();
63 error = _num2pip2pim2pi0->err();
64 }
65 else if(ix==3) {
66 sigma = _num2pip2pim2KpKm->val();
67 error = _num2pip2pim2KpKm->err();
68 }
69 sigma *= crossSection()/ sumOfWeights() /nanobarn;
70 error *= crossSection()/ sumOfWeights() /nanobarn;
71 Scatter2D temphisto(refData(ix, 1, 1));
72 Scatter2DPtr mult;
73 book(mult, ix, 1, 1);
74 for (size_t b = 0; b < temphisto.numPoints(); b++) {
75 const double x = temphisto.point(b).x();
76 pair<double,double> ex = temphisto.point(b).xErrs();
77 pair<double,double> ex2 = ex;
78 if(ex2.first ==0.) ex2. first=0.0001;
79 if(ex2.second==0.) ex2.second=0.0001;
80 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
81 mult->addPoint(x, sigma, ex, make_pair(error,error));
82 }
83 else {
84 mult->addPoint(x, 0., ex, make_pair(0.,.0));
85 }
86 }
87 }
88 }
89
90 //@}
91
92 // just count the number of events of the types we're looking for
93 CounterPtr _num3pip3pim,_num2pip2pim2pi0,_num2pip2pim2KpKm;
94
95 };
96
97
98 // The hook for the plugin system
99 RIVET_DECLARE_PLUGIN(BABAR_2006_I709730);
100
101
102}
|