Rivet analyses referenceMC_MUONSMonte Carlo validation observables for muon productionExperiment: () Status: VALIDATED Authors:
Beams: * * Beam energies: ANY
Any muons with $p_\perp > 0.5$ GeV are found and projected onto many different observables. To restrict attention to direct/prompt electrons only, use the DIRECT option. To use lepton dressing, use the DRESSED option; this only makes sense for prompt leptons, and is automatically activated if DIRECT=1 is used, hence the main use of DRESSED is to *disable* lepton dressing in DIRECT=1 mode. Source code: MC_MUONS.cc 1// -*- C++ -*-
2#include "Rivet/Analyses/MC_PARTICLES_BASE.hh"
3#include "Rivet/Projections/PromptFinalState.hh"
4#include "Rivet/Projections/LeptonFinder.hh"
5
6namespace Rivet {
7
8
9 /// @brief MC validation analysis for muons
10 class MC_MUONS : public MC_PARTICLES_BASE {
11 public:
12
13 MC_MUONS()
14 : MC_PARTICLES_BASE("MC_MUONS", 2, "muon")
15 { }
16
17
18 void init() {
19 const bool direct = getOption<bool>("DIRECT", false);
20 const bool dressed = getOption<bool>("DRESSED", direct);
21 MSG_DEBUG("Direct-only: " << direct << ", dressed: " << dressed);
22 FinalState muons(Cuts::abspid == PID::MUON);
23 if (!direct) {
24 declare(muons, "Muons");
25 } else if (!dressed) {
26 declare(PromptFinalState(muons), "Muons");
27 } else {
28 LeptonFinder dleps(muons, FinalState(Cuts::abspid == PID::PHOTON), 0.1);
29 declare(dleps, "Muons");
30 }
31
32 MC_PARTICLES_BASE::init();
33 }
34
35
36 void analyze(const Event& event) {
37 const Particles mus = apply<ParticleFinder>(event, "Muons").particlesByPt(Cuts::pT > 0.5*GeV);
38 MC_PARTICLES_BASE::_analyze(event, mus);
39 }
40
41
42 void finalize() {
43 MC_PARTICLES_BASE::finalize();
44 }
45
46 };
47
48
49 RIVET_DECLARE_PLUGIN(MC_MUONS);
50
51}
|