Rivet Analyses Reference

BABAR_2013_I1238276

Production of charged pions, kaons, and protons in $e^+e^-$ annihilations into hadrons at $\sqrt{s}=10.54$GeV
Experiment: BaBar (PEP-II)
Inspire ID: 1238276
Status: VALIDATED
Authors:
  • Peter Richardson
References:Beams: e+ e-
Beam energies: (3.5, 8.0) GeV
Run details:
  • $e^+ e^-$ analysis in the continuum near the $\Upsilon(4S)$ resonance, with CoM boosts of 8.0 GeV ($e^-$) and 3.5 GeV ($e^+$)

Measurement of charged pion, kaon and proton production in $e^+e^-$ collisions with the BABAR detector at the SLAC PEP-II electron-positron storage ring operating at a center-of-mass energy of 10.54 GeV. This is a measurement in the continuum.

Source code: BABAR_2013_I1238276.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/Beam.hh"
#include "Rivet/Projections/ChargedFinalState.hh"

namespace Rivet {


  /// @brief BaBar pion, kaon and proton production in the continuum
  /// @author Peter Richardson
  class BABAR_2013_I1238276 : public Analysis {
  public:

    BABAR_2013_I1238276()
      : Analysis("BABAR_2013_I1238276")
    { }


    void init() {
      declare(Beam(), "Beams");
      declare(ChargedFinalState(), "FS");

      book(_histPion_no_dec   ,1,1,1);
      book(_histKaon_no_dec   ,1,1,2);
      book(_histProton_no_dec ,1,1,3);
      book(_histPion_dec      ,2,1,1);
      book(_histKaon_dec      ,2,1,2);
      book(_histProton_dec    ,2,1,3);
    }


    void analyze(const Event& e) {
      // Loop through charged FS particles and look for charmed mesons/baryons
      const ChargedFinalState& fs = apply<ChargedFinalState>(e, "FS");

      const Beam beamproj = apply<Beam>(e, "Beams");
      const ParticlePair& beams = beamproj.beams();
      const FourMomentum mom_tot = beams.first.momentum() + beams.second.momentum();
      const LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(mom_tot.betaVec());
      MSG_DEBUG("CMS Energy sqrt s = " << beamproj.sqrtS());

      for (const Particle& p : fs.particles()) {
        // check if prompt or not
        ConstGenParticlePtr pmother = p.genParticle();
        ConstGenVertexPtr ivertex = pmother->production_vertex();
        bool prompt = true;
        while (ivertex) {
          vector<ConstGenParticlePtr> inparts = HepMCUtils::particles(ivertex, Relatives::PARENTS);
          int n_inparts = inparts.size();
          if (n_inparts < 1) break;
          pmother = inparts[0]; // first mother particle
          int mother_pid = abs(pmother->pdg_id());
          if (mother_pid==PID::K0S || mother_pid==PID::LAMBDA) {
            prompt = false;
            break;
          }
          else if (mother_pid<6) {
            break;
          }
          ivertex = pmother->production_vertex();
        }

        // momentum in CMS frame
        const double mom = cms_boost.transform(p.momentum()).vector3().mod();
        const int PdgId = p.abspid();
        MSG_DEBUG("pdgID = " << PdgId << " Momentum = " << mom);
        switch (PdgId) {
        case PID::PIPLUS:
          if(prompt) _histPion_no_dec->fill(mom);
          _histPion_dec   ->fill(mom);
          break;
        case PID::KPLUS:
          if(prompt) _histKaon_no_dec->fill(mom);
          _histKaon_dec   ->fill(mom);
          break;
        case PID::PROTON:
          if(prompt) _histProton_no_dec->fill(mom);
          _histProton_dec   ->fill(mom);
        default :
          break;
        }
      }
    }


    void finalize() {
      scale(_histPion_no_dec  ,1./sumOfWeights());
      scale(_histKaon_no_dec  ,1./sumOfWeights());
      scale(_histProton_no_dec,1./sumOfWeights());
      scale(_histPion_dec     ,1./sumOfWeights());
      scale(_histKaon_dec     ,1./sumOfWeights());
      scale(_histProton_dec   ,1./sumOfWeights());
    }


  private:

    //@{
    // Histograms for continuum data (sqrt(s) = 10.52 GeV)
    // no K_S and Lambda decays
    Histo1DPtr _histPion_no_dec;
    Histo1DPtr _histKaon_no_dec;
    Histo1DPtr _histProton_no_dec;
    // including decays
    Histo1DPtr _histPion_dec;
    Histo1DPtr _histKaon_dec;
    Histo1DPtr _histProton_dec;
    //@}

  };


  // The hook for the plugin system
  RIVET_DECLARE_PLUGIN(BABAR_2013_I1238276);

}