Analysis.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "boca/fastjet/Vector.hh"
6 
12 namespace tthh
13 {
14 
15 using namespace boca::units;
16 
17 template<typename Tagger_>
18 class Analysis : public boca::Analysis<Tagger_>
19 {
20 
21 public:
22 
23  void SetFiles(boca::Phase const &phase) override
24  {
25  switch (phase.Tag()) {
26  case boca::Tag::signal :
27  this->AddSignal("lambda0-n1", "\\lambda_{0} n_{1}");
28 // this->AddSignal("lambda0-n1-isol", "\\lambda_{0} n_{1} (isol)");
29  break;
31  this->AddBackground("tt_inc-100TeV", "tt_{inc}");
32  this->AddBackground("tttt_100TeV", "tttt");
33  this->AddBackground("tttwb_100TeV", "tttW^{\\pm}b");
34  this->AddBackground("ttwbb_100TeV", "ttW^{\\pm}bb");
35  break;
36  }
37  }
38 
39  long TrainNumberMax() const override
40  {
41  return 1000;
42  }
43 
44  std::string Name() const override
45  {
46  return "larger";
47  }
48 
49  bool PassPreCut(boca::Event const &event) const override
50  {
51  auto number_hard_leptons = CountIfHard(event.Leptons(), 20_GeV);
52  return number_hard_leptons >= 2 ? true : false;
53  return true;
54  static auto ievent = 0;
55  ++ievent;
56  static auto two_leptons = 0;
57  if (number_hard_leptons >= 1) {
58  ++two_leptons;
59  auto fraction = static_cast<double>(two_leptons) / ievent;
60  ERROR(two_leptons, ievent, fraction);
61  return true;
62  };
63  return false;
64 
65 
66  auto number_hard_jets = CountIfHard(event.Jets(), 20_GeV);
67  auto number_hard_photons = CountIfHard(event.Photons(), 20_GeV);
68  return number_hard_jets >= 2 && number_hard_photons >= 2 ? true : false;
69  }
70 
71 };
72 
73 }
#define ERROR(...)
Definition: DEBUG_MACROS.hh:74
long TrainNumberMax() const override
Definition: Analysis.hh:39
bool PassPreCut(boca::Event const &event) const override
Definition: Analysis.hh:49
Base class for the event Topology.
Definition: Event.hh:53
provides main analysis loops and logic.
Definition: Analysis.hh:29
Higgs coupling.
Definition: Global.cpp:8
Units.
Definition: Barn.hh:14
std::vector< Jet > Jets() const
Jets.
Definition: Event.cpp:116
void SetFiles(boca::Phase const &phase) override
Definition: Analysis.hh:23
std::string Name() const override
Definition: Analysis.hh:44
int CountIfHard(std::vector< Multiplet_ > multiplets, Momentum const &pt_min)
Definition: Vector.hh:60
std::vector< Lepton > Leptons() const
Electrons and muons.
Definition: Event.cpp:82
The phases of the multivariant tagging process.
Definition: Phase.hh:16
boca::Tag Tag() const
The Tag of the multivariant tagging process.
Definition: Phase.cpp:18
std::vector< Photon > Photons() const
Photons.
Definition: Event.cpp:110