Rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALICE_2011_S8945144

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_S8945144.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ChargedFinalState.hh"

namespace Rivet {


  class ALICE_2011_S8945144 : public Analysis {
  public:

    ALICE_2011_S8945144()
      : Analysis("ALICE_2011_S8945144")
    {}


  public:

    void init() {
      const ChargedFinalState cfs(-15, 15);
      declare(cfs, "CFS");

      _histPtPions        = bookHisto1D("d01-x01-y01");
      _histPtAntiPions    = bookHisto1D("d01-x01-y02");
      _histPtKaons        = bookHisto1D("d02-x01-y01");
      _histPtAntiKaons    = bookHisto1D("d02-x01-y02");
      _histPtProtons      = bookHisto1D("d03-x01-y01");
      _histPtAntiProtons  = bookHisto1D("d03-x01-y02");
      _histAveragePt      = bookProfile1D("d04-x01-y01");
    }


    void analyze(const Event& event) {
      const double weight = event.weight();
      const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
      foreach (const Particle& p, cfs.particles()) {
        if(p.absrap()<0.5) {
          switch (p.pid()) {
            case 211:
              _histPtPions->fill(p.pT()/GeV, weight);
              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              break;
            case -211:
              _histPtAntiPions->fill(p.pT()/GeV, weight);
              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              break;
            case 2212:
              if ( !(p.hasAncestor(3322) ||                             // Xi0
                     p.hasAncestor(3122) || p.hasAncestor(-3122) ||     // Lambda
                     p.hasAncestor(3222) || p.hasAncestor(-3222) ||     // Sigma+/-
                     p.hasAncestor(3312) || p.hasAncestor(-3312) ) ) {  // Xi-/+
                _histPtProtons->fill(p.pT()/GeV, weight);
                _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              }
              break;
            case -2212:
              if ( !(p.hasAncestor(3322) ||                             // Xi0
                     p.hasAncestor(3122) || p.hasAncestor(-3122) ||     // Lambda
                     p.hasAncestor(3222) || p.hasAncestor(-3222) ||     // Sigma+/-
                     p.hasAncestor(3312) || p.hasAncestor(-3312) ) ) {  // Xi-/+
                _histPtAntiProtons->fill(p.pT()/GeV, weight);
                _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              }
              break;
            case 321:
              _histPtKaons->fill(p.pT()/GeV, weight);
              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              break;
            case -321:
              _histPtAntiKaons->fill(p.pT()/GeV, weight);
              _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
              break;
          }
        }
      }
    }


    void finalize() {
      scale(_histPtPions,       1./sumOfWeights());
      scale(_histPtProtons,     1./sumOfWeights());
      scale(_histPtKaons,       1./sumOfWeights());
      scale(_histPtAntiPions,   1./sumOfWeights());
      scale(_histPtAntiProtons, 1./sumOfWeights());
      scale(_histPtAntiKaons,   1./sumOfWeights());
    }


  private:

    Histo1DPtr _histPtPions;
    Histo1DPtr _histPtProtons;
    Histo1DPtr _histPtKaons;
    Histo1DPtr _histPtAntiPions;
    Histo1DPtr _histPtAntiProtons;
    Histo1DPtr _histPtAntiKaons;
    Profile1DPtr _histAveragePt;

  };



  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(ALICE_2011_S8945144);

}