Rivet analyses referenceBABAR_2014_I1204444Cross section for $e^+e^-\to \psi(2S)\pi^+\pi^-$ at energies between 3.975 and 5.925 GeVExperiment: BABAR (PEP-II) Inspire ID: 1204444 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to \psi(2S)\pi^+\pi^-$ at energies between 3.975 and 5.925 GeV using radiative return by BABAR. Source code: BABAR_2014_I1204444.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- > psi(2S) pi+ pi-
10 class BABAR_2014_I1204444 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2014_I1204444);
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==100443), "UFS");
24 book(_sigmaPsi, "TMP/psi",refData(1,1,1));
25 }
26
27 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
28 for (const Particle &child : p.children()) {
29 if (child.children().empty()) {
30 --nRes[child.pid()];
31 --ncount;
32 }
33 else {
34 findChildren(child,nRes,ncount);
35 }
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 map<long,int> nRes = nCount;
52 int ncount = ntotal;
53 findChildren(p,nRes,ncount);
54 // omega pi+pi-
55 if (ncount!=2) continue;
56 bool matched = true;
57 for (const auto& val : nRes) {
58 if (abs(val.first)==211) {
59 if (val.second !=1) {
60 matched = false;
61 break;
62 }
63 }
64 else if (val.second!=0) {
65 matched = false;
66 break;
67 }
68 }
69 if (matched) {
70 _sigmaPsi->fill(sqrtS());
71 break;
72 }
73 }
74 }
75
76 /// Normalise histograms etc., after the run
77 void finalize() {
78 scale(_sigmaPsi, crossSection()/ sumOfWeights() /picobarn);
79 Estimate1DPtr tmp;
80 book(tmp,1,1,1);
81 barchart(_sigmaPsi,tmp);
82 }
83
84 /// @}
85
86
87 /// @name Histograms
88 /// @{
89 Histo1DPtr _sigmaPsi;
90 /// @}
91
92
93 };
94
95
96 RIVET_DECLARE_PLUGIN(BABAR_2014_I1204444);
97
98}
|