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: ANY 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 double cK = beamAxis.dot(p.momentum().p3().unit());
59 if(p.pid()>0)
60 _h_Kp->fill(cK);
61 else
62 _h_Km->fill(cK);
63 }
64 else {
65 if(modp<11.41 || modp>22.82) continue;
66 double cLam = beamAxis.dot(p.momentum().p3().unit());
67 if(p.pid()>0)
68 _h_lm->fill(cLam);
69 else
70 _h_lb->fill(cLam);
71 }
72 }
73 }
74
75 pair<double,double> calcAsymmetry(Scatter2DPtr hist) {
76 double sum1(0.),sum2(0.);
77 for (auto bin : hist->points() ) {
78 double Oi = bin.y();
79 if(Oi==0.) continue;
80 double bi = 4.*(bin.xMax()+bin.xMin())/(3.+sqr(bin.xMax())+bin.xMax()*bin.xMin()+sqr(bin.xMin()));
81 double Ei = bin.yErrAvg();
82 sum1 += sqr(bi/Ei);
83 sum2 += bi/sqr(Ei)*Oi;
84 }
85 return make_pair(sum2/sum1,sqrt(1./sum1));
86 }
87
88 /// Normalise histograms etc., after the run
89 void finalize() {
90 normalize(_h_Kp);
91 normalize(_h_Km);
92 Scatter2DPtr sK;
93 book(sK,"a_K");
94 asymm(_h_Kp,_h_Km,sK);
95 pair<double,double> alpha = calcAsymmetry(sK);
96 Scatter2DPtr h_K;
97 book(h_K, 1,1,1);
98 h_K->addPoint(91.2, -alpha.first, make_pair(0.5,0.5),
99 make_pair(alpha.second,alpha.second) );
100
101 normalize(_h_lm);
102 normalize(_h_lb);
103 Scatter2DPtr sLam;
104 book(sLam,"a_Lam");
105 asymm(_h_lm,_h_lb,sLam);
106 alpha = calcAsymmetry(sLam);
107 Scatter2DPtr h_lam;
108 book(h_lam, 1,1,2);
109 h_lam->addPoint(91.2, alpha.first, make_pair(0.5,0.5),
110 make_pair(alpha.second,alpha.second) );
111 }
112
113 //@}
114
115
116 /// @name Histograms
117 //@{
118 Histo1DPtr _h_Kp,_h_Km,_h_lm,_h_lb;
119 //@}
120
121
122 };
123
124
125 // The hook for the plugin system
126 RIVET_DECLARE_PLUGIN(DELPHI_1995_I382285);
127
128
129}
|