rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MARKIII_1987_I244856

$e^+e^-\to D^\pm_sD^{*\mp}_s$ cross section at $\sqrt{s}=4.14\,$GeV
Experiment: MARKIII (SPEAR)
Inspire ID: 244856
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 58 (1987) 2171
Beams: e+ e-
Beam energies: (2.1, 2.1) GeV
Run details:
  • e+e- > hadrons

$e^+e^-\to D^\pm_sD^{*\mp}_s$ cross section at $\sqrt{s}=4.14\,$GeV

Source code: MARKIII_1987_I244856.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 e+e-> D_s D_s*
 10  class MARKIII_1987_I244856 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(MARKIII_1987_I244856);
 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(Cuts::abspid==431 or Cuts::abspid==433), "UFS");
 25      // histos
 26      book(_h,1,1,1);
 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
 41    /// Perform the per-event analysis
 42    void analyze(const Event& event) {
 43      const FinalState& fs = apply<FinalState>(event, "FS");
 44      // total hadronic and muonic cross sections
 45      map<long,int> nCount;
 46      int ntotal(0);
 47      for (const Particle& p : fs.particles()) {
 48      	nCount[p.pid()] += 1;
 49      	++ntotal;
 50      }
 51      // mu+mu- + photons
 52      if (nCount[-13]==1 and nCount[13]==1 && ntotal==2+nCount[22]) vetoEvent;
 53      Particles ds = apply<UnstableParticles>(event, "UFS").particles();
 54      for (const Particle& p1 : ds) {
 55        if(p1.abspid()!=431) continue;
 56      	// find the children
 57        bool matched = false;
 58      	map<long,int> nRes = nCount;
 59      	int ncount = ntotal;
 60      	findChildren(p1,nRes,ncount);
 61        for (const Particle& p2 : ds) {
 62          if(p2.abspid()!=433 || p1.pid()*p2.pid()>0) continue;
 63          map<long,int> nRes2 = nRes;
 64          int ncount2 = ncount;
 65          findChildren(p2,nRes2,ncount2);
 66          if (ncount2!=0) continue;
 67          matched=true;
 68          for (const auto& val : nRes2) {
 69            if (val.second!=0) {
 70              matched = false;
 71              break;
 72            }
 73          }
 74          if (matched) {
 75            break;
 76          }
 77        }
 78        if (matched) {
 79          _h->fill("4.14"s);
 80          break;
 81        }
 82      }
 83    }
 84
 85
 86    /// Normalise histograms etc., after the run
 87    void finalize() {
 88      const double br = 0.045;
 89      const double fact = br*crossSection()/ sumOfWeights()/picobarn;
 90      scale(_h,fact);
 91    }
 92
 93    /// @}
 94
 95
 96    /// @name Histograms
 97    /// @{
 98    BinnedHistoPtr<string> _h;
 99    /// @}
100
101
102  };
103
104
105  RIVET_DECLARE_PLUGIN(MARKIII_1987_I244856);
106
107}