Rivet analyses referenceBABAR_2008_I789278Longitudinal polarization in $B^\pm\to\phi K^\pm_1$ and $\phi K^\pm_2$Experiment: BABAR (PEP-II) Inspire ID: 789278 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the longitudinal polarization in $B^\pm\to\phi K^\pm_1$ and $\phi K^\pm_2$. The values were taken from Table I, due to the large backgrounds none of the distributions are implemented. Source code: BABAR_2008_I789278.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+ -> K_1+/K_2+ phixs
10 class BABAR_2008_I789278 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2008_I789278);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 UnstableParticles ufs = UnstableParticles(Cuts::abspid==521);
23 declare(ufs, "UFS");
24 DecayedParticles BP(ufs);
25 BP.addStable( 10323);
26 BP.addStable(-10323);
27 BP.addStable( 325);
28 BP.addStable( -325);
29 BP.addStable( 333);
30 declare(BP, "BP");
31 // histos
32 for(unsigned int ix=0;ix<2;++ix) {
33 book(_p[ix][0],1,1,1+ix);
34 book(_p[ix][1],"TMP/wgt_"+toString(ix+1));
35 }
36 }
37
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 static const map<PdgId,unsigned int> & mode1 = { { 333,1}, { 10323,1}};
42 static const map<PdgId,unsigned int> & mode1CC = { { 333,1}, {-10323,1}};
43 static const map<PdgId,unsigned int> & mode2 = { { 333,1}, { 325,1}};
44 static const map<PdgId,unsigned int> & mode2CC = { { 333,1}, { -325,1}};
45
46 DecayedParticles BP = apply<DecayedParticles>(event, "BP");
47 // loop over particles
48 for(unsigned int ix=0;ix<BP.decaying().size();++ix) {
49 int imode=-1;
50 if (BP.modeMatches(ix,2,mode1 ) ||
51 BP.modeMatches(ix,2,mode1CC) ) imode=0;
52 else if (BP.modeMatches(ix,2,mode2 ) ||
53 BP.modeMatches(ix,2,mode2CC) ) imode=1;
54 else continue;
55 // find phi decay products
56 const Particle & phi = BP.decayProducts()[ix].at(333)[0];
57 if(phi.children().size()!=2) continue;
58 if(phi.children()[0].pid()!=-phi.children()[1].pid()) continue;
59 if(phi.children()[0].abspid()!=321) continue;
60 Particle Kp = phi.children()[0].pid()>0 ? phi.children()[0] : phi.children()[1];
61 // boost to B rest frame
62 LorentzTransform boost =
63 LorentzTransform::mkFrameTransformFromBeta(BP.decaying()[ix].momentum().betaVec());
64 FourMomentum pPhi = boost.transform(phi.momentum());
65 FourMomentum pKp = boost.transform( Kp.momentum());
66 const LorentzTransform boost2 = LorentzTransform::mkFrameTransformFromBeta(pPhi.betaVec());
67 pKp = boost2.transform(pKp);
68 double cK = pKp.p3().unit().dot(pPhi.p3().unit());
69 _p[imode][0]->fill(-(1.-5.*sqr(cK))/2.);
70 _p[imode][1]->fill();
71 }
72 }
73
74
75 /// Normalise histograms etc., after the run
76 void finalize() {
77 for(unsigned int ix=0;ix<2;++ix)
78 scale(_p[ix][0], 1./ *_p[ix][1]);
79 }
80
81 /// @}
82
83
84 /// @name Histograms
85 /// @{
86 CounterPtr _p[2][2];
87 /// @}
88
89
90 };
91
92
93 RIVET_DECLARE_PLUGIN(BABAR_2008_I789278);
94
95}
|