rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_JETTAGS

Monte Carlo validation analysis for ideal heavy flavour tagging observables
Experiment: ()
Status: VALIDATED
Authors:
  • Andy Buckley
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Run any events which will produce jets above 20 GeV. Of most interest for processes where c and b hadrons can be produced (either hard or soft) of course!

Plots to study theoretical tagging of heavy flavour hadrons in jets.

Source code: MC_JETTAGS.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4#include "Rivet/Projections/FastJets.hh"
 5
 6namespace Rivet {
 7
 8
 9
10  /// @brief MC validation analysis for jet events
11  class MC_JETTAGS : public Analysis {
12  public:
13
14    MC_JETTAGS()
15      : Analysis("MC_JETTAGS")
16    {    }
17
18
19    void init() {
20      FinalState fs;
21      declare(FastJets(fs, FastJets::ANTIKT, 0.4), "Jets04");
22      declare(FastJets(fs, FastJets::ANTIKT, 0.6), "Jets06");
23
24      book(_h_numBTagsPerJet[0] ,"numBTagsPer04Jet", 5, -0.5, 4.5);
25      book(_h_numBTagsPerJet[1] ,"numBTagsPer06Jet", 5, -0.5, 4.5);
26      book(_h_numCTagsPerJet[0] ,"numCTagsPer04Jet", 5, -0.5, 4.5);
27      book(_h_numCTagsPerJet[1] ,"numCTagsPer06Jet", 5, -0.5, 4.5);
28      book(_h_numTauTagsPerJet[0] ,"numTauTagsPer04Jet", 5, -0.5, 4.5);
29      book(_h_numTauTagsPerJet[1] ,"numTauTagsPer06Jet", 5, -0.5, 4.5);
30    }
31
32
33    void analyze(const Event& event) {
34      const double weight = 1.0;
35
36      const Jets jets04 = apply<FastJets>(event, "Jets04").jetsByPt(20*GeV);
37      const Jets jets06 = apply<FastJets>(event, "Jets06").jetsByPt(20*GeV);
38
39      for (const Jet& j : jets04) {
40        _h_numBTagsPerJet[0]->fill(j.bTags().size(), weight);
41        _h_numCTagsPerJet[0]->fill(j.cTags().size(), weight);
42        _h_numTauTagsPerJet[0]->fill(j.tauTags().size(), weight);
43      }
44      for (const Jet& j : jets06) {
45        _h_numBTagsPerJet[1]->fill(j.bTags().size(), weight);
46        _h_numCTagsPerJet[1]->fill(j.cTags().size(), weight);
47        _h_numTauTagsPerJet[1]->fill(j.tauTags().size(), weight);
48      }
49    }
50
51
52    void finalize() {
53      for (size_t i = 0; i < 2; ++i) {
54        normalize(_h_numBTagsPerJet[i]);
55        normalize(_h_numCTagsPerJet[i]);
56        normalize(_h_numTauTagsPerJet[i]);
57      }
58    }
59
60
61  private:
62
63    Histo1DPtr _h_numBTagsPerJet[2], _h_numCTagsPerJet[2], _h_numTauTagsPerJet[2];
64
65  };
66
67
68  // The hook for the plugin system
69  RIVET_DECLARE_PLUGIN(MC_JETTAGS);
70
71}