rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2022_I2169640

Cross section for $e^+e^-\to\phi\chi_{c(1,2)}$ at from $\sqrt{s}=4.600$ to 4.951 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2169640
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5); (2.5, 2.5) GeV
Run details:
  • e+ e- -> hadrons

Measurement of the cross section for $e^+e^-\to\phi\chi_{c(1,2)}$ at from $\sqrt{s}=4.600$ to 4.951 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2022_I2169640.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- -> phi chi_c(1,2)
 10  class BESIII_2022_I2169640 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2169640);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      // projections
 23      declare(FinalState(), "FS");
 24      declare(UnstableParticles(), "UFS");
 25      for (unsigned int ix=0; ix<2; ++ix) {
 26        book(_sigma[ix],1,1,1+ix);
 27      }
 28      for (const string& en : _sigma[0].binning().edges<0>()) {
 29        const double end = std::stod(en)*GeV;
 30        if (isCompatibleWithSqrtS(end)) {
 31          _ecms = en;
 32          break;
 33        }
 34      }
 35      if(_ecms.empty()) 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
 50    /// Perform the per-event analysis
 51    void analyze(const Event& event) {
 52      const FinalState& fs = apply<FinalState>(event, "FS");
 53      map<long,int> nCount;
 54      int ntotal(0);
 55      for (const Particle& p: fs.particles()) {
 56        nCount[p.pid()] += 1;
 57        ++ntotal;
 58      }
 59      const FinalState& ufs = apply<FinalState>(event, "UFS");
 60      // loop over any phi mesons
 61      for (const Particle & phi : ufs.particles(Cuts::pid==333)) {
 62        bool matched = false;
 63        if(phi.children().empty()) continue;
 64        map<long,int> nRes = nCount;
 65        int ncount = ntotal;
 66        findChildren(phi,nRes,ncount);
 67        for (const Particle & chi : ufs.particles(Cuts::pid==20443 || Cuts::pid==445)) {
 68          if (chi.children().empty()) continue;
 69          map<long,int> nRes2 = nRes;
 70          int ncount2 = ncount;
 71          findChildren(chi,nRes2,ncount2);
 72          matched = true;
 73          for (const auto& val : nRes2) {
 74            if(val.second!=0) {
 75              matched = false;
 76              break;
 77            }
 78          }
 79          if (!matched) continue;
 80          if     (chi.pid()==20443) _sigma[0]->fill(_ecms);
 81          else if(chi.pid()==  445) _sigma[1]->fill(_ecms);
 82          break;
 83        }
 84        if (matched) break;
 85      }
 86    }
 87
 88
 89    /// Normalise histograms etc., after the run
 90    void finalize() {
 91	    scale(_sigma, crossSection()/ sumOfWeights() /picobarn);
 92    }
 93
 94    /// @}
 95
 96
 97    /// @name Histograms
 98    /// @{
 99    BinnedHistoPtr<string> _sigma[2];
100    string _ecms;
101    /// @}
102
103
104  };
105
106
107  RIVET_DECLARE_PLUGIN(BESIII_2022_I2169640);
108
109}