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
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/FastJets.hh"

namespace Rivet {



  /// @brief MC validation analysis for jet events
  class MC_JETTAGS : public Analysis {
  public:

    MC_JETTAGS()
      : Analysis("MC_JETTAGS")
    {    }


    void init() {
      FinalState fs;
      declare(FastJets(fs, FastJets::ANTIKT, 0.4), "Jets04");
      declare(FastJets(fs, FastJets::ANTIKT, 0.6), "Jets06");

      book(_h_numBTagsPerJet[0] ,"numBTagsPer04Jet", 5, -0.5, 4.5);
      book(_h_numBTagsPerJet[1] ,"numBTagsPer06Jet", 5, -0.5, 4.5);
      book(_h_numCTagsPerJet[0] ,"numCTagsPer04Jet", 5, -0.5, 4.5);
      book(_h_numCTagsPerJet[1] ,"numCTagsPer06Jet", 5, -0.5, 4.5);
      book(_h_numTauTagsPerJet[0] ,"numTauTagsPer04Jet", 5, -0.5, 4.5);
      book(_h_numTauTagsPerJet[1] ,"numTauTagsPer06Jet", 5, -0.5, 4.5);
    }


    void analyze(const Event& event) {
      const double weight = 1.0;

      const Jets jets04 = apply<FastJets>(event, "Jets04").jetsByPt(20*GeV);
      const Jets jets06 = apply<FastJets>(event, "Jets06").jetsByPt(20*GeV);

      for (const Jet& j : jets04) {
        _h_numBTagsPerJet[0]->fill(j.bTags().size(), weight);
        _h_numCTagsPerJet[0]->fill(j.cTags().size(), weight);
        _h_numTauTagsPerJet[0]->fill(j.tauTags().size(), weight);
      }
      for (const Jet& j : jets06) {
        _h_numBTagsPerJet[1]->fill(j.bTags().size(), weight);
        _h_numCTagsPerJet[1]->fill(j.cTags().size(), weight);
        _h_numTauTagsPerJet[1]->fill(j.tauTags().size(), weight);
      }
    }


    void finalize() {
      for (size_t i = 0; i < 2; ++i) {
        normalize(_h_numBTagsPerJet[i]);
        normalize(_h_numCTagsPerJet[i]);
        normalize(_h_numTauTagsPerJet[i]);
      }
    }


  private:

    Histo1DPtr _h_numBTagsPerJet[2], _h_numCTagsPerJet[2], _h_numTauTagsPerJet[2];

  };


  // The hook for the plugin system
  RIVET_DECLARE_PLUGIN(MC_JETTAGS);

}