Rivet analyses referenceBABAR_2007_I755548Mass distributions in $B\to p\bar{p} K^{(*)}$Experiment: BABAR (PEP-II) Inspire ID: 755548 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY
Measurement of mass distributions in $B^0\to p \bar{p} K^0_S$, $B^0\to p \bar{p} K^{*0}$, $B^+\to p \bar{p} K^+$ and $B^+\to p \bar{p} K^{*+}$. The corrected data were read from the plots in the paper. Source code: BABAR_2007_I755548.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 B -> p pbar meson
10 class BABAR_2007_I755548 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_I755548);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==511 ||
24 Cuts::abspid==521);
25 declare(ufs, "UFS");
26 DecayedParticles BB(ufs);
27 BB.addStable( 310);
28 BB.addStable( 313);
29 BB.addStable( 323);
30 BB.addStable(-313);
31 BB.addStable(-323);
32 BB.addStable( 441);
33 BB.addStable( 443);
34 BB.addStable(100443);
35 BB.addStable( 10441);
36 BB.addStable( 20443);
37 BB.addStable( 445);
38 declare(BB, "BB");
39 // histograms
40 for(unsigned int ix=0;ix<4;++ix) {
41 book(_h_mass[ix],1,1,1+ix);
42 book(_c[ix],"TMP/c_"+toString(ix+1));
43 for(unsigned int iy=0;iy<2;++iy)
44 if(!(ix==0&&iy==1)) book(_h_mass2[iy][ix],2,1+iy,1+ix);
45 }
46 }
47
48
49 /// Perform the per-event analysis
50 void analyze(const Event& event) {
51 static const map<PdgId,unsigned int> & mode1 = { { 2212,1}, {-2212,1}, { 310,1} };
52 static const map<PdgId,unsigned int> & mode1CC = { { 2212,1}, {-2212,1}, { 310,1} };
53 static const map<PdgId,unsigned int> & mode2 = { { 2212,1}, {-2212,1}, { 321,1} };
54 static const map<PdgId,unsigned int> & mode2CC = { { 2212,1}, {-2212,1}, {-321,1} };
55 static const map<PdgId,unsigned int> & mode3 = { { 2212,1}, {-2212,1}, { 313,1} };
56 static const map<PdgId,unsigned int> & mode3CC = { { 2212,1}, {-2212,1}, {-313,1} };
57 static const map<PdgId,unsigned int> & mode4 = { { 2212,1}, {-2212,1}, { 323,1} };
58 static const map<PdgId,unsigned int> & mode4CC = { { 2212,1}, {-2212,1}, {-323,1} };
59 DecayedParticles BB = apply<DecayedParticles>(event, "BB");
60 // loop over particles
61 for(unsigned int ix=0;ix<BB.decaying().size();++ix) {
62 int sign = BB.decaying()[ix].pid()/BB.decaying()[ix].abspid();
63 int imode=-1, iK;
64 if((sign>0 &&BB.modeMatches(ix,3,mode1)) ||
65 (sign<0 &&BB.modeMatches(ix,3,mode1CC))) {
66 imode = 0;
67 iK = 310;
68 }
69 else if((sign>0 &&BB.modeMatches(ix,3,mode2)) ||
70 (sign<0 &&BB.modeMatches(ix,3,mode2CC))) {
71 imode = 1;
72 iK = sign*321;
73 }
74 else if((sign>0 &&BB.modeMatches(ix,3,mode3)) ||
75 (sign<0 &&BB.modeMatches(ix,3,mode3CC))) {
76 imode = 2;
77 iK = sign*313;
78 }
79 else if((sign>0 &&BB.modeMatches(ix,3,mode4)) ||
80 (sign<0 &&BB.modeMatches(ix,3,mode4CC))) {
81 imode = 3;
82 iK = sign*323;
83 }
84 else continue;
85 _c[imode]->fill();
86 const Particle & pp = BB.decayProducts()[ix].at( sign*2212)[0];
87 const Particle & pbar = BB.decayProducts()[ix].at(-sign*2212)[0];
88 const Particle & meson = BB.decayProducts()[ix].at( iK)[0];
89 FourMomentum pbaryon = pp.momentum()+pbar.momentum();
90 double mass = pbaryon.mass();
91 _h_mass[imode]->fill(mass);
92 double mph[2] = {(pp .momentum()+meson.momentum()).mass(),
93 (pbar.momentum()+meson.momentum()).mass()};
94 if(imode==0) {
95 _h_mass2[0][imode]->fill(max(mph[0],mph[1]));
96 }
97 else {
98 if(mph[0]>mph[1])
99 _h_mass2[0][imode]->fill(mph[0]);
100 else
101 _h_mass2[1][imode]->fill(mph[1]);
102 }
103 }
104 }
105
106 /// Normalise histograms etc., after the run
107 void finalize() {
108 for(unsigned int ix=0;ix<4;++ix) {
109 normalize(_h_mass[ix],1.,false);
110 for(unsigned int iy=0;iy<2;++iy)
111 if(_h_mass2[iy][ix]) scale(_h_mass2[iy][ix],1./ *_c[ix]);
112 }
113 }
114
115 /// @}
116
117
118 /// @name Histograms
119 /// @{
120 Histo1DPtr _h_mass[4],_h_mass2[2][4];
121 CounterPtr _c[4];
122 /// @}
123 };
124
125
126 RIVET_DECLARE_PLUGIN(BABAR_2007_I755548);
127
128}
|