rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2006_I719111

Charm hadron spectra in $B^0$, $\bar{B}^0$ and $B^\pm$ decays
Experiment: BABAR (PEP-II)
Inspire ID: 719111
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D75 (2007) 072002
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing B0, Bbar0, B+, B-

Spectra of $D^0$, $\bar{D}^0$, $D^\pm$, $D_s^\pm$, $\Lambda^+_c$, $\bar\Lambda_c^-$ in $B^0$, $\bar{B}^0$ and $B^\pm$ decays measured by BaBar at the $\Upsilon(4S)$.

Source code: BABAR_2006_I719111.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {


  /// @brief Charm meson spectra in bottom decays
  class BABAR_2006_I719111 : public Analysis {
  public:

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(BABAR_2006_I719111);


    /// @name Analysis methods
    //@{

    /// Book histograms and initialise projections before the run
    void init() {

      // Initialise and register projections
      declare(UnstableParticles(), "UFS");

      // Book histograms
      book(_h_Bm_D0      , 1, 1, 1);
      book(_h_Bm_Dbar0   , 1, 1, 2);
      book(_h_Bm_Dp      , 2, 1, 1);
      book(_h_Bm_Dm      , 2, 1, 2);
      book(_h_Bm_Dsp     , 3, 1, 1);
      book(_h_Bm_Dsm     , 3, 1, 2);
      book(_h_Bm_lam     , 4, 1, 1);
      book(_h_Bm_lbar    , 4, 1, 2);
      book(_h_Bbar0_D0   , 5, 1, 1);
      book(_h_Bbar0_Dbar0, 5, 1, 2);
      book(_h_Bbar0_Dp   , 6, 1, 1);
      book(_h_Bbar0_Dm   , 6, 1, 2);
      book(_h_Bbar0_Dsp  , 7, 1, 1);
      book(_h_Bbar0_Dsm  , 7, 1, 2);
      book(_h_Bbar0_lam  , 8, 1, 1);
      book(_h_Bbar0_lbar , 8, 1, 2);

      book(_c_Bm   ,"/TMP/Bm");
      book(_c_Bbar0,"/TMP/B0");
    }

    void findDecayProducts(Particle p,
			   Particles & D0, Particles & Dbar0,
			   Particles & Dp, Particles & Dm,
			   Particles & Dsp, Particles & Dsm,
			   Particles & lam, Particles & lbar) {
      for(const Particle & child : p.children()) {
	if(child.pid()==421)
	  D0.push_back(child);
	else if(child.pid()==-421)
	  Dbar0.push_back(child);
	else if(child.pid()==411)
	  Dp.push_back(child);
	else if(child.pid()==-411)
	  Dm.push_back(child);
	else if(child.pid()==431)
	  Dsp.push_back(child);
	else if(child.pid()==-431)
	  Dsm.push_back(child);
	else if(child.pid()==4122)
	  lam.push_back(child);
	else if(child.pid()==-4122)
	  lbar.push_back(child);
	else if(!child.children().empty())
	  findDecayProducts(child,D0,Dbar0,Dp,Dm, Dsp, Dsm, lam, lbar);
      }
    }

    /// Perform the per-event analysis
    void analyze(const Event& event) {
      const UnstableParticles& ufs = apply<UnstableFinalState>(event, "UFS");
      for(const Particle & p : ufs.particles(Cuts::abspid==511 || Cuts::abspid==521)) {
      	if(p.abspid()==511)
      	  _c_Bbar0->fill();
      	else if(p.abspid()==521)
      	  _c_Bm   ->fill();
      	Particles D0, Dbar0, Dp, Dm, Dsp, Dsm, lam, lbar;
      	findDecayProducts(p,D0,Dbar0,Dp,Dm, Dsp, Dsm, lam, lbar);
      	LorentzTransform boost =
      	  LorentzTransform::mkFrameTransformFromBeta(p.momentum().betaVec());
      	if(p.pid()>0) {
      	  swap(D0, Dbar0);
      	  swap(Dp, Dm);
      	  swap(Dsp, Dsm);
      	  swap(lam, lbar);
      	}
      	for(const Particle & child : D0) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_D0   ->fill(pChild);
      	  else
      	    _h_Bbar0_D0->fill(pChild);
      	}
      	for(const Particle & child : Dbar0) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_Dbar0   ->fill(pChild);
      	  else
      	    _h_Bbar0_Dbar0->fill(pChild);
      	}
      	for(const Particle & child : Dp) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_Dp   ->fill(pChild);
      	  else
      	    _h_Bbar0_Dp->fill(pChild);
      	}
      	for(const Particle & child : Dm) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_Dm   ->fill(pChild);
      	  else
      	    _h_Bbar0_Dm->fill(pChild);
      	}
      	for(const Particle & child : Dsp) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_Dsp   ->fill(pChild);
      	  else
      	    _h_Bbar0_Dsp->fill(pChild);
      	}
      	for(const Particle & child : Dsm) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_Dsm   ->fill(pChild);
      	  else
      	    _h_Bbar0_Dsm->fill(pChild);
      	}
      	for(const Particle & child : lam) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_lam   ->fill(pChild);
      	  else
      	    _h_Bbar0_lam->fill(pChild);
      	}
      	for(const Particle & child : lbar) {
      	  double pChild = boost.transform(child.momentum()).p3().mod();
      	  if(p.abspid()==521)
      	    _h_Bm_lbar   ->fill(pChild);
      	  else
      	    _h_Bbar0_lbar->fill(pChild);
      	}
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      scale(_h_Bm_D0      ,100./ _c_Bm->val());
      scale(_h_Bm_Dbar0   ,100./ _c_Bm->val());
      scale(_h_Bm_Dp      ,100./ _c_Bm->val());
      scale(_h_Bm_Dm      ,100./ _c_Bm->val());
      scale(_h_Bm_Dsp     ,100./ _c_Bm->val());
      scale(_h_Bm_Dsm     ,100./ _c_Bm->val());
      scale(_h_Bm_lam     ,100./ _c_Bm->val());
      scale(_h_Bm_lbar    ,100./ _c_Bm->val());
      scale(_h_Bbar0_D0   ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_Dbar0,100./ _c_Bbar0->val());
      scale(_h_Bbar0_Dp   ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_Dm   ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_Dsp  ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_Dsm  ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_lam  ,100./ _c_Bbar0->val());
      scale(_h_Bbar0_lbar ,100./ _c_Bbar0->val());
    }

    //@}


    /// @name Histograms
    //@{
    Histo1DPtr _h_Bm_D0,_h_Bm_Dbar0,_h_Bm_Dp,_h_Bm_Dm,_h_Bm_Dsp,_h_Bm_Dsm,
      _h_Bm_lam,_h_Bm_lbar,_h_Bbar0_D0;
    Histo1DPtr _h_Bbar0_Dbar0,_h_Bbar0_Dp,_h_Bbar0_Dm,
      _h_Bbar0_Dsp,_h_Bbar0_Dsm,_h_Bbar0_lam,_h_Bbar0_lbar;

    CounterPtr _c_Bm ,_c_Bbar0;
    //@}

  };


  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(BABAR_2006_I719111);


}