Rivet analyses referenceCELLO_1992_I345437$\gamma\gamma\to\pi^+\pi^-$ for centre-of-mass energies between 0.75 and 2 GeVExperiment: CELLO (Petra) Inspire ID: 345437 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: CELLO_1992_I345437.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 CELLO_1992_I345437 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CELLO_1992_I345437);
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.75*GeV || sqrtS()>2.*GeV)
25 throw Error("Invalid CMS energy for CELLO_1992_I345437");
26 int ibin = (sqrtS()-0.70)/0.05;
27 if(ibin>0&&ibin<19)
28 book(_h_cTheta,2,1,ibin);
29 if(inRange(sqrtS()/GeV,0.85,.95))
30 book(_h_cTheta2,2,1,19);
31 else if(inRange(sqrtS()/GeV,1.15,1.25))
32 book(_h_cTheta2,2,1,20);
33 else if(inRange(sqrtS()/GeV,1.25,1.35))
34 book(_h_cTheta2,2,1,21);
35 book(_cPi, "/TMP/nPi");
36 }
37
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 Particles part = applyProjection<FinalState>(event,"FS").particles();
42 if(part.size()!=2) vetoEvent;
43 double cTheta(0.);
44 bool foundP(false),foundM(false);
45 for(const Particle & p : part) {
46 if(p.pid()==PID::PIPLUS) {
47 foundP=true;
48 cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
49 }
50 else if(p.pid()==PID::PIMINUS)
51 foundM=true;
52 }
53 if(!foundP || !foundM) vetoEvent;
54 if(cTheta<=0.6) _cPi->fill();
55 if(_h_cTheta ) _h_cTheta ->fill(cTheta);
56 if(_h_cTheta2) _h_cTheta2->fill(cTheta);
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 double fact = crossSection()/nanobarn/sumOfWeights();
63 if(_h_cTheta ) scale(_h_cTheta ,fact);
64 if(_h_cTheta2) scale(_h_cTheta2,fact);
65 double sigma = _cPi->val()*fact;
66 double error = _cPi->err()*fact;
67 Scatter2D temphisto(refData(1, 1, 1));
68 Scatter2DPtr mult;
69 book(mult, 1, 1, 1);
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 /// @name Histograms
89 ///@{
90 Histo1DPtr _h_cTheta,_h_cTheta2;
91 CounterPtr _cPi;
92 ///@}
93
94
95 };
96
97
98 RIVET_DECLARE_PLUGIN(CELLO_1992_I345437);
99
100}
|