Rivet analyses referenceBESIII_2015_I1329785Cross section for $e^+e^-\to \gamma\chi_{c(0,1,2)}$ at energies between 4.009 and 4.36 GeVExperiment: BESIII (BEPC) Inspire ID: 1329785 Status: VALIDATED Authors:
Beam energies: (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2) GeV Run details:
Measurement of the cross section for $e^+e^-\to \gamma\chi_{c(0,1,2)}$ at energies between 4.009 and 4.36 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2015_I1329785.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief Cross section for $e^+e^-\to \gamma\chi_{c(0,1,2)}$ at energies between 4.009 and 4.36 GeV
10 class BESIII_2015_I1329785 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1329785);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(FinalState(), "FS");
23 declare(UnstableParticles(), "UFS");
24 book(_nChi0, 1, 1, 8);
25 book(_nChi1, 2, 1, 8);
26 book(_nChi2, 3, 1, 8);
27 for (const string& en : _nChi0.binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
35 }
36
37 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
38 for( const Particle &child : p.children()) {
39 if(child.children().empty()) {
40 --nRes[child.pid()];
41 --ncount;
42 }
43 else
44 findChildren(child,nRes,ncount);
45 }
46 }
47
48 /// Perform the per-event analysis
49 void analyze(const Event& event) {
50 const FinalState& fs = apply<FinalState>(event, "FS");
51 map<long,int> nCount;
52 int ntotal(0);
53 for (const Particle& p : fs.particles()) {
54 nCount[p.pid()] += 1;
55 ++ntotal;
56 }
57 const FinalState& ufs = apply<FinalState>(event, "UFS");
58 for (const Particle& p : ufs.particles(Cuts::pid==10441 or Cuts::pid==20443 or Cuts::pid==445)) {
59 if(p.children().empty()) continue;
60 map<long,int> nRes = nCount;
61 int ncount = ntotal;
62 findChildren(p,nRes,ncount);
63 // chi gamma
64 if(ncount!=1) continue;
65 bool matched = true;
66 for(auto const & val : nRes) {
67 if(val.first==22) {
68 if(val.second !=1) {
69 matched = false;
70 break;
71 }
72 }
73 else if(val.second!=0) {
74 matched = false;
75 break;
76 }
77 }
78 if(matched) {
79 if(p.pid()==10441)
80 _nChi0->fill(_ecms);
81 else if(p.pid()==20443)
82 _nChi1->fill(_ecms);
83 else if(p.pid()==445)
84 _nChi2->fill(_ecms);
85 break;
86 }
87 }
88 }
89
90
91 /// Normalise histograms etc., after the run
92 void finalize() {
93 double fact = crossSection()/ sumOfWeights() /picobarn;
94 scale(_nChi0,fact);
95 scale(_nChi1,fact);
96 scale(_nChi2,fact);
97 }
98 /// @}
99
100 /// @name Histograms
101 /// @{
102 BinnedHistoPtr<string> _nChi0,_nChi1,_nChi2;
103 string _ecms;
104 /// @}
105
106 };
107
108
109 RIVET_DECLARE_PLUGIN(BESIII_2015_I1329785);
110
111
112}
|