Rivet analyses referenceBESIII_2012_I1113599Analysis of $J/\psi$ decays to $p\bar{p}$ and $n\bar{n}$Experiment: BESIII (BEPC) Inspire ID: 1113599 Status: VALIDATED Authors:
Beam energies: (1.8, 1.8) GeV Run details:
Analysis of the angular distribution of the baryons produced in $e^+e^-\to J/\psi \to p\bar{p}$ and $n\bar{n}$. Gives information about the decay and is useful for testing correlations in hadron decays. Source code: BESIII_2012_I1113599.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6
7namespace Rivet {
8
9
10 /// @brief J/psi to p pbar n nbar
11 class BESIII_2012_I1113599 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2012_I1113599);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23
24 // Initialise and register projections
25 declare(Beam(), "Beams");
26 declare(UnstableParticles(), "UFS");
27 declare(FinalState(), "FS");
28
29 // Book histograms
30 book(_h_proton , "ctheta_p",20,-1.,1.);
31 book(_h_neutron, "ctheta_n",20,-1.,1.);
32
33 }
34
35
36 /// Perform the per-event analysis
37 void analyze(const Event& event) {
38 // get the axis, direction of incoming electron
39 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
40 Vector3 axis;
41 if(beams.first.pid()>0)
42 axis = beams.first .momentum().p3().unit();
43 else
44 axis = beams.second.momentum().p3().unit();
45 // types of final state particles
46 const FinalState& fs = apply<FinalState>(event, "FS");
47 map<long,int> nCount;
48 int ntotal(0);
49 Particle outgoing;
50 for (const Particle& p : fs.particles()) {
51 nCount[p.pid()] += 1;
52 if(p.pid()==2212 || p.pid()==2112)
53 outgoing = p;
54 ++ntotal;
55 }
56 if(ntotal==2) {
57 if(nCount[2212]==1 && nCount[-2212]==1) {
58 _h_proton->fill(outgoing.momentum().p3().unit().dot(axis));
59 }
60 else if(nCount[2112]==1 && nCount[-2112]==1) {
61 _h_neutron->fill(outgoing.momentum().p3().unit().dot(axis));
62 }
63 }
64 }
65
66 pair<double,pair<double,double> > calcAlpha(Histo1DPtr hist) {
67 if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
68 double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
69 for (const auto& bin : hist->bins() ) {
70 double Oi = bin.sumW();
71 if(Oi==0.) continue;
72 double a = 1.5*(bin.xMax() - bin.xMin());
73 double b = 0.5*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
74 double Ei = bin.errW();
75 sum1 += a*Oi/sqr(Ei);
76 sum2 += b*Oi/sqr(Ei);
77 sum3 += sqr(a)/sqr(Ei);
78 sum4 += sqr(b)/sqr(Ei);
79 sum5 += a*b/sqr(Ei);
80 }
81 // calculate alpha
82 double alpha = (-3*sum1 + 9*sum2 + sum3 - 3*sum5)/(sum1 - 3*sum2 + 3*sum4 - sum5);
83 // and error
84 double cc = -pow((sum3 + 9*sum4 - 6*sum5),3);
85 double bb = -2*sqr(sum3 + 9*sum4 - 6*sum5)*(sum1 - 3*sum2 + 3*sum4 - sum5);
86 double aa = sqr(sum1 - 3*sum2 + 3*sum4 - sum5)*(-sum3 - 9*sum4 + sqr(sum1 - 3*sum2 + 3*sum4 - sum5) + 6*sum5);
87 double dis = sqr(bb)-4.*aa*cc;
88 if(dis>0.) {
89 dis = sqrt(dis);
90 return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
91 }
92 else {
93 return make_pair(alpha,make_pair(0.,0.));
94 }
95 }
96
97 /// Normalise histograms etc., after the run
98 void finalize() {
99 // proton
100 normalize(_h_proton );
101 pair<double,pair<double,double> > alpha = calcAlpha(_h_proton);
102 Estimate0DPtr _h_alpha_proton;
103 book(_h_alpha_proton,1,1,1);
104 _h_alpha_proton->set(alpha.first, alpha.second);
105 // neutron
106 normalize(_h_neutron);
107 alpha = calcAlpha(_h_neutron);
108 Estimate0DPtr _h_alpha_neutron;
109 book(_h_alpha_neutron, 1,1,2);
110 _h_alpha_neutron->set(alpha.first, alpha.second);
111 }
112
113 /// @}
114
115
116 /// @name Histograms
117 /// @{
118 Histo1DPtr _h_proton,_h_neutron;
119 /// @}
120
121
122 };
123
124
125 RIVET_DECLARE_PLUGIN(BESIII_2012_I1113599);
126
127
128}
|