rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

DELPHI_1995_I395026

Production of $B^*$ mesons at LEP1
Experiment: DELPHI (LEP)
Inspire ID: 395026
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Z.Phys. C68 (1995) 353-362
Beams: e- e+
Beam energies: ANY
Run details:
  • e+e- to hadrons

Spectrum for the production of $B^*$ mesons at LEP1. The polarization and ratio of vector to pseudoscalar $B$ meson production is also measured.

Source code: DELPHI_1995_I395026.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/Beam.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5#include "Rivet/Projections/UnstableParticles.hh"
  6
  7#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
  8#include "Rivet/Projections/InitialQuarks.hh"
  9
 10namespace Rivet {
 11
 12  /// @brief B* production at LEP1
 13  class DELPHI_1995_I395026 : public Analysis {
 14  public:
 15
 16    /// Constructor
 17    RIVET_DEFAULT_ANALYSIS_CTOR(DELPHI_1995_I395026);
 18
 19
 20    /// @name Analysis methods
 21    //@{
 22
 23    /// Book histograms and initialise projections before the run
 24    void init() {
 25
 26      // // Initialise and register projections
 27      declare(Beam(), "Beams");
 28      declare(ChargedFinalState(), "FS");
 29      declare(InitialQuarks(), "IQF");
 30      declare(UnstableParticles(), "UFS");
 31
 32      // Book histograms
 33      book(_h_ctheta1, 5,1,1);
 34      book(_h_ctheta2, "/TMP/ctheta",20,-1.,1.);
 35      book(_h_z      , 4,1,1);
 36      book(_c_hadron , "/TMP/chadron");
 37      book(_c_bottom , "/TMP/cbottom");
 38      book(_c_bStar  , "/TMP/cbStar ");
 39      book(_c_B      , "/TMP/cB     ");
 40    }
 41
 42
 43    /// Perform the per-event analysis
 44    void analyze(const Event& event) {
 45      // First, veto on leptonic events by requiring at least 4 charged FS particles
 46      const FinalState& fs = apply<FinalState>(event, "FS");
 47      const size_t numParticles = fs.particles().size();
 48
 49      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 50      if (numParticles < 2) {
 51        MSG_DEBUG("Failed leptonic event cut");
 52        vetoEvent;
 53      }
 54      MSG_DEBUG("Passed leptonic event cut");
 55
 56      int flavour = 0;
 57      const InitialQuarks& iqf = apply<InitialQuarks>(event, "IQF");
 58
 59      // If we only have two quarks (qqbar), just take the flavour.
 60      // If we have more than two quarks, look for the highest energetic q-qbar pair.
 61      if (iqf.particles().size() == 2) {
 62        flavour = iqf.particles().front().abspid();
 63      }
 64      else {
 65        map<int, double> quarkmap;
 66        for (const Particle& p : iqf.particles()) {
 67          if (quarkmap[p.pid()] < p.E()) {
 68            quarkmap[p.pid()] = p.E();
 69          }
 70        }
 71        double maxenergy = 0.;
 72        for (int i = 1; i <= 5; ++i) {
 73          if (quarkmap[i]+quarkmap[-i] > maxenergy) {
 74            flavour = i;
 75          }
 76        }
 77      }
 78      if     (flavour==5) _c_bottom->fill();
 79      _c_hadron->fill();
 80      // Get beams and average beam momentum
 81      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 82      const double meanBeamMom = ( beams.first.p3().mod() +
 83                                   beams.second.p3().mod() ) / 2.0;
 84      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 85      
 86      // loop over the particles
 87      for(const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==513 or Cuts::abspid==523 or
 88									       Cuts::abspid==511 or Cuts::abspid==521)) {
 89	int sign = p.pid()/p.abspid();
 90	// count number of Bs not from mixing or B*
 91	if(p.abspid()==511 || p.abspid()==521) {
 92	  if(p.parents()[0].abspid()==p.abspid()) continue;
 93	  if(p.parents()[0].abspid()==513 || p.parents()[0].abspid()==523) continue;
 94	  _c_B->fill(); 
 95	}
 96	// B*
 97	else {
 98	  _c_bStar->fill(); 
 99	  double xE = p.momentum().t()/meanBeamMom;
100	  _h_z->fill(xE);
101	  Particle decay;
102	  if(p.children().size()!=2) continue;
103	  int mid = p.abspid()-2;
104	  if(p.children()[0].pid()==sign*mid && 
105	     p.children()[1].pid()==22) {
106	    decay = p.children()[1];
107	  }
108	  else if(p.children()[1].pid()==sign*mid && 
109		  p.children()[0].pid()==22) {
110	    decay = p.children()[0];
111	  }
112	  else
113	    continue;
114	  LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(p.momentum().betaVec());
115	  Vector3 e1z = p.p3().unit();	
116	  FourMomentum pp = boost.transform(decay.momentum());
117	  Vector3 axis1 = boost.transform(decay.momentum()).p3().unit();
118	  double ctheta = e1z.dot(axis1);
119	  _h_ctheta1->fill(ctheta);
120	  _h_ctheta2->fill(ctheta);
121	}
122      }
123    }
124    
125    pair<double,double> calcRho(Histo1DPtr hist) {
126      if(hist->numEntries()==0.) return make_pair(0.,0.);
127      double sum1(0.),sum2(0.);
128      for (auto bin : hist->bins() ) {
129	double Oi = bin.area();
130	if(Oi==0.) continue;
131	double ai = 0.125*( -bin.xMin()*(3.+sqr(bin.xMin())) + bin.xMax()*(3.+sqr(bin.xMax())));
132	double bi = 0.375*( -bin.xMin()*(1.-sqr(bin.xMin())) + bin.xMax()*(1.-sqr(bin.xMax())));
133	double Ei = bin.areaErr();
134	sum1 += sqr(bi/Ei);
135	sum2 += bi/sqr(Ei)*(Oi-ai);
136      }
137      return make_pair(sum2/sum1,sqrt(1./sum1));
138    }
139
140    /// Normalise histograms etc., after the run
141    void finalize() {
142      // spectrum
143      scale(_h_z      ,1./_c_hadron->val());
144      // polarization
145      scale(_h_ctheta1,1./_c_hadron->val());
146      normalize(_h_ctheta2);
147      pair<double,double> rho = calcRho(_h_ctheta2);
148      Scatter2DPtr h_rho;
149      book(h_rho, 3,1,1);
150      h_rho->addPoint(0.5, rho.first, make_pair(0.5,0.5),
151		      make_pair(rho.second,rho.second) );
152      // no of B* per hadronic Z
153      double val = _c_bStar->val()/_c_hadron->val();
154      double err = val*sqrt(sqr(_c_bStar->err()/_c_bStar->val())+sqr(_c_hadron->err()/_c_hadron->val()));
155      Scatter2DPtr h_nBS;
156      book(h_nBS,2,1,1);
157      h_nBS->addPoint(1.,val,make_pair(0.5,0.5),make_pair(err,err) );
158      // no of B* per b bbar
159      val = _c_bStar->val()/_c_bottom->val();
160      err = val*sqrt(sqr(_c_bStar->err()/_c_bStar->val())+sqr(_c_bottom->err()/_c_bottom->val()));
161      Scatter2DPtr h1;
162      book(h1,1,1,1);
163      h1->addPoint(1.,val,make_pair(0.5,0.5),make_pair(err,err) );
164      Counter ctemp = *_c_bStar+*_c_B;
165      // no of B*/B+B*
166      val = _c_bStar->val()/ctemp.val();
167      err = val*sqrt(sqr(_c_bStar->err()/_c_bStar->val())+sqr(ctemp.err()/ctemp.val()));
168      h1->addPoint(2.,val,make_pair(0.5,0.5),make_pair(err,err) );
169      // average x_E
170      val = _h_z->xMean();
171      err = _h_z->xStdErr();
172      h1->addPoint(3.,val,make_pair(0.5,0.5),make_pair(err,err) );
173    }
174
175    //@}
176
177
178    /// @name Histograms
179    //@{
180    Histo1DPtr _h_ctheta1, _h_ctheta2, _h_z;
181    CounterPtr _c_hadron,_c_bottom,_c_bStar,_c_B;
182    //@}
183
184
185  };
186
187
188  // The hook for the plugin system
189  RIVET_DECLARE_PLUGIN(DELPHI_1995_I395026);
190
191
192}