rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MARKII_1979_I143939

Measurement of $R$ and $D\bar{D}$ cross section between 3.67 and 3.872 GeV
Experiment: MARKII (SPEAR)
Inspire ID: 143939
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Schindler, R.H. PhD Thesis, 1979
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons and e+ e- to mu+ mu- (for normalization)

Measurement of $R$ and the $D\bar{D}$ cross section in $e^+e^-$ collisions between 3.67 and 3.872 GeV The individual hadronic and muonic cross sections are also outputted to the yoda file so that ratio $R$ can be recalcuated if runs are combined.

Source code: MARKII_1979_I143939.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 Add a short analysis description here
 10  class MARKII_1979_I143939 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(MARKII_1979_I143939);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      declare(FinalState(), "FS");
 23      declare(UnstableParticles(), "UFS");
 24      book(_c_hadrons, "/TMP/sigma_hadrons");
 25      book(_c_muons, "/TMP/sigma_muons");
 26      book(_c_DD, "/TMP/sigma_DD");
 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    /// Perform the per-event analysis
 41    void analyze(const Event& event) {
 42      const FinalState& fs = apply<FinalState>(event, "FS");
 43      // total hadronic and muonic cross sections
 44      map<long,int> nCount;
 45      int ntotal(0);
 46      for (const Particle& p : fs.particles()) {
 47	nCount[p.pid()] += 1;
 48	++ntotal;
 49      }
 50      // mu+mu- + photons
 51      if(nCount[-13]==1 and nCount[13]==1 &&
 52	 ntotal==2+nCount[22])
 53	_c_muons->fill();
 54      // everything else
 55      else
 56	_c_hadrons->fill();
 57      // identified final state with D mesons
 58      const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
 59      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 60	bool matched = false;
 61       	const Particle& p1 = ufs.particles()[ix];
 62       	int id1 = abs(p1.pid());
 63       	if(id1 != 411 && id1 != 421) continue;
 64      	// check fs
 65      	bool fs = true;
 66      	for (const Particle & child : p1.children()) {
 67      	  if(child.pid()==p1.pid()) {
 68      	    fs = false;
 69      	    break;
 70      	  }
 71      	}
 72      	if(!fs) continue;
 73      	// find the children
 74      	map<long,int> nRes = nCount;
 75      	int ncount = ntotal;
 76      	findChildren(p1,nRes,ncount);
 77      	// loop over the other fs particles
 78       	for(unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
 79       	  const Particle& p2 = ufs.particles()[iy];
 80       	  fs = true;
 81       	  for (const Particle & child : p2.children()) {
 82       	    if(child.pid()==p2.pid()) {
 83       	      fs = false;
 84       	      break;
 85       	    }
 86       	  }
 87       	  if(!fs) continue;
 88       	  if(p2.pid()/abs(p2.pid())==p1.pid()/abs(p1.pid())) continue;
 89       	  int id2 = abs(p2.pid());
 90       	  if(id2 != 411 && id2 != 421) continue;
 91      	  if(!p2.parents().empty() && p2.parents()[0].pid()==p1.pid())
 92      	    continue;
 93      	  map<long,int> nRes2 = nRes;
 94      	  int ncount2 = ncount;
 95      	  findChildren(p2,nRes2,ncount2);
 96      	  if(ncount2!=0) continue;
 97	  matched=true;
 98	  for(auto const & val : nRes2) {
 99	    if(val.second!=0) {
100	      matched = false;
101	      break;
102	    }
103	  }
104	  if(matched) {
105	    _c_DD  ->fill();
106	    break;
107	  }
108	}
109	if(matched) break;
110      }
111    }
112
113
114    /// Normalise histograms etc., after the run
115    void finalize() {
116      Estimate0D R = *_c_hadrons/ *_c_muons;
117      double fact = crossSection()/ sumOfWeights() /nanobarn;
118      double sig_h = _c_hadrons->val()*fact;
119      double err_h = _c_hadrons->err()*fact;
120      double sig_m = _c_muons  ->val()*fact;
121      double err_m = _c_muons  ->err()*fact;
122      Estimate1DPtr hadrons;
123      book(hadrons, "sigma_hadrons");
124      Estimate1DPtr muons;
125      book(muons, "sigma_muons"  );
126      Estimate1DPtr mult;
127      book(mult, 2,1,1);
128      for (auto& b : mult->bins()) {
129        if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
130          b.set(R.val(), R.errPos());
131          hadrons->bin(b.index()).set(sig_h, err_h);
132          muons  ->bin(b.index()).set(sig_m, err_m);
133        }
134      }
135      double sigma = _c_DD->val()*fact;
136      double error = _c_DD->err()*fact;
137      book(mult, 3,1,1);
138      for (auto& b : mult->bins()) {
139        if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
140          b.set(sigma, error);
141        }
142      }
143    }
144
145    /// @}
146
147
148    /// @name Histograms
149    /// @{
150    CounterPtr _c_hadrons, _c_muons, _c_DD;
151    /// @}
152
153
154  };
155
156
157  RIVET_DECLARE_PLUGIN(MARKII_1979_I143939);
158
159
160}