Rivet analyses referenceBESIII_2020_I1800404Charged particle multiplicity distributions in $J/\psi$ and $\chi_{c0,1,2}$ decaysExperiment: BESIII (BEPC) Inspire ID: 1800404 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the charged particle multiplicity distributions in $J/\psi$ and $\chi_{c0,1,2}$ decays by the BES collaboration. Source code: BESIII_2020_I1800404.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief J/Psi chi_c charged particle multiplicities
9 class BESIII_2020_I1800404 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2020_I1800404);
14
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 declare(UnstableParticles(Cuts::pid==443 or Cuts::pid==445 or Cuts::pid==10441 or Cuts::pid==20443),"UFS");
23 // histograms
24 book(_h_chi0,1,1,1);
25 book(_h_chi1,1,1,2);
26 book(_h_chi2,1,1,3);
27 book(_h_jpsi[0],2,1,1);
28 book(_h_jpsi[1],2,1,2);
29 }
30
31 void findChildren(const Particle & p, int & nCharged) {
32 for( const Particle &child : p.children()) {
33 if(child.children().empty()) {
34 if(PID::isCharged(child.pid())) ++nCharged;
35 }
36 else
37 findChildren(child,nCharged);
38 }
39 }
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 // loop over particles
44 for( const Particle & p : apply<UnstableParticles>(event, "UFS").particles()) {
45 // skip radiative modes
46 if(p.children().size()==2) {
47 if(p.children()[0].pid()==PID::GAMMA) {
48 if(p.children()[1].pid()==PID::GAMMA ||
49 p.children()[1].pid()==PID::JPSI) continue;
50 }
51 if(p.children()[1].pid()==PID::GAMMA) {
52 if(p.children()[0].pid()==PID::GAMMA ||
53 p.children()[0].pid()==PID::JPSI) continue;
54 }
55 }
56 // get the charged particle multiplicity
57 int nCharged(0);
58 findChildren(p,nCharged);
59 if(p.pid()==PID::JPSI) {
60 _h_jpsi[0]->fill(nCharged);
61 _h_jpsi[1]->fill(nCharged);
62 }
63 else if(p.pid()==10441)
64 _h_chi0->fill(nCharged);
65 else if(p.pid()==20443)
66 _h_chi1->fill(nCharged);
67 else if(p.pid()==445)
68 _h_chi2->fill(nCharged);
69 }
70 }
71
72
73 /// Normalise histograms etc., after the run
74 void finalize() {
75 // percentage and bin width
76 normalize(_h_jpsi[0],200.);
77 normalize(_h_jpsi[1],200.);
78 normalize(_h_chi0 ,200.);
79 normalize(_h_chi1 ,200.);
80 normalize(_h_chi2 ,200.);
81 }
82
83 /// @}
84
85
86 /// @name Histograms
87 /// @{
88 Histo1DPtr _h_jpsi[2],_h_chi0,_h_chi1,_h_chi2;
89 /// @}
90
91 };
92
93
94 RIVET_DECLARE_PLUGIN(BESIII_2020_I1800404);
95
96}
|