Rivet analyses referenceBESII_2006_I650381$J/\psi\to p \bar{n}\pi^-$ and $n\bar{p}\pi^+$Experiment: BESII (BEPC) Inspire ID: 650381 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the mass distributions in the decays $J/\psi\to p \bar{n}\pi^-$ and $n\bar{p}\pi^+$. The data were read from the plots in the paper and may not be corrected for efficiency or background. Source code: BESII_2006_I650381.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 J/psi -> p nbar pi+ + c.c
10 class BESII_2006_I650381 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2006_I650381);
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::pid==443);
23 declare(ufs, "UFS");
24 DecayedParticles psi(ufs);
25 psi.addStable(PID::PI0);
26 psi.addStable(PID::K0S);
27 psi.addStable(PID::ETA);
28 psi.addStable(PID::ETAPRIME);
29 declare(psi, "psi");
30 for(unsigned int ix=0;ix<2;++ix) {
31 book(_h[ix],1,1,1+ix);
32 book(_dalitz[ix], "dalitz_"+toString(ix+1),50,1.,5.,50,1.,5.);
33 }
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 static const map<PdgId,unsigned int> & mode = { { 2212,1}, {-2112,1}, {-211,1} };
40 static const map<PdgId,unsigned int> & modeCC = { {-2212,1}, { 2112,1}, { 211,1} };
41 DecayedParticles psi = apply<DecayedParticles>(event, "psi");
42 // loop over particles
43 for(unsigned int ix=0;ix<psi.decaying().size();++ix) {
44 if(psi.modeMatches(ix,3,mode)) {
45 const Particle & pim = psi.decayProducts()[ix].at(-211)[0];
46 const Particle & pp = psi.decayProducts()[ix].at( 2212)[0];
47 const Particle & nbar = psi.decayProducts()[ix].at(-2112)[0];
48 double mminus = (pp .momentum()+pim.momentum()).mass2();
49 double mplus = (nbar.momentum()+pim.momentum()).mass2();
50 _h[0]->fill(sqrt(mminus));
51 _dalitz[0]->fill(mminus,mplus);
52 }
53 else if (psi.modeMatches(ix,3,modeCC)) {
54 const Particle & pip = psi.decayProducts()[ix].at( 211)[0];
55 const Particle & nn = psi.decayProducts()[ix].at( 2112)[0];
56 const Particle & pbar = psi.decayProducts()[ix].at(-2212)[0];
57 double mminus = (pbar.momentum()+pip.momentum()).mass2();
58 double mplus = (nn .momentum()+pip.momentum()).mass2();
59 _h[1]->fill(sqrt(mminus));
60 _dalitz[1]->fill(mminus,mplus);
61 }
62 }
63 }
64
65
66 /// Normalise histograms etc., after the run
67 void finalize() {
68 for(unsigned int ix=0;ix<2;++ix) {
69 normalize(_h[ix]);
70 normalize(_dalitz[ix]);
71 }
72 }
73
74 /// @}
75
76
77 /// @name Histograms
78 /// @{
79 Histo1DPtr _h[2];
80 Histo2DPtr _dalitz[2];
81 /// @}
82
83
84 };
85
86
87 RIVET_DECLARE_PLUGIN(BESII_2006_I650381);
88
89}
|