Rivet analyses
title: ALICE_2012_I944757
Measurement of charm production at central rapidity in proton-proton collisions at $\sqrt{s}=7$ TeV
Experiment: ALICE (LHC)
Inspire ID: 944757
Status: VALIDATED
Authors: - Marco Giacalone
References: - DOI: 10.1007/JHEP01(2012)128 - arXiv: 1111.1553
Beams: p+ p+
Beam energies: (3500.0, 3500.0)GeV
Run details: - Proton Proton events at 7 TeV simulated using PYTHIA 8.240 and HERWIG 7.1.5. SoftQCD:all parameter enabled on the former, while MB (Minimum Bias) and SoftTune snippets were used for the latter.
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
```c++
include "Rivet/Analysis.hh"
include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// @brief Charm production at central rapidity in pp at 7 TeV class ALICE_2012_I944757 : public Analysis { public:
/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2012_I944757);
/// @name Analysis methods
/// @{
/// Book histograms and initialise projections before the run
void init() {
// Initialise and register projections
declare(UnstableParticles(Cuts::absrap < 0.5), "UFS");
// Book histograms
book(_h_D0, 1, 1, 1);
book(_h_Dplus, 2, 1, 1);
book(_h_Dstarp, 3, 1, 1);
book(_h_integ, 4, 1, 1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
/*PDG code IDs used inside the for loop: 421 = D0, 411 = D+, 413 = D*+ */
for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles()) {
if (p.fromBottom()) continue;
if (p.abspid() == 421) {
_h_D0->fill(p.pT() / GeV);
_h_integ->fill(sedges[0]);
}
else if (p.abspid() == 411) {
_h_Dplus->fill(p.pT() / GeV);
_h_integ->fill(sedges[1]);
}
else if (p.abspid() == 413) {
_h_Dstarp->fill(p.pT() / GeV);
_h_integ->fill(sedges[2]);
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
scale(_h_D0, crossSection() / (microbarn * 2 * sumOfWeights())); // norm to cross section
scale(_h_Dplus, crossSection() / (microbarn * 2 * sumOfWeights())); // norm to cross section
scale(_h_Dstarp, crossSection() / (microbarn * 2 * sumOfWeights())); // norm to cross section
scale(_h_integ, crossSection() / (microbarn * 2 * sumOfWeights())); // norm to cross section
/* Obtained cross sections data at this point consider both particles and antiparticles
hence the added factor 2 in the normalization solves the issue (as done in the paper) */
}
/// @}
/// @name Histograms
/// @{
Histo1DPtr _h_D0, _h_Dplus, _h_Dstarp;
BinnedHistoPtr<string> _h_integ;
vector<string> sedges = {"P P --> D0 X", "P P --> D+ X", "P P --> D* X"};
/// @}
};
RIVET_DECLARE_PLUGIN(ALICE_2012_I944757); } ```