Rivet analyses referenceCLEOII_1999_I504672Charged Particle Multiplicity in $\Upsilon(4S)$ decaysExperiment: CLEOII (CESR) Inspire ID: 504672 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Charged particle multiplicity in $\Upsilon(4S)$ decays measured by CLEOII. Source code: CLEOII_1999_I504672.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Charged particle multplicity in Upsilon 4s decays
9 class CLEOII_1999_I504672 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEOII_1999_I504672);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(UnstableParticles(), "UFS");
24
25 // Book histograms
26 book(_n_tot , 1, 1, 1);
27 book(_n_lep , 1, 1, 2);
28 book(_n_nolep, 1, 1, 3);
29 book(_h_n , 2, 1, 1);
30 book(_n_Ups_All ,"/TMP/n_Ups_All");
31 book(_n_Ups_Lep ,"/TMP/n_Ups_Lep");
32 book(_n_Ups_NoLep,"/TMP/n_Ups_NoLep");
33 }
34
35 void findChildren(const Particle & p,int & nCharged, int & nLep) {
36 bool isBottom = PID::isBottomHadron(p.pid());
37 for (const Particle& child : p.children()) {
38 if (child.children().empty()) {
39 if (PID::isCharged(child.pid())) ++nCharged;
40 if (isBottom && (child.abspid()==11||child.abspid()==13)) ++nLep;
41 }
42 else {
43 findChildren(child,nCharged,nLep);
44 }
45 }
46 }
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 for (const Particle& p : apply<FinalState>(event, "UFS").particles(Cuts::pid==300553)) {
51 _n_Ups_All->fill();
52 int nCharged(0),nLep(0);
53 findChildren(p,nCharged,nLep);
54 _h_n->fill(nCharged);
55 _n_tot->fill(Ecm, nCharged);
56 if(nLep==2) {
57 _n_lep ->fill(Ecm, nCharged);
58 _n_Ups_Lep->fill();
59 }
60 else {
61 _n_nolep->fill(Ecm, nCharged);
62 _n_Ups_NoLep->fill();
63 }
64 }
65 }
66
67
68 /// Normalise histograms etc., after the run
69 void finalize() {
70 scale(_h_n , 1./ *_n_Ups_All );
71 scale(_n_tot , 1./ *_n_Ups_All );
72 scale(_n_lep , 1./ *_n_Ups_Lep );
73 scale(_n_nolep, 1./ *_n_Ups_NoLep);
74 }
75
76 /// @}
77
78
79 /// @name Histograms
80 /// @{
81 Histo1DPtr _h_n;
82 BinnedHistoPtr<string> _n_tot,_n_lep,_n_nolep;
83 CounterPtr _n_Ups_All,_n_Ups_Lep,_n_Ups_NoLep;
84 const string Ecm = "10.6";
85
86 /// @}
87
88
89 };
90
91
92 RIVET_DECLARE_PLUGIN(CLEOII_1999_I504672);
93
94}
|