rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2015_I1406939

Cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1406939
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D93 (2016) 011102, 2016
Beams: e+ e-
Beam energies: (2.2, 2.2); (2.3, 2.3) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2015_I1406939.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 Cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV
 10  class BESIII_2015_I1406939 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1406939);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      declare(FinalState(), "FS");
 23      declare(UnstableParticles(), "UFS");
 24      for(unsigned int ix=0;ix<2;++ix) {
 25        book(_nChi[ix], 2+ix,1,6);
 26        for (const string& en : _nChi[ix].binning().edges<0>()) {
 27          double end = std::stod(en)*GeV;
 28          if(isCompatibleWithSqrtS(end)) {
 29            _ecms[ix] = en;
 30            break;
 31          }
 32        }
 33      }
 34      if(_ecms[0].empty() && _ecms[1].empty())
 35        MSG_ERROR("Beam energy incompatible with analysis.");
 36    }
 37
 38    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 39      for( const Particle &child : p.children()) {
 40        if(child.children().empty()) {
 41          --nRes[child.pid()];
 42          --ncount;
 43        }
 44        else
 45          findChildren(child,nRes,ncount);
 46      }
 47    }
 48
 49    /// Perform the per-event analysis
 50    void analyze(const Event& event) {
 51      const FinalState& fs = apply<FinalState>(event, "FS");
 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      bool matched = false;
 60      for (const Particle& p :  ufs.particles(Cuts::pid==20443 or Cuts::pid==445)) {
 61        if(p.children().empty()) continue;
 62        map<long,int> nRes = nCount;
 63        int ncount = ntotal;
 64        findChildren(p,nRes,ncount);
 65        for (const Particle& p2 :  ufs.particles(Cuts::pid==223)) {
 66          map<long,int> nRes2 = nRes;
 67          int ncount2 = ncount;
 68          findChildren(p2,nRes2,ncount2);
 69          if(ncount2!=0) continue;
 70          matched=true;
 71          for(auto const & val : nRes2) {
 72            if(val.second!=0) {
 73              matched = false;
 74              break;
 75            }
 76          }
 77          if(matched) {
 78            if(p.pid()==20443) {
 79              if(!_ecms[0].empty()) _nChi[0]->fill(_ecms[0]);
 80            }
 81            else if(p.pid()==445){
 82              if(!_ecms[1].empty()) _nChi[1]->fill(_ecms[1]);
 83            }
 84            break;
 85          }
 86        }
 87        if(matched) break;
 88      }
 89    }
 90
 91
 92    /// Normalise histograms etc., after the run
 93    void finalize() {
 94      double fact =  crossSection()/ sumOfWeights() /picobarn;
 95      for(unsigned int ix=0;ix<2;++ix) {
 96        scale(_nChi[ix],fact);
 97      }
 98    }
 99
100    /// @}
101
102
103    /// @name Histograms
104    /// @{
105    BinnedHistoPtr<string> _nChi[2];
106    string _ecms[2];
107    /// @}
108
109
110  };
111
112
113  RIVET_DECLARE_PLUGIN(BESIII_2015_I1406939);
114
115
116}