rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALICE_2011_I885104

Transverse momentum spectra of pions, kaons and protons in pp collisions at 0.9 TeV
Experiment: ALICE (LHC)
Inspire ID: 885104
Status: VALIDATED
Authors:
  • Pablo Bueno Gomez
  • Eva Sicking
References: Beams: p+ p+
Beam energies: (450.0, 450.0) GeV
Run details:
  • Diffractive events need to be enabled.

Obtaining the transverse momentum spectra of pions, kaons and protons in $pp$ collisions at $\sqrt{s} = 0.9$ TeV with ALICE at the LHC. Mean transverse momentum as a function of the mass of the emitted particle is also included.

Source code: ALICE_2011_I885104.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/ChargedFinalState.hh"
 4
 5namespace Rivet {
 6
 7
 8  class ALICE_2011_I885104 : public Analysis {
 9  public:
10
11    RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2011_I885104);
12
13
14    void init() {
15      const ChargedFinalState cfs((Cuts::etaIn(-15, 15)));
16      declare(cfs, "CFS");
17
18      book(_histPtPions        ,"d01-x01-y01");
19      book(_histPtAntiPions    ,"d01-x01-y02");
20      book(_histPtKaons        ,"d02-x01-y01");
21      book(_histPtAntiKaons    ,"d02-x01-y02");
22      book(_histPtProtons      ,"d03-x01-y01");
23      book(_histPtAntiProtons  ,"d03-x01-y02");
24      book(_histAveragePt      ,"d04-x01-y01");
25    }
26
27
28    void analyze(const Event& event) {
29      const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
30      for (const Particle& p : cfs.particles()) {
31        if(p.absrap()<0.5) {
32          switch (p.pid()) {
33            case 211:
34              _histPtPions->fill(p.pT()/GeV);
35              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
36              break;
37            case -211:
38              _histPtAntiPions->fill(p.pT()/GeV);
39              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
40              break;
41            case 2212:
42              if ( !(p.hasAncestorWith(Cuts::pid == 3322) ||                             // Xi0
43                     p.hasAncestorWith(Cuts::pid == 3122) || p.hasAncestorWith(Cuts::pid == -3122) ||     // Lambda
44                     p.hasAncestorWith(Cuts::pid == 3222) || p.hasAncestorWith(Cuts::pid == -3222) ||     // Sigma+/-
45                     p.hasAncestorWith(Cuts::pid == 3312) || p.hasAncestorWith(Cuts::pid == -3312) ) ) {  // Xi-/+
46                _histPtProtons->fill(p.pT()/GeV);
47                _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
48              }
49              break;
50            case -2212:
51              if ( !(p.hasAncestorWith(Cuts::pid == 3322) ||                             // Xi0
52                     p.hasAncestorWith(Cuts::pid == 3122) || p.hasAncestorWith(Cuts::pid == -3122) ||     // Lambda
53                     p.hasAncestorWith(Cuts::pid == 3222) || p.hasAncestorWith(Cuts::pid == -3222) ||     // Sigma+/-
54                     p.hasAncestorWith(Cuts::pid == 3312) || p.hasAncestorWith(Cuts::pid == -3312) ) ) {  // Xi-/+
55                _histPtAntiProtons->fill(p.pT()/GeV);
56                _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
57              }
58              break;
59            case 321:
60              _histPtKaons->fill(p.pT()/GeV);
61              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
62              break;
63            case -321:
64              _histPtAntiKaons->fill(p.pT()/GeV);
65              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV);
66              break;
67          }
68        }
69      }
70    }
71
72
73    void finalize() {
74      scale(_histPtPions,       1./sumOfWeights());
75      scale(_histPtProtons,     1./sumOfWeights());
76      scale(_histPtKaons,       1./sumOfWeights());
77      scale(_histPtAntiPions,   1./sumOfWeights());
78      scale(_histPtAntiProtons, 1./sumOfWeights());
79      scale(_histPtAntiKaons,   1./sumOfWeights());
80    }
81
82
83  private:
84
85    Histo1DPtr _histPtPions;
86    Histo1DPtr _histPtProtons;
87    Histo1DPtr _histPtKaons;
88    Histo1DPtr _histPtAntiPions;
89    Histo1DPtr _histPtAntiProtons;
90    Histo1DPtr _histPtAntiKaons;
91    Profile1DPtr _histAveragePt;
92
93  };
94
95
96
97  RIVET_DECLARE_ALIASED_PLUGIN(ALICE_2011_I885104, ALICE_2011_S8945144);
98
99}