rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

TASSO_1990_I284251

$K^0,\bar{K}^0$ and $K^{*\pm}$ spectra in $e^+e^-$ collisions for centre-of-mass energies between 14.8 and 42.6 GeV
Experiment: TASSO (Petra)
Inspire ID: 284251
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Z.Phys. C47 (1990) 167-180, 1990
Beams: e+ e-
Beam energies: (7.4, 7.4); (10.8, 10.8); (17.2, 17.2); (17.5, 17.5); (21.3, 21.3) GeV
Run details:
  • e+ e- to hadrons. Beam energy must be specified as analysis option "ENERGY" when rivet-merge'ing samples.

Measurement of the $K^0,\bar{K}^0$ and $K^{*\pm}$ spectra in $e^+e^-$ collisions for centre-of-mass energies between 14.8 and 42.6 GeV by the TASSO experiment at Petra. Beam energy must be specified as analysis option "ENERGY" when rivet-merge'ing samples.

Source code: TASSO_1990_I284251.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/Beam.hh"
  4#include "Rivet/Projections/Sphericity.hh"
  5#include "Rivet/Projections/UnstableParticles.hh"
  6#include "Rivet/Projections/ChargedFinalState.hh"
  7
  8namespace Rivet {
  9
 10
 11  /// @brief K0 and K*+ spectra
 12  class TASSO_1990_I284251 : public Analysis {
 13  public:
 14
 15    /// Constructor
 16    RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1990_I284251);
 17
 18
 19    /// @name Analysis methods
 20    //@{
 21
 22    /// Book histograms and initialise projections before the run
 23    void init() {
 24
 25      // Initialise and register projections
 26      declare(Beam(), "Beams");
 27      declare(UnstableParticles(), "UFS");
 28      const ChargedFinalState cfs;
 29      declare(cfs, "CFS");
 30      declare(Sphericity(cfs), "Sphericity");
 31
 32
 33      // Book histograms
 34      _ih=-1; _iy=-1;
 35      if(isCompatibleWithSqrtS(14.8)) {
 36	_ih=1;
 37      }
 38      else if (isCompatibleWithSqrtS(21.5)) {
 39	_ih=2;
 40      }
 41      else if (isCompatibleWithSqrtS(34.5)) {
 42	_ih=0;
 43	_iy=3;
 44      }
 45      else if (isCompatibleWithSqrtS(35.0)) {
 46	_ih=0;
 47	_iy=2;
 48      }
 49      else if (isCompatibleWithSqrtS(42.6)) {
 50	_ih=0;
 51	_iy=1;
 52      }
 53      else
 54	MSG_ERROR("Beam energy " << sqrtS() << " not supported!");
 55
 56      if(_ih==0) {
 57	book(_h_K0_x, 1,1,_iy);
 58	if(_iy!=3) {
 59	  book(_p_K0_S_1, 5,1,2*_iy-1);
 60	  book(_p_K0_S_2,"TMP/p_K0_S_2",refData(_ih+5,1,2*_iy));
 61	}
 62	book(_h_Kstar_x, 8,1,_iy);
 63	if(_iy==2) {
 64	  book(_p_Kstar_S_1, 10,1,1);
 65	  book(_p_Kstar_S_2,"TMP/p_Kstar_S_2",refData(10,1,2));
 66	}
 67      }
 68      else {
 69	book(_h_K0_x  , _ih+1,1,1);
 70	book(_p_K0_S_1, _ih+5,1,1);
 71	book(_p_K0_S_2,"TMP/p_K0_S_2",refData(_ih+5,1,2));
 72      }
 73      book(_n_K0   ,"/TMP/nK0"   );
 74      book(_n_Kstar,"/TMP/nKstar");
 75    }
 76
 77
 78    /// Perform the per-event analysis
 79    void analyze(const Event& event) {
 80      const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
 81      const size_t numParticles = cfs.particles().size();
 82
 83      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 84      if (numParticles < 2) {
 85        MSG_DEBUG("Failed leptonic event cut");
 86        vetoEvent;
 87      }
 88      MSG_DEBUG("Passed leptonic event cut");
 89
 90      // Get beams and average beam momentum
 91      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 92      const double meanBeamMom = ( beams.first.p3().mod() +
 93				   beams.second.p3().mod() ) / 2.0;
 94      const Sphericity& sphericity = apply<Sphericity>(event, "Sphericity");
 95
 96      unsigned int nK0(0),nKstar(0);
 97      UnstableParticles ufs = apply<UnstableParticles>(event,"UFS");
 98      for(const Particle & p : ufs.particles(Cuts::abspid==323 or Cuts::pid==130 or Cuts::pid==310)) {
 99	double xE = p.E()/meanBeamMom;
100	double modp = p.p3().mod();
101	double beta = modp/p.E();
102	if(abs(p.pid())==323) {
103	  if(_h_Kstar_x!=Histo1DPtr()) _h_Kstar_x->fill(xE,1./beta);
104	  ++nKstar;
105	}
106	else {
107	  if(_h_K0_x!=Histo1DPtr()) _h_K0_x->fill(xE,1./beta);
108	  ++nK0;
109	}
110      }
111      _n_K0->fill(nK0);
112      _n_Kstar->fill(nKstar);
113      double sphere = sphericity.sphericity();
114      if(_p_K0_S_1!=Profile1DPtr()) {
115	_p_K0_S_1->fill(sphere,nK0);
116	_p_K0_S_2->fill(sphere,cfs.particles().size());
117      }
118      if(_p_Kstar_S_1!=Profile1DPtr()) {
119	_p_Kstar_S_1->fill(sphere,nKstar);		    
120	_p_Kstar_S_2->fill(sphere,cfs.particles().size());
121      }
122    }
123
124
125    /// Normalise histograms etc., after the run
126    void finalize() {
127      scale(_h_K0_x, sqr(sqrtS())*crossSection()/microbarn/sumOfWeights());
128      if(_h_Kstar_x!=Histo1DPtr())
129	scale(_h_Kstar_x, sqr(sqrtS())*crossSection()/nanobarn/sumOfWeights());
130      if(_p_K0_S_1!=Profile1DPtr()) {
131	Scatter2DPtr temp;
132	if(_ih==0)
133	  book(temp,5,1,2*_iy);
134	else
135	  book(temp,_ih+5,1,2);
136	divide(_p_K0_S_1,_p_K0_S_2,temp);
137      }
138      if(_p_Kstar_S_1!=Profile1DPtr()) {
139	Scatter2DPtr temp;
140	book(temp,10,1,2);
141	divide(_p_Kstar_S_1,_p_Kstar_S_2,temp);
142      }
143      // K0 mult
144      scale(_n_K0   ,1./sumOfWeights());
145      Scatter2D temphisto(refData(4, 1, 1));
146      Scatter2DPtr mult;
147      book(mult, 4, 1, 1);
148      for (size_t b = 0; b < temphisto.numPoints(); b++) {
149      	const double x  = temphisto.point(b).x();
150      	pair<double,double> ex = temphisto.point(b).xErrs();
151      	pair<double,double> ex2 = ex;
152     	if(ex2.first ==0.) ex2. first=0.0001;
153     	if(ex2.second==0.) ex2.second=0.0001;
154      	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second))
155       	  mult   ->addPoint(x, _n_K0->val(), ex, make_pair(_n_K0->err(),_n_K0->err()));
156	else
157	  mult   ->addPoint(x, 0., ex, make_pair(0.,.0));
158      }
159      // K*= mult
160      scale(_n_Kstar,1./sumOfWeights());
161      Scatter2D temphisto2(refData(9, 1, 1));
162      Scatter2DPtr mult2;
163      book(mult2,9, 1, 1);
164      for (size_t b = 0; b < temphisto2.numPoints(); b++) {
165      	const double x  = temphisto2.point(b).x();
166      	pair<double,double> ex = temphisto2.point(b).xErrs();
167      	pair<double,double> ex2 = ex;
168     	if(ex2.first ==0.) ex2. first=0.0001;
169     	if(ex2.second==0.) ex2.second=0.0001;
170      	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second))
171       	  mult2   ->addPoint(x, _n_Kstar->val(), ex, make_pair(_n_Kstar->err(),_n_Kstar->err()));
172	else
173	  mult2   ->addPoint(x, 0., ex, make_pair(0.,.0));
174      }
175    }
176
177    //@}
178
179
180    /// @name Histograms
181    //@{
182    Histo1DPtr _h_K0_x, _h_Kstar_x;
183    Profile1DPtr _p_K0_S_1, _p_K0_S_2, _p_Kstar_S_1, _p_Kstar_S_2;
184    CounterPtr _n_K0,_n_Kstar;
185    int _ih,_iy;
186    //@}
187
188
189  };
190
191
192  // The hook for the plugin system
193  RIVET_DECLARE_PLUGIN(TASSO_1990_I284251);
194
195
196}