rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

SND_2019_I1726419

Cross section for $e^+e^-\to\pi^+\pi^-\pi^0\eta$ for energies below 2 GeV
Experiment: SND (VEPP-2M)
Inspire ID: 1726419
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to\pi^+\pi^-\pi^0\eta$, and the resonant sub-processes $\omega\eta$, $\phi\eta$ and $a_0(980)\rho$, for energies below 2 GeV by the SND experiment

Source code: SND_2019_I1726419.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 SND pi+pi-pi0eta cross section
 10  class SND_2019_I1726419 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(SND_2019_I1726419);
 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
 27
 28      book(_c_all  , "/TMP/all");
 29      book(_c_omega, "/TMP/omega");
 30      book(_c_phi  , "/TMP/phi");
 31      book(_c_rho  , "/TMP/rho");
 32    }
 33
 34
 35    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 36      for( const Particle &child : p.children()) {
 37	if(child.children().empty()) {
 38	  --nRes[child.pid()];
 39	  --ncount;
 40	}
 41	else
 42	  findChildren(child,nRes,ncount);
 43      }
 44    }
 45
 46    /// Perform the per-event analysis
 47    void analyze(const Event& event) {
 48      
 49      const FinalState& fs = apply<FinalState>(event, "FS");
 50
 51      map<long,int> nCount;
 52      int ntotal(0);
 53      for (const Particle& p : fs.particles()) {
 54	nCount[p.pid()] += 1;
 55	++ntotal;
 56      }
 57      const FinalState& ufs = apply<FinalState>(event, "UFS");
 58      bool found = false, foundOmegaPhi = false;
 59      for (const Particle& p : ufs.particles(Cuts::pid==221)) {
 60	map<long,int> nRes = nCount;
 61	int ncount = ntotal;
 62	findChildren(p,nRes,ncount);
 63	// eta pi+pi-
 64	if(ncount==3) {
 65	  bool matched = true;
 66	  for(auto const & val : nRes) {
 67	    if(abs(val.first)==211 || val.first==111 ) {
 68	      if(val.second !=1) {
 69		matched = false;
 70		break;
 71	      }
 72	    }
 73	    else if(val.second!=0) {
 74	      matched = false;
 75	      break;
 76	    }
 77	  }
 78	  if(matched) {
 79	    _c_all->fill();
 80	    found = true;
 81	  }
 82	}
 83	for (const Particle& p2 : ufs.particles()) {
 84	  if(p2.pid()!=223 && p2.pid()!=333) continue;
 85	  map<long,int> nResB = nRes;
 86	  int ncountB = ncount;
 87	  findChildren(p2,nResB,ncountB);
 88	  if(ncountB!=0) continue;
 89	  bool matched2 = true;
 90	  for(auto const & val : nResB) {
 91	    if(val.second!=0) {
 92	      matched2 = false;
 93	      break;
 94	    }
 95	  }
 96	  if(matched2) {
 97	    if(p2.pid()==223)
 98	      _c_omega->fill();
 99	    else if(p2.pid()==333)
100	      _c_phi->fill();
101	    foundOmegaPhi=true;
102	  }
103	}
104      }
105      if(found && !foundOmegaPhi)
106	_c_rho->fill();
107    }
108    
109
110    /// Normalise histograms etc., after the run
111    void finalize() {
112      double fact = crossSection()/nanobarn/sumOfWeights();
113      for(unsigned int ix=1;ix<5;++ix) {
114	double sigma(0.),error(0.);
115	if(ix==1) {
116	  sigma = _c_all->val()*fact;
117	  error = _c_all->err()*fact;
118	}
119	else if(ix==2) {
120	  sigma = _c_omega->val()*fact;
121	  error = _c_omega->err()*fact;
122	}
123	else if(ix==3) {
124	  sigma = _c_phi->val()*fact;
125	  error = _c_phi->err()*fact;
126	}
127	else if(ix==4) {
128	  sigma = _c_rho->val()*fact;
129	  error = _c_rho->err()*fact;
130	} 
131	Scatter2D temphisto(refData(1, 1, ix));
132	Scatter2DPtr  mult;
133	book(mult, 1, 1, ix);
134	for (size_t b = 0; b < temphisto.numPoints(); b++) {
135	  const double x  = temphisto.point(b).x();
136	  pair<double,double> ex = temphisto.point(b).xErrs();
137	  pair<double,double> ex2 = ex;
138	  if(ex2.first ==0.) ex2. first=0.0001;
139	  if(ex2.second==0.) ex2.second=0.0001;
140	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
141	    mult->addPoint(x, sigma, ex, make_pair(error,error));
142	  }
143	  else {
144	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
145	  }
146	}
147      }
148    }
149
150    //@}
151
152
153    /// @name Histograms
154    //@{
155    CounterPtr _c_all, _c_omega, _c_phi,_c_rho;
156    //@}
157
158
159  };
160
161
162  // The hook for the plugin system
163  RIVET_DECLARE_PLUGIN(SND_2019_I1726419);
164
165
166}