rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2016_I1409298

Differential cross sections for $J/\psi$ and $\psi(2S)$ at 7 and 8 TeV
Experiment: ATLAS (LHC)
Inspire ID: 1409298
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0); (4000.0, 4000.0) GeV
Run details:
  • hadronic events with J/psi and psi(2S)

Measurement of the double differential (in $p_\perp$ and $y$) cross section for $J/\psi$ and $\psi(2S)$ production at 7 and 8 TeV by the ATLAS collaboration.

Source code: ATLAS_2016_I1409298.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4#include "Rivet/Tools/HistoGroup.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief ATLAS J/psi psi2s at 7 and 8 TeV
 10  class ATLAS_2016_I1409298 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(ATLAS_2016_I1409298);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22
 23      declare(UnstableParticles(Cuts::pid==443 or Cuts::pid==100443), "UFS");
 24
 25      // binning in y
 26      const vector<double> yedges = {0.,0.25,0.5,0.75,1.0,1.25,1.5,1.75,2.};
 27      // book histos
 28      size_t ie = 0; _ih = 10;
 29      for (double eVal : allowedEnergies()) {
 30
 31        if (isCompatibleWithSqrtS(eVal))  _ih = ie;
 32
 33        for (unsigned int ix=0; ix<3; ++ix) {
 34          book(_h_JPsi[ie][ix], yedges);
 35          if(ix<2) book(_h_JPsi[ie][ix+3], yedges);
 36          book(_h_psi2S[ie][ix], yedges);
 37          for (size_t iy=1; iy < yedges.size(); ++iy) {
 38            if (ix == 2) {
 39              // total no for ratios etc
 40              book(_h_JPsi[ie][ix]->bin(iy),
 41                   "TMP/JPsi_2_"+toString(iy)+"_"+toString(ie),
 42                   refData(1+ie,1,iy));
 43              book(_h_psi2S[ie][ix]->bin(iy),
 44                   "TMP/psi2S_2_"+toString(iy)+"_"+toString(ie),
 45                   refData(5+ie,1,iy));
 46              continue;
 47            }
 48            // prompt and non-prompt Jpsi
 49            book(_h_JPsi[ie][ix]->bin(iy), 1+ie+2*ix,1,iy);
 50            // prompt and non-prompt psi(2S)
 51            book(_h_psi2S[ie][ix]->bin(iy), 5+ie+2*ix,1,iy);
 52            // extra Jpsi for ratios with psi2s
 53            if(ix<2) {
 54              book(_h_JPsi[ie][ix+3]->bin(iy),
 55                   "TMP/JPsi_"+toString(ix+3)+"_"+toString(iy)+"_"+toString(ie),
 56                   refData(5+ie+2*ix,1,iy));
 57            }
 58          }
 59        }
 60        ++ie;
 61      }
 62      if (_ih == 10 && !merging()) {
 63        throw BeamError("Invalid beam energy for " + name() + "\n");
 64      }
 65    }
 66
 67
 68    /// Perform the per-event analysis
 69    void analyze(const Event& event) {
 70
 71      // Final state of unstable particles to get particle spectra
 72      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
 73
 74      for (const Particle& p : ufs.particles()) {
 75        // prompt/non-prompt
 76        bool nonPrompt = p.fromBottom();
 77        const double absrap = p.absrap();
 78        const double xp = p.perp();
 79        if (p.pid()==443) {
 80          _h_JPsi[_ih][nonPrompt  ]->fill(absrap,xp);
 81          _h_JPsi[_ih][2          ]->fill(absrap,xp);
 82          _h_JPsi[_ih][nonPrompt+3]->fill(absrap,xp);
 83        }
 84        else {
 85          _h_psi2S[_ih][nonPrompt]->fill(absrap,xp);
 86          _h_psi2S[_ih][2        ]->fill(absrap,xp);
 87        }
 88      }
 89    }
 90
 91
 92    /// Normalise histograms etc., after the run
 93    void finalize() {
 94      // 1/2 due rapidity folding +/-
 95      const double factor = 0.5*crossSection()/nanobarn/sumOfWeights();
 96      // br to muons PDG 2021 (psi2s is e+e- due large errors on mu+mu-)
 97      const vector<double> br = {0.05961,0.00793};
 98      for (size_t ie=0; ie<2; ++ie) {
 99        // scale histos
100        for (size_t ix=0; ix<5; ++ix) {
101          scale(_h_JPsi[ie][ix], factor*br[0]);
102          divByGroupWidth(_h_JPsi[ie][ix]);
103          if (ix>2) continue;
104          scale(_h_psi2S[ie][ix], factor*br[1]);
105          divByGroupWidth(_h_psi2S[ie][ix]);
106        }
107        // ratios
108        for (size_t iy=1; iy<=_h_JPsi[ie][0]->numBins(); ++iy) {
109          // non-prompt J/psi percentage
110          Estimate1DPtr tmp;
111          book(tmp,9+ie,1,iy);
112          efficiency(_h_JPsi[ie][1]->bin(iy),_h_JPsi[ie][2]->bin(iy),tmp);
113          tmp->scale(100.);
114          // non-prompt psi2S percentage
115          book(tmp,11+ie,1,iy);
116          efficiency(_h_psi2S[ie][1]->bin(iy),_h_psi2S[ie][2]->bin(iy),tmp);
117          tmp->scale(100.);
118          // prompt psi(2s)/J/psi percentage
119          book(tmp,13+ie,1,iy);
120          divide(_h_psi2S[ie][0]->bin(iy),_h_JPsi[ie][3]->bin(iy),tmp);
121          tmp->scale(100.);
122          // non-prompt psi(2s)/J/psi percentage
123          book(tmp,15+ie,1,iy);
124          divide(_h_psi2S[ie][1]->bin(iy),_h_JPsi[ie][4]->bin(iy),tmp);
125          tmp->scale(100.);
126        }
127      }
128    }
129
130    /// @}
131
132
133    /// @name Histograms
134    /// @{
135    Histo1DGroupPtr _h_JPsi[2][5], _h_psi2S[2][3];
136    size_t _ih;
137    /// @}
138
139
140  };
141
142
143  RIVET_DECLARE_PLUGIN(ATLAS_2016_I1409298);
144
145}