Event.hh
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include <map>
7 
9 #include "boca/generic/Flag.hh"
10 #include "boca/fastjet/Jet.hh"
11 #include "boca/fastjet/Particle.hh"
12 
13 namespace boca
14 {
15 
16 enum class JetDetail
17 {
18  none = 0,
19  plain = 1 << 0,
20  structure = 1 << 1,
21  isolation = 1 << 2,
22 };
23 
24 template<>
25 struct Flag<JetDetail> {
26  static const bool enable = true;
27 };
28 
29 std::string Name(JetDetail jet_detail);
30 
31 enum class Decay
32 {
33  leptonic,
34  hadronic
35 };
36 
37 std::string Name(Decay decay);
38 
39 enum class Status
40 {
41  none = 0,
42  stable = 1,
43  unstable = 2,
44  generator = 3
45 };
46 
47 class TreeReader;
48 
53 class Event
54 {
55 
56 public:
57 
61  Event(boca::TreeReader const& tree_reader);
62 
66  std::vector<Particle> GenParticles() const;
67 
71  std::vector<Particle> Particles() const;
72 
76  std::vector<Lepton> Leptons() const;
77 
81  std::vector<Lepton> Electrons() const;
82 
86  std::vector<Lepton> Muons() const;
87 
91  std::vector<Photon> Photons() const;
92 
96  std::vector<Jet> Jets() const;
97 
101  std::vector<Jet> EFlow(JetDetail jet_detail) const;
102 
106  boca::MissingEt MissingEt() const;
107 
111  Momentum ScalarHt() const;
112 
113  Event(Event const&) = default;
114 
115  Event(Event &&) = default;
116 
117  Event &operator=(Event const&) & = default;
118 
119  Event &operator=(Event &&) & = default;
120 
121 protected:
122 
123  ~Event() {}
124 
125  boca::TreeReader const& TreeReader() const;
126 
127  virtual std::vector<Particle> GetParticles(Status max_status) const = 0;
128 
129  virtual std::vector<Lepton> GetElectrons() const = 0;
130 
131  virtual std::vector<Lepton> GetMuons() const = 0;
132 
133  virtual std::vector<Photon> GetPhotons() const = 0;
134 
135  virtual std::vector<Jet> GetJets() const = 0;
136 
137  virtual std::vector<Jet> GetEFlow(JetDetail jet_detail) const = 0;
138 
139  virtual boca::MissingEt GetMissingEt() const = 0;
140 
141  virtual Momentum GetScalarHt() const = 0;
142 
143 private:
144 
145  boca::TreeReader const* tree_reader_;
146 
147  mutable std::map<Status, Mutable<std::vector<Particle>>> particles_;
148 
149  Mutable<std::vector<Lepton>> electrons_;
150 
152 
153  Mutable<std::vector<Photon>> photons_;
154 
156 
157  Mutable<std::vector<Jet>> eflow_;
158 
159  Mutable<boca::MissingEt> missing_et_;
160 
161  Mutable<Momentum> scalar_ht_;
162 
163 };
164 
165 }
Jet.
Definition: Jet.hh:15
Mark a strongly typed enumerator as a flag.
Definition: Flag.hh:22
Lazy caching of variables.
Definition: Mutable.hh:19
::Event Event
Definition: TypeDef.hh:13
Jet MissingEt
Definition: Jet.hh:132
Definition: TreeReader.hh:39
Base class for the event Topology.
Definition: Event.hh:53
JetDetail
Definition: Event.hh:16
Status
Definition: Event.hh:39
Boosted Collider Analysis.
Definition: Analysis.hh:15
std::string Name(Output output)
Definition: Base.cpp:23
Energy Momentum
Momentum measured in electronvolt.
Definition: ElectronVolt.hh:68
Decay
Definition: Event.hh:31
~Event()
Definition: Event.hh:123