1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// @brief b-baryon polarization
class OPAL_1998_I474012 : public Analysis {
public:
/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1998_I474012);
/// @name Analysis methods
//@{
/// Book histograms and initialise projections before the run
void init() {
// Initialise and register projections
declare(UnstableParticles(), "UFS");
// Book histograms
book(_h_El , "El", 45,0.,45.0);
book(_h_Ev , "Ev", 45,0.,45.0);
book(_h_ratio, "ratio",20,0.,10.0);
}
void findDecayProducts(Particle p, Particles & lep, Particles & nu) {
for(const Particle & child : p.children()) {
if(PID::isHadron(child.pid())) continue;
if(child.abspid()==11 or child.abspid()==13)
lep.push_back(child);
else if(child.abspid()==12 or child.abspid()==14)
nu.push_back(child);
else if(child.abspid()!=15)
findDecayProducts(child,lep,nu);
}
}
/// Perform the per-event analysis
void analyze(const Event& event) {
const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
// loop over weakly decaying b-baryons
for (const Particle& p : ufs.particles(Cuts::abspid==5122)) {
Particles lep,nu;
findDecayProducts(p,lep,nu);
if(lep.size()!=1 || nu.size()!=1) continue;
_h_El ->fill(lep[0].momentum().t());
_h_Ev ->fill(nu [0].momentum().t());
_h_ratio->fill(nu [0].momentum().t()/lep[0].momentum().t());
}
}
/// Normalise histograms etc., after the run
void finalize() {
normalize(_h_El );
normalize(_h_Ev );
normalize(_h_ratio);
if(_h_El->effNumEntries()!=0. and _h_Ev->effNumEntries()!=0.) {
double Ev = _h_Ev->xMean();
double El = _h_El->xMean();
double dEv = _h_Ev->xStdErr();
double dEl = _h_El->xStdErr();
double ratio = Ev/El;
double dr = (El*dEv-Ev*dEl)/sqr(El);
double rho = 0.091;
double P = 7. - 20./(2. + ratio) + 10.*rho*ratio*(-4. + 3.*ratio)/sqr(2.+ratio);
double dP = (20.*(2. + ratio + rho*(-4. + 8.*ratio)))/pow(2.+ratio,3)*dr;
Scatter2DPtr h_pol;
book(h_pol, 1,1,1);
h_pol->addPoint(91.2, P, make_pair(0.5,0.5),make_pair(dP,dP) );
}
}
//@}
/// @name Histograms
//@{
Histo1DPtr _h_El, _h_Ev, _h_ratio;
//@}
};
// The hook for the plugin system
RIVET_DECLARE_PLUGIN(OPAL_1998_I474012);
}
|