Rivet analyses referenceBELLE_2017_I1613517Cross Section for $e^+e^-\to D^\pm D^{*\mp}$ and $D^{*+}D^{*-}$ from threshold to 6 GeVExperiment: BELLE (KEKB) Inspire ID: 1613517 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to D^\pm D^{*\mp}$ and $D^{*+}D^{*-}$ from threshold to 6 GeV. Source code: BELLE_2017_I1613517.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 D+/- D*-/+ and D*+ D*- cross sections
10 class BELLE_2017_I1613517 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2017_I1613517);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 book(_c_DpDmS, "/TMP/sigma_DpDmS");
29 book(_c_DpSDmS, "/TMP/sigma_DpSDmS");
30 }
31
32 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
33 for (const Particle &child : p.children()) {
34 if (child.children().empty()) {
35 nRes[child.pid()]-=1;
36 --ncount;
37 }
38 else {
39 findChildren(child,nRes,ncount);
40 }
41 }
42 }
43
44 /// Perform the per-event analysis
45 void analyze(const Event& event) {
46 const FinalState& fs = apply<FinalState>(event, "FS");
47 // total hadronic and muonic cross sections
48 map<long,int> nCount;
49 int ntotal(0);
50 for (const Particle& p : fs.particles()) {
51 nCount[p.pid()] += 1;
52 ++ntotal;
53 }
54 // mu+mu- + photons
55 if (nCount[-13]==1 and nCount[13]==1 && ntotal==2+nCount[22]) {
56 vetoEvent;
57 }
58 // unstable charm analysis
59 const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
60 for (unsigned int ix=0; ix<ufs.particles().size(); ++ix) {
61 const Particle& p1 = ufs.particles()[ix];
62 int id1 = abs(p1.pid());
63 if (id1 != 411 && id1 != 413) continue;
64 // check fs
65 bool fs = true;
66 for (const Particle & child : p1.children()) {
67 if (child.pid()==p1.pid()) {
68 fs = false;
69 break;
70 }
71 }
72 if (!fs) continue;
73 // find the children
74 map<long,int> nRes = nCount;
75 int ncount = ntotal;
76 findChildren(p1,nRes,ncount);
77 bool matched=false;
78 int sign = p1.pid()/id1;
79 // loop over the other fs particles
80 for (unsigned int iy=ix+1; iy<ufs.particles().size(); ++iy) {
81 const Particle& p2 = ufs.particles()[iy];
82 fs = true;
83 for (const Particle & child : p2.children()) {
84 if (child.pid()==p2.pid()) {
85 fs = false;
86 break;
87 }
88 }
89 if (!fs) continue;
90 if (p2.pid()/abs(p2.pid())==sign) continue;
91 int id2 = abs(p2.pid());
92 if (id2 != 411 && id2 != 413) continue;
93 if (!p2.parents().empty() && p2.parents()[0].pid()==p1.pid()) {
94 continue;
95 }
96 map<long,int> nRes2 = nRes;
97 int ncount2 = ncount;
98 findChildren(p2,nRes2,ncount2);
99 if (ncount2!=0) continue;
100 matched=true;
101 for (const auto& val : nRes2) {
102 if (val.second!=0) {
103 matched = false;
104 break;
105 }
106 }
107 if (matched) {
108 if (id1==413 && id2==413) {
109 _c_DpSDmS->fill();
110 }
111 else if((id1==411 && id2==413) || (id1==413 && id2==411)) {
112 _c_DpDmS->fill();
113 }
114 break;
115 }
116 }
117 if (matched) break;
118 }
119 }
120
121
122 /// Normalise histograms etc., after the run
123 void finalize() {
124 double fact = crossSection()/ sumOfWeights()/nanobarn;
125 for (unsigned int iy=1;iy<3;++iy) {
126 double sigma = 0.0, error = 0.0;
127 if(iy==1) {
128 sigma = _c_DpDmS->val()*fact;
129 error = _c_DpDmS->err()*fact;
130 }
131 else if (iy==2) {
132 sigma = _c_DpSDmS->val()*fact;
133 error = _c_DpSDmS->err()*fact;
134 }
135 Estimate1DPtr mult;
136 book(mult, 1, 1, iy);
137 for (auto& b : mult->bins()) {
138 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
139 b.set(sigma, error);
140 }
141 }
142 }
143 }
144 /// @}
145
146
147 /// @name Histograms
148 /// @{
149 CounterPtr _c_DpDmS, _c_DpSDmS;
150 /// @}
151
152
153 };
154
155
156 RIVET_DECLARE_PLUGIN(BELLE_2017_I1613517);
157
158
159}
|