rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2019_I1756876

Cross section for $e^+e^-\to D^+D^-\pi^+\pi^-$ for $E_{\text{CMS}}=4.36\to4.60$ GeV
Experiment: BESIII (BEPC)
Inspire ID: 1756876
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e- e+
Beam energies: (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) GeV
Run details:
  • e+e- to hadrons

Cross section for $e^+e^-\to D^+D^-\pi^+\pi^-$ for $E_{\text{CMS}}=4.36\to4.60$ GeV. The cross sections for the subprocesses $e^+e^-\to D_1(2420)^\pm D^\mp$ and $e^+e^-\to \psi(3770) \pi^+\pi^-$ are measured. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2019_I1756876.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 D+D- pi+ pi- (D1 D and psi(3770) pi+pi- subprocesses)
 10  class BESIII_2019_I1756876 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1756876);
 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(), "UFS");
 25      // Book histograms
 26      book(_nD1D, 1, 1,  1);
 27      book(_nPsi, 1, 1,  2);
 28      for (const string& en : _nD1D.binning().edges<0>()) {
 29        const double end = std::stod(en)*MeV;
 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
 39    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 40      for(const Particle &child : p.children()) {
 41        if(child.children().empty()) {
 42          nRes[child.pid()]-=1;
 43          --ncount;
 44        }
 45        else
 46          findChildren(child,nRes,ncount);
 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      bool matched=false;
 62      for(const Particle& p1 : ufs.particles(Cuts::abspid==411)) {
 63        int sign = p1.pid()/411;
 64        map<long,int> nRes = nCount;
 65        int ncount = ntotal;
 66        findChildren(p1,nRes,ncount);
 67        matched=false;
 68        for(const Particle& p2 : ufs.particles(Cuts::pid==-sign*411)) {
 69          map<long,int> nRes2 = nRes;
 70          int ncount2 = ncount;
 71          findChildren(p2,nRes2,ncount2);
 72          if(ncount2!=2) continue;
 73          matched=true;
 74          for(auto const & val : nRes2) {
 75            if(abs(val.first)==211) {
 76              if(val.second!=1) {
 77                matched = false;
 78                break;
 79              }
 80            }
 81            else if(val.second!=0) {
 82              matched = false;
 83              break;
 84            }
 85          }
 86          if(matched) break;
 87        }
 88        if(matched)
 89          break;
 90      }
 91      if(!matched) vetoEvent;
 92      // psi(3770) pi+pi-
 93      for(const Particle& p1 : ufs.particles(Cuts::abspid==30443)) {
 94        if(p1.children().empty()) continue;
 95        map<long,int> nRes = nCount;
 96        int ncount = ntotal;
 97        findChildren(p1,nRes,ncount);
 98        // psi(3770) pi+pi-
 99        if(ncount!=2) continue;
100        bool matched = true;
101        for(auto const & val : nRes) {
102          if(abs(val.first)==211) {
103            if(val.second !=1) {
104              matched = false;
105              break;
106            }
107          }
108          else if(val.second!=0) {
109            matched = false;
110            break;
111          }
112        }
113        if(matched) {
114          _nPsi->fill(_ecms);
115          return;
116        }
117      }
118      // D1 D
119      for(const Particle& p1 : ufs.particles(Cuts::abspid==10413)) {
120        if(p1.children().empty()) continue;
121        int sign = p1.pid()/10413;
122        map<long,int> nRes = nCount;
123        int ncount = ntotal;
124        findChildren(p1,nRes,ncount);
125        matched=false;
126        for(const Particle& p2 : ufs.particles(Cuts::pid==-sign*411)) {
127          map<long,int> nRes2 = nRes;
128          int ncount2 = ncount;
129          findChildren(p2,nRes2,ncount2);
130          if(ncount2!=0) continue;
131          matched=true;
132          for(auto const & val : nRes2) {
133            if(val.second!=0) {
134              matched = false;
135              break;
136            }
137          }
138          if(matched) break;
139        }
140        if(matched) {
141          _nD1D->fill(_ecms);
142          return;
143        }
144      }
145    }
146
147    /// Normalise histograms etc., after the run
148    void finalize() {
149      double fact = crossSection()/ sumOfWeights()/picobarn;
150      scale(_nD1D,fact);
151      scale(_nPsi,fact);
152    }
153
154    /// @}
155
156    /// @name Histograms
157    /// @{
158    BinnedHistoPtr<string> _nD1D, _nPsi;
159    string _ecms;
160    /// @}
161
162  };
163
164
165  RIVET_DECLARE_PLUGIN(BESIII_2019_I1756876);
166
167}