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(sqrtS()<1.*GeV || sqrtS()>1.5*GeV)
25 throw Error("Invalid CMS energy for VENUS_1995_I392360");
26 // bin for the angle plots
27 int ibin = (sqrtS()-1.0)/0.05 + 2;
28 book(_h_cTheta,ibin,1,1);
29 book(_cPi, "/TMP/nPi");
30 _cmax = ibin>2 ? 0.6 : 0.4;
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 if(cTheta<=_cmax) _cPi->fill();
50 if(_h_cTheta ) _h_cTheta ->fill(cTheta);
51 }
52
53
54 /// Normalise histograms etc., after the run
55 void finalize() {
56 double fact = crossSection()/nanobarn/sumOfWeights();
57 if(_h_cTheta ) scale(_h_cTheta ,fact);
58 double sigma = _cPi->val()*fact;
59 double error = _cPi->err()*fact;
60 Scatter2D temphisto(refData(1, 1, 1));
61 Scatter2DPtr mult;
62 book(mult, 1, 1, 1);
63 for (size_t b = 0; b < temphisto.numPoints(); b++) {
64 const double x = temphisto.point(b).x();
65 pair<double,double> ex = temphisto.point(b).xErrs();
66 pair<double,double> ex2 = ex;
67 if(ex2.first ==0.) ex2. first=0.0001;
68 if(ex2.second==0.) ex2.second=0.0001;
69 if (inRange(sqrtS(), x-ex2.first, x+ex2.second)) {
70 mult->addPoint(x, sigma, ex, make_pair(error,error));
71 }
72 else {
73 mult->addPoint(x, 0., ex, make_pair(0.,.0));
74 }
75 }
76 }
77
78 ///@}
79
80
81 /// @name Histograms
82 ///@{
83 Histo1DPtr _h_cTheta;
84 CounterPtr _cPi;
85 double _cmax;
86 ///@}
87
88
89 };
90
91
92 RIVET_DECLARE_PLUGIN(VENUS_1995_I392360);
93
94}
|