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      Scatter1D R = *_c_hadrons/ *_c_muons;
117      double              rval = R.point(0).x();
118      pair<double,double> rerr = R.point(0).xErrs();
119      double fact = crossSection()/ sumOfWeights() /nanobarn;
120      double sig_h = _c_hadrons->val()*fact;
121      double err_h = _c_hadrons->err()*fact;
122      double sig_m = _c_muons  ->val()*fact;
123      double err_m = _c_muons  ->err()*fact;
124      Scatter2D temphisto(refData(2, 1, 1));
125      Scatter2DPtr hadrons;
126      book(hadrons, "sigma_hadrons");
127      Scatter2DPtr muons;
128      book(muons, "sigma_muons"  );
129      Scatter2DPtr mult;
130      book(mult, 2,1,1);
131      for (size_t b = 0; b < temphisto.numPoints(); b++) {
132	const double x  = temphisto.point(b).x();
133	pair<double,double> ex = temphisto.point(b).xErrs();
134	pair<double,double> ex2 = ex;
135	if(ex2.first ==0.) ex2. first=0.0001;
136	if(ex2.second==0.) ex2.second=0.0001;
137	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
138	  mult   ->addPoint(x, rval, ex, rerr);
139	  hadrons->addPoint(x, sig_h, ex, make_pair(err_h,err_h));
140	  muons  ->addPoint(x, sig_m, ex, make_pair(err_m,err_m));
141	}
142	else {
143	  mult   ->addPoint(x, 0., ex, make_pair(0.,.0));
144	  hadrons->addPoint(x, 0., ex, make_pair(0.,.0));
145	  muons  ->addPoint(x, 0., ex, make_pair(0.,.0));
146	}
147      }
148      double sigma = _c_DD->val()*fact;
149      double error = _c_DD->err()*fact;
150      Scatter2D temphisto2(refData(3, 1, 1));
151      book(mult, 3,1,1);
152      for (size_t b = 0; b < temphisto2.numPoints(); b++) {
153	const double x  = temphisto2.point(b).x();
154	pair<double,double> ex = temphisto2.point(b).xErrs();
155	pair<double,double> ex2 = ex;
156	if(ex2.first ==0.) ex2. first=0.0001;
157	if(ex2.second==0.) ex2.second=0.0001;
158	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
159	  mult   ->addPoint(x, sigma, ex, make_pair(error,error));
160	}
161	else {
162	  mult   ->addPoint(x, 0., ex, make_pair(0.,.0));
163	}
164      }
165    }
166
167    //@}
168
169
170    /// @name Histograms
171    //@{
172    CounterPtr _c_hadrons, _c_muons, _c_DD;
173    //@}
174
175
176  };
177
178
179  // The hook for the plugin system
180  RIVET_DECLARE_PLUGIN(MARKII_1979_I143939);
181
182
183}