Rivet analyses referenceCRYSTAL_BALL_1990_I294492$\gamma\gamma\to \pi^0\pi^0$ for centre-of-mass energies between 0.25 and 1.95 GeVExperiment: CRYSTAL_BALL (DORIS) Inspire ID: 294492 Status: UNVALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the differential cross section for $\gamma\gamma\to \pi^0\pi^0$ for $0.25 \text{GeV} < W < 1.95 \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: CRYSTAL_BALL_1990_I294492.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief gamma gamma -> pi0pi0
9 class CRYSTAL_BALL_1990_I294492 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CRYSTAL_BALL_1990_I294492);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(FinalState(), "FS");
23 // histos
24 if (inRange(sqrtS()/GeV,0.25,1.95)) {
25 book(_npipi, 1, 1, 1);
26 double sMin=0.27,sMax=0.5, step=0.2;
27 unsigned int ihist=1;
28 while (sMin<4.1) {
29 if (inRange(sqrtS()/GeV, sMin, sMax)) {
30 break;
31 }
32 sMin=sMax;
33 if (fuzzyEquals(1.3, sMin)) step=0.4;
34 sMax+=step;
35 ihist+=1;
36 }
37 if (ihist<7) book(_h_cTheta[0], 2, 1, ihist);
38 if (inRange(sqrtS()/GeV,1.1,1.5)) book(_h_cTheta[1], 2, 1, 7);
39 }
40 else {
41 throw Error("Invalid CMS energy for CRYSTAL_BALL_1990_I294492");
42 }
43 _comEdge = "OTHER"s;
44 for (const string& edge : _npipi.binning().edges<0>()) {
45 if (isCompatibleWithSqrtS(std::stod(edge))) {
46 _comEdge = edge;
47 break;
48 }
49 }
50 _axis = YODA::Axis<double>({0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8});
51 }
52
53
54 /// Perform the per-event analysis
55 void analyze(const Event& event) {
56 if (_h_cTheta[0] && _edges.empty()) _edges = _h_cTheta[0]->xEdges();
57 if (_h_cTheta[1] && _edges.empty()) _edges = _h_cTheta[1]->xEdges();
58 Particles part = apply<FinalState>(event,"FS").particles();
59 if (part.size()!=2) vetoEvent;
60 for(const Particle& p : part) {
61 if (p.pid()!=PID::PI0) vetoEvent;
62 }
63 const double cTheta = abs(part[0].momentum().z()/part[0].momentum().p3().mod());
64 if (cTheta<=0.8) _npipi->fill(_comEdge);
65 if (_h_cTheta[0]) _h_cTheta[0]->fill(disc(cTheta));
66 if (_h_cTheta[1]) _h_cTheta[1]->fill(disc(cTheta));
67 }
68
69
70 string disc(const double value) const {
71 size_t idx = _axis.index(value);
72 if (0 < idx && idx <= _edges.size()) return _edges[idx-1];
73 return "OTHER"s;
74 }
75
76
77 /// Normalise histograms etc., after the run
78 void finalize() {
79 const double fact = crossSection()/nanobarn/sumOfWeights();
80 for (unsigned int ix=0; ix<2; ++ix) {
81 if (_h_cTheta[ix]) {
82 scale(_h_cTheta[ix], fact);
83 for(auto & b : _h_cTheta[ix]->bins()) {
84 const size_t idx = b.index();
85 b.scaleW(1./_axis.width(idx));
86 }
87 }
88 }
89 scale(_npipi, fact);
90 }
91
92 /// @}
93
94
95 /// @name Histograms
96 /// @{
97 BinnedHistoPtr<string> _npipi, _h_cTheta[2];
98 YODA::Axis<double> _axis;
99 vector<string> _edges;
100 string _comEdge;
101 /// @}
102
103
104 };
105
106
107 RIVET_DECLARE_PLUGIN(CRYSTAL_BALL_1990_I294492);
108
109}
|