Rivet analyses referenceTASSO_1989_I277658Hadronic charged multiplicity measurement between 14 and 43.6 GeVExperiment: TASSO (PEP) Inspire ID: 277658 Status: VALIDATED Authors:
Beam energies: (7.0, 7.0); (11.0, 11.0); (17.4, 17.4); (21.8, 21.8) GeV Run details:
The charged particle multiplicity distribution of hadronic $e^+e^-$ events as measured between 14 and 43.6 GeV using the TASSO detector at PEP. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: TASSO_1989_I277658.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class TASSO_1989_I277658 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1989_I277658);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 const ChargedFinalState cfs;
22 declare(cfs, "CFS");
23
24 size_t ih = 0;
25 for (double eVal : allowedEnergies()) {
26 const string en = toString(int(eVal/MeV));
27 if (isCompatibleWithSqrtS(eVal)) {
28 _sqs = en;
29 _ie = ih+1;
30 }
31 book(_h[en], 5, 1, ++ih);
32 }
33 if (_sqs == "" && !merging()) {
34 throw BeamError("Invalid beam energy for " + name() + "\n");
35 }
36 book(_p, 2, 1, 1);
37 }
38
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 if (Ecm == "") Ecm = _p->bin(_ie).xEdge();
43 const FinalState& cfs = apply<FinalState>(event, "CFS");
44 MSG_DEBUG("Total charged multiplicity = " << cfs.size());
45 _h[_sqs]->fill(cfs.size());
46 _p->fill(Ecm, cfs.size());
47 }
48
49
50 /// Normalise histograms etc., after the run
51 void finalize() {
52 scale(_h, 1.0/sumOfWeights());
53 }
54
55 /// @}
56
57
58 private:
59
60 /// @name Histograms
61 /// @{
62 map<string,BinnedHistoPtr<int>> _h;
63 BinnedProfilePtr<string> _p;
64 string Ecm = "", _sqs = "";
65 size_t _ie = 0;
66 /// @}
67 };
68
69
70 RIVET_DECLARE_PLUGIN(TASSO_1989_I277658);
71
72
73}
|