rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALICE_2015_I1357424

Transverse momentum spectra of pions, kaons and protons in $pp$ collisions at 7 TeV
Experiment: ALICE (LHC)
Inspire ID: 1357424
Status: VALIDATED
Authors:
  • Andreas Morsch
No references listed
Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • Inelastic pp collisions at sqrt(s) = 7 TeV

Obtaining the transverse momentum spectra of primary pions, kaons and protons in $pp$ collisions at $\sqrt{s} = 7$ TeV with ALICE at the LHC. K/pi and p/pi ratios are also included.

Source code: ALICE_2015_I1357424.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/ChargedFinalState.hh"
 4
 5namespace Rivet {
 6
 7
 8  class ALICE_2015_I1357424 : public Analysis {
 9  public:
10
11    ALICE_2015_I1357424()
12      : Analysis("ALICE_2015_I1357424")
13    {}
14
15
16  public:
17
18    void init() {
19      const ChargedFinalState cfs(Cuts::absrap<0.5);
20      declare(cfs, "CFS");
21      //
22      // plots from the paper
23      book(_histPtPions          ,"d01-x01-y01");    // pions
24      book(_histPtKaons          ,"d01-x01-y02");    // kaons
25      book(_histPtProtons        ,"d01-x01-y03");    // protons
26      book(_histPtKtoPi          ,"d02-x01-y01");  // K to pi ratio
27      book(_histPtPtoPi          ,"d03-x01-y01");  // p to pi ratio
28      //
29      // temp histos for ratios
30      book(_histPtPionsR1        ,"TMP/pT_pi1", refData(2, 1, 1)); // pi histo compatible with more restricted kaon binning
31      book(_histPtPionsR2        ,"TMP/pT_pi2", refData(3, 1, 1)); // pi histo compatible with more restricted proton binning
32      book(_histPtKaonsR         ,"TMP/pT_K",   refData(2, 1, 1)); // K histo with more restricted binning
33      book(_histPtProtonsR       ,"TMP/pT_p",   refData(3, 1, 1)); // p histo with more restricted binning
34    }
35
36
37    void analyze(const Event& event) {
38      const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
39      for (const Particle& p : cfs.particles()) {
40	// protections against mc generators decaying long-lived particles
41	if ( !(p.hasAncestorWith(Cuts::pid == 310)  || p.hasAncestorWith(Cuts::pid == -310)  ||     // K0s
42	       p.hasAncestorWith(Cuts::pid == 130)  || p.hasAncestorWith(Cuts::pid == -130)  ||     // K0l
43	       p.hasAncestorWith(Cuts::pid == 3322) || p.hasAncestorWith(Cuts::pid == -3322) ||     // Xi0
44	       p.hasAncestorWith(Cuts::pid == 3122) || p.hasAncestorWith(Cuts::pid == -3122) ||     // Lambda
45	       p.hasAncestorWith(Cuts::pid == 3222) || p.hasAncestorWith(Cuts::pid == -3222) ||     // Sigma+/-
46	       p.hasAncestorWith(Cuts::pid == 3312) || p.hasAncestorWith(Cuts::pid == -3312) ||     // Xi-/+
47	   p.hasAncestorWith(Cuts::pid == 3334) || p.hasAncestorWith(Cuts::pid == -3334) ))     // Omega-/+
48        {
49	  switch (abs(p.pid())) {
50	  case 211: // pi+
51	    _histPtPions->fill(p.pT()/GeV);
52	    _histPtPionsR1->fill(p.pT()/GeV);
53	    _histPtPionsR2->fill(p.pT()/GeV);
54	    break;
55	  case 2212: // proton
56	    _histPtProtons->fill(p.pT()/GeV);
57	    _histPtProtonsR->fill(p.pT()/GeV);
58	    break;
59	  case 321: // K+
60	    _histPtKaons->fill(p.pT()/GeV);
61	    _histPtKaonsR->fill(p.pT()/GeV);
62	    break;
63	  } // particle switch
64	} // primary pi, K, p only
65      } // particle loop
66    }
67
68    void finalize() {
69      divide(_histPtKaonsR,   _histPtPionsR1, _histPtKtoPi);
70      divide(_histPtProtonsR, _histPtPionsR2, _histPtPtoPi);
71
72      scale(_histPtPions,       1./sumOfWeights());
73      scale(_histPtProtons,     1./sumOfWeights());
74      scale(_histPtKaons,       1./sumOfWeights());
75    }
76
77
78  private:
79
80    Histo1DPtr _histPtPions;
81    Histo1DPtr _histPtProtons;
82    Histo1DPtr _histPtKaons;
83
84    Histo1DPtr _histPtPionsR1;
85    Histo1DPtr _histPtPionsR2;
86    Histo1DPtr _histPtProtonsR;
87    Histo1DPtr _histPtKaonsR;
88
89    Estimate1DPtr _histPtKtoPi;
90    Estimate1DPtr _histPtPtoPi;
91  };
92
93
94
95  RIVET_DECLARE_PLUGIN(ALICE_2015_I1357424);
96
97}