Rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2011_I944826

$K_S^0$ and $\Lambda$ production at 0.9 and 7 TeV with ATLAS
Experiment: ATLAS (LHC)
Inspire ID: 944826
Status: VALIDATED
Authors:
  • Holger Schulz
References: Beams: p+ p+
Beam energies: (450.0, 450.0); (3500.0, 3500.0) GeV
Run details:
  • QCD events, 900\;GeV and 7\;TeV. $\Lambda$ and $K_S$ must be able to decay. Allow only charged decay modes to improve efficiency.

The production of $K_S$ and $\Lambda$ hadrons is studied in inelastic $pp$ collisions at $\sqrt{s} = 0.9$ and 7 TeV collected with the ATLAS detector at the LHC using a minimum-bias trigger. The observed distributions of transverse momentum, rapidity, and multiplicity are corrected to hadron level in a model-independent way within well defined phase-space regions. The distribution of the production ratio of $\bar{\Lambda}$ to $\Lambda$ baryons is also measured. The results are compared with various Monte Carlo simulation models. Although most of these models agree with data to within 15 percent in the $K_S$ distributions, substantial disagreements with data are found in the $\Lambda$ distributions of transverse momentum.

Source code: ATLAS_2011_I944826.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/UnstableFinalState.hh"

namespace Rivet {


  class ATLAS_2011_I944826 : public Analysis {
  public:

    /// Constructor
    ATLAS_2011_I944826()
      : Analysis("ATLAS_2011_I944826")
    {
      _sum_w_ks     = 0.0;
      _sum_w_lambda = 0.0;
      _sum_w_passed = 0.0;
    }


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

      UnstableFinalState ufs(Cuts::pT > 100*MeV);
      declare(ufs, "UFS");

      ChargedFinalState  mbts(Cuts::absetaIn(2.09, 3.84));
      declare(mbts, "MBTS");

      IdentifiedFinalState nstable(Cuts::abseta < 2.5 && Cuts::pT >= 100*MeV);
      nstable.acceptIdPair(PID::ELECTRON)
        .acceptIdPair(PID::MUON)
        .acceptIdPair(PID::PIPLUS)
        .acceptIdPair(PID::KPLUS)
        .acceptIdPair(PID::PROTON);
      declare(nstable, "nstable");

      if (fuzzyEquals(sqrtS()/GeV, 7000, 1e-3)) {
        _hist_Ks_pT      = bookHisto1D(1, 1, 1);
        _hist_Ks_y       = bookHisto1D(2, 1, 1);
        _hist_Ks_mult    = bookHisto1D(3, 1, 1);
        _hist_L_pT       = bookHisto1D(7, 1, 1);
        _hist_L_y        = bookHisto1D(8, 1, 1);
        _hist_L_mult     = bookHisto1D(9, 1, 1);
        _hist_Ratio_v_y  = bookScatter2D(13, 1, 1);
        _hist_Ratio_v_pT = bookScatter2D(14, 1, 1);
        //
        _temp_lambda_v_y = Histo1D(10, 0.0, 2.5);
        _temp_lambdabar_v_y = Histo1D(10, 0.0, 2.5);
        _temp_lambda_v_pT = Histo1D(18, 0.5, 4.1);
        _temp_lambdabar_v_pT = Histo1D(18, 0.5, 4.1);
      }
      else if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) {
        _hist_Ks_pT   = bookHisto1D(4, 1, 1);
        _hist_Ks_y    = bookHisto1D(5, 1, 1);
        _hist_Ks_mult = bookHisto1D(6, 1, 1);
        _hist_L_pT    = bookHisto1D(10, 1, 1);
        _hist_L_y     = bookHisto1D(11, 1, 1);
        _hist_L_mult  = bookHisto1D(12, 1, 1);
        _hist_Ratio_v_y      = bookScatter2D(15, 1, 1);
        _hist_Ratio_v_pT     = bookScatter2D(16, 1, 1);
        //
        _temp_lambda_v_y = Histo1D(5, 0.0, 2.5);
        _temp_lambdabar_v_y = Histo1D(5, 0.0, 2.5);
        _temp_lambda_v_pT = Histo1D(8, 0.5, 3.7);
        _temp_lambdabar_v_pT = Histo1D(8, 0.5, 3.7);
      }
    }


    // This function is required to impose the flight time cuts on Kaons and Lambdas
    double getPerpFlightDistance(const Rivet::Particle& p) {
      const HepMC::GenParticle* genp = p.genParticle();
      const HepMC::GenVertex* prodV = genp->production_vertex();
      const HepMC::GenVertex* decV  = genp->end_vertex();
      const HepMC::ThreeVector prodPos = prodV->point3d();
      if (decV) {
        const HepMC::ThreeVector decPos = decV->point3d();
        double dy = prodPos.y() - decPos.y();
        double dx = prodPos.x() - decPos.x();
        return add_quad(dx, dy);
      }
      return numeric_limits<double>::max();
    }


    bool daughtersSurviveCuts(const Rivet::Particle& p) {
      // We require the Kshort or Lambda to decay into two charged
      // particles with at least pT = 100 MeV inside acceptance region
      const HepMC::GenParticle* genp = p.genParticle();
      const HepMC::GenVertex* decV  = genp->end_vertex();
      bool decision = true;

      if (!decV) return false;
      if (decV->particles_out_size() == 2) {
        std::vector<double> pTs;
        std::vector<int> charges;
        std::vector<double> etas;
        foreach (const HepMC::GenParticle* gp, particles(decV, HepMC::children)) {
          pTs.push_back(gp->momentum().perp());
          etas.push_back(fabs(gp->momentum().eta()));
          charges.push_back( Rivet::PID::threeCharge(gp->pdg_id()) );
          // gp->print();
        }
        if ( (pTs[0]/Rivet::GeV < 0.1) || (pTs[1]/Rivet::GeV < 0.1) ) {
          decision = false;
          MSG_DEBUG("Failed pT cut: " << pTs[0]/Rivet::GeV << " " << pTs[1]/Rivet::GeV);
        }
        if ( etas[0] > 2.5 || etas[1] > 2.5 ) {
          decision = false;
          MSG_DEBUG("Failed eta cut: " << etas[0] << " " << etas[1]);
        }
        if ( charges[0] * charges[1] >= 0 ) {
          decision = false;
          MSG_DEBUG("Failed opposite charge cut: " << charges[0] << " " << charges[1]);
        }
      }
      else {
        decision = false;
        MSG_DEBUG("Failed nDaughters cut: " << decV->particles_out_size());
      }

      return decision;
    }

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

      // ATLAS MBTS trigger requirement of at least one hit in either hemisphere
      if (apply<FinalState>(event, "MBTS").size() < 1) {
        MSG_DEBUG("Failed trigger cut");
        vetoEvent;
      }

      // Veto event also when we find less than 2 particles in the acceptance region of type 211,2212,11,13,321
      if (apply<FinalState>(event, "nstable").size() < 2) {
        MSG_DEBUG("Failed stable particle cut");
        vetoEvent;
      }
      _sum_w_passed += weight;

      // This ufs holds all the Kaons and Lambdas
      const UnstableFinalState& ufs = apply<UnstableFinalState>(event, "UFS");

      // Some conters
      int n_KS0 = 0;
      int n_LAMBDA = 0;

      // Particle loop
      foreach (const Particle& p, ufs.particles()) {

        // General particle quantities
        const double pT = p.pT();
        const double y = p.rapidity();
        const PdgId apid = p.abspid();

        double flightd = 0.0;

        // Look for Kaons, Lambdas
        switch (apid) {

        case PID::K0S:
          flightd = getPerpFlightDistance(p);
          if (!inRange(flightd/mm, 4., 450.) ) {
            MSG_DEBUG("Kaon failed flight distance cut:" << flightd);
            break;
          }
          if (daughtersSurviveCuts(p) ) {
            _hist_Ks_y ->fill(y, weight);
            _hist_Ks_pT->fill(pT/GeV, weight);
            _sum_w_ks += weight;
            n_KS0++;
          }
          break;

        case PID::LAMBDA:
          if (pT < 0.5*GeV) { // Lambdas have an additional pT cut of 500 MeV
            MSG_DEBUG("Lambda failed pT cut:" << pT/GeV << " GeV");
            break;
          }
          flightd = getPerpFlightDistance(p);
          if (!inRange(flightd/mm, 17., 450.)) {
            MSG_DEBUG("Lambda failed flight distance cut:" << flightd/mm << " mm");
            break;
          }
          if ( daughtersSurviveCuts(p) ) {
            if (p.pid() == PID::LAMBDA) {
              _temp_lambda_v_y.fill(fabs(y), weight);
              _temp_lambda_v_pT.fill(pT/GeV, weight);
              _hist_L_y->fill(y, weight);
              _hist_L_pT->fill(pT/GeV, weight);
              _sum_w_lambda += weight;
              n_LAMBDA++;
            } else if (p.pid() == -PID::LAMBDA) {
             _temp_lambdabar_v_y.fill(fabs(y), weight);
              _temp_lambdabar_v_pT.fill(pT/GeV, weight);
            }
          }
          break;

        }
      }

      // Fill multiplicity histos
      _hist_Ks_mult->fill(n_KS0, weight);
      _hist_L_mult->fill(n_LAMBDA, weight);
    }



    /// Normalise histograms etc., after the run
    void finalize() {
      MSG_DEBUG("# Events that pass the trigger: " << _sum_w_passed);
      MSG_DEBUG("# Kshort events: " << _sum_w_ks);
      MSG_DEBUG("# Lambda events: " << _sum_w_lambda);

      /// @todo Replace with normalize()?
      scale(_hist_Ks_pT,   1.0/_sum_w_ks);
      scale(_hist_Ks_y,    1.0/_sum_w_ks);
      scale(_hist_Ks_mult, 1.0/_sum_w_passed);

      /// @todo Replace with normalize()?
      scale(_hist_L_pT,   1.0/_sum_w_lambda);
      scale(_hist_L_y,    1.0/_sum_w_lambda);
      scale(_hist_L_mult, 1.0/_sum_w_passed);

      // Division of histograms to obtain lambda_bar/lambda ratios
      divide(_temp_lambdabar_v_y, _temp_lambda_v_y, _hist_Ratio_v_y);
      divide(_temp_lambdabar_v_pT, _temp_lambda_v_pT, _hist_Ratio_v_pT);
    }


  private:

    /// Counters
    double _sum_w_ks, _sum_w_lambda, _sum_w_passed;

    /// @name Persistent histograms
    //@{
    Histo1DPtr _hist_Ks_pT, _hist_Ks_y, _hist_Ks_mult;
    Histo1DPtr _hist_L_pT, _hist_L_y, _hist_L_mult;
    Scatter2DPtr _hist_Ratio_v_pT, _hist_Ratio_v_y;
    //@}

    /// @name Temporary histograms
    //@{
    Histo1D _temp_lambda_v_y, _temp_lambdabar_v_y;
    Histo1D _temp_lambda_v_pT, _temp_lambdabar_v_pT;
    //@}

  };


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

}