Rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2003_I593379

Measurement of inclusive charmonium production
Experiment: BaBar (PEP-II)
Inspire ID: 593379
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D67 032002, 2003
  • hep-ex/0207097
Beams: e+ e-
Beam energies: (3.5, 8.0) GeV
Run details:
  • Production of charmionum at the $\Upsilon(4S)$ resonace.

Measurement of $J/\psi$, $\psi'$, $\chi_{c1}$ and $\chi_{c2}$ production using a data sample corresponding to an integrated luminosity of 20.3\;fb$^{-1}$ collected with the BABAR detector at the SLAC PEP-II electron-positron storage ring operating at a centre-of-mass energy near 10.58\;GeV.

Source code: BABAR_2003_I593379.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/Beam.hh"
#include "Rivet/Projections/UnstableFinalState.hh"

namespace Rivet {


  /// @brief Babar charmonium spectra
  /// @author Peter Richardson
  class BABAR_2003_I593379 : public Analysis {
  public:

    BABAR_2003_I593379()
      : Analysis("BABAR_2003_I593379"), _weightSum(0.)
    { }


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

      // Find the charmonia
      Particles upsilons;
      // First in unstable final state
      const UnstableFinalState& ufs = apply<UnstableFinalState>(e, "UFS");
      foreach (const Particle& p, ufs.particles())
        if (p.pid() == 300553) upsilons.push_back(p);
      // Then in whole event if fails
      if (upsilons.empty()) {
        foreach (const GenParticle* p, Rivet::particles(e.genEvent())) {
          if (p->pdg_id() != 300553) continue;
          const GenVertex* pv = p->production_vertex();
          bool passed = true;
          if (pv) {
            foreach (const GenParticle* pp, particles_in(pv)) {
              if ( p->pdg_id() == pp->pdg_id() ) {
                passed = false;
                break;
              }
            }
          }
          if (passed) upsilons.push_back(Particle(*p));
        }
      }

      // Find upsilons
      foreach (const Particle& p, upsilons) {
        _weightSum += weight;
        // Find the charmonium resonances
        /// @todo Use Rivet::Particles
        vector<const GenParticle*> allJpsi, primaryJpsi, Psiprime, all_chi_c1, all_chi_c2, primary_chi_c1, primary_chi_c2;
        findDecayProducts(p.genParticle(), allJpsi, primaryJpsi, Psiprime,
                          all_chi_c1, all_chi_c2, primary_chi_c1, primary_chi_c2);
        const LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(p.mom().betaVec());
        for (size_t i = 0; i < allJpsi.size(); i++) {
          const double pcm = cms_boost.transform(FourMomentum(allJpsi[i]->momentum())).p();
          _hist_all_Jpsi->fill(pcm, weight);
        }
        _mult_JPsi->fill(10.58, weight*double(allJpsi.size()));
        for (size_t i = 0; i < primaryJpsi.size(); i++) {
          const double pcm = cms_boost.transform(FourMomentum(primaryJpsi[i]->momentum())).p();
          _hist_primary_Jpsi->fill(pcm, weight);
        }
        _mult_JPsi_direct->fill(10.58, weight*double(primaryJpsi.size()));
        for (size_t i=0; i<Psiprime.size(); i++) {
          const double pcm = cms_boost.transform(FourMomentum(Psiprime[i]->momentum())).p();
          _hist_Psi_prime->fill(pcm, weight);
        }
        _mult_Psi2S->fill(10.58, weight*double(Psiprime.size()));
        for (size_t i = 0; i < all_chi_c1.size(); i++) {
          const double pcm = cms_boost.transform(FourMomentum(all_chi_c1[i]->momentum())).p();
          _hist_chi_c1->fill(pcm, weight);
        }
        _mult_chi_c1->fill(10.58, weight*double(all_chi_c1.size()));
        _mult_chi_c1_direct->fill(10.58, weight*double(primary_chi_c1.size()));
        for (size_t i = 0; i < all_chi_c2.size(); i++) {
          const double pcm = cms_boost.transform(FourMomentum(all_chi_c2[i]->momentum())).p();
          _hist_chi_c2->fill(pcm, weight);
        }
        _mult_chi_c2->fill(10.58, weight*double(all_chi_c2.size()));
        _mult_chi_c2_direct->fill(10.58, weight*double(primary_chi_c2.size()));
      }
    } // analyze


    void finalize() {
      scale(_hist_all_Jpsi     , 0.5*0.1/_weightSum);
      scale(_hist_chi_c1       , 0.5*0.1/_weightSum);
      scale(_hist_chi_c2       , 0.5*0.1/_weightSum);
      scale(_hist_Psi_prime    , 0.5*0.1/_weightSum);
      scale(_hist_primary_Jpsi , 0.5*0.1/_weightSum);
      scale(_mult_JPsi         , 0.5*100./_weightSum);
      scale(_mult_JPsi_direct  , 0.5*100./_weightSum);
      scale(_mult_chi_c1       , 0.5*100./_weightSum);
      scale(_mult_chi_c1_direct, 0.5*100./_weightSum);
      scale(_mult_chi_c2       , 0.5*100./_weightSum);
      scale(_mult_chi_c2_direct, 0.5*100./_weightSum);
      scale(_mult_Psi2S        , 0.5*100./_weightSum);
    } // finalize


    void init() {
      declare(UnstableFinalState(), "UFS");

      _mult_JPsi          = bookHisto1D(1, 1, 1);
      _mult_JPsi_direct   = bookHisto1D(1, 1, 2);
      _mult_chi_c1        = bookHisto1D(1, 1, 3);
      _mult_chi_c1_direct = bookHisto1D(1, 1, 4);
      _mult_chi_c2        = bookHisto1D(1, 1, 5);
      _mult_chi_c2_direct = bookHisto1D(1, 1, 6);
      _mult_Psi2S         = bookHisto1D(1, 1, 7);
      _hist_all_Jpsi      = bookHisto1D(6, 1, 1);
      _hist_chi_c1        = bookHisto1D(7, 1, 1);
      _hist_chi_c2        = bookHisto1D(7, 1, 2);
      _hist_Psi_prime     = bookHisto1D(8, 1, 1);
      _hist_primary_Jpsi  = bookHisto1D(10, 1, 1);
    } // init

  private:

    //@{
    // count of weights
    double _weightSum;
    /// Histograms
    Histo1DPtr _hist_all_Jpsi;
    Histo1DPtr _hist_chi_c1;
    Histo1DPtr _hist_chi_c2;
    Histo1DPtr _hist_Psi_prime;
    Histo1DPtr _hist_primary_Jpsi;

    Histo1DPtr _mult_JPsi;
    Histo1DPtr _mult_JPsi_direct;
    Histo1DPtr _mult_chi_c1;
    Histo1DPtr _mult_chi_c1_direct;
    Histo1DPtr _mult_chi_c2;
    Histo1DPtr _mult_chi_c2_direct;
    Histo1DPtr _mult_Psi2S;
    //@}

    void findDecayProducts(const GenParticle* p,
                           vector<const GenParticle*>& allJpsi,
                           vector<const GenParticle*>& primaryJpsi,
                           vector<const GenParticle*>& Psiprime,
                           vector<const GenParticle*>& all_chi_c1, vector<const GenParticle*>& all_chi_c2,
                           vector<const GenParticle*>& primary_chi_c1, vector<const GenParticle*>& primary_chi_c2) {
      const GenVertex* dv = p->end_vertex();
      bool isOnium = false;
      /// @todo Use better looping
      for (GenVertex::particles_in_const_iterator pp = dv->particles_in_const_begin() ; pp != dv->particles_in_const_end() ; ++pp) {
        int id = (*pp)->pdg_id();
        id = id%1000;
        id -= id%10;
        id /= 10;
        if (id==44) isOnium = true;
      }
      /// @todo Use better looping
      for (GenVertex::particles_out_const_iterator pp = dv->particles_out_const_begin(); pp != dv->particles_out_const_end(); ++pp) {
        int id = (*pp)->pdg_id();
        if (id==100443) {
          Psiprime.push_back(*pp);
        }
        else if (id==20443) {
          all_chi_c1.push_back(*pp);
          if (!isOnium) primary_chi_c1.push_back(*pp);
        }
        else if (id==445) {
          all_chi_c2.push_back(*pp);
          if (!isOnium) primary_chi_c2.push_back(*pp);
        }
        else if (id==443) {
          allJpsi.push_back(*pp);
          if (!isOnium) primaryJpsi.push_back(*pp);
        }
        if ((*pp)->end_vertex()) {
          findDecayProducts(*pp, allJpsi, primaryJpsi, Psiprime, all_chi_c1, all_chi_c2, primary_chi_c1, primary_chi_c2);
        }
      }
    }

  };


  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(BABAR_2003_I593379);

}