rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

GAMMAGAMMA_1981_I158474

Multi pion cross sections for energies between 1.44 and 2.15 GeV
Experiment: GAMMAGAMMA (ADONE)
Inspire ID: 158474
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Nucl.Phys. B184 (1981) 31-39, 1981
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to$pions for energies between 1.44 and 2.15 GeV

Source code: GAMMAGAMMA_1981_I158474.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief Add a short analysis description here
  9  class GAMMAGAMMA_1981_I158474 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(GAMMAGAMMA_1981_I158474);
 14
 15
 16    /// @name Analysis methods
 17    //@{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      // Initialise and register projections
 22      declare(FinalState(), "FS");
 23      book(_n3pi, "TMP/n3pi");
 24      book(_n4pi, "TMP/n4pi");
 25      book(_n5pi, "TMP/n5pi");
 26      book(_n6pi, "TMP/n6pi");
 27      book(_n35pi, "TMP/n35pi");
 28      book(_n46pi, "TMP/n46pi");
 29      book(_nC2, "TMP/nC2");
 30      book(_nC4, "TMP/nC4");
 31      book(_nmu, "TMP/nmu");
 32    }
 33
 34
 35    /// Perform the per-event analysis
 36    void analyze(const Event& event) {
 37      const FinalState& fs = apply<FinalState>(event, "FS");
 38
 39      map<long,int> nCount;
 40      int ntotal(0);
 41      for (const Particle& p : fs.particles()) {
 42	nCount[p.pid()] += 1;
 43	++ntotal;
 44      }
 45      // mu+mu- + photons
 46      if(nCount[-13]==1 and nCount[13]==1 &&
 47	 ntotal==2+nCount[22])
 48	_nmu->fill();
 49      else {
 50	if(ntotal==3 && nCount[211] == 1 && nCount[-211]==1 && nCount[111]==1 ) {
 51	  _n3pi->fill();
 52	}
 53	if(ntotal==4 && nCount[211] == 1 && nCount[-211]==1 && nCount[111]==2 ) {
 54	  _n4pi->fill();
 55	}
 56	if(ntotal==5 && nCount[211] == 2 && nCount[-211]==2 && nCount[111]==1 ) {
 57	  _n5pi->fill();
 58	}
 59	if(ntotal==6 && nCount[211] == 2 && nCount[-211]==2 && nCount[111]==2 ) {
 60	  _n6pi->fill();
 61	}
 62	if(nCount[211] == 1 && nCount[-211]==1 && ntotal == 2+nCount[111]) {
 63	  _nC2->fill();
 64	}
 65	if(nCount[211] == 2 && nCount[-211]==2 && ntotal == 4+nCount[111]) {
 66	  _nC4->fill();
 67	}
 68	if((nCount[211]+nCount[-211]+nCount[111])==ntotal ) {
 69	  if(ntotal==3 || ntotal ==5)
 70	    _n35pi->fill();
 71	  else if(ntotal==4 || ntotal==6) 
 72	    _n46pi ->fill();
 73	}
 74      }
 75    }
 76
 77
 78    /// Normalise histograms etc., after the run
 79    void finalize() {
 80      double fact = crossSection()/ sumOfWeights() /nanobarn;
 81      for(unsigned int ix=1;ix<7;++ix) {
 82	double sigma = 0.0, error = 0.0;
 83	if(ix==1) {
 84	  sigma = _n3pi->val()*fact;
 85	  error = _n3pi->err()*fact;
 86	}
 87	else if(ix==2) {
 88	  sigma = _n4pi->val()*fact;
 89	  error = _n4pi->err()*fact;
 90	}
 91	else if(ix==3) {
 92	  sigma = _n5pi->val()*fact;
 93	  error = _n5pi->err()*fact;
 94	}
 95	else if(ix==4) {
 96	  sigma = _n6pi->val()*fact;
 97	  error = _n6pi->err()*fact;
 98	}
 99	else if(ix==5) {
100	  sigma = _n35pi->val()*fact;
101	  error = _n35pi->err()*fact;
102	}
103	else if(ix==6) {
104	  sigma = _n46pi->val()*fact;
105	  error = _n46pi->err()*fact;
106	} 
107	Scatter2D temphisto(refData(1, 1, ix));
108	Scatter2DPtr mult;
109	book(mult, 1, 1, ix);
110	for (size_t b = 0; b < temphisto.numPoints(); b++) {
111	  const double x  = temphisto.point(b).x();
112	  pair<double,double> ex = temphisto.point(b).xErrs();
113	  pair<double,double> ex2 = ex;
114	  if(ex2.first ==0.) ex2. first=0.0001;
115	  if(ex2.second==0.) ex2.second=0.0001;
116	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
117	    mult->addPoint(x, sigma, ex, make_pair(error,error));
118	  }
119	  else {
120	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
121	  }
122	}
123      }
124      for(unsigned int ix=1;ix<3;++ix) {
125	Scatter1D R = (ix==1? *_nC2 : *_nC4)/ *_nmu;
126	double              rval = R.point(0).x();
127	pair<double,double> rerr = R.point(0).xErrs();
128	double sig_h = (ix ==1 ? _nC2 : _nC4)->val()*fact;
129	double err_h = (ix ==1 ? _nC2 : _nC4)->err()*fact;
130	double sig_m = _nmu->val()*fact;
131	double err_m = _nmu->err()*fact;
132	Scatter2D temphisto(refData(2, 1, ix));
133	std::ostringstream title;
134	if(ix==1)
135	  title << "sigma_2pi";
136	else
137	  title << "sigma_4pi";
138	Scatter2DPtr hadrons;
139	book(hadrons, title.str());
140	Scatter2DPtr muons;
141 book(muons, "sigma_muons");
142	Scatter2DPtr mult;
143	book(mult, 2,1,ix);
144	for (size_t b = 0; b < temphisto.numPoints(); b++) {
145	  const double x  = temphisto.point(b).x();
146	  pair<double,double> ex = temphisto.point(b).xErrs();
147	  pair<double,double> ex2 = ex;
148	  if(ex2.first ==0.) ex2. first=0.0001;
149	  if(ex2.second==0.) ex2.second=0.0001;
150	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
151	    mult   ->addPoint(x, rval, ex, rerr);
152	    hadrons->addPoint(x, sig_h, ex, make_pair(err_h,err_h));
153	    if(ix==1) muons  ->addPoint(x, sig_m, ex, make_pair(err_m,err_m));
154	  }
155	  else {
156	    mult   ->addPoint(x, 0., ex, make_pair(0.,.0));
157	    hadrons->addPoint(x, 0., ex, make_pair(0.,.0));
158	    if(ix==1) muons  ->addPoint(x, 0., ex, make_pair(0.,.0));
159	  }
160	}
161      }
162    }
163
164    //@}
165
166
167    /// @name Histograms
168    //@{
169    CounterPtr _n3pi,_n4pi,_n5pi,_n6pi,_n35pi,_n46pi,_nC2,_nC4,_nmu;
170    //@}
171
172
173  };
174
175
176  // The hook for the plugin system
177  RIVET_DECLARE_PLUGIN(GAMMAGAMMA_1981_I158474);
178
179
180}