Rivet analyses referenceALICE_2021_I1829739Prompt $\Lambda_c^+$ production at 5.02 TeVExperiment: ALICE (LHC) Inspire ID: 1829739 Status: VALIDATED Authors:
Beam energies: (2510.0, 2510.0) GeV Run details:
Differential cross section in $p_\perp$ for prompt $\Lambda_c^+$ production at 5.02 TeV. Source code: ALICE_2021_I1829739.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Lambda_c+ at 5.02 TeV
9 class ALICE_2021_I1829739 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2021_I1829739);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projection
22 declare(UnstableParticles(), "UFS");
23 // histograms
24 book(_h_Lambda,1,1,1);
25 book(_h_D ,"TMP/h_D",refData(4,1,1));
26 book(_h_sig[0],7,1,1);
27 book(_h_sig[1],7,1,2);
28 book(_c_D,"TMP/c_D");
29 book(_c_Lambda,"TMP/c_Lambda");
30 }
31
32
33 /// Perform the per-event analysis
34 void analyze(const Event& event) {
35 // Final state of unstable particles to get particle spectra
36 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
37 // loop over onium states
38 for (const Particle & p : ufs.particles(Cuts::abspid==4122 || Cuts::abspid==421)) {
39 // prompt
40 if (p.fromBottom()) continue;
41 // skip copies due mixing
42 if (p.children().size()==1 && p.children()[0].abspid()==p.abspid()) continue;
43 if (p.absrap()>.5) continue;
44 const double pT = p.perp();
45 if (p.abspid()==4122) {
46 _h_Lambda->fill(pT);
47 if (pT>1. && pT<12.) _h_sig[0]->fill("P P --> Lc X"s);
48 _h_sig[1]->fill("P P --> Lc X"s);
49 _c_Lambda->fill();
50 }
51 else {
52 _h_D->fill(pT);
53 _c_D->fill();
54 }
55 }
56 }
57
58
59 /// Normalise histograms etc., after the run
60 void finalize() {
61 double factor = crossSection()/microbarn/sumOfWeights();
62 scale(_h_Lambda,factor);
63 scale(_h_D ,factor);
64 scale(_h_sig,factor);
65
66 Estimate1DPtr tmp;
67 // ratio prompt Lambda/D0
68 book(tmp,4,1,1);
69 divide(_h_Lambda,_h_D,tmp);
70
71 // ratio lambda/D0 integrated
72 Estimate0D e0d = *_c_Lambda / *_c_D;
73 BinnedEstimatePtr<string> ratio;
74 book(ratio, 8, 1, 1);
75 auto& b = ratio->bin(1);
76 b.setVal(e0d.val());
77 b.setErr(e0d.err());
78 }
79
80 /// @}
81
82
83 /// @name Histograms
84 /// @{
85 Histo1DPtr _h_Lambda,_h_D;
86 BinnedHistoPtr<string> _h_sig[2];
87 CounterPtr _c_D,_c_Lambda;
88 /// @}
89
90
91 };
92
93
94 RIVET_DECLARE_PLUGIN(ALICE_2021_I1829739);
95
96}
|