Rivet analyses


title: MARKI_1976_I109792

Charged particle momentum distributions for energies between 3.0 and 7.4 GeV

Experiment: MARK-I (SPEAR)

Inspire ID: 109792

Status: VALIDATED

Authors: - Peter Richardson

References: none listed

Beams: e- e+

Beam energies: (1.5, 1.5); (2.4, 2.4); (2.9, 2.9); (3.1, 3.1); (3.3, 3.3); (3.5, 3.5); (3.7, 3.7)GeV

Run details: - e+e- > hadrons.

Charged particle momentum distributions for energies between 3.0 and 7.4 GeV.

Source code:MARKI_1976_I109792.cc

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

include "Rivet/Analysis.hh"

include "Rivet/Projections/ChargedFinalState.hh"

namespace Rivet {

/// @brief Charged particle spectra between 3.0 and 7.4 GeV class MARKI_1976_I109792 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(MARKI_1976_I109792);


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

/// Book histograms and initialise projections before the run
void init() {
  declare(ChargedFinalState(), "FS");
  unsigned int ih = 8;
  for (double eVal : allowedEnergies()) {
    const string en = toString(round(eVal / MeV));
    if (isCompatibleWithSqrtS(eVal)) _sqs = en;
    book(_h[en], ih--, 1, 1);
  }
  raiseBeamErrorIf(_sqs.empty());
}


/// Perform the per-event analysis
void analyze(const Event& event) {
  const ChargedFinalState& fs = apply<ChargedFinalState>(event, "FS");
  if (fs.particles().size() == 2 && fs.particles()[0].abspid() == 13 && fs.particles()[1].abspid() == 13)
    vetoEvent;
  for (const Particle& p : fs.particles()) {
    const Vector3 mom3 = p.p3();
    double pp = mom3.mod();
    double x = 2. * pp / sqrtS();
    _h[_sqs]->fill(x);
  }
}


/// Normalise histograms etc., after the run
void finalize() {
  for (auto& item : _h) {
    const double en = stod(item.first.substr(0, 4)) * MeV;
    scale(item.second, crossSection() * sqr(en) / sumOfWeights() / microbarn);
  }
}

/// @}


/// @name Histograms
/// @{
map<string, Histo1DPtr> _h;
string _sqs = "";
/// @}

};

RIVET_DECLARE_PLUGIN(MARKI_1976_I109792); } ```