Rivet analyses

Monte Carlo validation observables for muon production

Experiment: ()

Status: VALIDATED

Authors: - Andy Buckley

References: none listed

Beams: * *

Beam energies: ANY

Run details: none listed

Any muons with p > 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

// -*- C++ -*-
#include "Rivet/Analyses/MC_PARTICLES_BASE.hh"
#include "Rivet/Projections/PromptFinalState.hh"
#include "Rivet/Projections/LeptonFinder.hh"

namespace Rivet {


  /// @brief MC validation analysis for muons
  class MC_MUONS : public MC_PARTICLES_BASE {
  public:

    MC_MUONS()
      : MC_PARTICLES_BASE("MC_MUONS", 2, "muon")
    {    }


    void init() {
      const bool direct = getOption<bool>("DIRECT", false);
      const bool dressed = getOption<bool>("DRESSED", direct);
      MSG_DEBUG("Direct-only: " << direct << ", dressed: " << dressed);
      FinalState muons(Cuts::abspid == PID::MUON);
      if (!direct) {
        declare(muons, "Muons");
      } else if (!dressed) {
        declare(PromptFinalState(muons), "Muons");
      } else {
        LeptonFinder dleps(muons, FinalState(Cuts::abspid == PID::PHOTON), 0.1);
        declare(dleps, "Muons");
      }

      MC_PARTICLES_BASE::init();
    }


    void analyze(const Event& event) {
      const Particles mus = apply<ParticleFinder>(event, "Muons").particlesByPt(Cuts::pT > 0.5*GeV);
      MC_PARTICLES_BASE::_analyze(event, mus);
    }


    void finalize() {
      MC_PARTICLES_BASE::finalize();
    }

  };


  RIVET_DECLARE_PLUGIN(MC_MUONS);

}