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*GeV)) {
 36	_ih=1;
 37      }
 38      else if (isCompatibleWithSqrtS(21.5*GeV)) {
 39	_ih=2;
 40      }
 41      else if (isCompatibleWithSqrtS(34.5*GeV)) {
 42	_ih=0;
 43	_iy=3;
 44      }
 45      else if (isCompatibleWithSqrtS(35.0*GeV)) {
 46	_ih=0;
 47	_iy=2;
 48      }
 49      else if (isCompatibleWithSqrtS(42.6*GeV)) {
 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      }
131      if(_p_K0_S_1!=Profile1DPtr()) {
132        Estimate1DPtr temp;
133        if(_ih==0)  book(temp,5,1,2*_iy);
134        else        book(temp,_ih+5,1,2);
135        divide(_p_K0_S_1,_p_K0_S_2,temp);
136      }
137      if(_p_Kstar_S_1!=Profile1DPtr()) {
138        Estimate1DPtr temp;
139        book(temp,10,1,2);
140        divide(_p_Kstar_S_1,_p_Kstar_S_2,temp);
141      }
142      // K0 mult
143      scale(_n_K0   ,1./sumOfWeights());
144      Estimate1DPtr mult;
145      book(mult, 4, 1, 1);
146      for (auto& b : mult->bins()) {
147      	if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
148       	  b.set(_n_K0->val(), _n_K0->err());
149        }
150      }
151      // K*= mult
152      scale(_n_Kstar,1./sumOfWeights());
153      Estimate1DPtr mult2;
154      book(mult2,9, 1, 1);
155      for (auto& b : mult2->bins()) {
156      	if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
157       	  b.set(_n_Kstar->val(), _n_Kstar->err());
158        }
159      }
160    }
161
162    /// @}
163
164
165    /// @name Histograms
166    /// @{
167    Histo1DPtr _h_K0_x, _h_Kstar_x;
168    Profile1DPtr _p_K0_S_1, _p_K0_S_2, _p_Kstar_S_1, _p_Kstar_S_2;
169    CounterPtr _n_K0,_n_Kstar;
170    int _ih,_iy;
171    /// @}
172
173
174  };
175
176
177  RIVET_DECLARE_PLUGIN(TASSO_1990_I284251);
178
179
180}