[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed Jan 31 21:15:01 GMT 2018


details:   https://rivet.hepforge.org/hg/rivet/rev/abf5f9c42b50
branches:  release-2-6-x
changeset: 6229:abf5f9c42b50
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jan 31 21:08:16 2018 +0000
description:
Add partonic tops MC analysis

details:   https://rivet.hepforge.org/hg/rivet/rev/62b8c38c9f8d
branches:  release-2-6-x
changeset: 6230:62b8c38c9f8d
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jan 31 21:09:14 2018 +0000
description:
Add PartonicTops debug printout code (commented out)

diffs (truncated from 185 to 50 lines):

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/analyses/pluginMC/MC_PARTONICTOPS.cc	Wed Jan 31 21:09:14 2018 +0000
@@ -0,0 +1,96 @@
+// -*- C++ -*-
+#include "Rivet/Analysis.hh"
+#include "Rivet/Projections/PartonicTops.hh"
+
+namespace Rivet {
+
+
+  /// Find and plot partonic top properties (requires tops in event record)
+  class MC_PARTONICTOPS : public Analysis {
+  public:
+
+    /// Constructor
+    DEFAULT_RIVET_ANALYSIS_CTOR(MC_PARTONICTOPS);
+
+
+    /// @name Analysis methods
+    //@{
+
+    /// Book histograms and initialise projections before the run
+    void init() {
+
+      // Initialise and register projections
+      declare(PartonicTops(PartonicTops::ALL), "AllTops");
+      declare(PartonicTops(PartonicTops::E_MU), "LeptonicTops");
+      declare(PartonicTops(PartonicTops::HADRONIC), "HadronicTops");
+
+      // Book histograms
+      _h_tall_n  = bookHisto1D("t_all_n", linspace(5, -0.5, 4.5));
+      _h_tall_pt = bookHisto1D("t_all_pT", logspace(50, 1, 500));
+      _h_tall_y  = bookHisto1D("t_all_y", linspace(50, -5, 5));
+
+      _h_tlep_n  = bookHisto1D("t_lep_n", linspace(5, -0.5, 4.5));
+      _h_tlep_pt = bookHisto1D("t_lep_pT", logspace(50, 1, 500));
+      _h_tlep_y  = bookHisto1D("t_lep_y", linspace(50, -5, 5));
+
+      _h_thad_n  = bookHisto1D("t_had_n", linspace(5, -0.5, 4.5));
+      _h_thad_pt = bookHisto1D("t_had_pT", logspace(50, 1, 500));
+      _h_thad_y  = bookHisto1D("t_had_y", linspace(50, -5, 5));
+
+    }
+
+
+    /// Perform the per-event analysis
+    void analyze(const Event& event) {
+
+      const Particles& alltops = apply<PartonicTops>(event, "AllTops").particlesByPt();
+      _h_tall_n->fill(alltops.size(), event.weight());


More information about the Rivet-svn mailing list