diff --git a/analyses/pluginDORIS/ARGUS_1993_S2669951.cc b/analyses/pluginDORIS/ARGUS_1993_S2669951.cc --- a/analyses/pluginDORIS/ARGUS_1993_S2669951.cc +++ b/analyses/pluginDORIS/ARGUS_1993_S2669951.cc @@ -1,211 +1,211 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableParticles.hh" namespace Rivet { /// @brief Production of the $\eta'(958)$ and $f_0(980)$ in $e^+e^-$ annihilation in the Upsilon region /// @author Peter Richardson class ARGUS_1993_S2669951 : public Analysis { public: ARGUS_1993_S2669951() : Analysis("ARGUS_1993_S2669951"), _weightSum_cont(0.), _weightSum_Ups1(0.), _weightSum_Ups2(0.) { } void init() { declare(UnstableParticles(), "UFS"); // histograms _hist_cont_f0 = bookHisto1D(2, 1, 1); _hist_Ups1_f0 = bookHisto1D(3, 1, 1); _hist_Ups2_f0 = bookHisto1D(4, 1, 1); // counters _count_etaPrime_highZ.push_back(bookCounter("/TMP/EtaHighCont")); _count_etaPrime_highZ.push_back(bookCounter("/TMP/EtaHighUps1")); _count_etaPrime_allZ.push_back(bookCounter("/TMP/EtaAllCont")); _count_etaPrime_allZ.push_back(bookCounter("/TMP/EtaAllUps1")); _count_etaPrime_allZ.push_back(bookCounter("/TMP/EtaAllUps2")); _count_f0.push_back(bookCounter("/TMP/f0Cont")); _count_f0.push_back(bookCounter("/TMP/f0Ups1")); _count_f0.push_back(bookCounter("/TMP/f0Ups2")); } void analyze(const Event& e) { // Find the Upsilons among the unstables const UnstableParticles& ufs = apply(e, "UFS"); Particles upsilons = ufs.particles(Cuts::pid==553 or Cuts::pid==100553); // Finding done, now fill counters const double weight = e.weight(); // Continuum if (upsilons.empty()) { MSG_DEBUG("No Upsilons found => continuum event"); _weightSum_cont += weight; foreach (const Particle& p, ufs.particles()) { const int id = p.pdgId(); const double xp = 2.*p.E()/sqrtS(); const double beta = p.p3().mod() / p.E(); if (id == 9010221) { _hist_cont_f0->fill(xp, weight/beta); _count_f0[2]->fill(weight); } else if (id == 331) { if (xp > 0.35) _count_etaPrime_highZ[1]->fill(weight); _count_etaPrime_allZ[2]->fill(weight); } } } // Upsilon(s) found else { MSG_DEBUG("Upsilons found => resonance event"); for (const Particle& ups : upsilons) { const int parentId = ups.pid(); if(parentId==553) { _weightSum_Ups1 += weight; } else { _weightSum_Ups2 += weight; } Particles unstable; // Find the decay products we want findDecayProducts(ups, unstable); // boost to rest frame (if required) LorentzTransform cms_boost; if (ups.p3().mod() > 1*MeV) cms_boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec()); const double mass = ups.mass(); // loop over decay products foreach(const Particle& p, unstable) { const int id = p.pdgId(); const FourMomentum p2 = cms_boost.transform(p.momentum()); const double xp = 2.*p2.E()/mass; const double beta = p2.p3().mod()/p2.E(); if (id == 9010221) { if(parentId == 553 ) { _hist_Ups1_f0->fill(xp, weight/beta); _count_f0[0]->fill(weight); } else { _hist_Ups2_f0->fill(xp, weight/beta); _count_f0[1]->fill(weight); } } else if ( id == 331 ) { if (parentId == 553) { if (xp > 0.35) _count_etaPrime_highZ[0]->fill(weight); _count_etaPrime_allZ[0]->fill(weight); } else { _count_etaPrime_allZ[1]->fill(weight); } } } } } } void finalize() { // High-Z eta' multiplicity Scatter2DPtr s111 = bookScatter2D(1, 1, 1, true); // Point at 9.460 if (_weightSum_Ups1 > 0) { scale(_count_etaPrime_highZ[0] , 1./_weightSum_Ups1); s111->point(0).setY(_count_etaPrime_highZ[0]->val(), _count_etaPrime_highZ[0]->err()); } // Point at 9.905 if (_weightSum_cont > 0) { scale(_count_etaPrime_highZ[1] , 1./_weightSum_cont); s111->point(1).setY(_count_etaPrime_highZ[1]->val(), _count_etaPrime_highZ[1]->err()); } // All-Z eta' multiplicity Scatter2DPtr s112 = bookScatter2D(1, 1, 2, true); // Point at 9.460 if (_weightSum_Ups1 > 0) { scale(_count_etaPrime_allZ[0] , 1./ _weightSum_Ups1); s112->point(0).setY(_count_etaPrime_allZ[0]->val(), _count_etaPrime_allZ[0]->err()); } // Point at 9.905 if (_weightSum_cont > 0) { scale(_count_etaPrime_allZ[2] , 1. / _weightSum_cont); s112->point(1).setY(_count_etaPrime_allZ[2]->val(), _count_etaPrime_allZ[2]->err()); } // Point at 10.02 if (_weightSum_Ups2 > 0) { scale(_count_etaPrime_allZ[1] , 1. / _weightSum_Ups2); s112->point(2).setY(_count_etaPrime_allZ[1]->val(), _count_etaPrime_allZ[1]->err()); } // f0 multiplicity Scatter2DPtr s511 = bookScatter2D(5, 1, 1, true); // Point at 9.46 if (_weightSum_Ups1 > 0) { scale(_count_f0[0] , 1./ _weightSum_Ups1); s511->point(0).setY(_count_f0[0]->val(), _count_f0[0]->err()); } // Point at 10.02 if (_weightSum_Ups2 > 0) { scale(_count_f0[1] , 1./ _weightSum_Ups2); s511->point(1).setY(_count_f0[1]->val(), _count_f0[1]->err()); } // Point at 10.45 if (_weightSum_cont > 0) { scale(_count_f0[2] , 1./ _weightSum_cont); s511->point(2).setY(_count_f0[2]->val(), _count_f0[2]->err()); } // Scale histos if (_weightSum_cont > 0.) scale(_hist_cont_f0, 1./_weightSum_cont); if (_weightSum_Ups1 > 0.) scale(_hist_Ups1_f0, 1./_weightSum_Ups1); if (_weightSum_Ups2 > 0.) scale(_hist_Ups2_f0, 1./_weightSum_Ups2); } private: /// @name Counters //@{ vector _count_etaPrime_highZ, _count_etaPrime_allZ, _count_f0; double _weightSum_cont,_weightSum_Ups1,_weightSum_Ups2; //@} /// Histos Histo1DPtr _hist_cont_f0, _hist_Ups1_f0, _hist_Ups2_f0; /// Recursively walk the decay tree to find decay products of @a p void findDecayProducts(Particle mother, Particles& unstable) { for(const Particle & p: mother.children()) { const int id = p.pdgId(); if (id == 331 || id == 9010221) { unstable.push_back(p); } - if(!p.children().empty()) + else if(!p.children().empty()) findDecayProducts(p, unstable); } } }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ARGUS_1993_S2669951); } diff --git a/analyses/pluginDORIS/ARGUS_1993_S2789213.cc b/analyses/pluginDORIS/ARGUS_1993_S2789213.cc --- a/analyses/pluginDORIS/ARGUS_1993_S2789213.cc +++ b/analyses/pluginDORIS/ARGUS_1993_S2789213.cc @@ -1,221 +1,221 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/UnstableParticles.hh" namespace Rivet { /// @brief ARGUS vector meson production /// @author Peter Richardson class ARGUS_1993_S2789213 : public Analysis { public: ARGUS_1993_S2789213() : Analysis("ARGUS_1993_S2789213"), _weightSum_cont(0.),_weightSum_Ups1(0.),_weightSum_Ups4(0.) { } void init() { declare(UnstableParticles(), "UFS"); for(unsigned int ix=0;ix<3;++ix) { for(unsigned int iy=0;iy<5;++iy) { ostringstream title; title << "/TMP/MULT_" << ix << "_" << iy; _mult[ix][iy] = bookCounter(title.str()); } } _hist_cont_KStarPlus = bookHisto1D( 4, 1, 1); _hist_Ups1_KStarPlus = bookHisto1D( 5, 1, 1); _hist_Ups4_KStarPlus = bookHisto1D( 6, 1, 1); _hist_cont_KStar0 = bookHisto1D( 7, 1, 1); _hist_Ups1_KStar0 = bookHisto1D( 8, 1, 1); _hist_Ups4_KStar0 = bookHisto1D( 9, 1, 1); _hist_cont_Rho0 = bookHisto1D(10, 1, 1); _hist_Ups1_Rho0 = bookHisto1D(11, 1, 1); _hist_Ups4_Rho0 = bookHisto1D(12, 1, 1); _hist_cont_Omega = bookHisto1D(13, 1, 1); _hist_Ups1_Omega = bookHisto1D(14, 1, 1); } void analyze(const Event& e) { const double weight = e.weight(); // Find the upsilons // First in unstable final state const UnstableParticles& ufs = apply(e, "UFS"); Particles upsilons = ufs.particles(Cuts::pid==553 || Cuts::pid==300553); // continuum if (upsilons.empty()) { _weightSum_cont += weight; foreach (const Particle& p, ufs.particles()) { int id = p.abspid(); double xp = 2.*p.E()/sqrtS(); double beta = p.p3().mod()/p.E(); if (id == 113) { _hist_cont_Rho0->fill(xp, weight/beta); _mult[0][1]->fill(weight); } else if (id == 313) { _hist_cont_KStar0->fill(xp, weight/beta); _mult[0][2]->fill(weight); } else if (id == 223) { _hist_cont_Omega->fill(xp, weight/beta); _mult[0][0]->fill(weight); } else if (id == 323) { _hist_cont_KStarPlus->fill(xp,weight/beta); _mult[0][3]->fill(weight); } else if (id == 333) { _mult[0][4]->fill(weight); } } } // found an upsilon else { foreach (const Particle& ups, upsilons) { const int parentId = ups.pid(); (parentId == 553 ? _weightSum_Ups1 : _weightSum_Ups4) += weight; Particles unstable; // Find the decay products we want findDecayProducts(ups,unstable); LorentzTransform cms_boost; if (ups.p3().mod() > 0.001) cms_boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec()); double mass = ups.mass(); foreach(const Particle & p , unstable) { int id = p.abspid(); FourMomentum p2 = cms_boost.transform(p.momentum()); double xp = 2.*p2.E()/mass; double beta = p2.p3().mod()/p2.E(); if (id == 113) { if (parentId == 553) { _hist_Ups1_Rho0->fill(xp,weight/beta); _mult[1][1]->fill(weight); } else { _hist_Ups4_Rho0->fill(xp,weight/beta); _mult[2][1]->fill(weight); } } else if (id == 313) { if (parentId == 553) { _hist_Ups1_KStar0->fill(xp,weight/beta); _mult[1][2]->fill(weight); } else { _hist_Ups4_KStar0->fill(xp,weight/beta); _mult[2][2]->fill(weight); } } else if (id == 223) { if (parentId == 553) { _hist_Ups1_Omega->fill(xp,weight/beta); _mult[1][0]->fill(weight); } else { _mult[2][0]->fill(weight); } } else if (id == 323) { if (parentId == 553) { _hist_Ups1_KStarPlus->fill(xp,weight/beta); _mult[1][3]->fill(weight); } else { _hist_Ups4_KStarPlus->fill(xp,weight/beta); _mult[2][3]->fill(weight); } } else if (id == 333) { if (parentId == 553) { _mult[1][4]->fill(weight); } else { _mult[2][4]->fill(weight); } } } } } } void finalize() { // multiplicities vector scales = {_weightSum_cont,_weightSum_Ups1,_weightSum_Ups4}; for(unsigned int ix=0;ix<3;++ix) { if(scales[ix]<=0.) continue; for(unsigned int iy=0;iy<5;++iy) { Scatter2DPtr scatter = bookScatter2D(ix+1, 1, iy+1, true); scale(_mult[ix][iy],1./scales[ix]); scatter->point(0).setY(_mult[ix][iy]->val(),_mult[ix][iy]->err()); } } // spectra if (_weightSum_cont > 0.) { scale(_hist_cont_KStarPlus, 1./_weightSum_cont); scale(_hist_cont_KStar0 , 1./_weightSum_cont); scale(_hist_cont_Rho0 , 1./_weightSum_cont); scale(_hist_cont_Omega , 1./_weightSum_cont); } if (_weightSum_Ups1 > 0.) { scale(_hist_Ups1_KStarPlus, 1./_weightSum_Ups1); scale(_hist_Ups1_KStar0 , 1./_weightSum_Ups1); scale(_hist_Ups1_Rho0 , 1./_weightSum_Ups1); scale(_hist_Ups1_Omega , 1./_weightSum_Ups1); } if (_weightSum_Ups4 > 0.) { scale(_hist_Ups4_KStarPlus, 1./_weightSum_Ups4); scale(_hist_Ups4_KStar0 , 1./_weightSum_Ups4); scale(_hist_Ups4_Rho0 , 1./_weightSum_Ups4); } } private: //@{ Histo1DPtr _hist_cont_KStarPlus, _hist_Ups1_KStarPlus, _hist_Ups4_KStarPlus; Histo1DPtr _hist_cont_KStar0, _hist_Ups1_KStar0, _hist_Ups4_KStar0 ; Histo1DPtr _hist_cont_Rho0, _hist_Ups1_Rho0, _hist_Ups4_Rho0; Histo1DPtr _hist_cont_Omega, _hist_Ups1_Omega; CounterPtr _mult[3][5]; double _weightSum_cont,_weightSum_Ups1,_weightSum_Ups4; //@} /// Recursively walk the decay tree to find decay products of @a p void findDecayProducts(Particle mother, Particles& unstable) { for(const Particle & p: mother.children()) { const int id = abs(p.pdgId()); if (id == 113 || id == 313 || id == 323 || id == 333 || id == 223 ) { unstable.push_back(p); } - if(!p.children().empty()) + else if(!p.children().empty()) findDecayProducts(p, unstable); } } }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ARGUS_1993_S2789213); }