diff --git a/analyses/pluginMisc/NMD_1974_I745.cc b/analyses/pluginMisc/NMD_1974_I745.cc new file mode 100644 --- /dev/null +++ b/analyses/pluginMisc/NMD_1974_I745.cc @@ -0,0 +1,99 @@ +// -*- C++ -*- +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/FinalState.hh" + +namespace Rivet { + + + /// @brief Add a short analysis description here + class NMD_1974_I745 : public Analysis { + public: + + /// Constructor + DEFAULT_RIVET_ANALYSIS_CTOR(NMD_1974_I745); + + + /// @name Analysis methods + //@{ + + /// Book histograms and initialise projections before the run + void init() { + // Initialise and register projections + declare(FinalState(), "FS"); + + // Book histograms + _c_hadrons = bookCounter("/TMP/sigma_hadrons"); + _c_muons = bookCounter("/TMP/sigma_muons"); + } + + + /// Perform the per-event analysis + void analyze(const Event& event) { + const FinalState& fs = apply(event, "FS"); + + map nCount; + int ntotal(0); + foreach (const Particle& p, fs.particles()) { + nCount[p.pdgId()] += 1; + ++ntotal; + } + // mu+mu- + photons + if(nCount[-13]==1 and nCount[13]==1 && + ntotal==2+nCount[22]) + _c_muons->fill(event.weight()); + // everything else + else + _c_hadrons->fill(event.weight()); + } + + + /// Normalise histograms etc., after the run + void finalize() { + Scatter1D R = *_c_hadrons/ *_c_muons; + double rval = R.point(0).x(); + pair rerr = R.point(0).xErrs(); + double fact = crossSection()/ sumOfWeights() /nanobarn; + double sig_h = _c_hadrons->val()*fact; + double err_h = _c_hadrons->err()*fact; + double sig_m = _c_muons ->val()*fact; + double err_m = _c_muons ->err()*fact; + Scatter2D temphisto(refData(1, 1, 1)); + Scatter2DPtr hadrons = bookScatter2D(1, 1, 1); + Scatter2DPtr muons = bookScatter2D("sigma_muons" ); + Scatter2DPtr mult = bookScatter2D(1, 1, 2); + for (size_t b = 0; b < temphisto.numPoints(); b++) { + const double x = temphisto.point(b).x(); + pair ex = temphisto.point(b).xErrs(); + pair ex2 = ex; + if(ex2.first ==0.) ex2. first=0.0001; + if(ex2.second==0.) ex2.second=0.0001; + if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) { + mult ->addPoint(x, rval, ex, rerr); + hadrons->addPoint(x, sig_h, ex, make_pair(err_h,err_h)); + muons ->addPoint(x, sig_m, ex, make_pair(err_m,err_m)); + } + else { + mult ->addPoint(x, 0., ex, make_pair(0.,.0)); + hadrons->addPoint(x, 0., ex, make_pair(0.,.0)); + muons ->addPoint(x, 0., ex, make_pair(0.,.0)); + } + } + } + + //@} + + + /// @name Histograms + //@{ + CounterPtr _c_hadrons, _c_muons; + //@} + + + }; + + + // The hook for the plugin system + DECLARE_RIVET_PLUGIN(NMD_1974_I745); + + +} diff --git a/analyses/pluginMisc/NMD_1974_I745.info b/analyses/pluginMisc/NMD_1974_I745.info new file mode 100644 --- /dev/null +++ b/analyses/pluginMisc/NMD_1974_I745.info @@ -0,0 +1,35 @@ +Name: NMD_1974_I745 +Year: 1974 +Summary: Measurement of $R$ and the hadronic cross section for 4 GeV +Experiment: NMD +Collider: CEA +InspireID: 745 +Status: VALIDATED +Authors: + - Peter Richardson +References: + - Phys.Rev.Lett. 32 (1974) 432-435, 1974 +RunInfo: e+ e- to hadrons and e+ e- to mu+ mu- (for normalization) +NeedCrossSection: no +Beams: [e-, e+] +Description: + 'Measurement of $R$ and the hadronic cross seection in $e^+e^-$ collisions by + the Non-Magnetic Detector at 4 GeV. + The muonic cross section is also outputted to the yoda file + so that ratio $R$ can be recalcuated if runs are combined.' +Keywords: [] +BibKey: Tarnopolsky:1974xb +BibTeX: '@article{Tarnopolsky:1974xb, + author = "Tarnopolsky, G. and Eshelman, J. and Law, M. E. and + Leong, J. and Newman, H. and Little, R. and Strauch, K. + and Wilson, R.", + title = "{Hadron Production by electron-Positron Annihilation at + 5-GeV Center-Of-Mass Energy}", + journal = "Phys. Rev. Lett.", + volume = "32", + year = "1974", + pages = "432-435", + doi = "10.1103/PhysRevLett.32.432", + reportNumber = "PRINT-74-0434 (CEA)", + SLACcitation = "%%CITATION = PRLTA,32,432;%%" +}' diff --git a/analyses/pluginMisc/NMD_1974_I745.plot b/analyses/pluginMisc/NMD_1974_I745.plot new file mode 100644 --- /dev/null +++ b/analyses/pluginMisc/NMD_1974_I745.plot @@ -0,0 +1,27 @@ +BEGIN PLOT /NMD_1974_I745/d01-x01-y02 +Title=$R=\sigma(e^+e^-\to \text{hadrons})/\sigma(e^+e^-\to \mu^+\mu^-)$ +XLabel=$\sqrt{s}$/GeV +YLabel=$R$ +LogY=0 +ConnectGaps=1 +XMin=3.5 +XMax=4.5 +END PLOT +BEGIN PLOT /NMD_1974_I745/d01-x01-y01 +Title=$\sigma(e^+e^-\to \text{hadrons})$ +XLabel=$\sqrt{s}$/GeV +YLabel=$\sigma(e^+e^-\to \text{hadrons})/pb$ +LogY=0 +ConnectGaps=1 +XMin=3.5 +XMax=4.5 +END PLOT +BEGIN PLOT /NMD_1974_I745/sigma_muons +Title=$\sigma(e^+e^-\to \mu^+\mu^-)$ +XLabel=$\sqrt{s}$/GeV +YLabel=$\sigma(e^+e^-\to \mu^+\mu^-)/nb$ +LogY=0 +ConnectGaps=1 +XMin=3.5 +XMax=4.5 +END PLOT diff --git a/analyses/pluginMisc/NMD_1974_I745.yoda b/analyses/pluginMisc/NMD_1974_I745.yoda new file mode 100644 --- /dev/null +++ b/analyses/pluginMisc/NMD_1974_I745.yoda @@ -0,0 +1,18 @@ +BEGIN YODA_SCATTER2D_V2 /REF/NMD_1974_I745/d01-x01-y01 +IsRef: 1 +Path: /REF/NMD_1974_I745/d01-x01-y01 +Title: doi:10.17182/hepdata.21302.v1/t1 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +4.000000e+00 0.000000e+00 0.000000e+00 2.100000e+01 5.000000e+00 5.000000e+00 +END YODA_SCATTER2D_V2 +BEGIN YODA_SCATTER2D_V2 /REF/NMD_1974_I745/d01-x01-y02 +IsRef: 1 +Path: /REF/NMD_1974_I745/d01-x01-y02 +Title: doi:10.17182/hepdata.21302.v1/t1 +Type: Scatter2D +--- +# xval xerr- xerr+ yval yerr- yerr+ +4.000000e+00 0.000000e+00 0.000000e+00 6.000000e+00 1.500000e+00 1.500000e+00 +END YODA_SCATTER2D_V2