Rivet analyses referenceLHCB_2012_I1184177Fraction of Υ(1S) from χb(1P) decays at 7 TeVExperiment: LHCB (LHC) Inspire ID: 1184177 Status: VALIDATED Authors:
Beam energies: (3500.0, 3500.0) GeV Run details:
Measurement of the fraction of Υ(1S) from χb(1P) decays at 7 TeV Source code: LHCB_2012_I1184177.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief chi_b(1p) production at 7 TeV
9 class LHCB_2012_I1184177 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2012_I1184177);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 declare(UnstableParticles(), "UFS");
22 for(unsigned int ix=0;ix<2;++ix) {
23 book(_h_pT[ix],"TMP/pT_"+toString(ix),refData(1,1,1));
24 }
25 }
26
27
28 /// Perform the per-event analysis
29 void analyze(const Event& event) {
30
31 // Final state of unstable particles to get particle spectra
32 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
33
34 for (const Particle& p : ufs.particles(Cuts::pid==553 ||
35 Cuts::pid==10551 ||
36 Cuts::pid==20553 ||
37 Cuts::pid==555)) {
38 // J/psi as a reference
39 if(p.pid()==553) {
40 double absrap=p.absrap();
41 if(absrap>2. && absrap<4.5) _h_pT[1]->fill(p.perp());
42 }
43 else {
44 Particle Upsilon;
45 if(p.children()[0].pid()==22 && p.children()[1].pid()==553) {
46 Upsilon=p.children()[1];
47 }
48 else if(p.children()[1].pid()==22 && p.children()[0].pid()==553) {
49 Upsilon=p.children()[0];
50 }
51 else
52 continue;
53 double absrap=Upsilon.absrap();
54 if(absrap<2. || absrap>4.5) continue;
55 _h_pT[0]->fill(Upsilon.perp());
56 }
57 }
58 }
59
60
61 /// Normalise histograms etc., after the run
62 void finalize() {
63 // compute fraction
64 Estimate1DPtr tmp;
65 book(tmp,1,1,1);
66 efficiency(_h_pT[0],_h_pT[1],tmp);
67 tmp->scale(100.);
68 }
69
70 /// @}
71
72
73 /// @name Histograms
74 /// @{
75 Histo1DPtr _h_pT[2];
76 /// @}
77
78
79 };
80
81
82 RIVET_DECLARE_PLUGIN(LHCB_2012_I1184177);
83
84}
|