Rivet analyses referenceMARKI_1975_I100733Measurement of $R$ and the hadronic cross section for energies between 2.4 and 6.9 GeVExperiment: MARKI (Spear) Inspire ID: 100733 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of $R$ and the hadronic cross section for energies between 2.4 and 6.9 GeV. The charged hadron spectum at 3, 4.8 and 7.4 GeV is also measured. The muonic cross sections is also outputted to the yoda file so that ratio $R$ can be recalcuated if runs are combined. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: MARKI_1975_I100733.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class MARKI_1975_I100733 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(MARKI_1975_I100733);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 declare(FinalState(), "FS");
23 // Book histograms
24 book(_c_hadrons, "/TMP/sigma_hadrons");
25 book(_c_muons, "/TMP/sigma_muons");
26 if (isCompatibleWithSqrtS(3*GeV)) {
27 book(_h_charged, 3, 1, 1);
28 }
29 else if (isCompatibleWithSqrtS(4.8*GeV)) {
30 book(_h_charged, 3, 1, 2);
31 }
32 else if (isCompatibleWithSqrtS(7.4*GeV)) {
33 book(_h_charged, 3, 1, 3);
34 }
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41
42 map<long,int> nCount;
43 int ntotal(0);
44 for (const Particle& p : fs.particles()) {
45 nCount[p.pid()] += 1;
46 ++ntotal;
47 }
48 if (nCount[-13]==1 and nCount[13]==1 && ntotal==2+nCount[22]) {
49 _c_muons->fill(); // mu+mu- + photons
50 }
51 // everything else
52 else {
53 _c_hadrons->fill();
54 if(_h_charged) {
55 for (const Particle& p : fs.particles()) {
56 if(PID::isCharged(p.pid())) {
57 double x = 2.*p.p3().mod()/sqrtS();
58 _h_charged->fill(x);
59 }
60 }
61 }
62 }
63 }
64
65
66 /// Normalise histograms etc., after the run
67 void finalize() {
68 if (_h_charged) {
69 scale(_h_charged, crossSection()/ sumOfWeights() /microbarn*sqr(sqrtS()));
70 }
71 // R
72 const double fact = crossSection()/ sumOfWeights() /nanobarn;
73 scale({_c_hadrons, _c_muons}, fact);
74 BinnedEstimatePtr<string> hadrons;
75 book(hadrons, 1,1,1);
76 BinnedEstimatePtr<string> muons;
77 book(muons, "sigma_muons", hadrons->xEdges());
78 for (auto& b : hadrons->bins()) {
79 const double sqs = std::stod(b.xEdge());
80 if (isCompatibleWithSqrtS(sqs)) {
81 b.set(_c_hadrons->val(), _c_hadrons->err());
82 muons->bin(b.index()).set(_c_muons->val(), _c_muons->err());
83 }
84 }
85
86 Estimate0D R = *_c_hadrons/ *_c_muons;
87 BinnedEstimatePtr<string> mult;
88 book(mult, 2,1,1);
89 for (auto& b : mult->bins()) {
90 const double sqs = std::stod(b.xEdge());
91 if (isCompatibleWithSqrtS(sqs)) {
92 b.set(R.val(), R.errPos());
93 }
94 }
95 }
96
97 /// @}
98
99
100 /// @name Histograms
101 /// @{
102 CounterPtr _c_hadrons, _c_muons;
103 Histo1DPtr _h_charged;
104 /// @}
105
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(MARKI_1975_I100733);
111
112
113}
|