Rivet analyses referenceCLEO_1999_I474676Cross Section for $e^+e^-\to\Upsilon(2,3S)\gamma$ at 10.52, 10.58 GeVExperiment: CLEO (CESR) Inspire ID: 474676 Status: VALIDATED Authors:
Beam energies: (5.3, 5.3); (5.3, 5.3) GeV Run details:
Measurement of the cross section for $e^+e^-\to\Upsilon(2,3S)\gamma$ at 10.52 and 10.58 by CLEO. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: CLEO_1999_I474676.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief e+ e- > Upsilon(2,3S) gamma at 10.52 and 10.58
10 class CLEO_1999_I474676 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1999_I474676);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(FinalState(), "FS");
23 declare(UnstableParticles(Cuts::pid==100553 ||
24 Cuts::pid==200553), "UFS");
25 book(_nUps2pipi, 1,1,2);
26 book(_nUps3pipi, 1,1,1);
27 for (const string& en : _nUps2pipi.binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
35 }
36
37 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
38 for (const Particle &child : p.children()) {
39 if(child.children().empty()) {
40 --nRes[child.pid()];
41 --ncount;
42 }
43 else
44 findChildren(child,nRes,ncount);
45 }
46 }
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 const FinalState& fs = apply<FinalState>(event, "FS");
51 map<long,int> nCount;
52 int ntotal(0);
53 for (const Particle& p : fs.particles()) {
54 nCount[p.pid()] += 1;
55 ++ntotal;
56 }
57 const FinalState& ufs = apply<FinalState>(event, "UFS");
58 for (const Particle& p : ufs.particles()) {
59 if(p.children().empty()) continue;
60 map<long,int> nRes = nCount;
61 int ncount = ntotal;
62 findChildren(p,nRes,ncount);
63 if(ncount!=1) continue;
64 bool matched = true;
65 for(auto const & val : nRes) {
66 if(val.first==22) {
67 if(val.second!=1) {
68 matched = false;
69 break;
70 }
71 }
72 else if(val.second!=0) {
73 matched = false;
74 break;
75 }
76 }
77 if(matched) {
78 if(p.pid()==100553)
79 _nUps2pipi->fill(_ecms);
80 else if(p.pid()==200553)
81 _nUps3pipi->fill(_ecms);
82 }
83 }
84 }
85
86
87 /// Normalise histograms etc., after the run
88 void finalize() {
89 double fact = crossSection()/ sumOfWeights() /picobarn;
90 scale(_nUps3pipi,fact);
91 scale(_nUps2pipi,fact);
92 }
93 /// @}
94
95 /// @name Histograms
96 /// @{
97 BinnedHistoPtr<string> _nUps2pipi,_nUps3pipi;
98 string _ecms;
99 /// @}
100
101 };
102
103
104 RIVET_DECLARE_PLUGIN(CLEO_1999_I474676);
105
106
107}
|