rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2012_I892684

Cross sections for $e^+e^-\to$ $K^+K^-\pi^+\pi^-$, $K^+K^-\pi^0\pi^0$, and $K^+K^-K^+K^-$ between 1.28 and 5.0 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 892684
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D86 (2012) 012008, 2012
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^- \to$ $K^+K^-\pi^+\pi^-$, $K^+K^-\pi^0\pi^0$ and $K^+K^-K^+K^-$ via radiative return, including the identification of $K^{*0}$, $\phi$ and $f_0(980)$ mesons for energies between 1.28 and 5.0 GeV

Source code: BABAR_2012_I892684.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/UnstableParticles.hh"
  5
  6
  7namespace Rivet {
  8
  9
 10  /// @brief e+e- > K+K- + pi+pi-, pi0pi0 or K+K-
 11  class BABAR_2012_I892684 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2012_I892684);
 16
 17
 18    /// @name Analysis methods
 19    //@{
 20
 21    /// Book histograms and initialise projections before the run
 22    void init() {
 23
 24      // Initialise and register projections
 25      declare(FinalState(), "FS");
 26      declare(UnstableParticles(), "UFS");
 27
 28      book(_cKpKmpippim , "TMP/KpKmpippim");
 29      book(_cKstarKpi   , "TMP/KstarKpi");
 30      book(_cphipippim  , "TMP/phipippim");
 31      book(_cphif0_980  , "TMP/phif0_980");
 32      book(_cphif0_600  , "TMP/phif0_600");
 33      book(_cKpKmpi0pi0 , "TMP/KpKmpi0pi0");
 34      book(_cphif0pi0pi0, "TMP/phif0pi0pi0");
 35      book(_c2Kp2Km     , "TMP/2Kp2Km");
 36    }
 37
 38    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 39      for (const Particle &child : p.children()) {
 40	if(child.children().empty()) {
 41	  nRes[child.pid()]-=1;
 42	  --ncount;
 43	}
 44	else
 45	  findChildren(child,nRes,ncount);
 46      }
 47    }
 48
 49
 50    /// Perform the per-event analysis
 51    void analyze(const Event& event) {
 52      const FinalState& fs = apply<FinalState>(event, "FS");
 53
 54      map<long,int> nCount;
 55      int ntotal(0);
 56      for (const Particle& p : fs.particles()) {
 57	nCount[p.pid()] += 1;
 58	++ntotal;
 59      }
 60      const FinalState& ufs = apply<FinalState>(event, "UFS");
 61      for (const Particle& p : ufs.particles()) {
 62	if(p.children().empty()) continue;
 63	// K*0
 64	if(abs(p.pid())==313) {
 65	  map<long,int> nRes=nCount;
 66	  int ncount = ntotal;
 67	  findChildren(p,nRes,ncount);
 68	  // K* K+/- pi-/+
 69	  if(ncount !=2 ) continue;
 70	  bool matched = true;
 71	  for(auto const & val : nRes) {
 72	    if(abs(val.first)==321 || abs(val.first)==211) {
 73	      continue;
 74	    }
 75	    else if(val.second!=0) {
 76	      matched = false;
 77	      break;
 78	    }
 79	  }
 80	  if(matched==false) continue;
 81	  if((nCount[321] == 1 && nCount[-321] ==0 &&
 82	      nCount[211] == 0 && nCount[-211] == 1) ||
 83	     (nCount[321] == 0 && nCount[-321] ==1 &&
 84	      nCount[211] == 1 && nCount[-211] == 0))
 85	    _cKstarKpi->fill();
 86	}
 87	else if(p.pid()==333) {
 88	  map<long,int> nRes=nCount;
 89	  int ncount = ntotal;
 90	  findChildren(p,nRes,ncount);
 91	  // phi pi+pi-
 92	  if(ncount==2) {
 93	    bool matched = true;
 94	    for(auto const & val : nRes) {
 95	      if(abs(val.first)==211) {
 96		if(val.second!=1) {
 97		  matched = false;
 98		  break;
 99		}
100	      }
101	      else if(val.second!=0) {
102		matched = false;
103		break;
104	      }
105	    }
106	    if(matched)
107	      _cphipippim->fill();
108	  }
109	  for (const Particle& p2 : ufs.particles()) {
110	    if(p2.pid()!=9010221&&p2.pid()!=9000221) continue;
111	    if(p2.parents()[0].isSame(p)) continue;
112	    map<long,int> nResB = nRes;
113	    int ncountB = ncount;
114	    findChildren(p2,nResB,ncountB);
115	    if(ncountB!=0) continue;
116	    bool matched2 = true;
117	    for(auto const & val : nResB) {
118	      if(val.second!=0) {
119		matched2 = false;
120		break;
121	      }
122	    }
123	    if(matched2) {
124	      if(p2.pid()==9010221) {
125		_cphif0pi0pi0->fill();
126		_cphif0_980  ->fill();
127	      }
128	      else {
129		_cphif0_600  ->fill();
130	      }
131	    }
132	  }
133	}
134      }
135      if(ntotal==4) {
136	if(nCount[321]==1 && nCount[-321]==1 && nCount[211]==1 && nCount[-211]==1)
137	  _cKpKmpippim->fill();
138	else if( nCount[321]==1 && nCount[-321]==1 && nCount[111]==2)
139	  _cKpKmpi0pi0->fill();
140	else if( nCount[321]==2 && nCount[-321]==2)
141	  _c2Kp2Km->fill();
142      }
143    }
144
145
146    /// Normalise histograms etc., after the run
147    void finalize() {
148      for(unsigned int ix=1;ix<9;++ix) {
149	double sigma = 0., error = 0.;
150	if(ix==1) {
151	  sigma = _cKpKmpippim->val();
152	  error = _cKpKmpippim->err();
153	}
154	else if(ix==2) {
155	  sigma = _cKstarKpi->val();
156	  error = _cKstarKpi->err();
157	}
158     	else if(ix==3) {
159	  sigma = _cphipippim->val();
160	  error = _cphipippim->err();
161	}
162     	else if(ix==4) {
163	  sigma = _cphif0_980->val();
164	  error = _cphif0_980->err();
165	}
166     	else if(ix==5) {
167	  sigma = _cphif0_600->val();
168	  error = _cphif0_600->err();
169	}
170     	else if(ix==6) {
171	  sigma = _cKpKmpi0pi0->val();
172	  error = _cKpKmpi0pi0->err();
173	}
174     	else if(ix==7) {
175	  sigma = _cphif0pi0pi0->val();
176	  error = _cphif0pi0pi0->err();
177	}
178     	else if(ix==8) {
179	  sigma =  _c2Kp2Km->val();
180	  error =  _c2Kp2Km->err();
181	}
182    	sigma *= crossSection()/ sumOfWeights() /nanobarn;
183    	error *= crossSection()/ sumOfWeights() /nanobarn;
184	Scatter2D temphisto(refData(ix, 1, 1));
185	Scatter2DPtr  mult;
186        book(mult, ix, 1, 1);
187	for (size_t b = 0; b < temphisto.numPoints(); b++) {
188	  const double x  = temphisto.point(b).x();
189	  pair<double,double> ex = temphisto.point(b).xErrs();
190	  pair<double,double> ex2 = ex;
191	  if(ex2.first ==0.) ex2. first=0.0001;
192	  if(ex2.second==0.) ex2.second=0.0001;
193	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
194	    mult->addPoint(x, sigma, ex, make_pair(error,error));
195	  }
196	  else {
197	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
198	  }
199	}
200      }
201    }
202
203    //@}
204
205
206    /// @name Histograms
207    //@{
208    CounterPtr _cKpKmpippim, _cKstarKpi, _cphipippim,
209      _cphif0_980,_cphif0_600, _cKpKmpi0pi0, _cphif0pi0pi0, _c2Kp2Km;
210    //@}
211
212
213  };
214
215
216  // The hook for the plugin system
217  RIVET_DECLARE_PLUGIN(BABAR_2012_I892684);
218
219
220}