Rivet analyses referenceBELLE_2019_I1718551Cross sections for $\pi^\pm$, $K^\pm$ and $p\bar{p}$ as functions of $z$ and $p_\perp$ at $E_{\text{cms}}=10.58$ GeVExperiment: BELLE (KEKB) Inspire ID: 1718551 Status: VALIDATED Authors:
Beam energies: (5.3, 5.3) GeV Run details:
Cross sections for $\pi^\pm$, $K^\pm$ and $p\bar{p}$ as functions of $z$ and $p_\perp$ at $E_{\text{cms}}=10.58$ GeV Source code: BELLE_2019_I1718551.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/Thrust.hh"
5#include "Rivet/Projections/Beam.hh"
6
7namespace Rivet {
8
9
10 /// @brief pi, kaon and proton spectra at 10.58 GeV
11 class BELLE_2019_I1718551 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2019_I1718551);
16
17
18 /// @name Analysis methods
19 //@{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 // projections
24 const FinalState fs;
25 declare(fs, "FS");
26 declare(Thrust(fs),"Thrust");
27 declare(Beam(), "Beams");
28
29 for(unsigned int ix=0;ix<6;++ix) {
30 double xmin=0.05;
31 for(unsigned int iy=0;iy<18;++iy) {
32 xmin+=0.05;
33 // pions
34 if(ix==0&&iy>15) continue;
35 Histo1DPtr temp1;
36 book(temp1,1,ix+1,iy+1);
37 _pion[ix].add(xmin,xmin+0.05,temp1);
38 // kaons
39 Histo1DPtr temp2;
40 book(temp2,2,ix+1,iy+1);
41 _kaon[ix].add(xmin,xmin+0.05,temp2);
42 if(iy>15 || (iy>14&&ix<3) || (iy>11&&ix==0)) continue;
43 // protons
44 Histo1DPtr temp3;
45 book(temp3,3,ix+1,iy+1);
46 _proton[ix].add(xmin,xmin+0.05,temp3);
47 }
48 }
49 }
50
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 // Get beams and average beam momentum
55 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
56 const double meanBeamMom = ( beams.first.p3().mod() +
57 beams.second.p3().mod() ) / 2.0;
58 // get the thrust
59 const double tbins[6]={0.7,0.8,0.85,0.9,0.95,1.0};
60 const Thrust& thrust = apply<Thrust>(event, "Thrust");
61 // find the thrust bin
62 unsigned int ithrust=0;
63 for(;ithrust<6;++ithrust)
64 if(thrust.thrust()<=tbins[ithrust]) break;
65 Vector3 a1 = thrust.thrustMajorAxis();
66 Vector3 a2 = thrust.thrustMinorAxis();
67 // loop over the charged hadrons
68 const FinalState & fs = apply<FinalState>(event, "FS");
69 for(const Particle & charged : fs.particles(Cuts::abspid==211 or
70 Cuts::abspid==321 or
71 Cuts::abspid==2212)) {
72 double xE = charged.momentum().t()/meanBeamMom;
73 double pT = sqrt(sqr(a1.dot(charged.momentum().p3()))+
74 sqr(a2.dot(charged.momentum().p3())));
75 if(charged.abspid()==211)
76 _pion [ithrust].fill(xE,pT);
77 else if(charged.abspid()==321)
78 _kaon [ithrust].fill(xE,pT);
79 else if(charged.abspid()==2212)
80 _proton[ithrust].fill(xE,pT);
81 }
82 }
83
84
85 /// Normalise histograms etc., after the run
86 void finalize() {
87 // scale factor including bin width in x_E
88 double fact = crossSection()/femtobarn/sumOfWeights()/0.05;
89 for(unsigned int ix=0;ix<6;++ix) {
90 for(Histo1DPtr histo : _pion [ix].histos()) scale(histo,fact);
91 for(Histo1DPtr histo : _kaon [ix].histos()) scale(histo,fact);
92 for(Histo1DPtr histo : _proton[ix].histos()) scale(histo,fact);
93 }
94 }
95
96 //@}
97
98
99 /// @name Histograms
100 //@{
101 BinnedHistogram _pion[6],_kaon[6],_proton[6];
102 //@}
103
104
105 };
106
107
108 RIVET_DECLARE_PLUGIN(BELLE_2019_I1718551);
109
110}
|