rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMD2_2001_I554522

Cross section for $e^+e^-\to\eta\gamma$ for energies between 600 MeV and 1380 MeV
Experiment: CMD2 (VEPP-2M)
Inspire ID: 554522
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett. B509 (2001) 217-226, 2001
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons below 0.6 and 1.38 GeV

Cross section for $e^+e^-\to\eta\gamma$ for energies between 600 MeV and 1380 MeV

Source code: CMD2_2001_I554522.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/UnstableParticles.hh"
  5
  6namespace Rivet {
  7  
  8  
  9  /// @brief Add a short analysis description here
 10  class CMD2_2001_I554522 : public Analysis {
 11  public:
 12    
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(CMD2_2001_I554522);
 15    
 16    
 17    /// @name Analysis methods
 18    //@{
 19    
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      
 23      // Initialise and register projections
 24      declare(FinalState(), "FS");
 25      declare(UnstableParticles(), "UFS");
 26      book(_numEtaGamma, "TMP/EtaGamma");
 27    }
 28    
 29    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 30      for (const Particle &child : p.children()) {
 31	if(child.children().empty()) {
 32	  --nRes[child.pid()];
 33	  --ncount;
 34	}
 35	else
 36	  findChildren(child,nRes,ncount);
 37      }
 38    }
 39    
 40    
 41    /// Perform the per-event analysis
 42    void analyze(const Event& event) {
 43      
 44      const FinalState& fs = apply<FinalState>(event, "FS");
 45      
 46      map<long,int> nCount;
 47      int ntotal(0);
 48      for (const Particle& p : fs.particles()) {
 49	nCount[p.pid()] += 1;
 50	++ntotal;
 51      }
 52      
 53      const FinalState& ufs = apply<FinalState>(event, "UFS");
 54      for (const Particle& p : ufs.particles()) {
 55	if(p.children().empty()) continue;
 56	// find the omega
 57	if(p.pid()==221) {
 58	  map<long,int> nRes = nCount;
 59	  int ncount = ntotal;
 60	  findChildren(p,nRes,ncount);
 61	  // eta pi+pi-
 62	  if(ncount!=1) continue;
 63	  bool matched = true;
 64          for(auto const & val : nRes) {
 65	    if(val.first==22) {
 66	      if(val.second !=1) {
 67		matched = false;
 68		break;
 69	      }
 70	    }
 71	    else if(val.second!=0) {
 72	      matched = false;
 73	      break;
 74	    }
 75	  }
 76	  if(matched)
 77	    _numEtaGamma->fill();
 78	}
 79      }
 80      
 81    }
 82
 83
 84    /// Normalise histograms etc., after the run
 85    void finalize() {
 86      double sigma = _numEtaGamma->val();
 87      double error = _numEtaGamma->err();
 88      sigma *= crossSection()/ sumOfWeights() /nanobarn;
 89      error *= crossSection()/ sumOfWeights() /nanobarn; 
 90      Scatter2D temphisto(refData(1, 1, 1));
 91      Scatter2DPtr mult;
 92      book(mult, 1, 1, 1);
 93      for (size_t b = 0; b < temphisto.numPoints(); b++) {
 94	const double x  = temphisto.point(b).x();
 95	pair<double,double> ex = temphisto.point(b).xErrs();
 96	pair<double,double> ex2 = ex;
 97	if(ex2.first ==0.) ex2. first=0.0001;
 98	if(ex2.second==0.) ex2.second=0.0001;
 99	if (inRange(sqrtS()/MeV, x-ex2.first, x+ex2.second)) {
100	  mult->addPoint(x, sigma, ex, make_pair(error,error));
101	}
102	else {
103	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
104	}
105      }
106    }
107
108    //@}
109
110
111    /// @name Histograms
112    //@{
113    CounterPtr _numEtaGamma;
114    //@}
115
116
117  };
118
119
120  // The hook for the plugin system
121  RIVET_DECLARE_PLUGIN(CMD2_2001_I554522);
122
123
124}