ComPWA
Common Partial-Wave-Analysis Framework
DataSet.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 DATA_DATASET_HPP_
6 #define DATA_DATASET_HPP_
7 
8 #include <memory>
9 
10 #include "Core/Event.hpp"
11 #include "Core/Function.hpp"
12 
13 namespace ComPWA {
14 class Kinematics;
15 namespace Data {
16 
17 struct DataSet {
19  std::vector<double> Weights;
20 };
21 
22 inline void resize(DataSet &set, size_t size) {
23  set.Weights.resize(size);
24  for (auto &i : set.Data) {
25  i.second.resize(size);
26  }
27 }
28 
30 addIntensityWeights(std::shared_ptr<ComPWA::Intensity> Intensity,
31  const ComPWA::EventCollection &DataSample,
33 
34 } // namespace Data
35 } // namespace ComPWA
36 
37 #endif
ComPWA::DataMap Data
Definition: DataSet.hpp:18
std::vector< double > Weights
Definition: DataSet.hpp:19
void resize(DataSet &set, size_t size)
Definition: DataSet.hpp:22
ComPWA::EventCollection addIntensityWeights(std::shared_ptr< ComPWA::Intensity > Intensity, const EventCollection &DataSample, const ComPWA::Kinematics &Kinematics)
Definition: DataSet.cpp:13
std::unordered_map< std::string, std::vector< double > > DataMap
Definition: Function.hpp:15
The Kinematics interface defines the conversion of Events to a DataSet.
Definition: Kinematics.hpp:19
Interface template for a general Function of the form OutputType Function(InputTypes) The concept clo...
Definition: Function.hpp:24