Rivet analyses referenceBESIII_2019_I1714778Mass distributions in the decay $D^+\to K^0_S\pi^+\pi^+\pi^-$Experiment: BESIII (BEPC) Inspire ID: 1714778 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY
Measurement of the mass distributions in the decay $D^+\to K^0_S\pi^+\pi^+\pi^-$ by BES. The data were read from the plots in the paper and therefore for some points the error bars are the size of the point. It is also not clear that any resolution effects have been unfolded. Source code: BESIII_2019_I1714778.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 D+ -> KS0 pi+pi+pi-
10 class BESIII_2019_I1714778 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1714778);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==411);
24 declare(ufs, "UFS");
25 DecayedParticles D0(ufs);
26 D0.addStable(PID::PI0);
27 D0.addStable(PID::K0S);
28 D0.addStable(PID::ETA);
29 D0.addStable(PID::ETAPRIME);
30 declare(D0, "D0");
31 // histos
32 for(unsigned int ix=0;ix<9;++ix)
33 book(_h[ix],1,1,1+ix);
34 }
35
36 void findDecayProducts(const Particle & mother, unsigned int & nstable,
37 Particles & pip , Particles & pim , Particles & K0) {
38 for(const Particle & p : mother.children()) {
39 int id = p.pid();
40 if (id == PID::PIPLUS) {
41 pip.push_back(p);
42 ++nstable;
43 }
44 else if (id == PID::PIMINUS) {
45 pim.push_back(p);
46 ++nstable;
47 }
48 else if (id == PID::K0S) {
49 K0.push_back(p);
50 ++nstable;
51 }
52 else if (id == PID::KPLUS ||id == PID::KMINUS ||
53 id == PID::PI0||id == PID::K0L) {
54 ++nstable;
55 }
56 else if ( !p.children().empty() ) {
57 findDecayProducts(p, nstable, pip, pim, K0);
58 }
59 else
60 ++nstable;
61 }
62 }
63
64 /// Perform the per-event analysis
65 void analyze(const Event& event) {
66 for(const Particle& meson : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid== 411)) {
67 unsigned int nstable(0);
68 Particles pip, pim, K0;
69 findDecayProducts(meson, nstable, pip, pim, K0);
70 if (nstable!=4) continue;
71 if(meson.pid()<0) {
72 swap(pim,pip);
73 }
74 if(pip.size()==2&&pim.size()==1&&K0.size()==1) {
75 double mpippim[2] = {(pim[0].momentum()+pip[0].momentum()).mass(),
76 (pim[0].momentum()+pip[1].momentum()).mass()};
77 if(mpippim[0]>mpippim[1]) {
78 swap( pip[0], pip[1]);
79 swap(mpippim[0],mpippim[1]);
80 }
81 _h[0]->fill((K0 [0].momentum()+pim[0].momentum()).mass());
82 _h[1]->fill((K0 [0].momentum()+pip[0].momentum()).mass());
83 _h[2]->fill((K0 [0].momentum()+pip[1].momentum()).mass());
84 _h[3]->fill(mpippim[0]);
85 _h[4]->fill(mpippim[1]);
86 _h[5]->fill((K0 [0].momentum()+pim[0].momentum()+pip[0].momentum()).mass());
87 _h[6]->fill((K0 [0].momentum()+pim[0].momentum()+pip[1].momentum()).mass());
88 _h[7]->fill((pim[0].momentum()+pip[0].momentum()+pip[1].momentum()).mass());
89 _h[8]->fill((pip[0].momentum()+pip[1].momentum()).mass());
90 }
91 }
92 }
93
94
95 /// Normalise histograms etc., after the run
96 void finalize() {
97 for(unsigned int ix=0;ix<9;++ix)
98 normalize(_h[ix],1.,false);
99 }
100
101 /// @}
102
103
104 /// @name Histograms
105 /// @{
106 Histo1DPtr _h[9];
107 /// @}
108
109
110 };
111
112
113 RIVET_DECLARE_PLUGIN(BESIII_2019_I1714778);
114
115}
|