rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2018_I1685535

Cross section for $e^+e^-\to\pi^+D^0D^{*-}$ +c.c. cross section between 4.05 and 4.60 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1685535
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 122 (2019) no.10, 102002
Beams: e+ e-
Beam energies: (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.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) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\pi^+D^0D^{*-}$ +c.c. cross section between 4.05 and 4.60 GeV by thew BEWS collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2018_I1685535.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 D0 D*- pi+ +c.c
 10  class BESIII_2018_I1685535 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1685535);
 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 histograms
 27      for(unsigned int ix=0;ix<2;++ix) {
 28        book(_nD0[ix], 1+ix, 1, 1);
 29        for (const string& en : _nD0[ix].binning().edges<0>()) {
 30          const double end = std::stod(en)*GeV;
 31          if (isCompatibleWithSqrtS(end)) {
 32            _ecms[ix] = en;
 33            break;
 34          }
 35        }
 36      }
 37      if (_ecms[0].empty() && _ecms[1].empty())
 38        MSG_ERROR("Beam energy incompatible with analysis.");
 39    }
 40
 41    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 42      for (const Particle &child : p.children()) {
 43        if(child.children().empty()) {
 44          nRes[child.pid()]-=1;
 45          --ncount;
 46        }
 47        else
 48          findChildren(child,nRes,ncount);
 49      }
 50    }
 51
 52    /// Perform the per-event analysis
 53    void analyze(const Event& event) {
 54      const FinalState& fs = apply<FinalState>(event, "FS");
 55
 56      map<long,int> nCount;
 57      int ntotal(0);
 58      for (const Particle& p : fs.particles()) {
 59        nCount[p.pid()] += 1;
 60        ++ntotal;
 61      }
 62      const FinalState& ufs = apply<FinalState>(event, "UFS");
 63
 64
 65      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 66        const Particle& p1 = ufs.particles()[ix];
 67        if(abs(p1.pid())!=421) continue;
 68        map<long,int> nRes = nCount;
 69        int ncount = ntotal;
 70        findChildren(p1,nRes,ncount);
 71        bool matched=false;
 72        int id2 = p1.pid()>0 ? -413 :  413;
 73        int ipi = p1.pid()>0 ?  211 : -211;
 74        for(unsigned int iy=0;iy<ufs.particles().size();++iy) {
 75          if(ix==iy) continue;
 76          const Particle& p2 = ufs.particles()[iy];
 77          if(p2.pid()!=id2) continue;
 78          map<long,int> nRes2 = nRes;
 79          int ncount2 = ncount;
 80          findChildren(p2,nRes2,ncount2);
 81          if(ncount2!=1) continue;
 82          matched=true;
 83          for(auto const & val : nRes2) {
 84            if(val.first==ipi) {
 85              if(val.second!=1) {
 86                matched = false;
 87                break;
 88              }
 89            }
 90            else if(val.second!=0) {
 91              matched = false;
 92              break;
 93            }
 94          }
 95          if(matched) break;
 96        }
 97        if(matched) {
 98          for(unsigned int ix=0;ix<2;++ix) {
 99            if(!_ecms[ix].empty()) _nD0[ix]->fill(_ecms[ix]);
100          }
101        }
102      }
103    }
104
105
106    /// Normalise histograms etc., after the run
107    void finalize() {
108      double fact = crossSection()/ sumOfWeights() /nanobarn;
109      for(unsigned int ix=0;ix<2;++ix)
110        scale(_nD0[ix],fact);
111    }
112
113    /// @}
114
115
116    /// @name Histograms
117    /// @{
118    BinnedHistoPtr<string> _nD0[2];
119    string _ecms[2];
120    /// @}
121
122
123  };
124
125
126  RIVET_DECLARE_PLUGIN(BESIII_2018_I1685535);
127
128}