Rivet analyses referenceALICE_2012_I944757Measurement of charm production at central rapidity in proton-proton collisions at $\sqrt{s}=7$ TeVExperiment: ALICE (LHC) Inspire ID: 944757 Status: VALIDATED Authors:
Beam energies: (3500.0, 3500.0) GeV Run details:
The $p_\text{T}$-differential inclusive production cross sections of the prompt charmed mesons $D^0$, $D^+$, and $D^{\ast +}$ in the rapidity range $|y|<0.5$ were measured in proton-proton collisions at $\sqrt{s}=7$ TeV at the LHC using the ALICE detector. Reconstructing the decays $D^0 \to K^-\pi^+$, $D^+\to K^-\pi^+\pi^+$, $D^{\ast +} \to D^0\pi^+$, and their charge conjugates, about 8,400 $D^0$, 2,900 $D^+$, and 2,600 $D^{\ast +}$ mesons with $1 < p_\text{T} < 24$ GeV/$c$ were counted, after selection cuts, in a data sample of 3.14$\times 10^8$ events collected with a minimum-bias trigger (integrated luminosity $L_\text{int} = 5$/nb). The results are described within uncertainties by predictions based on perturbative QCD. Source code: ALICE_2012_I944757.cc 1#include "Rivet/Analysis.hh"
2#include "Rivet/Projections/UnstableParticles.hh"
3
4namespace Rivet {
5
6
7 /// @brief Charm production at central rapidity in pp at 7 TeV
8 class ALICE_2012_I944757 : public Analysis {
9 public:
10
11 /// Constructor
12 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2012_I944757);
13
14
15 /// @name Analysis methods
16 /// @{
17
18 /// Book histograms and initialise projections before the run
19 void init() {
20
21 // Initialise and register projections
22 declare(UnstableParticles(Cuts::absrap < 0.5), "UFS");
23
24 // Book histograms
25 book(_h_D0, 1, 1, 1);
26 book(_h_Dplus, 2, 1, 1);
27 book(_h_Dstarp, 3, 1, 1);
28 book(_h_integ, 4, 1, 1);
29
30 }
31
32
33 /// Perform the per-event analysis
34 void analyze(const Event& event) {
35
36 /*PDG code IDs used inside the for loop: 421 = D0, 411 = D+, 413 = D*+ */
37
38 for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles()) {
39 if (p.fromBottom()) continue;
40 if (p.abspid() == 421) {
41 _h_D0->fill(p.pT()/GeV);
42 _h_integ->fill(sedges[0]);
43 }
44 else if (p.abspid() == 411) {
45 _h_Dplus->fill(p.pT()/GeV);
46 _h_integ->fill(sedges[1]);
47 }
48 else if (p.abspid()== 413) {
49 _h_Dstarp->fill(p.pT()/GeV);
50 _h_integ->fill(sedges[2]);
51 }
52 }
53 }
54
55
56 /// Normalise histograms etc., after the run
57 void finalize() {
58
59 scale(_h_D0, crossSection()/(microbarn*2*sumOfWeights())); // norm to cross section
60 scale(_h_Dplus, crossSection()/(microbarn*2*sumOfWeights())); // norm to cross section
61 scale(_h_Dstarp, crossSection()/(microbarn*2*sumOfWeights())); // norm to cross section
62 scale(_h_integ, crossSection()/(microbarn*2*sumOfWeights())); // norm to cross section
63 /* Obtained cross sections data at this point consider both particles and antiparticles
64 hence the added factor 2 in the normalization solves the issue (as done in the paper) */
65 }
66
67 /// @}
68
69
70 /// @name Histograms
71 /// @{
72 Histo1DPtr _h_D0, _h_Dplus, _h_Dstarp;
73 BinnedHistoPtr<string> _h_integ;
74 vector<string> sedges = {"P P --> D0 X", "P P --> D+ X", "P P --> D* X"};
75 /// @}
76
77
78 };
79
80 RIVET_DECLARE_PLUGIN(ALICE_2012_I944757);
81}
|