Rivet analyses referenceLHCB_2017_I1596893Mass distributions in B0→pˉΛπ− and B0s→pˉΛK−Experiment: LHCB (LHC) Inspire ID: 1596893 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Mass distributions in B0→pˉΛπ− and B0s→pˉΛK−. Data read from plots in paper but background subtracted and corrected for efficiency. Source code: LHCB_2017_I1596893.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/DecayedParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief B0 -> p Lambdabar0 pi- and Bs0 -> p Lambdabar0 K-
10 class LHCB_2017_I1596893 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2017_I1596893);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==511 or
24 Cuts::abspid==531);
25 declare(ufs, "UFS");
26 DecayedParticles B0(ufs);
27 B0.addStable( 3122);
28 B0.addStable(-3122);
29 declare(B0, "B0");
30 // book histograms
31 for(unsigned int ix=0;ix<2;++ix)
32 for(unsigned int iy=0;iy<3;++iy)
33 book(_h[ix][iy],1+ix,1,1+iy);
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 static const map<PdgId,unsigned int> & mode1 = { { 2212,1},{-3122,1}, {-211,1}};
40 static const map<PdgId,unsigned int> & mode1CC = { {-2212,1},{ 3122,1}, { 211,1}};
41 static const map<PdgId,unsigned int> & mode2 = { { 2212,1},{-3122,1}, {-321,1}};
42 static const map<PdgId,unsigned int> & mode2CC = { {-2212,1},{ 3122,1}, { 321,1}};
43 DecayedParticles B0 = apply<DecayedParticles>(event, "B0");
44 // loop over particles
45 for(unsigned int ix=0;ix<B0.decaying().size();++ix) {
46 int sign = 1, imode = 0;
47 if(B0.decaying()[ix].abspid()==511) {
48 if (B0.decaying()[ix].pid()>0 && B0.modeMatches(ix,3,mode1)) {
49 sign=1;
50 }
51 else if (B0.decaying()[ix].pid()<0 && B0.modeMatches(ix,3,mode1CC)) {
52 sign=-1;
53 }
54 else
55 continue;
56 imode=0;
57 }
58 else {
59 if (B0.decaying()[ix].pid()>0 && B0.modeMatches(ix,3,mode2)) {
60 sign=1;
61 }
62 else if (B0.decaying()[ix].pid()<0 && B0.modeMatches(ix,3,mode2CC)) {
63 sign=-1;
64 }
65 else
66 continue;
67 imode=1;
68 }
69 const Particle & pp = B0.decayProducts()[ix].at( sign*2212)[0];
70 const Particle & LamBar = B0.decayProducts()[ix].at(-sign*3122)[0];
71 const Particle & pim = B0.decayProducts()[ix].at(-sign*(imode==0 ? 211 : 321))[0];
72 _h[imode][0]->fill((pp .momentum()+LamBar.momentum()).mass());
73 _h[imode][1]->fill((pp .momentum()+pim .momentum()).mass());
74 _h[imode][2]->fill((pim.momentum()+LamBar.momentum()).mass());
75 }
76 }
77
78
79 /// Normalise histograms etc., after the run
80 void finalize() {
81 for(unsigned int ix=0;ix<2;++ix)
82 for(unsigned int iy=0;iy<3;++iy)
83 normalize(_h[ix][iy],1.,false);
84 }
85
86 /// @}
87
88
89 /// @name Histograms
90 /// @{
91 Histo1DPtr _h[2][3];
92 /// @}
93
94
95 };
96
97
98 RIVET_DECLARE_PLUGIN(LHCB_2017_I1596893);
99
100}
|