Rivet analyses


title: CLEO_1999_I474676

Cross Section for $e^+e^-\to\Upsilon(2,3S)\gamma$ at 10.52, 10.58 GeV

Experiment: CLEO (CESR)

Inspire ID: 474676

Status: VALIDATED

Authors: - Peter Richardson

References: - Phys.Rev. D59 (1999) 052003, 1999

Beams: e+ e-

Beam energies: (5.3, 5.3); (5.3, 5.3)GeV

Run details: - e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\Upsilon(2,3S)\gamma$ at 10.52 and 10.58 by CLEO.

Source code:CLEO_1999_I474676.cc

```c++ // -- C++ --

include "Rivet/Analysis.hh"

include "Rivet/Projections/FinalState.hh"

include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {

/// @brief e+ e- > Upsilon(2,3S) gamma at 10.52 and 10.58 class CLEO_1999_I474676 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1999_I474676);


/// @name Analysis methods
/// @{

/// Book histograms and initialise projections before the run
void init() {
  declare(FinalState(), "FS");
  declare(UnstableParticles(Cuts::pid == 100553 || Cuts::pid == 200553), "UFS");
  book(_nUps2pipi, 1, 1, 2);
  book(_nUps3pipi, 1, 1, 1);
  for (const string& en : _nUps2pipi.binning().edges<0>()) {
    const double eval = stod(en);
    if (isCompatibleWithSqrtS(eval)) {
      _sqs = en;
      break;
    }
  }
  raiseBeamErrorIf(_sqs.empty());
}

void findChildren(const Particle& p, map<long, int>& nRes, int& ncount) const {
  for (const Particle& child : p.children()) {
    if (child.children().empty()) {
      --nRes[child.pid()];
      --ncount;
    }
    else {
      findChildren(child, nRes, ncount);
    }
  }
}

/// Perform the per-event analysis
void analyze(const Event& event) {
  const FinalState& fs = apply<FinalState>(event, "FS");
  map<long, int> nCount;
  int ntotal(0);
  for (const Particle& p : fs.particles()) {
    nCount[p.pid()] += 1;
    ++ntotal;
  }
  const FinalState& ufs = apply<FinalState>(event, "UFS");
  for (const Particle& p : ufs.particles()) {
    if (p.children().empty()) continue;
    map<long, int> nRes = nCount;
    int ncount = ntotal;
    findChildren(p, nRes, ncount);
    if (ncount != 1) continue;
    bool matched = true;
    for (const auto& val : nRes) {
      if (val.first == 22) {
        if (val.second != 1) {
          matched = false;
          break;
        }
      }
      else if (val.second != 0) {
        matched = false;
        break;
      }
    }
    if (matched) {
      if (p.pid() == 100553)
        _nUps2pipi->fill(_sqs);
      else if (p.pid() == 200553)
        _nUps3pipi->fill(_sqs);
    }
  }
}


/// Normalise histograms etc., after the run
void finalize() {
  const double fact = crossSection() / sumOfWeights() / picobarn;
  scale(_nUps3pipi, fact);
  scale(_nUps2pipi, fact);
}
/// @}

/// @name Histograms
/// @{
BinnedHistoPtr<string> _nUps2pipi, _nUps3pipi;
string _sqs = "";
/// @}

};

RIVET_DECLARE_PLUGIN(CLEO_1999_I474676);

} ```