rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2024_I2755997

Cross section for $e^+e^-\to D\bar{D}$ for $\sqrt{s}$ between 3.80 and 4.95 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2755997
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (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.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.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- to hadrons

Measurement of the cross section for $e^+e^-\to D\bar{D}$ for $\sqrt{s}$ between 3.80 and 4.95 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2024_I2755997.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- -> D Dbar
 10  class BESIII_2024_I2755997 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2755997);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      // Initialise and register projections
 23      declare(FinalState(), "FS");
 24      declare(UnstableParticles(Cuts::abspid==411 or Cuts::abspid==421), "UFS");
 25      for(unsigned int ix=0;ix<2;++ix)
 26	book(_sigma[ix],ix+1, 1, 1);
 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()]-=1;
 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
 54      map<long,int> nCount;
 55      int ntotal(0);
 56      for (const Particle& p : fs.particles()) {
 57        nCount[p.pid()] += 1;
 58        ++ntotal;
 59      }
 60      const FinalState& ufs = apply<FinalState>(event, "UFS");
 61      for (unsigned int ix=0; ix<ufs.particles().size(); ++ix) {
 62       	const Particle& p1 = ufs.particles()[ix];
 63      	map<long,int> nRes = nCount;
 64      	int ncount = ntotal;
 65      	findChildren(p1,nRes,ncount);
 66      	bool matched=false;
 67       	for (unsigned int iy=ix+1; iy<ufs.particles().size(); ++iy) {
 68          const Particle& p2 = ufs.particles()[iy];
 69          if (p2.pid()!=-p1.pid()) continue;
 70          if (!p2.parents().empty() && p2.parents()[0].pid()==p1.pid()) continue;
 71          map<long,int> nRes2 = nRes;
 72          int ncount2 = ncount;
 73          findChildren(p2,nRes2,ncount2);
 74          if (ncount2!=0) continue;
 75          matched=true;
 76          for (const auto& val : nRes2) {
 77            if (val.second!=0) {
 78              matched = false;
 79              break;
 80            }
 81          }
 82          if (matched) break;
 83       	}
 84       	if(matched) {
 85	  if(p1.abspid()==421) _sigma[0]->fill(_ecms);
 86	  else                 _sigma[1]->fill(_ecms);
 87	  break;
 88      	}
 89      }
 90    }
 91
 92
 93    /// Normalise histograms etc., after the run
 94    void finalize() {
 95      double fact = crossSection()/ sumOfWeights() /picobarn; 
 96      for(unsigned int ix=0;ix<2;++ix)
 97        scale(_sigma[ix],fact);
 98    }
 99
100    /// @}
101
102
103    /// @name Histograms
104    /// @{
105    BinnedHistoPtr<string> _sigma[2];
106    string _ecms;
107    /// @}
108
109
110  };
111
112
113  RIVET_DECLARE_PLUGIN(BESIII_2024_I2755997);
114
115}