Rivet analyses referenceMARKII_1990_I304882$\gamma\gamma\to\pi^+\pi^-$ for centre-of-mass energies between 0.35 and 1.6 GeVExperiment: MARKII (PEP) Inspire ID: 304882 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the differential cross section for $\gamma\gamma\to\pi^+\pi^-$ for $0.35 \text{GeV} < W < 1.6 \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: MARKII_1990_I304882.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 MARKII_1990_I304882 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(MARKII_1990_I304882);
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()<0.35*GeV || sqrtS()>1.6*GeV)
25 throw Error("Invalid CMS energy for MARKII_1990_I304882");
26 for(unsigned int ix=0;ix<7;++ix) {
27 std::ostringstream title;
28 title << "/TMP/nPi_" << ix;
29 book(_cPi[ix], title.str());
30 }
31 }
32
33
34 /// Perform the per-event analysis
35 void analyze(const Event& event) {
36 Particles part = applyProjection<FinalState>(event,"FS").particles();
37 if(part.size()!=2) vetoEvent;
38 double cTheta(0.);
39 bool foundP(false),foundM(false);
40 for(const Particle & p : part) {
41 if(p.pid()==PID::PIPLUS) {
42 foundP=true;
43 cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
44 }
45 else if(p.pid()==PID::PIMINUS)
46 foundM=true;
47 }
48 if(!foundP || !foundM) vetoEvent;
49 int ibin = cTheta/0.1;
50 if(ibin>5) vetoEvent;
51 _cPi[ 0 ]->fill();
52 _cPi[ibin+1]->fill();
53 }
54
55
56 /// Normalise histograms etc., after the run
57 void finalize() {
58 double fact = crossSection()/nanobarn/sumOfWeights();
59 for(unsigned int ih=0;ih<7;++ih) {
60 unsigned int ix=2,iy=ih;
61 if(ih==0) {
62 ix=1;
63 iy=1;
64 }
65 double sigma = _cPi[ih]->val()*fact;
66 double error = _cPi[ih]->err()*fact;
67 Scatter2D temphisto(refData(ix, 1, iy));
68 Scatter2DPtr mult;
69 book(mult, ix, 1, iy);
70 for (size_t b = 0; b < temphisto.numPoints(); b++) {
71 const double x = temphisto.point(b).x();
72 pair<double,double> ex = temphisto.point(b).xErrs();
73 pair<double,double> ex2 = ex;
74 if(ex2.first ==0.) ex2. first=0.0001;
75 if(ex2.second==0.) ex2.second=0.0001;
76 if (inRange(sqrtS(), x-ex2.first, x+ex2.second)) {
77 mult->addPoint(x, sigma, ex, make_pair(error,error));
78 }
79 else {
80 mult->addPoint(x, 0., ex, make_pair(0.,.0));
81 }
82 }
83 }
84 }
85
86 ///@}
87
88
89 /// @name Histograms
90 ///@{
91 CounterPtr _cPi[7];
92 ///@}
93
94
95 };
96
97
98 RIVET_DECLARE_PLUGIN(MARKII_1990_I304882);
99
100}
|