Rivet analyses referenceTASSO_1980_I143691Charged Particle distributions between 13 and 31.6 GeVExperiment: TASSO (Petra) Inspire ID: 143691 Status: VALIDATED Authors:
Beam energies: (6.5, 6.5); (8.5, 8.5); (11.0, 11.0); (13.8, 13.8); (15.2, 15.2); (15.6, 15.6) GeV Run details:
Measurement of charged particle multiplicity, rapidity and scaled momentum distributions for a range of energies between 13 and 31.6 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: TASSO_1980_I143691.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5#include "Rivet/Projections/Thrust.hh"
6
7namespace Rivet {
8
9
10 /// @brief Charged particle multiplicities and distributions
11 class TASSO_1980_I143691 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1980_I143691);
16
17
18 /// @name Analysis methods
19 //@{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23
24 // Initialise and register projections
25 ChargedFinalState cfs;
26 declare(cfs, "CFS");
27 declare(Thrust(cfs), "Thrust");
28
29
30 // Book histograms
31 book(_mult, "/TMP/mult");
32 unsigned int iloc(0);
33 sqs = 1.0;
34 if(isCompatibleWithSqrtS(13)) {
35 iloc = 1;
36 sqs = 13.0;
37 }
38 else if(isCompatibleWithSqrtS(17)) {
39 iloc = 2;
40 sqs = 17.0;
41 }
42 else if (isCompatibleWithSqrtS(22)) {
43 iloc = 2;
44 sqs = 22.;
45 }
46 else if(isCompatibleWithSqrtS(27.6)) {
47 iloc = 3;
48 sqs = 27.6;
49 }
50 else if (isCompatibleWithSqrtS(30.3)) {
51 iloc = 3;
52 sqs = 30.3;
53 }
54 else if (isCompatibleWithSqrtS(31.2)) {
55 iloc = 3;
56 sqs = 31.2;
57 }
58 else
59 MSG_ERROR("Beam energy not supported!");
60
61 book(_h_rap,iloc+1,1,1);
62 book(_h_x ,iloc+4,1,1);
63 }
64
65
66 /// Perform the per-event analysis
67 void analyze(const Event& event) {
68 const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
69 // thrust
70 const Thrust& thrust = apply<Thrust>(event, "Thrust");
71 Vector3 axis=thrust.thrustAxis();
72 for (const Particle& p : cfs.particles()) {
73 const Vector3 mom3 = p.p3();
74 double pp = mom3.mod();
75 double xP = 2.*pp/sqs;
76 _h_x->fill(xP);
77 const double mom = dot(axis, mom3);
78 const double rap = 0.5 * log((p.E() + mom) /
79 (p.E() - mom));
80 _h_rap->fill(fabs(rap));
81 _mult->fill();
82 }
83 }
84
85
86 /// Normalise histograms etc., after the run
87 void finalize() {
88
89 scale(_h_rap, 1./sumOfWeights());
90 scale(_h_x , crossSection()*sqr(sqs)/sumOfWeights()/microbarn);
91
92 scale(_mult,1./sumOfWeights());
93
94 Scatter2D temphisto(refData(1, 1, 1));
95 Scatter2DPtr mult;
96 book(mult,1, 1, 1);
97 for (size_t b = 0; b < temphisto.numPoints(); b++) {
98 const double x = temphisto.point(b).x();
99 pair<double,double> ex = temphisto.point(b).xErrs();
100 pair<double,double> ex2 = ex;
101 if(ex2.first ==0.) ex2. first=0.2;
102 if(ex2.second==0.) ex2.second=0.2;
103 if (inRange(sqs, x-ex2.first, x+ex2.second)) {
104 mult ->addPoint(x, _mult->val(), ex, make_pair(_mult->err(), _mult->err()));
105 }
106 else {
107 mult ->addPoint(x, 0., ex, make_pair(0.,.0));
108 }
109 }
110 }
111
112 //@}
113
114
115 /// @name Histograms
116 //@{
117 Histo1DPtr _h_rap, _h_x;
118 CounterPtr _mult;
119 double sqs;
120 //@}
121
122
123 };
124
125
126 // The hook for the plugin system
127 RIVET_DECLARE_PLUGIN(TASSO_1980_I143691);
128
129
130}
|