Rivet analyses referenceCLEO_1999_I474676Cross Section for $e^+e^-\to\Upsilon(2,3S)\pi^+\pi^-$ at 10.52, 10.58 GeVExperiment: CLEO (CESR) Inspire ID: 474676 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\Upsilon(2,3S)\pi^+\pi^-$ at 10.52 and 10.58 by CLEO. 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 Add a short analysis description here
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(), "UFS");
24 book(_nUps2pipi, "TMP/nUps2pipi");
25 book(_nUps3pipi, "TMP/nUps3pipi");
26 }
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for (const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 --nRes[child.pid()];
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 const FinalState& fs = apply<FinalState>(event, "FS");
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 const FinalState& ufs = apply<FinalState>(event, "UFS");
49 for (const Particle& p : ufs.particles()) {
50 if(p.children().empty()) continue;
51 if(p.pid() != 100553 &&
52 p.pid() != 200553 ) continue;
53 map<long,int> nRes = nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 if(ncount!=2) continue;
57 bool matched = true;
58 for(auto const & val : nRes) {
59 if(abs(val.first)==211) {
60 if(val.second!=1) {
61 matched = false;
62 break;
63 }
64 }
65 else if(val.second!=0) {
66 matched = false;
67 break;
68 }
69 }
70 if(matched) {
71 if(p.pid()==100553)
72 _nUps2pipi->fill();
73 if(p.pid()==200553)
74 _nUps3pipi->fill();
75 }
76 }
77 }
78
79
80 /// Normalise histograms etc., after the run
81 void finalize() {
82 double fact = crossSection()/ sumOfWeights() /picobarn;
83 for(unsigned int ix=1;ix<3;++ix) {
84 double sigma = 0.0,error = 0.0;
85 if(ix==1) {
86 sigma = _nUps3pipi->val()*fact;
87 error = _nUps3pipi->err()*fact;
88 }
89 else if(ix==2) {
90 sigma = _nUps2pipi->val()*fact;
91 error = _nUps2pipi->err()*fact;
92 }
93 Scatter2D temphisto(refData(1, 1, ix));
94 Scatter2DPtr mult;
95 book(mult, 1, 1, ix);
96 for (size_t b = 0; b < temphisto.numPoints(); b++) {
97 const double x = temphisto.point(b).x();
98 pair<double,double> ex = temphisto.point(b).xErrs();
99 pair<double,double> ex2 = ex;
100 if(ex2.first ==0.) ex2. first=0.0001;
101 if(ex2.second==0.) ex2.second=0.0001;
102 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
103 mult->addPoint(x, sigma, ex, make_pair(error,error));
104 }
105 else {
106 mult->addPoint(x, 0., ex, make_pair(0.,.0));
107 }
108 }
109 }
110 }
111 //@}
112
113 /// @name Histograms
114 //@{
115 CounterPtr _nUps2pipi,_nUps3pipi;
116 //@}
117
118 };
119
120
121 // The hook for the plugin system
122 RIVET_DECLARE_PLUGIN(CLEO_1999_I474676);
123
124
125}
|