rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALICE_2016_I1507157

Angular correlations of identified particles at 7 TeV.
Experiment: ALICE (LHC)
Inspire ID: 1507157
Status: UNVALIDATED
Authors:
  • Christian Bierlich
References:
  • Eur.Phys.J.C77(2017)no.8,569
  • DOI:10.1140/epjc/s10052-017-5129-6
  • arXiv: 1612.08975
Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • Proton-proton minium bias events at 7 TeV.

Angular correlations between like-sign and opposite-sign identified particles, integrated over $\Delta \eta < 1.3$. The analysis makes use of event mixing to remove background. The current implementation of the event micing is not validated by experiment, and should be used with caution. Note in particular that for the event mixing to behave sensibly, event weights are assumed to be unity. Do not run this analysis with weighted events

Source code: ALICE_2016_I1507157.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/AliceCommon.hh"
#include "Rivet/Projections/PrimaryParticles.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/EventMixingFinalState.hh"
namespace Rivet {


  /// @brief ALICE correlations of identified particles in pp
  /// Also showcasing use of EventMixingFinalState.
  class ALICE_2016_I1507157 : public Analysis {
  public:

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(ALICE_2016_I1507157);


    /// @name Analysis methods
    //@{

    /// Book histograms and initialise projections before the run
    void init() {

      double etamax = 0.8;
      double pTmin = 0.5; // GeV

      // Trigger
      declare(ALICE::V0AndTrigger(), "V0-AND");
      // Charged tracks used to manage the mixing observable.
      ChargedFinalState cfsMult(Cuts::abseta < etamax);
      addProjection(cfsMult, "CFSMult");

      // Primary particles.
      PrimaryParticles pp({Rivet::PID::PIPLUS, Rivet::PID::KPLUS,
            Rivet::PID::K0S, Rivet::PID::K0L, Rivet::PID::PROTON,
            Rivet::PID::NEUTRON, Rivet::PID::LAMBDA, Rivet::PID::SIGMAMINUS,
            Rivet::PID::SIGMAPLUS, Rivet::PID::XIMINUS, Rivet::PID::XI0,
            Rivet::PID::OMEGAMINUS},Cuts::abseta < etamax && Cuts::pT > pTmin*GeV);
      addProjection(pp,"APRIM");

      // The event mixing projection
      declare(EventMixingFinalState(cfsMult, pp, 5, 0, 100, 10),"EVM");
      // The particle pairs.
      pid = {{211, -211}, {321, -321}, {2212, -2212}, {3122, -3122}, {211, 211},
             {321, 321}, {2212, 2212}, {3122, 3122}, {2212, 3122}, {2212, -3122}};
      // The associated histograms in the data file.
      vector<string> refdata = {"d04-x01-y01","d04-x01-y02","d04-x01-y03",
                                "d06-x01-y02","d05-x01-y01","d05-x01-y02","d05-x01-y03","d06-x01-y01",
                                "d01-x01-y02","d02-x01-y02"};
      for (int i = 0, N = refdata.size(); i < N; ++i) {
        // The ratio plots.
        ratio.push_back(bookScatter2D(refdata[i], true));
        // Signal and mixed background.
        signal.push_back(bookHisto1D("/TMP/" + refdata[i] +
                                     "-s", *ratio[i], refdata[i] + "-s"));
        background.push_back(bookHisto1D("/TMP/" + refdata[i] +
                                         "-b", *ratio[i], refdata[i] + "-b"));
        // Number of signal and mixed pairs.
        nsp.push_back(0.);
        nmp.push_back(0.);
      }
    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {
      const double weight = event.weight();

      // Triggering
      if (!apply<ALICE::V0AndTrigger>(event, "V0-AND")()) return;

      // The primary particles
      const PrimaryParticles& pp = apply<PrimaryParticles>(event, "APRIM");
      const Particles pparticles = pp.particles();

      // The mixed events
      const EventMixingFinalState& evm = apply<EventMixingFinalState>(event, "EVM");
      const vector<Particles> mixEvents = evm.getMixingEvents();
      if (mixEvents.empty()) vetoEvent;

      // Make a vector of mixed event particles
      vector<Particle> mixParticles;
      size_t pSize = 0;
      for (size_t i = 0; i < mixEvents.size(); ++i)
        pSize += mixEvents[i].size();
      mixParticles.reserve(pSize);
      for (size_t i = 0; i < mixEvents.size(); ++i)
        mixParticles.insert(mixParticles.end(), mixEvents[i].begin(), mixEvents[i].end());
      random_shuffle(mixParticles.begin(), mixParticles.end());

      for (size_t ip1 = 0; ip1 < pparticles.size()-1; ++ip1) {
        const Particle& p1 = pparticles[ip1];

        // Start by doing the signal distributions
        for (size_t ip2 = 0; ip2 < pparticles.size(); ++ip1) {
          if (ip1 == ip2) continue;
          const Particle& p2 = pparticles[ip2];
          const double dEta = deltaEta(p1, p2);
          const double dPhi = deltaPhi(p1, p2, true);
          if (dEta > 1.3) continue;
          for (int i = 0, N = pid.size(); i < N; ++i) {
            const int pid1 = pid[i].first;
            const int pid2 = pid[i].second;
            const bool samesign = (pid1 * pid2 > 0);
            const bool pidmatch1 = (pid1 == p1.pid() && pid2 == p2.pid()) || (pid1 == -p1.pid() && pid2 == -p2.pid());
            const bool pidmatch2 = abs(pid1) == abs(pid2) && pid1 == p1.pid() && pid2 == p2.pid();
            const bool pidmatch3 = abs(pid1) != abs(pid2) && ( (pid1 == p1.pid() && pid2 == p2.pid()) || (pid2 == p1.pid() && pid1 == p2.pid()) );
            if ((samesign && pidmatch1) || (!samesign && (pidmatch2 || pidmatch3))) {
              signal[i]->fill(dPhi, weight);
              nsp[i] += 1.0;
            }
          }
        }

        // Then do the background distribution
        for (const Particle& pMix : mixParticles){
          const double dEta = deltaEta(p1, pMix);
          const double dPhi = deltaPhi(p1, pMix, true);
          if (dEta > 1.3) continue;
          for (int i = 0, N = pid.size(); i < N; ++i) {
            const int pid1 = pid[i].first;
            const int pid2 = pid[i].second;
            const bool samesign = (pid1 * pid2 > 0);
            const bool pidmatch1 = (pid1 == p1.pid() && pid2 == pMix.pid()) || (pid1 == -p1.pid() && pid2 == -pMix.pid());
            const bool pidmatch2 = abs(pid1) == abs(pid2) && pid1 == p1.pid() && pid2 == pMix.pid();
            const bool pidmatch3 = abs(pid1) != abs(pid2) && ( (pid1 == p1.pid() && pid2 == pMix.pid()) || (pid2 == p1.pid() && pid1 == pMix.pid()) );
            if ((samesign && pidmatch1) || (!samesign && (pidmatch2 || pidmatch3))) {
              background[i]->fill(dPhi, weight);
              nmp[i] += 1.0;
            }
          }
        }
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      for (int i = 0, N = pid.size(); i < N; ++i) {
        const double sc = nmp[i] / nsp[i];
        signal[i]->scaleW(sc);
        divide(signal[i],background[i],ratio[i]);
      }
    }

    //@}


    /// @name Histograms
    //@{
    vector<pair<int, int> > pid;
    vector<Histo1DPtr> signal;
    vector<Histo1DPtr> background;
    vector<Scatter2DPtr> ratio;
    vector<double> nsp;
    vector<double> nmp;

    //@}


  };


  DECLARE_RIVET_PLUGIN(ALICE_2016_I1507157);

}