Rivet analyses referenceVENUS_1995_I392360$\gamma\gamma\to\pi^+\pi^-$ for centre-of-mass energies between 1 and 1.5 GeVExperiment: VENUS (Tristan) Inspire ID: 392360 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the differential cross section for $\gamma\gamma\to\pi^+\pi^-$. 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: VENUS_1995_I392360.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 VENUS_1995_I392360 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(VENUS_1995_I392360);
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 (!inRange(sqrtS(), 1*GeV, 1.5*GeV)) {
25 throw Error("Invalid CMS energy for VENUS_1995_I392360");
26 }
27 // bin for the angle plots
28 int ibin = (sqrtS()-1.0)/0.05 + 2;
29 book(_h_cTheta, ibin, 1, 1);
30 book(_cPi, "/TMP/nPi");
31 _cmax = ibin>2 ? 0.6 : 0.4;
32 if (ibin == 2) _axis = YODA::Axis<double>(6, 0.0, 0.6);
33 else _axis = YODA::Axis<double>(4, 0.0, 0.4);
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 if (_edges.empty()) _edges = _h_cTheta->xEdges();
40 Particles part = apply<FinalState>(event, "FS").particles();
41 if (part.size()!=2) vetoEvent;
42 double cTheta(0.);
43 bool foundP(false),foundM(false);
44 for (const Particle& p : part) {
45 if (p.pid()==PID::PIPLUS) {
46 foundP = true;
47 cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
48 }
49 else if (p.pid()==PID::PIMINUS)
50 foundM = true;
51 }
52 if (!foundP || !foundM) vetoEvent;
53 if (cTheta<=_cmax) _cPi->fill();
54 if (_h_cTheta ) _h_cTheta->fill(map2string(cTheta));
55 }
56
57 string map2string(const double value) const {
58 const size_t idx = _axis.index(value) - 1;
59 if (idx < _edges.size()) return _edges[idx];
60 return "OTHER";
61 }
62
63 /// Normalise histograms etc., after the run
64 void finalize() {
65 const double fact = crossSection()/nanobarn/sumOfWeights();
66 if (_h_cTheta ) scale(_h_cTheta, fact);
67 scale(_cPi, fact);
68 BinnedEstimatePtr<string> mult;
69 book(mult, 1, 1, 1);
70 for (auto& b : mult->bins()) {
71 const double Ecm = std::stod(b.xEdge());
72 if (isCompatibleWithSqrtS(sqrtS()/GeV, Ecm)) {
73 b.set(_cPi->val(), _cPi->err());
74 }
75 }
76 }
77
78 ///@}
79
80
81 /// @name Histograms
82 ///@{
83 BinnedHistoPtr<string> _h_cTheta;
84 CounterPtr _cPi;
85 double _cmax;
86 YODA::Axis<double> _axis;
87 vector<string> _edges;
88 ///@}
89
90
91 };
92
93
94 RIVET_DECLARE_PLUGIN(VENUS_1995_I392360);
95
96}
|