Rivet analyses referenceDELPHI_1995_I382285Forward-Backward Asymmetry for $K^\pm$ and $\Lambda^0$,$\bar\Lambda^0$ at LEP1Experiment: DELPHI (LEP) Inspire ID: 382285 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
Forward-Backward Asymmetry for $K^\pm$ and $\Lambda^0$,$\bar\Lambda^0$ at LEP1, the paper goes on to extract the strange quark asymmetry but this involves a lot of corrections and therefore only the $K^\pm$ and $\Lambda^0$,$\bar\Lambda^0$ are included Source code: DELPHI_1995_I382285.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6
7namespace Rivet {
8
9
10 /// @brief K+- Lambda asymmetries
11 class DELPHI_1995_I382285 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(DELPHI_1995_I382285);
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 declare(Beam(), "Beams");
26 declare(FinalState(), "FS");
27 declare(UnstableParticles(), "UFS");
28
29 // Book histograms
30 book(_h_Kp, "/TMP/cos_Kp",20,-1.,1.);
31 book(_h_Km, "/TMP/cos_Km",20,-1.,1.);
32 book(_h_lm, "/TMP/cos_lm",20,-1.,1.);
33 book(_h_lb, "/TMP/cos_lb",20,-1.,1.);
34
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40
41 // Get beams and average beam momentum
42 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
43 const double meanBeamMom = ( beams.first.p3().mod() +
44 beams.second.p3().mod() ) / 2.0;
45 Vector3 beamAxis;
46 if (beams.first.pid()==11) {
47 beamAxis = beams.first .momentum().p3().unit();
48 }
49 else {
50 beamAxis = beams.second.momentum().p3().unit();
51 }
52 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
53 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
54 for (const Particle & p : ufs.particles(Cuts::abspid==3122 || Cuts::abspid==321 )) {
55 double modp = p.momentum().p3().mod();
56 if (p.abspid()==321) {
57 if (modp<10. || modp>18.) continue;
58 const double cK = beamAxis.dot(p.momentum().p3().unit());
59 if (p.pid()>0) _h_Kp->fill(cK);
60 else _h_Km->fill(cK);
61 }
62 else {
63 if (modp<11.41 || modp>22.82) continue;
64 const double cLam = beamAxis.dot(p.momentum().p3().unit());
65 if (p.pid()>0) _h_lm->fill(cLam);
66 else _h_lb->fill(cLam);
67 }
68 }
69 }
70
71 pair<double,double> calcAsymmetry(const Estimate1DPtr& hist) {
72 double sum1(0.), sum2(0.);
73 for (const auto& bin : hist->bins()) {
74 double Oi = bin.val();
75 if (Oi==0.) continue;
76 const double bi = 4.*(bin.xMax()+bin.xMin())/(3.+sqr(bin.xMax())+bin.xMax()*bin.xMin()+sqr(bin.xMin()));
77 const double Ei = bin.errAvg();
78 sum1 += sqr(bi/Ei);
79 sum2 += bi/sqr(Ei)*Oi;
80 }
81 return make_pair(sum2/sum1,sqrt(1./sum1));
82 }
83
84 /// Normalise histograms etc., after the run
85 void finalize() {
86 normalize(_h_Kp);
87 normalize(_h_Km);
88 Estimate1DPtr sK;
89 book(sK,"a_K",20,-1.,1.);
90 asymm(_h_Kp,_h_Km,sK);
91 pair<double,double> alpha = calcAsymmetry(sK);
92 BinnedEstimatePtr<string> h_K;
93 book(h_K, 1,1,1);
94 h_K->bin(1).set(-alpha.first, alpha.second);
95
96 normalize(_h_lm);
97 normalize(_h_lb);
98 Estimate1DPtr sLam;
99 book(sLam,"a_Lam",20,-1.,1.);
100 asymm(_h_lm,_h_lb,sLam);
101 alpha = calcAsymmetry(sLam);
102 BinnedEstimatePtr<string> h_lam;
103 book(h_lam, 1, 1, 2);
104 h_lam->bin(1).set(alpha.first, alpha.second);
105 }
106
107 /// @}
108
109
110 /// @name Histograms
111 /// @{
112 Histo1DPtr _h_Kp,_h_Km,_h_lm,_h_lb;
113 const string Ecm = "91.2";
114 /// @}
115
116
117 };
118
119
120 RIVET_DECLARE_PLUGIN(DELPHI_1995_I382285);
121
122
123}
|