rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMD3_2019_I1744510

Cross section for $e^+e^-\to\eta\pi^+\pi^-$ between 1.08 and 2 GeV
Experiment: CMD3 (VEPP-2M)
Inspire ID: 1744510
Status: UNVALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Source code: CMD3_2019_I1744510.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/UnstableParticles.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief e+ e- > eta pi+pi-
 10  class CMD3_2019_I1744510 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2019_I1744510);
 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      declare(UnstableParticles(), "UFS");
 26      book(_numEtaPiPi, 2, 1, 1);
 27      for (const string& en : _numEtaPiPi.binning().edges<0>()) {
 28        const double end = std::stod(en)*GeV;
 29        if (isCompatibleWithSqrtS(end)) {
 30          _ecms = en;
 31          break;
 32        }
 33      }
 34      if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
 35    }
 36
 37    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 38      for(const Particle &child : p.children()) {
 39	if(child.children().empty()) {
 40	  --nRes[child.pid()];
 41	  --ncount;
 42	}
 43	else
 44	  findChildren(child,nRes,ncount);
 45      }
 46    }
 47
 48    /// Perform the per-event analysis
 49    void analyze(const Event& event) {
 50      const FinalState& fs = apply<FinalState>(event, "FS");
 51
 52      map<long,int> nCount;
 53      int ntotal(0);
 54      for (const Particle& p : fs.particles()) {
 55	nCount[p.pid()] += 1;
 56	++ntotal;
 57      }
 58      const FinalState& ufs = apply<FinalState>(event, "UFS");
 59      for (const Particle& p : ufs.particles()) {
 60	if(p.children().empty()) continue;
 61	// find the omega
 62	if(p.pid()==221) {
 63	  map<long,int> nRes = nCount;
 64	  int ncount = ntotal;
 65	  findChildren(p,nRes,ncount);
 66	  // eta pi+pi-
 67	  if(ncount!=2) continue;
 68	  bool matched = true;
 69	  for(auto const & val : nRes) {
 70	    if(abs(val.first)==211) {
 71	      if(val.second !=1) {
 72		matched = false;
 73		break;
 74	      }
 75	    }
 76	    else if(val.second!=0) {
 77	      matched = false;
 78	      break;
 79	    }
 80	  }
 81	  if(matched)
 82	    _numEtaPiPi->fill(_ecms);
 83	}
 84      }
 85    }
 86
 87
 88    /// Normalise histograms etc., after the run
 89    void finalize() {
 90      scale(_numEtaPiPi, crossSection()/ sumOfWeights() /nanobarn);
 91    }
 92
 93    /// @}
 94
 95
 96    /// @name Histograms
 97    /// @{
 98    BinnedHistoPtr<string> _numEtaPiPi;
 99    string _ecms;
100    /// @}
101
102
103  };
104
105
106  RIVET_DECLARE_PLUGIN(CMD3_2019_I1744510);
107
108
109}