rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2022_I1960979

Mass distributions in $B_c^+\to J/\psi+$ $\pi^+\pi^+\pi^-$, $K^+K^-\pi^+$ and $K^+\pi^+\pi^-$
Experiment: LHCB (LHC)
Inspire ID: 1960979
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • JHEP 01 (2022) 065
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing B_c+, originally pp

Mass distributions in $B_c^+\to J/\psi+$ $\pi^+\pi^+\pi^-$, $K^+K^-\pi^+$ and $K^+\pi^+\pi^-$. The data were read from the plots in the paper and may not be corrected for efficiency and acceptance.

Source code: LHCB_2022_I1960979.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_c - > jpsi + 3 charged hadrons
 10  class LHCB_2022_I1960979 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2022_I1960979);
 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==541);
 23      declare(ufs, "UFS");
 24      DecayedParticles BC(ufs);
 25      BC.addStable( PID::PI0);
 26      BC.addStable( PID::K0S);
 27      BC.addStable( PID::JPSI);
 28      declare(BC, "BC");
 29      for(unsigned int ix=0;ix<4;++ix) {
 30	for(unsigned int iy=0;iy<2;++iy) {
 31	  if(iy==1&&ix>1) continue;
 32	  book(_h[ix][iy],1+ix,1,1+iy);
 33	}
 34      }
 35    }
 36
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      static const map<PdgId,unsigned int> & mode1   = { { 443,1}, { 211,2}, {-211,1} };
 41      static const map<PdgId,unsigned int> & mode1CC = { { 443,1}, {-211,2}, { 211,1} };
 42      static const map<PdgId,unsigned int> & mode2   = { { 443,1}, { 321,1}, {-321,1}, { 211,1} };
 43      static const map<PdgId,unsigned int> & mode2CC = { { 443,1}, { 321,1}, {-321,1}, {-211,1} };
 44      static const map<PdgId,unsigned int> & mode3   = { { 443,1}, { 211,1}, {-211,1}, { 321,1} };
 45      static const map<PdgId,unsigned int> & mode3CC = { { 443,1}, { 211,1}, {-211,1}, {-321,1} };
 46      static const map<PdgId,unsigned int> & mode4   = { { 443,1}, { 321,2}, {-321,1} };
 47      static const map<PdgId,unsigned int> & mode4CC = { { 443,1}, { 321,1}, {-321,2} };
 48      DecayedParticles BC = apply<DecayedParticles>(event, "BC");
 49      // loop over particles
 50      for(unsigned int ix=0;ix<BC.decaying().size();++ix) {
 51	int sign = BC.decaying()[ix].pid()/BC.decaying()[ix].abspid();
 52	if ((sign== 1 && BC.modeMatches(ix,4,mode1  )) ||
 53	    (sign==-1 && BC.modeMatches(ix,4,mode1CC))) {
 54	  const Particle  & pim = BC.decayProducts()[ix].at(-sign*211)[0];
 55	  const Particles & pip = BC.decayProducts()[ix].at( sign*211);
 56	  _h[0][0]->fill((pim.momentum()+pip[0].momentum()+pip[1].momentum()).mass());
 57	  _h[0][1]->fill((pim.momentum()+pip[0].momentum()).mass());
 58	  _h[0][1]->fill((pim.momentum()+pip[1].momentum()).mass());
 59	}
 60	else if((sign== 1 && BC.modeMatches(ix,4,mode2  )) ||
 61		(sign==-1 && BC.modeMatches(ix,4,mode2CC))) {
 62	  const Particle  & Kp  = BC.decayProducts()[ix].at( sign*321)[0];
 63	  const Particle  & Km  = BC.decayProducts()[ix].at(-sign*321)[0];
 64	  const Particle  & pip = BC.decayProducts()[ix].at( sign*211)[0];
 65	  _h[1][0]->fill((Km.momentum()+pip.momentum()).mass());
 66	  _h[1][1]->fill((Km.momentum()+Kp .momentum()).mass());
 67	}
 68	else if((sign== 1 && BC.modeMatches(ix,4,mode3  )) ||
 69		(sign==-1 && BC.modeMatches(ix,4,mode3CC))) {
 70	  const Particle  & pim  = BC.decayProducts()[ix].at(-sign*211)[0];
 71	  const Particle  & Kp   = BC.decayProducts()[ix].at( sign*321)[0];
 72	  _h[2][0]->fill((Kp.momentum()+pim.momentum()).mass());
 73	}
 74	else if((sign== 1 && BC.modeMatches(ix,4,mode4  )) ||
 75		(sign==-1 && BC.modeMatches(ix,4,mode4CC))) {
 76	  const Particle  & Km = BC.decayProducts()[ix].at(-sign*321)[0];
 77	  const Particles & Kp = BC.decayProducts()[ix].at( sign*321);
 78	  _h[3][0]->fill((Kp[0].momentum()+Km.momentum()).mass());
 79	  _h[3][0]->fill((Kp[1].momentum()+Km.momentum()).mass());
 80	}
 81      }
 82    }
 83
 84
 85    /// Normalise histograms etc., after the run
 86    void finalize() {
 87      for(unsigned int ix=0;ix<3;++ix) {
 88	for(unsigned int iy=0;iy<2;++iy) {
 89	  if(iy==1&&ix>1) continue;
 90	  normalize(_h[ix][iy],1.,false);
 91	}
 92      }
 93    }
 94
 95    /// @}
 96
 97
 98    /// @name Histograms
 99    /// @{
100    Histo1DPtr _h[4][2];
101    /// @}
102
103
104  };
105
106
107  RIVET_DECLARE_PLUGIN(LHCB_2022_I1960979);
108
109}