Rivet analyses referenceBABAR_2005_I686355Helicity angle and polarization in $B^0\to D^{*+}D^{*-}$Experiment: BABAR (PEP-II) Inspire ID: 686355 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Helicity angle distributions and polarization in $B^0\to D^{*+}D^{*-}$ decays Source code: BABAR_2005_I686355.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief B0 -> D*+ D*-
9 class BABAR_2005_I686355 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2005_I686355);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 UnstableParticles ufs = UnstableParticles(Cuts::abspid==511);
23 declare(ufs, "UFS");
24 // histograms
25 book(_p[0],1,1,1);
26 book(_p[1],"TMP/wgt");
27 book(_h,2,1,1);
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 Particles B0 = apply<UnstableParticles>(event, "UFS").particles();
34 for(const Particle & p : B0) {
35 if(p.children().size()!=2) continue;
36 if(p.children()[0].pid()!=-p.children()[1].pid()) continue;
37 if(p.children()[0].abspid()!=413) continue;
38 Particle Dp = p.children()[0];
39 Particle Dm = p.children()[1];
40 if (p.pid()>0 && Dp.pid()<0) swap(Dp,Dm);
41 else if(p.pid()<0 && Dp.pid()>0) swap(Dp,Dm);
42 // find children of the D mesons
43 Particle pip,pim;
44 if(Dp.children().size()!=2) continue;
45 if(Dp.children()[0].abspid()==PID::PIPLUS &&
46 Dp.children()[1].abspid()==PID::D0)
47 pip = Dp.children()[0];
48 else if (Dp.children()[1].abspid()==PID::PIPLUS &&
49 Dp.children()[0].abspid()==PID::D0)
50 pip = Dp.children()[1];
51 else
52 continue;
53 if(Dm.children().size()!=2) continue;
54 if(Dm.children()[0].abspid()==PID::PIPLUS &&
55 Dm.children()[1].abspid()==PID::D0) {
56 pim = Dm.children()[0];
57 }
58 else if (Dm.children()[1].abspid()==PID::PIPLUS &&
59 Dm.children()[0].abspid()==PID::D0) {
60 pim = Dm.children()[1];
61 }
62 else
63 continue;
64 // boost to rest frame
65 LorentzTransform boostB = LorentzTransform::mkFrameTransformFromBeta(p.momentum().betaVec());
66 FourMomentum pDstarPlus = boostB.transform(Dp.momentum());
67 FourMomentum pDstarMinus = boostB.transform(Dm.momentum());
68 LorentzTransform boostDp = LorentzTransform::mkFrameTransformFromBeta(pDstarPlus .betaVec());
69 FourMomentum ppip = boostDp.transform(boostB.transform(pip.momentum()));
70 LorentzTransform boostDm = LorentzTransform::mkFrameTransformFromBeta(pDstarMinus.betaVec());
71 FourMomentum ppim = boostDm.transform(boostB.transform(pim.momentum()));
72 Vector3 axisX = pDstarPlus.p3().unit();
73 // y and z axis
74 ppim = boostDp.transform(boostB.transform(pim.momentum()));
75 Vector3 axisZ = axisX.cross(ppim.p3()).unit();
76 // cThetaTr
77 double cThetaTr = axisZ.dot(ppip.p3().unit());
78 _h->fill(cThetaTr);
79 _p[0]->fill(0.5*(5.*sqr(cThetaTr)-1));
80 _p[1]->fill();
81 }
82 }
83
84
85 /// Normalise histograms etc., after the run
86 void finalize() {
87 normalize(_h,1.,false);
88 scale(_p[0], 1./ *_p[1]);
89 }
90
91 /// @}
92
93
94 /// @name Histograms
95 /// @{
96 Histo1DPtr _h;
97 CounterPtr _p[2];
98 /// @}
99
100
101 };
102
103
104 RIVET_DECLARE_PLUGIN(BABAR_2005_I686355);
105
106}
|