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: ANY
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.

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(_nD0, "/TMP/nD0");
 27    }
 28
 29    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 30      for (const Particle &child : p.children()) {
 31        if(child.children().empty()) {
 32          nRes[child.pid()]-=1;
 33          --ncount;
 34        }
 35        else
 36          findChildren(child,nRes,ncount);
 37      }
 38    }
 39
 40    /// Perform the per-event analysis
 41    void analyze(const Event& event) {
 42      const FinalState& fs = apply<FinalState>(event, "FS");
 43
 44      map<long,int> nCount;
 45      int ntotal(0);
 46      for (const Particle& p : fs.particles()) {
 47        nCount[p.pid()] += 1;
 48        ++ntotal;
 49      }
 50      const FinalState& ufs = apply<FinalState>(event, "UFS");
 51
 52
 53      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 54        const Particle& p1 = ufs.particles()[ix];
 55        if(abs(p1.pid())!=421) continue;
 56        map<long,int> nRes = nCount;
 57        int ncount = ntotal;
 58        findChildren(p1,nRes,ncount);
 59        bool matched=false;
 60        int id2 = p1.pid()>0 ? -413 :  413;
 61        int ipi = p1.pid()>0 ?  211 : -211;
 62        for(unsigned int iy=0;iy<ufs.particles().size();++iy) {
 63          if(ix==iy) continue;
 64          const Particle& p2 = ufs.particles()[iy];
 65          if(p2.pid()!=id2) continue;
 66          map<long,int> nRes2 = nRes;
 67          int ncount2 = ncount;
 68          findChildren(p2,nRes2,ncount2);
 69          if(ncount2!=1) continue;
 70          matched=true;
 71          for(auto const & val : nRes2) {
 72            if(val.first==ipi) {
 73              if(val.second!=1) {
 74                matched = false;
 75                break;
 76              }
 77            }
 78            else if(val.second!=0) {
 79              matched = false;
 80              break;
 81            }
 82          }
 83          if(matched) break;
 84        }
 85        if(matched)
 86          _nD0->fill();
 87      }
 88    }
 89
 90
 91    /// Normalise histograms etc., after the run
 92    void finalize() {
 93      double sigma = _nD0->val();
 94      double error = _nD0->err();
 95      sigma *= crossSection()/ sumOfWeights() /nanobarn;
 96      error *= crossSection()/ sumOfWeights() /nanobarn;
 97      for (unsigned int ix=1;ix<3;++ix) {
 98        Estimate1DPtr  mult;
 99        book(mult, ix, 1, 1);
100        for (auto& b : mult->bins()) {
101          if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
102            b.set(sigma, error);
103          }
104        }
105      }
106    }
107
108    /// @}
109
110
111    /// @name Histograms
112    /// @{
113    CounterPtr _nD0;
114    /// @}
115
116
117  };
118
119
120  RIVET_DECLARE_PLUGIN(BESIII_2018_I1685535);
121
122}