rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BELLE_2005_I667712

$\gamma\gamma\to\pi^+\pi^-$ and $K^+K^-$ for centre-of-mass energies between 2.4 and 4.1 GeV
Experiment: BELLE (KEKB)
Inspire ID: 667712
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett.B 615 (2005) 39-49
Beams: 22 22
Beam energies: ANY
Run details:
  • gamma gamma to hadrons

Measurement of the differential cross section for $\gamma\gamma\to\pi^+\pi^-$ and $K^+K^-$ for $2.4 \text{GeV} < W < 4.1 \text{GeV}$. Both the cross section as a function of the centre-of-mass energy of the photonic collision, and the differential cross section with respect to the pion scattering angle are measured.

Source code: BELLE_2005_I667712.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief  gamma gamma -> pi+pi-/K+ K-
  9  class BELLE_2005_I667712 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2005_I667712);
 14
 15
 16    /// @name Analysis methods
 17    ///@{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      // Final state
 22      declare(FinalState(),"FS");
 23      // check CMS energy in range
 24      if(sqrtS()<2.4*GeV || sqrtS()>4.1*GeV)
 25	throw Error("Invalid CMS energy for BELLE_2005_I667712");
 26      for(unsigned int ix=0;ix<7;++ix) {
 27	std::ostringstream title;
 28	title << "/TMP/nPi_" << ix;
 29	book(_cPi[ix], title.str());
 30      }
 31      for(unsigned int ix=0;ix<7;++ix) {
 32	std::ostringstream title;
 33	title << "/TMP/nK_" << ix;
 34	book(_cK[ix], title.str());
 35      }
 36    }
 37
 38
 39    /// Perform the per-event analysis
 40    void analyze(const Event& event) {
 41      Particles part = applyProjection<FinalState>(event,"FS").particles();
 42      if(part.size()!=2) vetoEvent;
 43      if(part[0].pid()!=-part[1].pid()) vetoEvent;
 44      double cTheta(0.);
 45      bool foundPi(false),foundK(false);
 46      for(const Particle & p : part) {
 47	if(p.pid()==PID::PIPLUS) {
 48	  foundPi=true;
 49	  cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
 50	}
 51	else if(p.pid()==PID::KPLUS) {
 52	  foundK=true;
 53	  cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
 54	}
 55      }
 56      if(!foundPi && !foundK) vetoEvent;
 57      int ibin = cTheta/0.1;
 58      if(ibin>5) vetoEvent;
 59      if(foundPi) {
 60	_cPi[   0  ]->fill();
 61	_cPi[ibin+1]->fill();
 62      }
 63      else if(foundK) {
 64	_cK[   0  ]->fill();
 65	_cK[ibin+1]->fill();
 66      }
 67    }
 68
 69
 70    /// Normalise histograms etc., after the run
 71    void finalize() {
 72      double fact = crossSection()/nanobarn/sumOfWeights();
 73      for(unsigned int ip=0;ip<2;++ip) {
 74	CounterPtr denom = ip==0 ? _cPi[0] : _cK[0];
 75	if(denom->numEntries()==0) continue;
 76	for(unsigned int ih=0;ih<7;++ih) {
 77	  CounterPtr numer = ip==0 ? _cPi[ih] : _cK[ih];
 78	  double sigma = numer->val()*fact;
 79	  double error = numer->err()*fact;
 80	  // bin width for 2d dist
 81	  if(ih!=0) {
 82	    sigma /=0.1;
 83	    error /=0.1;
 84	  }
 85	  unsigned int ix=5+ip, iy=ih;
 86	  if(ih==0) {
 87	    ix=1;
 88	    iy = ip==0 ? 2 : 1;
 89	  }
 90	  // ratio
 91	  std::ostringstream title;
 92	  title << "/TMP/n_" << ip << "_" << ih;
 93	  Scatter1D sTemp(title.str());
 94	  Scatter1DPtr s1d = registerAO(sTemp);
 95	  // hist for axis
 96	  Scatter2D temphisto(refData(ix, 1, iy));
 97	  Scatter2DPtr cross,ratio;
 98	  book(cross, ix, 1, iy);
 99	  if(ih!=0) {
100	    book(ratio,ix-2,1,iy);
101	    divide(numer,denom,s1d);
102	  }
103	  for (size_t b = 0; b < temphisto.numPoints(); b++) {
104	    const double x  = temphisto.point(b).x();
105	    pair<double,double> ex = temphisto.point(b).xErrs();
106	    pair<double,double> ex2 = ex;
107	    if(ex2.first ==0.) ex2. first=0.0001;
108	    if(ex2.second==0.) ex2.second=0.0001;
109	    if (inRange(sqrtS(), x-ex2.first, x+ex2.second)) {
110	      cross->addPoint(x, sigma, ex, make_pair(error,error));
111	      if(ih!=0) {
112		ratio->addPoint(x,s1d->points()[0].x()/0.1,ex,make_pair(s1d->points()[0].xErrs().first /0.1,
113									s1d->points()[0].xErrs().second/0.1));
114	      }
115	    }
116	    else {
117	      cross->addPoint(x, 0., ex, make_pair(0.,.0));
118	      if(ih!=0)
119		ratio->addPoint(x, 0., ex, make_pair(0.,.0));
120	    }
121	  }
122	}
123      }
124
125
126      // }
127    }
128
129    ///@}
130
131
132    /// @name Histograms
133    ///@{
134    CounterPtr _cPi[7],_cK[7];
135    ///@}
136
137
138  };
139
140
141  RIVET_DECLARE_PLUGIN(BELLE_2005_I667712);
142
143}