Rivet analyses referenceBESII_2006_I717720Cross section for hadron production for $\sqrt{s}=3.65\to3.87\,$GeVExperiment: BESII (BEPC) Inspire ID: 717720 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\text{hadrons}$ for $\sqrt{s}=3.65\to3.87\,$GeV. In addition the cross section to charm hadrons near the $\psi(3770)$ is measured. As the analyses requires the beam energy smearing described in the paper then central CMS energy should be specified using the ECENT (in GeV) option. Source code: BESII_2006_I717720.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5#include "Rivet/Projections/ChargedFinalState.hh"
6
7namespace Rivet {
8
9
10 /// @brief e+ e- > hadrons
11 class BESII_2006_I717720 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2006_I717720);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 // Initialise and register projections
24 declare(UnstableParticles(Cuts::abspid==411 ||
25 Cuts::abspid==421 ), "UFS");
26 declare(FinalState(), "FS");
27
28 // Book histograms
29 book(_sigma[0], 1,1,1);
30 for(unsigned int ix=1;ix<4;++ix)
31 book(_sigma[ix], 2,1,ix);
32 string eCent = getOption<string>("ECENT", std::to_string(sqrtS()/GeV));
33 double ee = std::stod(eCent);
34 for(unsigned int ix=0;ix<3;++ix) {
35 for(const auto & en : _sigma[ix].binning().edges<0>()) {
36 if(fuzzyEquals(std::stod(en),ee,1e-5)) {
37 _ecms[ix]=en;
38 break;
39 }
40 }
41 }
42 if(_ecms[0].empty() && _ecms[1].empty() && _ecms[2].empty())
43 MSG_ERROR("Beam energy incompatible with analysis.");
44 _ecms[3]=_ecms[2];
45 }
46
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 const FinalState& fs = apply<FinalState>(event, "FS");
51 const FinalState& ufs = apply<FinalState>(event, "UFS");
52 map<long,int> nCount;
53 int ntotal(0);
54 for (const Particle& p : fs.particles()) {
55 nCount[p.pid()] += 1;
56 ++ntotal;
57 }
58 // mu+mu- + photons
59 if(nCount[-13]==1 and nCount[13]==1 && ntotal==2+nCount[22]) {
60 vetoEvent;
61 }
62 else if(nCount[-11]==1 and nCount[11]==1 && ntotal==2+nCount[22]) {
63 vetoEvent;
64 }
65 // everything else
66 else {
67 if(!_ecms[0].empty()) _sigma[0]->fill(_ecms[0]);
68 if(!ufs.particles().empty()) {
69 if(!_ecms[1].empty()) _sigma[1]->fill(_ecms[1]);
70 if(ufs.particles()[0].abspid()==421) {
71 if(!_ecms[2].empty()) _sigma[2]->fill(_ecms[2]);
72 }
73 else {
74 if(!_ecms[3].empty()) _sigma[3]->fill(_ecms[3]);
75 }
76 }
77 }
78 }
79
80
81 /// Normalise histograms etc., after the run
82 void finalize() {
83 double fact = crossSection()/sumOfWeights()/nanobarn;
84 for(unsigned int ix=0;ix<4;++ix)
85 scale(_sigma[ix],fact);
86 }
87
88 /// @}
89
90 /// @name Histograms
91 /// @{
92 BinnedHistoPtr<string> _sigma[4];
93 string _ecms[4];
94 /// @}
95
96 };
97
98
99 RIVET_DECLARE_PLUGIN(BESII_2006_I717720);
100
101}
|