10 #ifndef COMPWA_PHYSICS_SUBSYSTEM_HPP_ 11 #define COMPWA_PHYSICS_SUBSYSTEM_HPP_ 16 #include <boost/property_tree/ptree.hpp> 33 SubSystem(
const std::vector<std::vector<unsigned int>> &FinalStates,
34 const std::vector<unsigned int> &Recoil,
35 const std::vector<unsigned int> &ParentRecoil);
42 virtual const std::vector<std::vector<unsigned int>> &
getFinalStates()
const;
55 std::vector<unsigned int> result;
56 std::istringstream iStr(str);
57 std::vector<std::string> stringFrag{std::istream_iterator<std::string>{iStr},
58 std::istream_iterator<std::string>{}};
59 for (
auto i : stringFrag) {
60 result.push_back(std::stoul(i));
71 template <
typename T> std::size_t
combineHash(
size_t hash,
const T &v) {
72 hash ^= std::hash<T>()(v) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
75 template <>
struct hash<ComPWA::
IndexList> {
77 std::size_t seed = key.size();
78 for (
unsigned int i : key) {
85 template <>
struct hash<ComPWA::Physics::SubSystem> {
virtual ~SubSystem()=default
std::size_t combineHash(size_t hash, const T &v)
virtual const std::vector< unsigned int > & getParentRecoilState() const
std::vector< unsigned int > stringToVectInt(std::string str)
Helper funtions to transfor a string of space-separated numbers to a vector<unsigned int>...
virtual const std::vector< unsigned int > & getRecoilState() const
friend std::ostream & operator<<(std::ostream &stream, const SubSystem &s)
std::vector< unsigned int > IndexList
virtual const std::vector< std::vector< unsigned int > > & getFinalStates() const
SubSystem(const std::vector< std::vector< unsigned int >> &FinalStates, const std::vector< unsigned int > &Recoil, const std::vector< unsigned int > &ParentRecoil)
bool operator==(const SubSystem &b) const
std::vector< std::vector< unsigned int > > DecayProductFinalStates
std::vector< unsigned int > RecoilFinalState
std::vector< unsigned int > ParentRecoilFinalState
Definition of a two-body decay node within a sequential decay tree.