rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2005_I676691

$e^+e^- \to$ $2\pi^+2\pi^-$, $K^+K^-\pi^+\pi^-$ and $2K^+2K^-$ cross-sections between the threshold to 4.5 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 676691
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D71 (2005) 052001, 2005
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

$e^+e^- \to$ $2\pi^+2\pi^-$, $K^+K^-\pi^+\pi^-$ and $2K^+2K^-$ cross-sections measured by BaBar using radiative return from threshold to 4.5 GeV.

Source code: BABAR_2005_I676691.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 BABAR_2005_I676691 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2005_I676691);
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(_c2pip2pim  , "TMP/2pip2pim");
26      book(_cKpKmpippim, "TMP/KpKmpippim");
27      book(_c2Kp2Km    , "TMP/2Kp2Km");
28
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      for (const Particle& p : fs.particles()) {
39	nCount[p.pid()] += 1;
40	++ntotal;
41      }
42
43      if(ntotal!=4) vetoEvent;
44
45      if( nCount[211]==2 && nCount[-211]==2)
46	_c2pip2pim->fill();
47      else if(nCount[321]==1 && nCount[-321]==1 && nCount[211]==1 && nCount[-211]==1)
48	_cKpKmpippim->fill();
49      else if( nCount[321]==2 && nCount[-321]==2)
50	_c2Kp2Km->fill();
51    }
52
53
54    /// Normalise histograms etc., after the run
55    void finalize() {
56
57      for (unsigned int ix=1;ix<4;++ix) {
58        double sigma = 0., error = 0.;
59        if(ix==1) {
60          sigma =  _c2pip2pim->val();
61          error =  _c2pip2pim->err();
62        }
63        else if(ix==2) {
64          sigma = _cKpKmpippim->val();
65          error = _cKpKmpippim->err();
66        }
67        else if(ix==3) {
68          sigma =  _c2Kp2Km->val();
69          error =  _c2Kp2Km->err();
70        }
71        sigma *= crossSection()/ sumOfWeights() /nanobarn;
72        error *= crossSection()/ sumOfWeights() /nanobarn;
73        Estimate1DPtr  mult;
74        book(mult, ix, 1, 1);
75        for (auto& b : mult->bins()) {
76          if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
77            b.set(sigma, error);
78          }
79        }
80      }
81    }
82
83    /// @}
84
85
86    /// @name Histograms
87    /// @{
88    CounterPtr _c2pip2pim, _cKpKmpippim, _c2Kp2Km;
89    /// @}
90
91
92  };
93
94
95  RIVET_DECLARE_PLUGIN(BABAR_2005_I676691);
96
97
98}