Rivet analyses referenceMARKI_1976_I109792Charged particle momentum distributions for energies between 3.0 and 7.4 GeVExperiment: MARK-I (SPEAR) Inspire ID: 109792 Status: VALIDATED Authors:
Beams: e- e+ Beam energies: (1.5, 1.5); (2.4, 2.4); (2.9, 2.9); (3.1, 3.1); (3.3, 3.3); (3.5, 3.5); (3.7, 3.7) GeV Run details:
Charged particle momentum distributions for energies between 3.0 and 7.4 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: MARKI_1976_I109792.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Charged particle spectra between 3.0 and 7.4 GeV
9 class MARKI_1976_I109792 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(MARKI_1976_I109792);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 const ChargedFinalState fs;
22 declare(fs, "FS");
23 unsigned int iloc(0);
24 if(isCompatibleWithSqrtS(3.0*GeV))
25 iloc = 8;
26 else if(isCompatibleWithSqrtS(4.8*GeV))
27 iloc = 7;
28 else if(isCompatibleWithSqrtS(5.8*GeV))
29 iloc = 6;
30 else if(isCompatibleWithSqrtS(6.2*GeV))
31 iloc = 5;
32 else if(isCompatibleWithSqrtS(6.6*GeV))
33 iloc = 4;
34 else if(isCompatibleWithSqrtS(7.0*GeV))
35 iloc = 3;
36 else if(isCompatibleWithSqrtS(7.4*GeV))
37 iloc = 2;
38 else
39 MSG_ERROR("Beam energy incompatible with analysis.");
40 assert(iloc!=0);
41 book(_h_x, iloc ,1,1);
42 }
43
44
45 /// Perform the per-event analysis
46 void analyze(const Event& event) {
47 const ChargedFinalState& fs = apply<ChargedFinalState>(event, "FS");
48 if(fs.particles().size()==2 &&
49 abs(fs.particles()[0].pid())==13 &&
50 abs(fs.particles()[1].pid())==13) vetoEvent;
51 for (const Particle& p : fs.particles()) {
52 const Vector3 mom3 = p.p3();
53 double pp = mom3.mod();
54 double x = 2.*pp/sqrtS();
55 _h_x->fill(x);
56 }
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 scale(_h_x,crossSection()*sqr(sqrtS())/sumOfWeights()/microbarn);
63 }
64
65 /// @}
66
67
68 /// @name Histograms
69 /// @{
70 Histo1DPtr _h_x;
71 /// @}
72
73
74 };
75
76
77 RIVET_DECLARE_PLUGIN(MARKI_1976_I109792);
78
79
80}
|