rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

TPC_1988_I262143

Charged particle spectra at 29 GeV
Experiment: TPC (PEP)
Inspire ID: 262143
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 61 (1988) 1263, 1988
Beams: e+ e-
Beam energies: (14.5, 14.5) GeV
Run details:
  • e+e- to hadrons at 29 GeV

Momentum spectra for all charged particles, $\pi^\pm$, $K^\pm$ $p,\bar{p}$ in $e^+e^-$ collisions at 29 GeV measured by the TPC experiment.

Source code: TPC_1988_I262143.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/ChargedFinalState.hh"
  4#include "Rivet/Projections/Beam.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief Add a short analysis description here
 10  class TPC_1988_I262143 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(TPC_1988_I262143);
 15
 16
 17    /// @name Analysis methods
 18    //@{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      declare(Beam(), "Beams");
 23      declare(ChargedFinalState(), "FS");
 24
 25      // Book histograms
 26      book(_h_z_pi ,1, 1, 1);
 27      book(_h_z_K  ,1, 1, 2);
 28      book(_h_z_p  ,1, 1, 3);
 29      book(_h_z_all,1, 1, 4);
 30      
 31      book(_h_z2_pi, 5, 1, 1);
 32      book(_h_z2_K , 5, 1, 2);
 33      book(_h_z2_p , 5, 1, 3);
 34      
 35      book(_n_pi,"TMP/n_pi", refData(6,1,1));
 36      book(_n_K ,"TMP/n_K" , refData(6,1,2));
 37      book(_n_p ,"TMP/n_p" , refData(6,1,3));
 38      book(_d_pi,"TMP/d_pi", refData(6,1,1));
 39      book(_d_K ,"TMP/d_K" , refData(6,1,2));
 40      book(_d_p ,"TMP/d_p" , refData(6,1,3));
 41      book(_n2_K,"TMP/n2_K", refData(7,1,1));
 42      book(_n2_p,"TMP/n2_p", refData(7,1,2));
 43      book(_n3_p,"TMP/n3_p", refData(7,1,3));
 44      book(_d2_K,"TMP/d2_K", refData(7,1,1));
 45      book(_d2_p,"TMP/d2_p", refData(7,1,2));
 46      book(_d3_p,"TMP/d3_p", refData(7,1,3));
 47    }
 48
 49
 50    /// Perform the per-event analysis
 51    void analyze(const Event& event) {
 52
 53      // First, veto on leptonic events by requiring at least 4 charged FS particles
 54      const FinalState& fs = apply<FinalState>(event, "FS");
 55      const size_t numParticles = fs.particles().size();
 56
 57      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 58      if (numParticles < 2) {
 59        MSG_DEBUG("Failed leptonic event cut");
 60        vetoEvent;
 61      }
 62      MSG_DEBUG("Passed leptonic event cut");
 63
 64      // Get beams and average beam momentum
 65      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 66      const double meanBeamMom = ( beams.first.p3().mod() +
 67                                   beams.second.p3().mod() ) / 2.0;
 68      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 69      for (const Particle& p : fs.particles()) {
 70	double xP = p.p3().mod()/meanBeamMom;
 71	_h_z_all->fill(xP);
 72	_d_pi->fill(xP);
 73	_d_K ->fill(xP);
 74	_d_p ->fill(xP);
 75	int id = abs(p.pid());
 76	if(id==211) {
 77	  _h_z_pi->fill(xP);
 78	  _h_z2_pi->fill(xP, xP);
 79	  _n_pi ->fill(xP, 100.);
 80	  _d2_K->fill(xP);
 81	  _d2_p->fill(xP);
 82	  _d3_p->fill(xP);
 83	}
 84	else if(id==321) {
 85	  _h_z_K ->fill(xP);
 86	  _h_z2_K ->fill(xP, xP);
 87	  _n_K ->fill(xP, 100.);
 88	  _n2_K->fill(xP);
 89	  _d3_p->fill(xP);
 90	}
 91	else if(id==2212) {
 92	  _h_z_p ->fill(xP);
 93	  _h_z2_p ->fill(xP, xP);
 94	  _n_p  ->fill(xP, 100.);
 95	  _n2_p->fill(xP);
 96	  _n3_p->fill(xP);
 97	}
 98      }
 99    }
100
101    /// Normalise histograms etc., after the run
102    void finalize() {
103
104      scale(_h_z_all,1./sumOfWeights());
105      scale(_h_z_pi ,1./sumOfWeights());
106      scale(_h_z_K  ,1./sumOfWeights());
107      scale(_h_z_p  ,1./sumOfWeights());
108      scale(_h_z2_pi ,1./sumOfWeights());
109      scale(_h_z2_K  ,1./sumOfWeights());
110      scale(_h_z2_p  ,1./sumOfWeights());
111      Scatter2DPtr temp1,temp2,temp3,temp4,temp5,temp6;
112      book(temp1,6, 1, 1);
113      book(temp2,6, 1, 2);
114      book(temp3,6, 1, 3);
115      book(temp4,7, 1, 1);
116      book(temp5,7, 1, 2);
117      book(temp6,7, 1, 3);
118      divide(_n_pi,_d_pi, temp1);
119      divide(_n_K ,_d_K , temp2);
120      divide(_n_p ,_d_p , temp3);
121      divide(_n2_K,_d2_K, temp4);
122      divide(_n2_p,_d2_p, temp5);
123      divide(_n3_p,_d3_p, temp6);
124    }
125
126    //@}
127
128
129    /// @name Histograms
130    //@{
131    Histo1DPtr _h_z_all,_h_z_pi,_h_z_K,_h_z_p;
132    Histo1DPtr _h_z2_pi,_h_z2_K,_h_z2_p;
133    Histo1DPtr _n_pi,_n_K,_n_p,_d_pi,_d_K,_d_p;
134    Histo1DPtr _n2_K,_n2_p,_n3_p,_d2_K,_d2_p,_d3_p;
135    //@}2
136
137
138  };
139
140
141  // The hook for the plugin system
142  RIVET_DECLARE_PLUGIN(TPC_1988_I262143);
143
144
145}