rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2016_I1419070

Number of tracks in jets
Experiment: ATLAS (LHC)
Inspire ID: 1419070
Status: VALIDATED
Authors:
  • Ben Nachman
  • Christian Gutschow
References: Beams: p+ p+
Beam energies: (4000.0, 4000.0) GeV
Run details:
  • dijet production

The number of charged particles inside jets is a widely used discriminant for identifying the quark or gluon nature of the initiating parton and is sensitive to both the perturbative and non-perturbative components of fragmentation. This analysis presents a measurement of the average number of charged particles with $p_\text{T}>500$ MeV inside high-momentum jets in dijet events using 20.3 fb${}^{-1}$ of data recorded with the ATLAS detector in $pp$ collisions at $\sqrt{s}=8$ TeV collisions at the LHC. The jets considered have transverse momenta from 50 GeV up to and beyond 1.5 TeV. The reconstructed charged-particle track multiplicity distribution is unfolded to remove distortions from detector effects.

Source code: ATLAS_2016_I1419070.cc
  1#include "Rivet/Analysis.hh"
  2#include "Rivet/Projections/FinalState.hh"
  3#include "Rivet/Projections/FastJets.hh"
  4
  5namespace Rivet {
  6
  7  class ATLAS_2016_I1419070 : public Analysis {
  8  public:
  9
 10    /// Constructor
 11    ATLAS_2016_I1419070() : Analysis("ATLAS_2016_I1419070")
 12    {  }
 13
 14  public:
 15
 16    void init() {
 17
 18      declare(FastJets(FinalState(), FastJets::ANTIKT, 0.4), "Jets");
 19
 20      book(forward_500MeV ,1, 1, 1);
 21      book(forward_2GeV   ,2, 1, 1);
 22      book(forward_5GeV   ,3, 1, 1);
 23
 24      book(central_500MeV ,4, 1, 1);
 25      book(central_2GeV   ,5, 1, 1);
 26      book(central_5GeV   ,6, 1, 1);
 27
 28      book(diff_500MeV, "d07-x01-y01", true);
 29      book(diff_2GeV  , "d08-x01-y01", true);
 30      book(diff_5GeV  , "d09-x01-y01", true);
 31
 32      book(sum_500MeV, "d10-x01-y01", true);
 33      book(sum_2GeV  , "d11-x01-y01", true);
 34      book(sum_5GeV  , "d12-x01-y01", true);
 35
 36    }
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      Jets m_goodJets = applyProjection<JetAlg>(event, "Jets").jetsByPt(Cuts::pT > 25*GeV && Cuts::abseta < 2.1);
 41
 42      if (m_goodJets.size() < 2)        vetoEvent;
 43      if (m_goodJets[0].pT() < 50*GeV)  vetoEvent;
 44      if (m_goodJets[1].pT() < 50*GeV)  vetoEvent;
 45      if (fabs(1.0 - m_goodJets[0].pT()/m_goodJets[1].pT()) > 0.5)  vetoEvent;
 46
 47      bool check = m_goodJets[0].abseta() < m_goodJets[1].abseta();
 48      int pos_f = int(check);
 49      int pos_c = int(!check);
 50
 51      double pt500MeV_f = CalculateNCharge(m_goodJets[pos_f], 0.5);
 52      double pt2GeV_f   = CalculateNCharge(m_goodJets[pos_f], 2.0);
 53      double pt5GeV_f   = CalculateNCharge(m_goodJets[pos_f], 5.0);
 54      double pT_f = m_goodJets[pos_f].pT();
 55
 56      double pt500MeV_c = CalculateNCharge(m_goodJets[pos_c], 0.5);
 57      double pt2GeV_c   = CalculateNCharge(m_goodJets[pos_c], 2.0);
 58      double pt5GeV_c   = CalculateNCharge(m_goodJets[pos_c], 5.0);
 59      double pT_c = m_goodJets[pos_c].pT();
 60
 61      forward_500MeV->fill(pT_f, pt500MeV_f);
 62      forward_2GeV->fill(  pT_f, pt2GeV_f);
 63      forward_5GeV->fill(  pT_f, pt5GeV_f);
 64
 65      central_500MeV->fill(pT_c, pt500MeV_c);
 66      central_2GeV->fill(  pT_c, pt2GeV_c);
 67      central_5GeV->fill(  pT_c, pt5GeV_c);
 68    }
 69
 70    double CalculateNCharge(Jet& jet, double pTcut=0.5) {
 71      unsigned int ncharge = 0;
 72      for (const Particle& p : jet.particles()) {
 73        if (p.pT() < pTcut)  continue;
 74        if (p.charge3())  ++ncharge;
 75      }
 76      if (ncharge > 60)  ncharge = 60;
 77      return double(ncharge);
 78    }
 79
 80    /// Normalise histograms etc., after the run
 81    void finalize() {
 82
 83      if (numEvents() > 2) {
 84        for (unsigned int i = 0; i < forward_500MeV->numBins(); ++i) {
 85          ProfileBin1D bsum  = central_500MeV->bin(i) + forward_500MeV->bin(i);
 86          ProfileBin1D bsum2 = central_2GeV->bin(i) + forward_2GeV->bin(i);
 87          ProfileBin1D bsum5 = central_5GeV->bin(i) + forward_5GeV->bin(i);
 88          ProfileBin1D bdiff  = central_500MeV->bin(i) - forward_500MeV->bin(i);
 89          ProfileBin1D bdiff2 = central_2GeV->bin(i) - forward_2GeV->bin(i);
 90          ProfileBin1D bdiff5 = central_5GeV->bin(i) - forward_5GeV->bin(i);
 91
 92          double ydiff  = central_500MeV->bin(i).effNumEntries()? central_500MeV->bin(i).mean() : 0.0;
 93          double ydiff2 = central_2GeV->bin(i).effNumEntries()?   central_2GeV->bin(i).mean()   : 0.0;
 94          double ydiff5 = central_5GeV->bin(i).effNumEntries()?   central_5GeV->bin(i).mean()   : 0.0;
 95          ydiff  -= forward_500MeV->bin(i).effNumEntries()? forward_500MeV->bin(i).mean() : 0.0;
 96          ydiff2 -= forward_2GeV->bin(i).effNumEntries()?   forward_2GeV->bin(i).mean()   : 0.0;
 97          ydiff5 -= forward_5GeV->bin(i).effNumEntries()?   forward_5GeV->bin(i).mean()   : 0.0;
 98
 99          double yerr  = bsum.effNumEntries()  > 1.0 ?  bsum.stdErr() : 0.0;
100          double yerr2 = bsum2.effNumEntries() > 1.0 ? bsum2.stdErr() : 0.0;
101          double yerr5 = bsum5.effNumEntries() > 1.0 ? bsum5.stdErr() : 0.0;
102
103	  diff_500MeV->point(i).setY(ydiff, yerr);
104          diff_2GeV->point(i).setY(ydiff2, yerr2);
105          diff_5GeV->point(i).setY(ydiff5, yerr5);
106
107          sum_500MeV->point(i).setY(bsum.effNumEntries()? bsum.mean() : 0.0, yerr);
108          sum_2GeV->point(i).setY(bsum2.effNumEntries()? bsum2.mean() : 0.0, yerr2);
109          sum_5GeV->point(i).setY(bsum5.effNumEntries()? bsum5.mean() : 0.0, yerr5);
110        }
111      }
112
113    }
114
115
116  private:
117
118    Profile1DPtr forward_500MeV;
119    Profile1DPtr forward_2GeV;
120    Profile1DPtr forward_5GeV;
121
122    Profile1DPtr central_500MeV;
123    Profile1DPtr central_2GeV;
124    Profile1DPtr central_5GeV;
125
126    Scatter2DPtr sum_500MeV;
127    Scatter2DPtr sum_2GeV;
128    Scatter2DPtr sum_5GeV;
129
130    Scatter2DPtr diff_500MeV;
131    Scatter2DPtr diff_2GeV;
132    Scatter2DPtr diff_5GeV;
133
134  };
135
136  // The hook for the plugin system
137  RIVET_DECLARE_PLUGIN(ATLAS_2016_I1419070);
138}