Rivet analyses referenceBABAR_2009_I821188Mass distributions in $B^0\to K^0_S\pi^+\pi^-$ decaysExperiment: BABAR (PEP-II) Inspire ID: 821188 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of mass distributions in $B^0\to K^0_S\pi^+\pi^-$ decays. The data were read from the plots in the paper and may not be corrected for efficiency/acceptance, however the backgrounds shown in the paper have been subtracted. Source code: BABAR_2009_I821188.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 > KS0 pi+ pi-
10 class BABAR_2009_I821188 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2009_I821188);
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);
24 declare(ufs, "UFS");
25 DecayedParticles B0(ufs);
26 B0.addStable(PID::K0S);
27 declare(B0, "B0");
28 // histograms
29 for(unsigned int ix=0;ix<2;++ix)
30 for(unsigned int iy=0;iy<2;++iy)
31 book(_h[ix][iy],1+ix,1,1+iy);
32 }
33
34
35 /// Perform the per-event analysis
36 void analyze(const Event& event) {
37 static const map<PdgId,unsigned int> & mode = { { 310,1}, { 211,1}, {-211,1}};
38 DecayedParticles B0 = apply<DecayedParticles>(event, "B0");
39 // loop over particles
40 for(unsigned int ix=0;ix<B0.decaying().size();++ix) {
41 if (!B0.modeMatches(ix,3,mode)) continue;
42 int sign = B0.decaying()[ix].pid()>0 ? 1 : -1;
43 // boost to B rest frame
44 LorentzTransform boost =
45 LorentzTransform::mkFrameTransformFromBeta(B0.decaying()[ix]. momentum().betaVec());
46 // momenta
47 FourMomentum pip = boost.transform(B0.decayProducts()[ix].at( 211*sign)[0].momentum());
48 FourMomentum pim = boost.transform(B0.decayProducts()[ix].at(-211*sign)[0].momentum());
49 FourMomentum K0 = boost.transform(B0.decayProducts()[ix].at( 310 )[0].momentum());
50 // pi+pi- resonance
51 FourMomentum ppipi = pim+pip;
52 LorentzTransform boost2 = LorentzTransform::mkFrameTransformFromBeta(ppipi.betaVec());
53 double cTheta = boost2.transform(pim).p3().unit().dot(K0.p3().unit());
54 if(cTheta>0.) _h[0][0]->fill(ppipi.mass());
55 else _h[0][1]->fill(ppipi.mass());
56 // K pi- resonance
57 FourMomentum pKpim = K0+pim;
58 boost2 = LorentzTransform::mkFrameTransformFromBeta(pKpim.betaVec());
59 cTheta = boost2.transform(K0).p3().unit().dot(pip.p3().unit());
60 if(cTheta>0.) _h[1][0]->fill(pKpim.mass());
61 else _h[1][1]->fill(pKpim.mass());
62 // K pi+ resonance
63 FourMomentum pKpip = K0+pip;
64 boost2 = LorentzTransform::mkFrameTransformFromBeta(pKpip.betaVec());
65 cTheta = boost2.transform(pip).p3().unit().dot(pim.p3().unit());
66 if(cTheta>0.) _h[1][0]->fill(pKpip.mass());
67 else _h[1][1]->fill(pKpip.mass());
68 }
69 }
70
71
72 /// Normalise histograms etc., after the run
73 void finalize() {
74 for(unsigned int ix=0;ix<2;++ix)
75 for(unsigned int iy=0;iy<2;++iy)
76 normalize(_h[ix][iy],1.,false);
77 }
78
79 /// @}
80
81
82 /// @name Histograms
83 /// @{
84 Histo1DPtr _h[2][2];
85 /// @}
86
87
88 };
89
90
91 RIVET_DECLARE_PLUGIN(BABAR_2009_I821188);
92
93}
|