Rivet analyses referenceGAMMAGAMMA_1981_I158474Multi pion cross sections for energies between 1.44 and 2.15 GeVExperiment: GAMMAGAMMA (ADONE) Inspire ID: 158474 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to$pions for energies between 1.44 and 2.15 GeV Source code: GAMMAGAMMA_1981_I158474.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- > hadrons
9 class GAMMAGAMMA_1981_I158474 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(GAMMAGAMMA_1981_I158474);
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(FinalState(), "FS");
23 for(unsigned int ix=0;ix<6;++ix)
24 book(_h[ix],"TMP/h_"+toString(ix+1),refData(1,1,1+ix));
25 for(unsigned int ix=6;ix<9;++ix)
26 book(_h[ix],"TMP/h_"+toString(ix+1),refData(2,1,1));
27 }
28
29
30 /// Perform the per-event analysis
31 void analyze(const Event& event) {
32 const FinalState& fs = apply<FinalState>(event, "FS");
33
34 map<long,int> nCount;
35 int ntotal(0);
36 for (const Particle& p : fs.particles()) {
37 nCount[p.pid()] += 1;
38 ++ntotal;
39 }
40 // mu+mu- + photons
41 if(nCount[-13]==1 and nCount[13]==1 &&
42 ntotal==2+nCount[22])
43 _h[8]->fill(sqrtS());
44 else {
45 if(ntotal==3 && nCount[211] == 1 && nCount[-211]==1 && nCount[111]==1 ) {
46 _h[0]->fill(sqrtS());
47 }
48 if(ntotal==4 && nCount[211] == 1 && nCount[-211]==1 && nCount[111]==2 ) {
49 _h[1]->fill(sqrtS());
50 }
51 if(ntotal==5 && nCount[211] == 2 && nCount[-211]==2 && nCount[111]==1 ) {
52 _h[2]->fill(sqrtS());
53 }
54 if(ntotal==6 && nCount[211] == 2 && nCount[-211]==2 && nCount[111]==2 ) {
55 _h[3]->fill(sqrtS());
56 }
57 if(nCount[211] == 1 && nCount[-211]==1 && ntotal == 2+nCount[111]) {
58 _h[6]->fill(sqrtS());
59 }
60 if(nCount[211] == 2 && nCount[-211]==2 && ntotal == 4+nCount[111]) {
61 _h[7]->fill(sqrtS());
62 }
63 if((nCount[211]+nCount[-211]+nCount[111])==ntotal ) {
64 if(ntotal==3 || ntotal ==5)
65 _h[4]->fill(sqrtS());
66 else if(ntotal==4 || ntotal==6)
67 _h[5] ->fill(sqrtS());
68 }
69 }
70 }
71
72
73 /// Normalise histograms etc., after the run
74 void finalize() {
75 double fact = crossSection()/ sumOfWeights() /nanobarn;
76 for(unsigned int ix=0;ix<9;++ix) {
77 scale(_h[ix],fact);
78 if(ix>=6) continue;
79 Estimate1DPtr tmp;
80 book(tmp,1,1,1+ix);
81 barchart(_h[ix],tmp);
82 }
83 Estimate1DPtr tmp;
84 book(tmp,2,1,1);
85 divide(_h[6],_h[8],tmp);
86 book(tmp,2,1,2);
87 divide(_h[7],_h[8],tmp);
88 }
89
90 /// @}
91
92
93 /// @name Histograms
94 /// @{
95 Histo1DPtr _h[9];
96 /// @}
97
98
99 };
100
101
102 RIVET_DECLARE_PLUGIN(GAMMAGAMMA_1981_I158474);
103
104
105}
|