rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BES_1999_I508349

Charm cross sections and spectra at 4.03 and 4.14 GeV
Experiment: BES (BEPC)
Inspire ID: 508349
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D62 (2000) 012002
Beams: e+ e-
Beam energies: (2.0, 2.0); (2.1, 2.1) GeV
Run details:
  • e+e- to hadrons. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Measurement of the total cvharm cross section, together with the $D^0$, $D^+$ rates and spectra at 4.03 and 4.14 GeV by the BES collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BES_1999_I508349.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief charm cross sections
  9  class BES_1999_I508349 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BES_1999_I508349);
 14
 15
 16    /// @name Analysis methods
 17    ///@{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      declare(UnstableParticles(),"UFS");
 22      book(_nD0   ,"/TMP/nD0"   );
 23      book(_nDp   ,"/TMP/nDp"   );
 24      book(_nDs   ,"/TMP/nDs"   );
 25      book(_nCharm,"/TMP/nCharm");
 26      if(isCompatibleWithSqrtS(4.03,1e-3)) {
 27	book(_h_D0,2,1,1);
 28	book(_h_Dp,2,1,2);
 29      }
 30      else if(isCompatibleWithSqrtS(4.14,1e-3)) {
 31	book(_h_D0,3,1,1);
 32	book(_h_Dp,3,1,2);
 33      }
 34      else
 35	MSG_ERROR("Beam energy not supported!");
 36    }
 37
 38
 39    /// Perform the per-event analysis
 40    void analyze(const Event& event) {
 41      double nD0(0),nDp(0),nDs(0);
 42      for(const Particle & p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==411 or
 43										Cuts::abspid==421 or
 44										Cuts::abspid==431)) {
 45	if(p.abspid()==421) {
 46	  _h_D0->fill(p.momentum().p3().mod());
 47	  ++nD0;
 48	}
 49	else if(p.abspid()==411) {
 50	  _h_Dp->fill(p.momentum().p3().mod());
 51	  ++nDp;
 52	}
 53	else {
 54	  ++nDs;
 55	}
 56      }
 57      _nCharm->fill(0.5*(nD0+nDp+nDs));
 58      _nD0   ->fill(0.5*nD0);
 59      _nDp   ->fill(0.5*nDp);
 60      _nDs   ->fill(0.5*nDs);
 61    }
 62
 63
 64    /// Normalise histograms etc., after the run
 65    void finalize() {
 66      scale(_h_D0,0.5*crossSection()/sumOfWeights()/nanobarn);
 67      scale(_h_Dp,0.5*crossSection()/sumOfWeights()/nanobarn);
 68      for(unsigned int ix=1;ix<5;++ix) {
 69        double sigma = crossSection()/ sumOfWeights() /nanobarn;
 70        double error = crossSection()/ sumOfWeights() /nanobarn; 
 71      	if(ix==1) {
 72      	  sigma *= _nD0->val();
 73      	  error *= _nD0->err();
 74      	}
 75      	else if (ix==2){
 76      	  sigma *= _nDp->val();
 77      	  error *= _nDp->err();
 78      	}
 79      	else if (ix==3){
 80      	  sigma *= _nDs->val();
 81      	  error *= _nDs->err();
 82      	}
 83      	else if (ix==4){
 84      	  sigma *= _nCharm->val();
 85      	  error *= _nCharm->err();
 86      	}
 87        Scatter2D temphisto(refData(1, 1, ix));
 88        Scatter2DPtr  mult;
 89        book(mult, 1, 1, ix);
 90      	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 91      	  const double x  = temphisto.point(b).x();
 92      	  pair<double,double> ex = temphisto.point(b).xErrs();
 93      	  pair<double,double> ex2 = ex;
 94      	  if(ex2.first ==0.) ex2. first=0.0001;
 95      	  if(ex2.second==0.) ex2.second=0.0001;
 96      	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
 97      	    mult->addPoint(x, sigma, ex, make_pair(error,error));
 98      	  }
 99      	  else {
100      	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
101      	  }
102      	}
103      }
104    }
105
106    ///@}
107
108
109    /// @name Histograms
110    ///@{
111    CounterPtr _nD0,_nDp,_nDs,_nCharm;
112    Histo1DPtr _h_D0,_h_Dp;
113    ///@}
114
115
116  };
117
118
119  RIVET_DECLARE_PLUGIN(BES_1999_I508349);
120
121}