Rivet analyses referenceCUSB_1991_I325661Inclusive $B^*$ cross-section above the $\Upsilon(4S)$Experiment: CUSB (CESR) Inspire ID: 325661 Status: VALIDATED Authors:
Beam energies: (5.3, 5.3); (5.3, 5.3) GeV Run details:
Measurement of the inclusive cross section for $B^*$ production at energies above the $\Upsilon(4S)$ mass. Source code: CUSB_1991_I325661.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- > B* X
9 class CUSB_1991_I325661 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CUSB_1991_I325661);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(UnstableParticles(), "UFS");
24
25 // Book histograms
26 book(_c_Bstar, 1, 1, 1);
27 for (const string& en : _c_Bstar.binning().edges<0>()) {
28 const size_t idx = en.find("-");
29 if(idx!=std::string::npos) {
30 const double emin = std::stod(en.substr(0,idx));
31 const double emax = std::stod(en.substr(idx+1,string::npos));
32 if(inRange(sqrtS()/GeV, emin, emax)) {
33 _ecms = en;
34 break;
35 }
36 }
37 else {
38 const double end = std::stod(en)*GeV;
39 if (isCompatibleWithSqrtS(end)) {
40 _ecms = en;
41 break;
42 }
43 }
44 }
45 if (_ecms.empty())
46 MSG_ERROR("Beam energy incompatible with analysis.");
47 }
48
49
50 /// Perform the per-event analysis
51 void analyze(const Event& event) {
52 const FinalState& ufs = apply<FinalState>(event, "UFS");
53 unsigned int nBstar(0);
54 // Get Bottom hadrons
55 const Particles bhads = ufs.particles(Cuts::abspid==513 or Cuts::abspid==523);
56 // find the Bstars
57 for (const Particle& p : bhads) {
58 if(abs(p.pid())==513 || abs(p.pid())==523) {
59 if(!p.hasDescendantWith(Cuts::pid == p.pid())) ++nBstar;
60 }
61 }
62 if(nBstar!=0)
63 _c_Bstar->fill(_ecms,nBstar);
64 }
65
66
67 /// Normalise histograms etc., after the run
68 void finalize() {
69 scale(_c_Bstar,crossSection()/ sumOfWeights() /nanobarn);
70 }
71
72 /// @}
73
74
75 /// @name Histograms
76 /// @{
77 BinnedHistoPtr<string> _c_Bstar;
78 string _ecms;
79 /// @}
80
81
82 };
83
84
85 RIVET_DECLARE_PLUGIN(CUSB_1991_I325661);
86
87
88}
|