Rivet analyses referenceARGUS_1990_I298245Electron and Muon spectra at the $\Upsilon(4S)$Experiment: ARGUS (DORIS) Inspire ID: 298245 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Electron and Muon spectra at the $\Upsilon(4S)$. The correct data were read from figure 3 in the paper. Source code: ARGUS_1990_I298245.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief ARGUS lepton spectra
9 class ARGUS_1990_I298245 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(ARGUS_1990_I298245);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projections
22 declare(UnstableParticles(),"UFS");
23 // histograms
24 for (unsigned int ix=0; ix<2; ++ix) {
25 book(_h[ix], 2,1,1+ix);
26 }
27 book(_c,"TMP/nb");
28 }
29
30
31 void findDecayProducts(const Particle& parent, Particles& ee, Particles& mu) {
32 for (const Particle& p : parent.children()) {
33 if (p.abspid() == PID::EMINUS) {
34 ee.push_back(p);
35 }
36 else if (p.abspid() == PID::MUON) {
37 mu.push_back(p);
38 }
39 else if (!p.children().empty()) {
40 findDecayProducts(p,ee,mu);
41 }
42 }
43 }
44
45 /// Perform the per-event analysis
46 void analyze(const Event& event) {
47 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
48 for (const Particle& p : ufs.particles(Cuts::pid==300553)) {
49 // boost to rest frame
50 LorentzTransform cms_boost;
51 if (p.p3().mod() > 1*MeV) {
52 cms_boost = LorentzTransform::mkFrameTransformFromBeta(p.mom().betaVec());
53 }
54 // loop over decay products
55 for (const Particle& p2 : p.children()) {
56 if (p2.abspid()==511 || p2.abspid()==521) {
57 _c->fill();
58 // find decay products
59 Particles leptons[2];
60 findDecayProducts(p2, leptons[0], leptons[1]);
61 for (unsigned int ix=0; ix<2; ++ix) {
62 for (const Particle& lep : leptons[ix]) {
63 FourMomentum pl = cms_boost.transform(lep.mom());
64 _h[ix]->fill(pl.p3().mod());
65 }
66 }
67 }
68 }
69 }
70 }
71
72
73 /// Normalise histograms etc., after the run
74 void finalize() {
75 scale(_h, 1.0/ *_c);
76 }
77
78 /// @}
79
80
81 /// @name Histograms
82 /// @{
83 Histo1DPtr _h[2];
84 CounterPtr _c;
85 /// @}
86
87
88 };
89
90
91 RIVET_DECLARE_PLUGIN(ARGUS_1990_I298245);
92
93}
|