rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BELLE_2009_I809630

Cross Section for $e^+e^-\to\phi\pi^+\pi^-$ between 1.488 and 2.987 GeV
Experiment: BELLE (KEKB)
Inspire ID: 809630
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D80 (2009) 031101, 2009
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\phi\pi^+\pi^-$ between 1.488 and 2.987 GeV

Source code: BELLE_2009_I809630.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 BELLE_2009_I809630 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2009_I809630);
 15
 16
 17    /// @name Analysis methods
 18    //@{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22
 23      // Initialise and register projections
 24      declare(FinalState(), "FS");
 25      declare(UnstableParticles(), "UFS");
 26      book(_cphipippim, "TMP/phipippim");
 27      book(_cphif0 ,    "TMP/phif0");
 28    }
 29
 30    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 31      for(const Particle &child : p.children()) {
 32	if(child.children().empty()) {
 33	  nRes[child.pid()]-=1;
 34	  --ncount;
 35	}
 36	else
 37	  findChildren(child,nRes,ncount);
 38      }
 39    }
 40
 41
 42    /// Perform the per-event analysis
 43    void analyze(const Event& event) {
 44
 45      const FinalState& fs = apply<FinalState>(event, "FS");
 46
 47      map<long,int> nCount;
 48      int ntotal(0);
 49      for (const Particle& p : fs.particles()) {
 50	nCount[p.pid()] += 1;
 51	++ntotal;
 52      }
 53      const FinalState& ufs = apply<FinalState>(event, "UFS");
 54      for (const Particle& p : ufs.particles()) {
 55	if(p.children().empty()) continue;
 56	// phi
 57	if(p.pid()!=333) continue;
 58	map<long,int> nRes=nCount;
 59	int ncount = ntotal;
 60	findChildren(p,nRes,ncount);
 61	// phi pi+pi-
 62	if(ncount==2) {
 63	  bool matched = true;
 64	  for(auto const & val : nRes) {
 65	    if(abs(val.first)==211) {
 66	      if(val.second!=1) {
 67		matched = false;
 68		break;
 69	      }
 70	    }
 71	    else if(val.second!=0) {
 72	      matched = false;
 73	      break;
 74	    }
 75	  }
 76	  if(matched)
 77	    _cphipippim->fill();
 78	}
 79	for (const Particle& p2 : ufs.particles()) {
 80	  if(p2.pid()!=9010221) continue;
 81	  if(p2.parents()[0].isSame(p)) continue;
 82	  map<long,int> nResB = nRes;
 83	  int ncountB = ncount;
 84	  findChildren(p2,nResB,ncountB);
 85	  if(ncountB!=0) continue;
 86	  bool matched2 = true;
 87	  for(auto const & val : nResB) {
 88	    if(val.second!=0) {
 89	      matched2 = false;
 90	      break;
 91	    }
 92	  }
 93	  if(matched2) {
 94	    _cphif0  ->fill();
 95	  }
 96	}
 97      }
 98    }
 99
100
101    /// Normalise histograms etc., after the run
102    void finalize() {
103      for(unsigned int ix=1;ix<3;++ix) {
104	double sigma,error;
105	if(ix==1) {
106	  sigma = _cphipippim->val();
107	  error = _cphipippim->err();
108	}
109	else {
110	  sigma = _cphif0->val();
111	  error = _cphif0->err();
112	}
113	sigma *= crossSection()/ sumOfWeights() /nanobarn;
114	error *= crossSection()/ sumOfWeights() /nanobarn;
115	Scatter2D temphisto(refData(ix, 1, 1));
116	Scatter2DPtr  mult;
117        book(mult, ix, 1, 1);
118	for (size_t b = 0; b < temphisto.numPoints(); b++) {
119	  const double x  = temphisto.point(b).x();
120	  pair<double,double> ex = temphisto.point(b).xErrs();
121	  pair<double,double> ex2 = ex;
122	  if(ex2.first ==0.) ex2. first=0.0001;
123	  if(ex2.second==0.) ex2.second=0.0001;
124	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
125	    mult->addPoint(x, sigma, ex, make_pair(error,error));
126	  }
127	  else {
128	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
129	  }
130	}
131      }
132    }
133    //@}
134
135
136    /// @name Histograms
137    //@{
138    CounterPtr _cphipippim;
139    CounterPtr _cphif0;
140    //@}
141
142
143  };
144
145
146  // The hook for the plugin system
147  RIVET_DECLARE_PLUGIN(BELLE_2009_I809630);
148
149
150}