Rivet is hosted by Hepforge, IPPP Durham

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
117
// -*- 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");

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


    void analyze(const Event& e) {
      const double weight = e.weight();

      // 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());

      foreach (const Particle& p, fs.particles()) {
        // check if prompt or not
        const GenParticle* pmother = p.genParticle();
        const GenVertex* ivertex = pmother->production_vertex();
        bool prompt = true;
        while (ivertex) {
          int n_inparts = ivertex->particles_in_size();
          if (n_inparts < 1) break;
          pmother = particles(ivertex, HepMC::parents)[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,weight);
          _histPion_dec   ->fill(mom,weight);
          break;
        case PID::KPLUS:
          if(prompt) _histKaon_no_dec->fill(mom,weight);
          _histKaon_dec   ->fill(mom,weight);
          break;
        case PID::PROTON:
          if(prompt) _histProton_no_dec->fill(mom,weight);
          _histProton_dec   ->fill(mom,weight);
        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
  DECLARE_RIVET_PLUGIN(BABAR_2013_I1238276);

}