Rivet analyses referenceBELLE_2003_I629334$\gamma\gamma\to K^+K^-$ for centre-of-mass energies between 1.4 and 2.4 GeVExperiment: BELLE (KEKB) Inspire ID: 629334 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the differential cross section for $\gamma\gamma\to K^+K^-$ for $1.4 \text{GeV} < W < 2.4 \text{GeV}$. Both the cross section as a function of the centre-of-mass energy of the photonic collision, and the differential cross section with respect to the kaon scattering angle are measured. Source code: BELLE_2003_I629334.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief gamma gamma -> K+K-
9 class BELLE_2003_I629334 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2003_I629334);
14
15
16 /// @name Analysis methods
17 ///@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Final state
22 declare(FinalState(),"FS");
23 // check CMS energy in range
24 if(sqrtS()<1.4*GeV || sqrtS()>2.4*GeV)
25 throw Error("Invalid CMS energy for BELLE_2003_I629334");
26 // bin for the angle plots
27 int ibin = (sqrtS()-1.40)/0.04;
28 book(_h_cTheta,2+ibin/4,1,ibin%4+1);
29 book(_cK, "/TMP/nK");
30 }
31
32
33 /// Perform the per-event analysis
34 void analyze(const Event& event) {
35 Particles part = applyProjection<FinalState>(event,"FS").particles();
36 if(part.size()!=2) vetoEvent;
37 double cTheta(0.);
38 bool foundP(false),foundM(false);
39 for(const Particle & p : part) {
40 if(p.pid()==PID::KPLUS) {
41 foundP=true;
42 cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
43 }
44 else if(p.pid()==PID::KMINUS)
45 foundM=true;
46 }
47 if(!foundP || !foundM) vetoEvent;
48 if(cTheta<=0.6) _cK->fill();
49 if(_h_cTheta ) _h_cTheta ->fill(cTheta);
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 double fact = crossSection()/nanobarn/sumOfWeights();
56 if(_h_cTheta ) scale(_h_cTheta ,fact);
57 double sigma = _cK->val()*fact;
58 double error = _cK->err()*fact;
59 Scatter2D temphisto(refData(1, 1, 1));
60 Scatter2DPtr mult;
61 book(mult, 1, 1, 1);
62 for (size_t b = 0; b < temphisto.numPoints(); b++) {
63 const double x = temphisto.point(b).x();
64 pair<double,double> ex = temphisto.point(b).xErrs();
65 pair<double,double> ex2 = ex;
66 if(ex2.first ==0.) ex2. first=0.0001;
67 if(ex2.second==0.) ex2.second=0.0001;
68 if (inRange(sqrtS(), x-ex2.first, x+ex2.second)) {
69 mult->addPoint(x, sigma, ex, make_pair(error,error));
70 }
71 else {
72 mult->addPoint(x, 0., ex, make_pair(0.,.0));
73 }
74 }
75 }
76
77 ///@}
78
79
80 /// @name Histograms
81 ///@{
82 Histo1DPtr _h_cTheta;
83 CounterPtr _cK;
84 ///@}
85
86
87 };
88
89
90 RIVET_DECLARE_PLUGIN(BELLE_2003_I629334);
91
92}
|