Rivet analyses referenceLHCB_2024_I2756705$\pi^+\pi^0$ mass distribution in $B_c^+\to J/\psi \pi^+\pi^0$ decaysExperiment: LHCB (LHC) Inspire ID: 2756705 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Mass distributions in $B_c^+$ decays to $J/\psi \pi^+\pi^0$. The background subtracted data were extracted from figure 5 in the paper. Source code: LHCB_2024_I2756705.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 -> J/psi pi+pi0
10 class LHCB_2024_I2756705 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2024_I2756705);
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 UnstableParticles ufs = UnstableParticles(Cuts::abspid==541);
22 declare(ufs, "UFS");
23 DecayedParticles BC(ufs);
24 BC.addStable( PID::PI0);
25 BC.addStable( PID::JPSI);
26 declare(BC, "BC");
27 book(_h,1,1,1);
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 static const map<PdgId,unsigned int> & mode = { { 443,1}, { 211,1}, { 111,1} };
34 static const map<PdgId,unsigned int> & modeCC = { { 443,1}, {-211,1}, { 111,1} };
35 DecayedParticles BC = apply<DecayedParticles>(event, "BC");
36 // loop over particles
37 for(unsigned int ix=0;ix<BC.decaying().size();++ix) {
38 int sign = BC.decaying()[ix].pid()/BC.decaying()[ix].abspid();
39 if ((sign== 1 && BC.modeMatches(ix,3,mode )) ||
40 (sign==-1 && BC.modeMatches(ix,3,modeCC))) {
41 const Particle & pi0 = BC.decayProducts()[ix].at( 111)[0];
42 const Particle & pip = BC.decayProducts()[ix].at( sign*211)[0];
43 FourMomentum ptotal=pi0.momentum()+pip.momentum();
44 _h->fill(ptotal.mass());
45 }
46 }
47 }
48
49
50 /// Normalise histograms etc., after the run
51 void finalize() {
52 normalize(_h,1.,false);
53 }
54
55 /// @}
56
57 /// @name Histograms
58 /// @{
59 Histo1DPtr _h;
60 /// @}
61
62 };
63
64
65 RIVET_DECLARE_PLUGIN(LHCB_2024_I2756705);
66
67}
|