rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMS_2018_I1680318

Charged particle distributions in different final states at 13 TeV
Experiment: CMS collaboration (LHC)
Inspire ID: 1680318
Status: VALIDATED
Authors:
  • cms-pag-conveners-smp@cern.ch
  • Juan Manuel Grados Luyando
  • Pieters Maxim
References:
  • Eur.Phys.J. C78 (2018) no.9, 697
  • DOI: 10.1140/epjc/s10052-018-6144-y
  • arXiv: 1806.11245
  • http://cms-results.web.cern.ch/cms-results/public-results/publications/FSQ-16-011/
Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • Inelastic events at 13 TeV centre of mass energy. Tracks in $|\eta|<2.4$ and with $p_\perp > 0.5 GeV$

Charged particle distributions in different final states at $\sqrt{s} = 13$ TeV by the CMS experiment. Pseudorapidity, multiplicity and transverse momentum distributions of all charged particles. Also the $p_\perp$ leading charged particle spectrum and its integration as function of $p_\perp$. The distributions are presented for inelastic, non-single-diffractive and single-diffractive event selections. Please note, that the MC predictions are not scaled to the datapoints, in contrast to Figure 6 in the publication.

Source code: CMS_2018_I1680318.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5
  6namespace Rivet {
  7
  8
  9  class CMS_2018_I1680318 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2018_I1680318);
 14
 15
 16    /// Book histograms and initialise projections before the run
 17    void init() {
 18
 19      // Cuts
 20      MinEnergy     = 5.0; // Particle's energy cut in the forward region [GeV]
 21      EtaForwardMin = 3.0;
 22      EtaForwardMax = 5.0;
 23      EtaCentralCut = 2.4;
 24      MinParticlePt = 0.5; // [GeV]
 25
 26
 27      // Initialise and register projections
 28      const FinalState fsa(Cuts::abseta < EtaForwardMax);
 29      declare(fsa, "FSA");
 30
 31      const ChargedFinalState cfs(Cuts::abseta < EtaCentralCut && Cuts::pT > MinParticlePt*GeV);
 32      declare(cfs, "CFS");
 33
 34      // Event counters
 35      book(_num_evts_noCuts,          "num_evts_noCuts");
 36      book(_num_evts_after_cuts_or,   "num_evts_after_cuts_or");
 37      book(_num_evts_after_cuts_and,  "num_evts_after_cuts_and");
 38      book(_num_evts_after_cuts_xor,  "num_evts_after_cuts_xor");
 39      book(_num_evts_after_cuts_xorm, "num_evts_after_cuts_xorm");
 40      book(_num_evts_after_cuts_xorp, "num_evts_after_cuts_xorp");
 41
 42      // Histograms
 43      book(_hist_dNch_all_dEta_OR,          1,1,1);
 44      book(_hist_dNch_all_dEta_AND,         1,2,1);
 45      book(_hist_dNch_all_dEta_XOR,         1,3,1);
 46      book(_hist_dNch_all_dEta_XORpm,       1,4,1);
 47
 48      book(_hist_dNch_all_dpt_OR,           2,1,1);
 49      book(_hist_dNch_all_dpt_AND,          2,2,1);
 50      book(_hist_dNch_all_dpt_XOR,          2,3,1);
 51
 52      book(_hist_dNch_leading_dpt_OR,       3,1,1);
 53      book(_hist_dNch_leading_dpt_AND,      3,2,1);
 54      book(_hist_dNch_leading_dpt_XOR,      3,3,1);
 55
 56      book(_hist_integrated_leading_pt_OR,  4,1,1);
 57      book(_hist_integrated_leading_pt_AND, 4,2,1);
 58      book(_hist_integrated_leading_pt_XOR, 4,3,1);
 59
 60      book(_hist_dNev_all_dM_OR,            5,1,1);
 61      book(_hist_dNev_all_dM_AND,           5,2,1);
 62    }
 63
 64
 65    /// Perform the per-event analysis
 66    void analyze(const Event& event) {
 67
 68      const ChargedFinalState& charged = apply<ChargedFinalState>(event, "CFS");
 69      const FinalState& fsa = apply<FinalState>(event, "FSA");
 70
 71      bool activity_plus_side  = false,
 72        activity_minus_side = false;
 73
 74      for (const Particle& p : fsa.particles()) {
 75        if ( p.energy() >= MinEnergy ) {
 76          if ( inRange(p.eta(),      EtaForwardMin,      EtaForwardMax) ) activity_plus_side  = true;
 77          if ( inRange(p.eta(), -1.0*EtaForwardMax, -1.0*EtaForwardMin) ) activity_minus_side = true;
 78        }
 79
 80        // If activity already found in both sides,
 81        // then there is no point in keep going the loop
 82        if (activity_plus_side && activity_minus_side) break;
 83      }
 84
 85      // Event selections
 86      const bool cutsor   = ( activity_plus_side ||  activity_minus_side);
 87      const bool cutsand  = ( activity_plus_side &&  activity_minus_side);
 88      const bool cutsxor  = ((activity_plus_side && !activity_minus_side) || (!activity_plus_side && activity_minus_side));
 89      const bool cutsxorm = (!activity_plus_side &&  activity_minus_side);
 90      const bool cutsxorp = ( activity_plus_side && !activity_minus_side);
 91
 92      _num_evts_noCuts->fill();
 93      if ( charged.size() >= 1 ) {
 94        if (cutsor)   _num_evts_after_cuts_or   ->fill();
 95        if (cutsand)  _num_evts_after_cuts_and  ->fill();
 96        if (cutsxor)  _num_evts_after_cuts_xor  ->fill();
 97        if (cutsxorm) _num_evts_after_cuts_xorm ->fill();
 98        if (cutsxorp) _num_evts_after_cuts_xorp ->fill();
 99      }
100
101      // Loop over charged particles
102      double leading_pt = 0;
103      for (const Particle& p : charged.particles()) {
104        // Find the leading-pt particle of the event
105        if (p.pT() > leading_pt) leading_pt = p.pT();
106
107        // Filling histograms
108        if (cutsor)   _hist_dNch_all_dEta_OR    -> fill(p.eta());
109        if (cutsand)  _hist_dNch_all_dEta_AND   -> fill(p.eta());
110        if (cutsxor)  _hist_dNch_all_dEta_XOR   -> fill(p.eta());
111
112        //Average xorm & xorp
113        if (cutsxorm) _hist_dNch_all_dEta_XORpm -> fill(p.eta());
114        if (cutsxorp) _hist_dNch_all_dEta_XORpm -> fill(-1.0*p.eta());
115
116        if (cutsor)   _hist_dNch_all_dpt_OR     -> fill(p.pT());
117        if (cutsand)  _hist_dNch_all_dpt_AND    -> fill(p.pT());
118        if (cutsxor)  _hist_dNch_all_dpt_XOR    -> fill(p.pT());
119      }
120
121      // Filling multiplicity histograms
122      if ( charged.size() >= 1 ) {
123        if (cutsor)  _hist_dNev_all_dM_OR  -> fill(charged.size());
124        if (cutsand) _hist_dNev_all_dM_AND -> fill(charged.size());
125      }
126
127      // Filling leading-pt histograms
128      if (cutsor)  _hist_dNch_leading_dpt_OR  -> fill(leading_pt);
129      if (cutsand) _hist_dNch_leading_dpt_AND -> fill(leading_pt);
130      if (cutsxor) _hist_dNch_leading_dpt_XOR -> fill(leading_pt);
131
132      // Integrating leading-pt histograms
133      for (size_t i = 0 ; i < _hist_integrated_leading_pt_OR->numBins() ; ++i) {
134        double binlimitlow_t = _hist_integrated_leading_pt_OR->bin(i).xMin();
135        double weightbw_t    = _hist_integrated_leading_pt_OR->bin(i).xWidth();
136        double xbin_t        = _hist_integrated_leading_pt_OR->bin(i).xMid();
137        if (leading_pt > binlimitlow_t) {
138          if (cutsor)  _hist_integrated_leading_pt_OR  -> fill(xbin_t, weightbw_t);
139          if (cutsand) _hist_integrated_leading_pt_AND -> fill(xbin_t, weightbw_t);
140          if (cutsxor) _hist_integrated_leading_pt_XOR -> fill(xbin_t, weightbw_t);
141        }
142      }
143
144    }
145
146
147    /// Normalise histograms etc., after the run
148    void finalize() {
149      MSG_INFO("Number of selected events: "                  << endl
150               << "\t All       = " << _num_evts_noCuts->val()          << endl
151               << "\t Inelastic = " << _num_evts_after_cuts_or->val()   << endl
152               << "\t NSD       = " << _num_evts_after_cuts_and->val()  << endl
153               << "\t Xor       = " << _num_evts_after_cuts_xor->val()  << endl
154               << "\t Xorm      = " << _num_evts_after_cuts_xorm->val() << endl
155               << "\t Xorp      = " << _num_evts_after_cuts_xorp->val());
156
157      scale(_hist_dNch_all_dEta_OR,    1./ *_num_evts_after_cuts_or);
158      scale(_hist_dNch_all_dEta_AND,   1./ *_num_evts_after_cuts_and);
159      scale(_hist_dNch_all_dEta_XOR,   1./ *_num_evts_after_cuts_xor);
160      scale(_hist_dNch_all_dEta_XORpm, 1./ (*_num_evts_after_cuts_xorm + *_num_evts_after_cuts_xorp));
161
162      scale(_hist_dNch_all_dpt_OR,   1./ *_num_evts_after_cuts_or);
163      scale(_hist_dNch_all_dpt_AND,  1./ *_num_evts_after_cuts_and);
164      scale(_hist_dNch_all_dpt_XOR,  1./ *_num_evts_after_cuts_xor);
165
166      scale(_hist_dNch_leading_dpt_OR,   1./ *_num_evts_after_cuts_or);
167      scale(_hist_dNch_leading_dpt_AND,  1./ *_num_evts_after_cuts_and);
168      scale(_hist_dNch_leading_dpt_XOR,  1./ *_num_evts_after_cuts_xor);
169
170      scale(_hist_integrated_leading_pt_OR,   1./ *_num_evts_after_cuts_or);
171      scale(_hist_integrated_leading_pt_AND,  1./ *_num_evts_after_cuts_and);
172      scale(_hist_integrated_leading_pt_XOR,  1./ *_num_evts_after_cuts_xor);
173
174      scale(_hist_dNev_all_dM_OR,   1./ *_num_evts_after_cuts_or);
175      scale(_hist_dNev_all_dM_AND,  1./ *_num_evts_after_cuts_and);
176    }
177
178
179  private:
180
181    // Cuts
182    double MinEnergy, EtaForwardMin, EtaForwardMax, EtaCentralCut, MinParticlePt;
183
184    // Counters
185    CounterPtr _num_evts_noCuts,
186                  _num_evts_after_cuts_and,
187                  _num_evts_after_cuts_or,
188                  _num_evts_after_cuts_xor,
189                  _num_evts_after_cuts_xorp,
190                  _num_evts_after_cuts_xorm;
191
192    // Histograms
193    Histo1DPtr
194    _hist_dNch_all_dEta_AND,
195                  _hist_dNch_all_dEta_OR,
196                  _hist_dNch_all_dEta_XOR,
197                  _hist_dNch_all_dEta_XORpm;
198    Histo1DPtr
199    _hist_dNch_all_dpt_AND,
200                  _hist_dNch_all_dpt_OR,
201                  _hist_dNch_all_dpt_XOR;
202    Histo1DPtr
203    _hist_dNch_leading_dpt_AND,
204                  _hist_dNch_leading_dpt_OR,
205                  _hist_dNch_leading_dpt_XOR;
206    Histo1DPtr
207    _hist_integrated_leading_pt_AND,
208                  _hist_integrated_leading_pt_OR,
209                  _hist_integrated_leading_pt_XOR;
210    Histo1DPtr
211    _hist_dNev_all_dM_AND,
212                  _hist_dNev_all_dM_OR;
213
214  };
215
216
217  RIVET_DECLARE_PLUGIN(CMS_2018_I1680318);
218
219}