ComPWA
Common Partial-Wave-Analysis Framework
Event.hpp
Go to the documentation of this file.
1 // Copyright (c) 2013, 2017 The ComPWA Team.
2 // This file is part of the ComPWA framework, check
3 // https://github.com/ComPWA/ComPWA/license.txt for details.
4 
5 #ifndef COMPWA_EVENT_HPP_
6 #define COMPWA_EVENT_HPP_
7 
8 #include "Core/FourMomentum.hpp"
9 #include "Core/Properties.hpp"
10 
11 #include <unordered_map>
12 #include <vector>
13 
14 namespace ComPWA {
15 
20 struct Event {
21  std::vector<FourMomentum> FourMomenta;
22  double Weight = 1.0;
23 };
24 
26  bool checkPidMatchesEvents() const {
27  for (const auto &Event : Events)
28  if (Event.FourMomenta.size() != Pids.size())
29  return false;
30  return true;
31  }
32 
33  std::vector<pid> Pids;
34  std::vector<Event> Events;
35 };
36 
37 std::ostream &operator<<(std::ostream &stream, const Event &ev);
38 
39 double calculateInvariantMass(const Event &ev);
40 
41 double getMaximumSampleWeight(const EventCollection &sample);
42 
43 } // namespace ComPWA
44 
45 #endif
std::ostream & operator<<(std::ostream &os, const Event &ev)
Definition: Event.cpp:11
std::vector< Event > Events
Definition: Event.hpp:34
double Weight
Definition: Event.hpp:22
std::vector< FourMomentum > FourMomenta
Definition: Event.hpp:21
double calculateInvariantMass(const Event &ev)
Definition: Event.cpp:20
Data structure containing all kinematic information of a physics event.
Definition: Event.hpp:20
std::vector< pid > Pids
Definition: Event.hpp:33
double getMaximumSampleWeight(const EventCollection &Sample)
Definition: Event.cpp:27
bool checkPidMatchesEvents() const
Definition: Event.hpp:26