Analysis.hh
Go to the documentation of this file.
1 #pragma once
2 
3 // Include the cut analysis base class
4 #include "boca/analysis/Cut.hh"
5 
11 namespace cut
12 {
13 
14 // The analysis inherits from the boca cut analysis base class
16 {
17 
18 public:
19 
20  // Set files for signal and background
21  // it is assumed that all files are in the same folder
22  void SetFiles(boca::Phase const& phase) override
23  {
24  switch (phase.Tag()) {
25  case boca::Tag::signal :
26  // add a signal file by passing its file and process name
27  this->AddSignal("hh_14TeV-500GeV", "h");
28  break;
30  // add a background file by passing its file and process name
31  this->AddBackground("bb_14TeV-500GeV", "bb");
32  break;
33  }
34  }
35 
36  // define how many events are supposed to beeing used
37  long TrainNumberMax() const override
38  {
39  return 1000;
40  }
41 
42  // define the analysis name
43  std::string Name() const override
44  {
45  return "CutAnalysis";
46  }
47 
48  // Define the cuts
49  bool PassPreCut(boca::Event const& event) const override{
50  // The event class contains all relevant physical objects
51  auto jets = event.Jets();
52  // this cut is obviously not enough
53  if (jets.size() < 2) return false;
54  return true;
55  }
56 
57 };
58 
59 }
void SetFiles(boca::Phase const &phase) override
Definition: Analysis.hh:22
void AddSignal(std::string const &file_name, latex::String const &latex_name="", boca::Crosssection const &crosssection=0_b, boca::Mass const &mass=0_eV, std::string const &path="")
Definition: Base.cpp:97
bool PassPreCut(boca::Event const &event) const override
Definition: Analysis.hh:49
long TrainNumberMax() const override
Definition: Analysis.hh:37
Base class for the event Topology.
Definition: Event.hh:53
Cut Example.
Definition: Analysis.hh:11
std::string Name() const override
Definition: Analysis.hh:43
void AddBackground(std::string const &file_name, latex::String const &latex_name="", boca::Crosssection const &crosssection=0_b, boca::Mass const &mass=0_eV, std::string const &path="")
Definition: Base.cpp:105
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
Definition: Cut.hh:11
Definition: Analysis.hh:15