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 offset = 0;
25 if (isCompatibleWithSqrtS(14.0*GeV)) {
26 offset = 1;
27 }
28 else if (isCompatibleWithSqrtS(22.0*GeV)) {
29 offset = 2;
30 }
31 else if (isCompatibleWithSqrtS(34.8*GeV)) {
32 offset = 3;
33 }
34 else if (isCompatibleWithSqrtS(43.6*GeV)) {
35 offset = 4;
36 }
37 else {
38 MSG_WARNING("CoM energy of events sqrt(s) = " << sqrtS()/GeV
39 << " doesn't match any available analysis energy .");
40 }
41 book(_histCh, 5, 1, offset);
42 book(_histTotal, 2, 1, 1);
43 }
44
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 if (Ecm == "") Ecm = _histTotal->bin(offset).xEdge();
49 const FinalState& cfs = apply<FinalState>(event, "CFS");
50 MSG_DEBUG("Total charged multiplicity = " << cfs.size());
51 _histCh->fill(cfs.size());
52 _histTotal->fill(Ecm, cfs.size());
53 }
54
55
56 /// Normalise histograms etc., after the run
57 void finalize() {
58 scale(_histCh, 1.0/sumOfWeights());
59 }
60
61 /// @}
62
63
64 private:
65
66 /// @name Histograms
67 /// @{
68 BinnedHistoPtr<int> _histCh;
69 BinnedProfilePtr<string> _histTotal;
70 string Ecm = "";
71 int offset;
72 /// @}
73 };
74
75
76 RIVET_DECLARE_PLUGIN(TASSO_1989_I277658);
77
78
79}
|