rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CLEOC_2008_I777917

Measurement of charm final-states, the total hadronic cross section and $R$ for energies between 3.92 and 4.26 GeV
Experiment: CLEOC (CESR)
Inspire ID: 777917
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D80 (2009) 072001, 2009
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons and e+ e- to mu+ mu- (for normalization)

Measurement of charm final-states, the total hadronic cross section and $R$ for energies between 3.92 and 4.26 GeV The muonic cross section is also outputted to the yoda file so that ratio $R$ can be recalcuated if runs are combined.

Source code: CLEOC_2008_I777917.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 Charm cross sections 3.92 and 4.26 GeV
 10  class CLEOC_2008_I777917 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(CLEOC_2008_I777917);
 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      for(unsigned int ix=0;ix<3;++ix)
 27        for(unsigned int iy=0;iy<3;++iy)
 28          book(_sigma_DD[ix][iy],1+ix,1,1+iy);
 29      for(unsigned int ix=0;ix<2;++ix) {
 30        book(_sigma_DDpi[ix],4,1,1+ix);
 31        book(_sigma_DDX [ix],5,1,1+ix);
 32      }
 33      book(_sigma_R[0],"TMP/hadron",refData<YODA::BinnedEstimate<int>>(6,1,1));
 34      book(_sigma_R[1],"TMP/muon",refData<YODA::BinnedEstimate<int>>(6,1,1));
 35      book(_sigma_cc,6,1,1);
 36    }
 37
 38    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 39      for (const Particle &child : p.children()) {
 40	if(child.children().empty()) {
 41	  nRes[child.pid()]-=1;
 42	  --ncount;
 43	}
 44	else
 45	  findChildren(child,nRes,ncount);
 46      }
 47    }
 48
 49
 50    /// Perform the per-event analysis
 51    void analyze(const Event& event) {
 52      const FinalState& fs = apply<FinalState>(event, "FS");
 53      // total hadronic and muonic cross sections
 54      map<long,int> nCount;
 55      int ntotal(0);
 56      for (const Particle& p : fs.particles()) {
 57	nCount[p.pid()] += 1;
 58	++ntotal;
 59      }
 60      // mu+mu- + photons
 61      if(nCount[-13]==1 and nCount[13]==1 &&
 62	 ntotal==2+nCount[22]) {
 63	_sigma_R[1]->fill(round(sqrtS()/MeV));
 64        return;
 65      }
 66      else
 67        _sigma_R[0]  ->fill(round(sqrtS()/MeV));
 68      // identified final state with D mesons
 69      const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
 70      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 71	const Particle& p1 = ufs.particles()[ix];
 72	int id1 = abs(p1.pid());
 73	if(id1 != 411 && id1 != 413 && id1 != 421 && id1 != 423 &&
 74	   id1 != 431 && id1 != 433)
 75	  continue;
 76	// check fs
 77	bool fs = true;
 78	for (const Particle & child : p1.children()) {
 79	  if(child.pid()==p1.pid()) {
 80	    fs = false;
 81	    break;
 82	  }
 83	}
 84	if(!fs) continue;
 85	// find the children
 86	map<long,int> nRes = nCount;
 87	int ncount = ntotal;
 88	findChildren(p1,nRes,ncount);
 89	bool matched=false;
 90	int sign = p1.pid()/id1;
 91	// loop over the other fs particles
 92	for(unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
 93	  const Particle& p2 = ufs.particles()[iy];
 94	  fs = true;
 95	  for (const Particle & child : p2.children()) {
 96	    if(child.pid()==p2.pid()) {
 97	      fs = false;
 98	      break;
 99	    }
100	  }
101	  if(!fs) continue;
102	  if(p2.pid()/abs(p2.pid())==sign) continue;
103	  int id2 = abs(p2.pid());
104	  if(id2 != 411 && id2 != 413 && id2 != 421 && id2 != 423 &&
105	     id2 != 431 && id2 != 433)
106	    continue;
107	  if(!p2.parents().empty() && p2.parents()[0].pid()==p1.pid())
108	    continue;
109	  if((id1==411 || id1==421 || id1==431) && (id2==411 || id2==421 || id2==431 )) {
110	    _sigma_DDX[1]->fill(round(sqrtS()/MeV));
111            _sigma_cc->fill(round(sqrtS()/MeV));
112          }
113	  map<long,int> nRes2 = nRes;
114	  int ncount2 = ncount;
115	  findChildren(p2,nRes2,ncount2);
116	  if(ncount2==0) {
117	    matched=true;
118	    for(auto const & val : nRes2) {
119	      if(val.second!=0) {
120		matched = false;
121		break;
122	      }
123	    }
124	    if(matched) {
125	      if(id1==411 && id2==411) {
126		_sigma_DD[1][0]->fill(round(sqrtS()/MeV));
127		_sigma_DDX[0]  ->fill(round(sqrtS()/MeV));
128	      }
129	      else if(id1==421&& id2==421) {
130		_sigma_DD[0][0]->fill(round(sqrtS()/MeV));
131		_sigma_DDX[0]  ->fill(round(sqrtS()/MeV));
132	      }
133	      else if(id1==431&& id2==431) {
134		_sigma_DD[2][0]->fill(round(sqrtS()/MeV));
135	      }
136	      else if(id1==413 && id2==413) {
137		_sigma_DD[1][2]->fill(round(sqrtS()/MeV));
138	      }
139	      else if(id1==423&& id2==423) {
140		_sigma_DD[0][2]->fill(round(sqrtS()/MeV));
141	      }
142	      else if(id1==433&& id2==433) {
143		_sigma_DD[2][2]->fill(round(sqrtS()/MeV));
144	      }
145	      else if((id1==421 && id2==423) ||
146		      (id1==423 && id2==421)) {
147		_sigma_DD[0][1]->fill(round(sqrtS()/MeV));
148	      }
149	      else if((id1==411 && id2==413) ||
150		      (id1==413 && id2==411)) {
151		_sigma_DD[1][1]->fill(round(sqrtS()/MeV));
152	      }
153	      else if((id1==431 && id2==433) ||
154		      (id1==433 && id2==431)) {
155		_sigma_DD[2][1]->fill(round(sqrtS()/MeV));
156	      }
157	    }
158	  }
159	  else if(ncount2==1) {
160	    int ipi=0;
161	    if(nRes2[111]==1 && nRes2[211]==0 && nRes[-211]==0 )
162	      ipi = 111;
163	    else if(nRes2[111]==0 && nRes2[211]==1 && nRes[-211]==0 )
164	      ipi = 211;
165	    else if(nRes2[111]==0 && nRes2[211]==0 && nRes[-211]==1 )
166	      ipi =-211;
167	    if(ipi==0) continue;
168	    matched=true;
169	    for(auto const & val : nRes2) {
170	      if(val.first==ipi)
171		continue;
172	      else if(val.second!=0) {
173		matched = false;
174		break;
175	      }
176	    }
177	    if(matched) {
178	      bool Ddecay = false;
179	      Particle mother = p1;
180	      while (!mother.parents().empty()) {
181		mother = mother.parents()[0];
182		if(PID::isCharmMeson(mother.pid()) && mother.pid()!=p1.pid()) {
183		  Ddecay = true;
184		  break;
185		}
186	      }
187	      mother = p2;
188	      while (!mother.parents().empty()) {
189		mother = mother.parents()[0];
190		if(PID::isCharmMeson(mother.pid()) && mother.pid()!=p1.pid()) {
191		  Ddecay = true;
192		  break;
193		}
194	      }
195	      if(Ddecay) continue;
196	      if((id1==413 || id1==423 ) &&
197		 (id2==413 || id2==423 )) {
198		_sigma_DDpi[1]->fill(round(sqrtS()/MeV));
199	      }
200	      else if((id1==411 || id1==421 ) &&
201		      (id2==413 || id2==423 )) {
202		_sigma_DDpi[0]->fill(round(sqrtS()/MeV));
203	      }
204	      else if((id1==413 || id1==423 ) &&
205		      (id2==411 || id2==421 )) {
206		_sigma_DDpi[0]->fill(round(sqrtS()/MeV));
207	      }
208	    }
209	  }
210	}
211      }
212    }
213
214    /// Normalise histograms etc., after the run
215    void finalize() {
216      // cross sections
217      double fact = crossSection()/picobarn/ sumOfWeights();
218      for(unsigned int ix=0;ix<3;++ix)
219        for(unsigned int iy=0;iy<3;++iy)
220          scale(_sigma_DD[ix][iy],fact);
221      for(unsigned int ix=0;ix<2;++ix) {
222        scale(_sigma_DDpi[ix],fact);
223        scale(_sigma_DDX [ix],fact*1e-3); // this one in nb
224      }
225      BinnedEstimatePtr<int> tmp;
226      book(tmp,6,1,2);
227      divide(_sigma_R[0],_sigma_R[1],tmp);
228      scale(_sigma_cc,fact*1e-3);
229    }
230
231    /// @}
232
233
234    /// @name Histograms
235    /// @{
236    BinnedHistoPtr<int> _sigma_DD[3][3];
237    BinnedHistoPtr<int> _sigma_DDpi[2];
238    BinnedHistoPtr<int> _sigma_DDX[2];
239    BinnedHistoPtr<int> _sigma_R[2],_sigma_cc;
240    /// @}
241
242
243  };
244
245
246  RIVET_DECLARE_PLUGIN(CLEOC_2008_I777917);
247
248
249}