Rivet analyses referenceBESIII_2021_I1837968Mass distributions in $\Lambda_c^+\to p K^0_S \eta$Experiment: BESIII (BEPC) Inspire ID: 1837968 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the mass distributions in the decay $\Lambda_c^+\to p K^0_S \eta$ by BESIII. The data were read from the plots in the paper and may not have been corrected for efficiency/acceptance. Source code: BESIII_2021_I1837968.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 Lambda_c+ -> p K0S eta
10 class BESIII_2021_I1837968 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1837968);
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==4122);
24 declare(ufs, "UFS");
25 DecayedParticles LAMBDAC(ufs);
26 LAMBDAC.addStable(PID::PI0);
27 LAMBDAC.addStable(PID::K0S);
28 LAMBDAC.addStable(PID::ETA);
29 declare(LAMBDAC, "LAMBDAC");
30 // histograms
31 for(unsigned int ix=0;ix<3;++ix)
32 book(_h[ix],1,1,1+ix);
33 }
34
35
36 /// Perform the per-event analysis
37 void analyze(const Event& event) {
38 static const map<PdgId,unsigned int> & mode = { { PID::PROTON,1}, {310,1}, { 221,1}};
39 static const map<PdgId,unsigned int> & modeCC = { {-PID::PROTON,1}, {310,1}, { 221,1}};
40 DecayedParticles LAMBDAC = apply<DecayedParticles>(event, "LAMBDAC");
41 // loop over particles
42 for(unsigned int ix=0;ix<LAMBDAC.decaying().size();++ix) {
43 int sign = 1;
44 if (LAMBDAC.decaying()[ix].pid()>0 && LAMBDAC.modeMatches(ix,3,mode)) {
45 sign=1;
46 }
47 else if (LAMBDAC.decaying()[ix].pid()<0 && LAMBDAC.modeMatches(ix,3,modeCC)) {
48 sign=-1;
49 }
50 else
51 continue;
52 const Particle & pp = LAMBDAC.decayProducts()[ix].at( sign*PID::PROTON)[0];
53 const Particle & eta = LAMBDAC.decayProducts()[ix].at( 221)[0];
54 const Particle & K0 = LAMBDAC.decayProducts()[ix].at( 310)[0];
55 _h[0]->fill((pp.momentum()+ K0.momentum()).mass());
56 _h[1]->fill((K0.momentum()+eta.momentum()).mass());
57 _h[2]->fill((pp.momentum()+eta.momentum()).mass());
58 }
59 }
60
61
62 /// Normalise histograms etc., after the run
63 void finalize() {
64 for(unsigned int ix=0;ix<3;++ix)
65 normalize(_h[ix]);
66 }
67
68 /// @}
69
70
71 /// @name Histograms
72 /// @{
73 Histo1DPtr _h[3];
74 /// @}
75
76
77 };
78
79
80 RIVET_DECLARE_PLUGIN(BESIII_2021_I1837968);
81
82}
|