Rivet analyses referenceBESII_2006_I735496Measurement of $R$ for energies between 3.65 and 3.872 GeVExperiment: BESII (BEPC) Inspire ID: 735496 Status: VALIDATED NOHEPDATA SINGLEWEIGHT Authors:
Beam energies: (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9) GeV Run details:
Measurement of $R$ and the hadronic cross section in $e^+e^-$ collisions by BESII for energies between 3.65 and 3.872, in the vicinity of the $\psi(3770)$. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESII_2006_I735496.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Measurement of R 3.65 and 3.872 GeV
9 class BESII_2006_I735496 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2006_I735496);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(UnstableParticles(Cuts::abspid==100443 || Cuts::abspid==30443),"UFS");
23 declare(FinalState(), "FS");
24 // Book histograms
25 for (unsigned int ix=0;ix<2;++ix) {
26 book(_sigma_hadrons[ix], "/TMP/sigma_hadrons_"+toString(ix+1),refData<YODA::BinnedEstimate<string>>(1,1,1+ix));
27 }
28 book(_sigma_muons, "/TMP/sigma_muons",refData<YODA::BinnedEstimate<string>>(1,1,1));
29
30 for (const string& en : _sigma_muons.binning().edges<0>()) {
31 const double end = std::stod(en)*GeV;
32 if(isCompatibleWithSqrtS(end)) {
33 _ecms = en;
34 break;
35 }
36 }
37 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
38 }
39
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 const FinalState& fs = apply<FinalState>(event, "FS");
44
45 map<long,int> nCount;
46 int ntotal(0);
47 for (const Particle& p : fs.particles()) {
48 nCount[p.pid()] += 1;
49 ++ntotal;
50 }
51 // mu+mu- + photons
52 if (nCount[-13]==1 and nCount[13]==1 &&
53 ntotal==2+nCount[22])
54 _sigma_muons->fill(_ecms);
55 // everything else
56 else {
57 _sigma_hadrons[1]->fill(_ecms);
58 Particles psi = apply<UnstableParticles>(event,"UFS").particles();
59 if (psi.empty()) {
60 _sigma_hadrons[0]->fill(_ecms);
61 }
62 else {
63 bool psi3770 = false;
64 for (const Particle& p : psi) psi3770 |= p.pid()==30443;
65 if (psi3770) _sigma_hadrons[0]->fill(_ecms);
66 }
67 }
68 }
69
70
71 /// Normalise histograms etc., after the run
72 void finalize() {
73 for(unsigned int ix=0;ix<2;++ix) {
74 BinnedEstimatePtr<string> R;
75 book(R,1,1,1+ix);
76 divide(_sigma_hadrons[ix], _sigma_muons, R);
77 }
78 }
79
80 /// @}
81
82
83 /// @name Histograms
84 /// @{
85 BinnedHistoPtr<string> _sigma_hadrons[2], _sigma_muons;
86 string _ecms;
87 /// @}
88
89
90 };
91
92
93 RIVET_DECLARE_PLUGIN(BESII_2006_I735496);
94
95}
|