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
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"
#include "Rivet/Tools/BinnedHistogram.hh"
namespace Rivet {
class LHCF_2012_I1115479 : public Analysis {
public:
LHCF_2012_I1115479()
: Analysis("LHCF_2012_I1115479")
{ }
public:
void init() {
declare(UnstableParticles(),"UFS");
{Histo1DPtr tmp; _binnedHistos_y_pT.add( 8.9, 9.0, book(tmp, 1, 1, 1));}
{Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.0, 9.2, book(tmp, 2, 1, 1));}
{Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.2, 9.4, book(tmp, 3, 1, 1));}
{Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.4, 9.6, book(tmp, 4, 1, 1));}
{Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.6, 10.0, book(tmp, 5, 1, 1));}
{Histo1DPtr tmp; _binnedHistos_y_pT.add(10.0, 11.0, book(tmp, 6, 1, 1));}
}
void analyze(const Event& event) {
const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
const double dphi = TWOPI;
for (const Particle& p : ufs.particles()) {
if (p.pid() == 111) {
double pT = p.pT();
double y = p.rapidity();
if (pT > 0.6*GeV) continue;
const double scaled_weight = 1.0/(dphi*pT/GeV);
_binnedHistos_y_pT.fill(y, pT/GeV, scaled_weight);
}
}
}
void finalize() {
_binnedHistos_y_pT.scale( 1./sumOfWeights() , this);
}
private:
BinnedHistogram _binnedHistos_y_pT;
};
// The hook for the plugin system
RIVET_DECLARE_PLUGIN(LHCF_2012_I1115479);
}
|