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
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// @brief psi(2S) -> J/psi pi+pi-
class MARKII_1979_I144382 : public Analysis {
public:
/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(MARKII_1979_I144382);
/// @name Analysis methods
///@{
/// Book histograms and initialise projections before the run
void init() {
// Initialise and register projections
declare(UnstableParticles(),"UFS");
book(_hist, 1, 1, 1);
}
void findDecayProducts(const Particle & mother,
unsigned int & nstable,
Particles& pip, Particles& pim,
Particles & onium) {
for(const Particle & p : mother.children()) {
int id = p.pid();
if ( id == PID::PIMINUS) {
pim.push_back(p);
++nstable;
}
else if (id == PID::PIPLUS) {
pip.push_back(p);
++nstable;
}
else if (id==443) {
onium.push_back(p);
++nstable;
}
else if ( !p.children().empty() ) {
findDecayProducts(p,nstable,pip,pim,onium);
}
else
++nstable;
}
}
/// Perform the per-event analysis
void analyze(const Event& event) {
// loop over unstable particles
for(const Particle& ups : apply<UnstableParticles>(event, "UFS").particles(Cuts::pid==100443)) {
unsigned int nstable(0);
Particles pip, pim, onium;
findDecayProducts(ups,nstable,pip,pim,onium);
// check for onium
if(onium.size() !=1 || nstable !=3 || pip.size()!=1 || pim.size() !=1 ) continue;
FourMomentum q = pip[0].momentum()+pim[0].momentum();
_hist->fill(q.mass2());
}
}
/// Normalise histograms etc., after the run
void finalize() {
normalize(_hist);
}
///@}
/// @name Histograms
///@{
Histo1DPtr _hist;
///@}
};
RIVET_DECLARE_PLUGIN(MARKII_1979_I144382);
}
|