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
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// LHCb prompt charm hadron pT and rapidity spectra
class LHCB_2013_I1218996 : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
LHCB_2013_I1218996()
: Analysis("LHCB_2013_I1218996")
{ }
//@}
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
/// Initialise and register projections
declare(UnstableParticles(), "UFS");
/// Book histograms
{Histo1DPtr tmp; _h_pdg411_Dplus_pT_y.add( 2.0, 2.5, book(tmp, 3, 1, 1) );}
{Histo1DPtr tmp; _h_pdg411_Dplus_pT_y.add( 2.5, 3.0, book(tmp, 3, 1, 2) );}
{Histo1DPtr tmp; _h_pdg411_Dplus_pT_y.add( 3.0, 3.5, book(tmp, 3, 1, 3) );}
{Histo1DPtr tmp; _h_pdg411_Dplus_pT_y.add( 3.5, 4.0, book(tmp, 3, 1, 4) );}
{Histo1DPtr tmp; _h_pdg411_Dplus_pT_y.add( 4.0, 4.5, book(tmp, 3, 1, 5) );}
{Histo1DPtr tmp; _h_pdg421_Dzero_pT_y.add( 2.0, 2.5, book(tmp, 2, 1, 1) );}
{Histo1DPtr tmp; _h_pdg421_Dzero_pT_y.add( 2.5, 3.0, book(tmp, 2, 1, 2) );}
{Histo1DPtr tmp; _h_pdg421_Dzero_pT_y.add( 3.0, 3.5, book(tmp, 2, 1, 3) );}
{Histo1DPtr tmp; _h_pdg421_Dzero_pT_y.add( 3.5, 4.0, book(tmp, 2, 1, 4) );}
{Histo1DPtr tmp; _h_pdg421_Dzero_pT_y.add( 4.0, 4.5, book(tmp, 2, 1, 5) );}
{Histo1DPtr tmp; _h_pdg431_Dsplus_pT_y.add( 2.0, 2.5, book(tmp, 5, 1, 1) );}
{Histo1DPtr tmp; _h_pdg431_Dsplus_pT_y.add( 2.5, 3.0, book(tmp, 5, 1, 2) );}
{Histo1DPtr tmp; _h_pdg431_Dsplus_pT_y.add( 3.0, 3.5, book(tmp, 5, 1, 3) );}
{Histo1DPtr tmp; _h_pdg431_Dsplus_pT_y.add( 3.5, 4.0, book(tmp, 5, 1, 4) );}
{Histo1DPtr tmp; _h_pdg431_Dsplus_pT_y.add( 4.0, 4.5, book(tmp, 5, 1, 5) );}
{Histo1DPtr tmp; _h_pdg413_Dstarplus_pT_y.add( 2.0, 2.5, book(tmp, 4, 1, 1) );}
{Histo1DPtr tmp; _h_pdg413_Dstarplus_pT_y.add( 2.5, 3.0, book(tmp, 4, 1, 2) );}
{Histo1DPtr tmp; _h_pdg413_Dstarplus_pT_y.add( 3.0, 3.5, book(tmp, 4, 1, 3) );}
{Histo1DPtr tmp; _h_pdg413_Dstarplus_pT_y.add( 3.5, 4.0, book(tmp, 4, 1, 4) );}
{Histo1DPtr tmp; _h_pdg413_Dstarplus_pT_y.add( 4.0, 4.5, book(tmp, 4, 1, 5) );}
book(_h_pdg4122_Lambdac_pT ,1, 1, 1);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const double weight = 1.0;
/// @todo Use PrimaryHadrons to avoid double counting and automatically remove the contributions from unstable?
const UnstableParticles &ufs = apply<UnstableParticles> (event, "UFS");
for (const Particle& p : ufs.particles() ) {
// We're only interested in charm hadrons
if (!p.isHadron() || !p.hasCharm()) continue;
// Kinematic acceptance
const double y = p.absrap(); ///< Double analysis efficiency with a "two-sided LHCb"
const double pT = p.pT();
// Fiducial acceptance of the measurements
if (pT > 8.0*GeV || y < 2.0 || y > 4.5) continue;
/// Experimental selection removes non-prompt charm hadrons: we ignore those from b decays
if (p.fromBottom()) continue;
switch (p.abspid()) {
case 411:
_h_pdg411_Dplus_pT_y.fill(y, pT/GeV, weight);
break;
case 421:
_h_pdg421_Dzero_pT_y.fill(y, pT/GeV, weight);
break;
case 431:
_h_pdg431_Dsplus_pT_y.fill(y, pT/GeV, weight);
break;
case 413:
_h_pdg413_Dstarplus_pT_y.fill(y, pT/GeV, weight);
break;
case 4122:
_h_pdg4122_Lambdac_pT->fill(pT/GeV, weight);
break;
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
const double scale_factor = 0.5 * crossSection()/microbarn / sumOfWeights();
/// Avoid the implicit division by the bin width in the BinnedHistogram::scale method.
for (Histo1DPtr h : _h_pdg411_Dplus_pT_y.histos()) h->scaleW(scale_factor);
for (Histo1DPtr h : _h_pdg421_Dzero_pT_y.histos()) h->scaleW(scale_factor);
for (Histo1DPtr h : _h_pdg431_Dsplus_pT_y.histos()) h->scaleW(scale_factor);
for (Histo1DPtr h : _h_pdg413_Dstarplus_pT_y.histos()) h->scaleW(scale_factor);
_h_pdg4122_Lambdac_pT->scaleW(scale_factor);
}
//@}
private:
/// @name Histograms
//@{
BinnedHistogram _h_pdg411_Dplus_pT_y;
BinnedHistogram _h_pdg421_Dzero_pT_y;
BinnedHistogram _h_pdg431_Dsplus_pT_y;
BinnedHistogram _h_pdg413_Dstarplus_pT_y;
Histo1DPtr _h_pdg4122_Lambdac_pT;
//@}
};
// The hook for the plugin system
RIVET_DECLARE_PLUGIN(LHCB_2013_I1218996);
}
|