rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BELLE_2017_I1613517

Cross Section for $e^+e^-\to D^\pm D^{*\mp}$ and $D^{*+}D^{*-}$ from threshold to 6 GeV
Experiment: BELLE (KEKB)
Inspire ID: 1613517
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D97 (2018) no.1, 012002
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to D^\pm D^{*\mp}$ and $D^{*+}D^{*-}$ from threshold to 6 GeV.

Source code: BELLE_2017_I1613517.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 D+/- D*-/+ and D*+ D*- cross sections
 10  class BELLE_2017_I1613517 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2017_I1613517);
 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
 27      // Book histograms
 28      book(_c_DpDmS, "/TMP/sigma_DpDmS");
 29      book(_c_DpSDmS, "/TMP/sigma_DpSDmS");
 30    }
 31
 32    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 33      for(const Particle &child : p.children()) {
 34	if(child.children().empty()) {
 35	  nRes[child.pid()]-=1;
 36	  --ncount;
 37	}
 38	else
 39	  findChildren(child,nRes,ncount);
 40      }
 41    }
 42
 43    /// Perform the per-event analysis
 44    void analyze(const Event& event) {
 45      const FinalState& fs = apply<FinalState>(event, "FS");
 46      // total hadronic and muonic cross sections
 47      map<long,int> nCount;
 48      int ntotal(0);
 49      for (const Particle& p : fs.particles()) {
 50	nCount[p.pid()] += 1;
 51	++ntotal;
 52      }
 53      // mu+mu- + photons
 54      if(nCount[-13]==1 and nCount[13]==1 &&
 55	 ntotal==2+nCount[22])
 56	vetoEvent;
 57      // unstable charm analysis
 58      const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
 59      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 60       	const Particle& p1 = ufs.particles()[ix];
 61       	int id1 = abs(p1.pid());
 62       	if(id1 != 411 && id1 != 413) continue;
 63      	// check fs
 64      	bool fs = true;
 65      	for (const Particle & child : p1.children()) {
 66      	  if(child.pid()==p1.pid()) {
 67      	    fs = false;
 68      	    break;
 69      	  }
 70      	}
 71      	if(!fs) continue;
 72      	// find the children
 73      	map<long,int> nRes = nCount;
 74      	int ncount = ntotal;
 75      	findChildren(p1,nRes,ncount);
 76      	bool matched=false;
 77       	int sign = p1.pid()/id1;
 78      	// loop over the other fs particles
 79      	for(unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
 80      	  const Particle& p2 = ufs.particles()[iy];
 81      	  fs = true;
 82      	  for (const Particle & child : p2.children()) {
 83      	    if(child.pid()==p2.pid()) {
 84      	      fs = false;
 85      	      break;
 86      	    }
 87      	  }
 88      	  if(!fs) continue;
 89       	  if(p2.pid()/abs(p2.pid())==sign) continue;
 90      	  int id2 = abs(p2.pid());
 91       	  if(id2 != 411 && id2 != 413) continue;
 92      	  if(!p2.parents().empty() && p2.parents()[0].pid()==p1.pid())
 93      	    continue;
 94      	  map<long,int> nRes2 = nRes;
 95      	  int ncount2 = ncount;
 96      	  findChildren(p2,nRes2,ncount2);
 97	  if(ncount2!=0) continue;
 98	  matched=true;
 99	  for(auto const & val : nRes2) {
100	    if(val.second!=0) {
101	      matched = false;
102	      break;
103	    }
104	  }
105	  if(matched) {
106	    if(id1==413 && id2==413) {
107	      _c_DpSDmS->fill();
108	    }
109	    else if((id1==411 && id2==413) ||
110		    (id1==413 && id2==411)) {
111	      _c_DpDmS->fill();
112	    }
113	    break;
114	  }
115      	}
116	if(matched) break;
117      }
118    }
119
120
121    /// Normalise histograms etc., after the run
122    void finalize() {
123      double fact = crossSection()/ sumOfWeights()/nanobarn;
124      for (unsigned int iy=1;iy<3;++iy) {
125        double sigma = 0.0, error = 0.0;
126        if(iy==1) {
127          sigma = _c_DpDmS->val()*fact;
128          error = _c_DpDmS->err()*fact;
129        }
130        else if(iy==2) {
131          sigma = _c_DpSDmS->val()*fact;
132          error = _c_DpSDmS->err()*fact;
133        }
134        Estimate1DPtr mult;
135        book(mult, 1, 1, iy);
136        for (auto& b : mult->bins()) {
137          if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
138            b.set(sigma, error);
139          }
140        }
141      }
142    }
143    /// @}
144
145
146    /// @name Histograms
147    /// @{
148    CounterPtr _c_DpDmS, _c_DpSDmS;
149    /// @}
150
151
152  };
153
154
155  RIVET_DECLARE_PLUGIN(BELLE_2017_I1613517);
156
157
158}