Rivet analyses referenceL3_1995_I381046Production of $B^*$ mesons at LEP1Experiment: L3 (LEP) Inspire ID: 381046 Status: VALIDATED Authors:
Beam energies: ANY Run details:
The ratio of vector to pseudoscalar for $B$ meson production at LEP1. Source code: L3_1995_I381046.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief B* production
10 class L3_1995_I381046 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(L3_1995_I381046);
15
16
17 /// @name Analysis methods
18 //@{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // // Initialise and register projections
24 declare(ChargedFinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 book(_c_bStar, "/TMP/cbStar ");
29 book(_c_B , "/TMP/cB ");
30
31 }
32
33
34 /// Perform the per-event analysis
35 void analyze(const Event& event) {
36 // First, veto on leptonic events by requiring at least 4 charged FS particles
37 const FinalState& fs = apply<FinalState>(event, "FS");
38 const size_t numParticles = fs.particles().size();
39
40 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
41 if (numParticles < 2) {
42 MSG_DEBUG("Failed leptonic event cut");
43 vetoEvent;
44 }
45 MSG_DEBUG("Passed leptonic event cut");
46
47 for(const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==513 or Cuts::abspid==523 or
48 Cuts::abspid==511 or Cuts::abspid==521)) {
49 // count number of Bs not from mixing or B*
50 if(p.abspid()==511 || p.abspid()==521) {
51 if(p.parents()[0].abspid()==p.abspid()) continue;
52 if(p.parents()[0].abspid()==513 || p.parents()[0].abspid()==523) continue;
53 _c_B->fill();
54 }
55 // B*
56 else {
57 _c_bStar->fill();
58 }
59 }
60
61 }
62
63
64 /// Normalise histograms etc., after the run
65 void finalize() {
66 // no of B*/B+B*
67 Scatter2DPtr h1;
68 book(h1,1,1,1);
69 Counter ctemp = *_c_bStar+*_c_B;
70 double val = _c_bStar->val()/ctemp.val();
71 double err = val*sqrt(sqr(_c_bStar->err()/_c_bStar->val())+sqr(ctemp.err()/ctemp.val()));
72 h1->addPoint(91.2,val,make_pair(0.5,0.5),make_pair(err,err) );
73 }
74
75 //@}
76
77
78 /// @name Histograms
79 //@{
80 CounterPtr _c_bStar,_c_B;
81 //@}
82
83
84 };
85
86
87 // The hook for the plugin system
88 RIVET_DECLARE_PLUGIN(L3_1995_I381046);
89
90
91}
|