Rivet analyses referenceBELLE_2007_I749358$\gamma\gamma\to\pi^+\pi^-$ for centre-of-mass energies between 0.8 and 1.5 GeVExperiment: BELLE (KEKB) Inspire ID: 749358 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the differential cross section for $\gamma\gamma\to\pi^+\pi^-$ for $0.8 \text{GeV} < W < 1.5 \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 pion scattering angle are measured. Source code: BELLE_2007_I749358.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief gamma gamma -> pi+pi-
9 class BELLE_2007_I749358 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2007_I749358);
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 _energyAxis = YODA::Axis<double>(140, 0.8, 1.5);
25 _thetaAxis = YODA::Axis<double>(12, 0.0, 0.6);
26 if (sqrtS()<0.8*GeV || sqrtS()>1.5*GeV)
27 throw Error("Invalid CMS energy for BELLE_2007_I749358");
28 eIndex = _energyAxis.index(sqrtS()/GeV) - 1;
29
30 // bin for the angle plots
31 int ibin = (sqrtS()-0.8)/0.005 + 2;
32 book(_h_cTheta,ibin,1,1);
33 book(_cPi, "/TMP/nPi");
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39
40 if (_EcmEdges.empty()) _EcmEdges = _cPi->xEdges();
41 if (_thetaEdges.empty()) _thetaEdges = _h_cTheta->xEdges();
42
43 Particles part = apply<FinalState>(event,"FS").particles();
44 if (part.size()!=2) vetoEvent;
45 double cTheta(0.);
46 bool foundP(false),foundM(false);
47 for (const Particle& p : part) {
48 if (p.pid()==PID::PIPLUS) {
49 foundP=true;
50 cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
51 }
52 else if (p.pid()==PID::PIMINUS)
53 foundM=true;
54 }
55 if (!foundP || !foundM) vetoEvent;
56 if (cTheta<=0.6) _cPi->fill(_EcmEdges[eIndex]);
57 if (_h_cTheta ) {
58 size_t idx = _thetaAxis.index(cTheta) - 1;
59 _h_cTheta->fill(_thetaEdges[idx]);
60 }
61 }
62
63
64 /// Normalise histograms etc., after the run
65 void finalize() {
66 const double fact = crossSection()/nanobarn/sumOfWeights();
67 if (_h_cTheta ) scale(_h_cTheta ,fact);
68 scale(_cPi, fact);
69 }
70
71 ///@}
72
73
74 /// @name Histograms
75 ///@{
76 BinnedHistoPtr<string> _h_cTheta, _cPi;
77 YODA::Axis<double> _energyAxis;
78 YODA::Axis<double> _thetaAxis;
79 vector<string> _EcmEdges, _thetaEdges;
80 size_t eIndex;
81 ///@}
82
83
84 };
85
86
87 RIVET_DECLARE_PLUGIN(BELLE_2007_I749358);
88
89}
|