rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALEPH_2003_I626022

$\gamma\gamma\to\pi^+\pi^-$ ($2<\sqrt{s}<6$ GeV) and $K^+K^-$ ($2.25<\sqrt{s}<4$ GeV)
Experiment: ALEPH (LEP)
Inspire ID: 626022
Status: VALIDATED
Authors:
  • Your Name
References:
  • Phys.Lett.B 569 (2003) 140-150
Beams: 22 22
Beam energies: ANY
Run details:
  • gamma gamma to hadrons

Measurement of the differential cross section for $\gamma\gamma\to\pi^+\pi^-$ ($2<\sqrt{s}<6$ GeV) and $K^+K^-$ ($2.25<\sqrt{s}<4$ GeV). The cross section as a function of the centre-of-mass energy of the photonic collision is measured, and the differential cross section with respect to the meson scattering angle are measured.

Source code: ALEPH_2003_I626022.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/FastJets.hh"
  5#include "Rivet/Projections/DressedLeptons.hh"
  6#include "Rivet/Projections/MissingMomentum.hh"
  7#include "Rivet/Projections/PromptFinalState.hh"
  8
  9namespace Rivet {
 10
 11
 12  /// @brief gamma gamma -> pi+pi-/K+ K-
 13  class ALEPH_2003_I626022 : public Analysis {
 14  public:
 15
 16    /// Constructor
 17    RIVET_DEFAULT_ANALYSIS_CTOR(ALEPH_2003_I626022);
 18
 19
 20    /// @name Analysis methods
 21    ///@{
 22
 23    /// Book histograms and initialise projections before the run
 24    void init() {
 25      // check CMS energy in range
 26      if(sqrtS()<2.*GeV || sqrtS()>6.*GeV)
 27	throw Error("Invalid CMS energy for ");
 28      // Final state
 29      declare(FinalState(),"FS");
 30      // histos
 31      book(_h_Pi,1,1,1);
 32      if(sqrtS()<4.)
 33	book(_h_K,2,1,1);
 34      book(_cPi, "/TMP/nPi_");
 35      book(_cK , "/TMP/nK_" );
 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      if(part[0].pid()!=-part[1].pid()) vetoEvent;
 44      double cTheta(0.);
 45      bool foundPi(false),foundK(false);
 46      for(const Particle & p : part) {
 47	if(p.pid()==PID::PIPLUS) {
 48	  foundPi=true;
 49	  cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
 50	}
 51	else if(p.pid()==PID::KPLUS) {
 52	  foundK=true;
 53	  cTheta = abs(p.momentum().z()/p.momentum().p3().mod());
 54	}
 55      }
 56      if(!foundPi && !foundK) vetoEvent;
 57      if(foundPi&&_h_Pi) _h_Pi->fill(cTheta);
 58      if(foundK &&_h_K ) _h_K ->fill(cTheta);
 59      if(foundPi)     _cPi->fill();
 60      else if(foundK)  _cK->fill();
 61    }
 62
 63
 64    /// Normalise histograms etc., after the run
 65    void finalize() {
 66      double fact = crossSection()/nanobarn/sumOfWeights();
 67      if(_h_Pi) scale(_h_Pi, fact);
 68      if(_h_K ) scale(_h_K , fact);
 69      for(unsigned int ih=3;ih<5;++ih) {
 70	CounterPtr count = ih==3 ? _cPi : _cK;
 71	double sigma = count->val()*fact;
 72	double error = count->err()*fact;
 73	// hist for axis
 74	Scatter2D temphisto(refData(ih, 1, 1));
 75	Scatter2DPtr cross;
 76	book(cross, ih, 1, 1);
 77	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 78	  const double x  = temphisto.point(b).x();
 79	  pair<double,double> ex = temphisto.point(b).xErrs();
 80	  pair<double,double> ex2 = ex;
 81	  if(ex2.first ==0.) ex2. first=0.0001;
 82	  if(ex2.second==0.) ex2.second=0.0001;
 83	  if (inRange(sqrtS(), x-ex2.first, x+ex2.second)) {
 84	    cross->addPoint(x, sigma, ex, make_pair(error,error));
 85	  }
 86	  else {
 87	    cross->addPoint(x, 0., ex, make_pair(0.,.0));
 88	  }
 89	}
 90      }
 91    }
 92    
 93    ///@}
 94
 95
 96    /// @name Histograms
 97    ///@{
 98    Histo1DPtr _h_Pi,_h_K;
 99    CounterPtr _cPi,_cK;
100    ///@}
101
102
103  };
104
105
106  RIVET_DECLARE_PLUGIN(ALEPH_2003_I626022);
107
108}