rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2002_I582184

Momentum spectrum for $D_s^+$ and $D_s^{*+}$ at $\Upsilon(4S)$ and nearby continuum
Experiment: BABAR (PEP-II)
Inspire ID: 582184
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D65 (2002) 091104
Beams: e+ e-
Beam energies: (5.3, 5.3) GeV
Run details:
  • e+e- > hadrons at Upsilon (4S) and in nearby continuum

Momentum spectrum for $D_s^+$ and $D_s^{*+}$ at $\Upsilon(4S)$ and nearby continuum measured by BaBar.

Source code: BABAR_2002_I582184.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief D_s D_s* spectrum
  9  class BABAR_2002_I582184 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2002_I582184);
 14
 15
 16    /// @name Analysis methods
 17    /// @{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      // Initialise and register projections
 22      declare(UnstableParticles(), "UFS");
 23      // Book histograms
 24      // rates
 25      book(_c_Ds_on     ,2,1,1);
 26      book(_c_Ds_off    ,1,1,1);
 27      book(_c_DsStar_on ,2,1,2);
 28      book(_c_DsStar_off,1,1,2);
 29      book(_w_ups ,"/TMP/w_ups" );
 30      // dists
 31      book(_h_Ds_on     ,5,1,1);
 32      book(_h_Ds_off    ,3,1,2);
 33      book(_h_DsStar_on ,5,1,2);
 34      book(_h_DsStar_off,4,1,2);
 35    }
 36
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      // Find the Upsilon(4S) among the unstables
 41      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
 42      bool cont = ufs.particles(Cuts::pid==300553).empty();
 43      if(!cont) _w_ups ->fill();
 44      for(const Particle &p : ufs.particles(Cuts::abspid==431 or Cuts::abspid==433)) {
 45	double mom=p.momentum().p3().mod();
 46	if(cont) {
 47	  if(p.abspid()==431) {
 48	    _h_Ds_off->fill(mom);
 49	    _c_Ds_off->fill(0.5);
 50	  }
 51	  else {
 52	    _h_DsStar_off->fill(mom);
 53	    _c_DsStar_off->fill(0.5);
 54	  }
 55	}
 56	else {
 57	  if(p.abspid()==431) {
 58	    _h_Ds_on->fill(mom);
 59	    _c_Ds_on->fill(0.5);
 60	  }
 61	  else {
 62	    _h_DsStar_on->fill(mom);
 63	    _c_DsStar_on->fill(0.5);
 64	  }
 65	}
 66      }
 67    }
 68
 69
 70    /// Normalise histograms etc., after the run
 71    void finalize() {
 72      normalize(_h_Ds_on     );
 73      normalize(_h_Ds_off    );
 74      normalize(_h_DsStar_on );
 75      normalize(_h_DsStar_off);
 76      if(_w_ups->val()!=0) {
 77	scale(_c_Ds_on    ,0.5/ *_w_ups);
 78	scale(_c_DsStar_on,0.5/ *_w_ups);
 79      }
 80      scale(_c_Ds_off    , crossSection()/sumOfWeights()/picobarn);
 81      scale(_c_DsStar_off, crossSection()/sumOfWeights()/picobarn);
 82    }
 83
 84    /// @}
 85
 86
 87    /// @name Histograms
 88    /// @{
 89    Histo1DPtr _h_Ds_on,_h_Ds_off,_h_DsStar_on,_h_DsStar_off;
 90    Histo1DPtr _c_Ds_on,_c_Ds_off,_c_DsStar_on,_c_DsStar_off;
 91    CounterPtr _w_ups;
 92    /// @}
 93
 94
 95  };
 96
 97
 98  RIVET_DECLARE_PLUGIN(BABAR_2002_I582184);
 99
100}