Rivet analyses referenceBESIII_2024_I2730532Mass distributions for $D^0\to2\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$Experiment: BESIII (BEPC) Inspire ID: 2730532 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Mass distributions for $D^0\to2\pi^+2\pi^-$ and $\pi^+\pi^-2\pi^0$. Source code: BESIII_2024_I2730532.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 D0 -> 4 pions
10 class BESIII_2024_I2730532 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2730532);
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 UnstableParticles ufs = UnstableParticles(Cuts::abspid==421);
23 declare(ufs, "UFS");
24 DecayedParticles D0(ufs);
25 D0.addStable(PID::PI0);
26 D0.addStable(PID::K0S);
27 D0.addStable(PID::ETA);
28 D0.addStable(PID::ETAPRIME);
29 declare(D0, "D0");
30 for(unsigned int ix=0;ix<7;++ix) {
31 book(_h_0[ix],2,1,1+ix);
32 if(ix>=3) continue;
33 book(_h_c[ix],1,1,1+ix);
34 }
35 }
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39 // define the decay mode
40 DecayedParticles D0 = apply<DecayedParticles>(event, "D0");
41 // loop over particles
42 for (unsigned int ix=0;ix<D0.decaying().size(); ++ix) {
43 int sign = D0.decaying()[ix].pid()/421;
44 if (D0.modeMatches(ix,4,mode1)) {
45 const Particles & pip= D0.decayProducts()[ix].at( sign*211);
46 const Particles & pim= D0.decayProducts()[ix].at(-sign*211);
47 bool Kveto=false;
48 set<double> mpm;
49 for (unsigned int ix=0;ix<2;++ix) {
50 if((pim[0].mom()+pim[1].mom()+pip[ix].mom()).mass()<0.51) continue;
51 for(unsigned int iy=0;iy<2;++iy) {
52 double m = (pip[ix].mom()+pim[iy].mom()).mass();
53 mpm.insert(m);
54 if(abs(m-.4976)<0.03) Kveto=true;
55 }
56 }
57 if (Kveto) continue;
58 for (const double& m : mpm) _h_c[0]->fill(m);
59 for (unsigned int ix=0;ix<2;++ix) {
60 _h_c[1]->fill((D0.decaying()[ix].mom()-pim[ix].mom()).mass());
61 _h_c[2]->fill((D0.decaying()[ix].mom()-pip[ix].mom()).mass());
62 }
63 }
64 else if (D0.modeMatches(ix,4,mode2)) {
65 const Particles& pi0= D0.decayProducts()[ix].at( 111);
66 const Particle & pip= D0.decayProducts()[ix].at( sign*211)[0];
67 const Particle & pim= D0.decayProducts()[ix].at(-sign*211)[0];
68 double m00 = (pi0[0].mom()+pi0[1].mom()).mass();
69 if (m00>0.4376&&m00<5276) continue;
70 double mpm = (pip.mom()+pim.mom()).mass();
71 if (abs(mpm-.4976)<0.03) continue;
72 double mp0[2],mm0[2],mpm0[2];
73 bool veto=false;
74 for (unsigned int ix=0;ix<2;++ix) {
75 mp0[ix] = (pi0[ix].mom()+pip.mom()).mass();
76 mm0[ix] = (pi0[ix].mom()+pim.mom()).mass();
77 if (mm0[ix]>0.4677&&mm0[ix]<.5067) veto=true;
78 mpm0[ix] = (pi0[ix].mom()+pim.mom()+pip.mom()).mass();
79 if (mpm0[ix]<.57) veto=true;
80 }
81 if (veto) continue;
82 for (unsigned int ix=0;ix<2;++ix) {
83 _h_0[0]->fill(mpm0[ix]);
84 _h_0[5]->fill(mp0[ix]);
85 _h_0[6]->fill(mm0[ix]);
86 }
87 _h_0[1]->fill((pi0[0].mom()+pi0[1].mom()+pip.mom()).mass());
88 _h_0[2]->fill((pi0[0].mom()+pi0[1].mom()+pim.mom()).mass());
89 _h_0[3]->fill(mpm);
90 _h_0[4]->fill(m00);
91 }
92 }
93 }
94
95 /// Normalise histograms etc., after the run
96 void finalize() {
97 normalize(_h_c);
98 normalize(_h_0);
99 }
100 /// @}
101
102 /// @name Histograms
103 /// @{
104 Histo1DPtr _h_c[3],_h_0[7];
105 const map<PdgId,unsigned int> mode1 = { { 211,2}, { -211,2}};
106 const map<PdgId,unsigned int> mode2 = { { 111,2}, { 211,1}, { -211,1}};
107 /// @}
108
109 };
110
111
112 RIVET_DECLARE_PLUGIN(BESIII_2024_I2730532);
113
114}
|