AmpGen 2.1
Loading...
Searching...
No Matches
Chi2Estimator.h
Go to the documentation of this file.
1#ifndef AMPGEN_CHI2ESTIMATOR_H
2#define AMPGEN_CHI2ESTIMATOR_H
3
4#include <functional>
5#include <string>
6#include <vector>
7
8#include "AmpGen/BinDT.h"
9
10#if ENABLE_AVX
12#else
13#include "AmpGen/EventList.h"
14#endif
15
16namespace AmpGen {
17 class EventType;
18 class Event;
19
21#if ENABLE_AVX
22 typedef EventListSIMD EventList_type;
23#else
24 typedef EventList EventList_type;
25#endif
26 public:
27 template <typename... argument_types>
28 Chi2Estimator(const EventList_type &dataEvents, const EventList_type &mcEvents, const std::function<double(const Event &)> &fcn,
29 const argument_types &...args)
30 : m_binning(dataEvents.begin(), dataEvents.end(), ArgumentPack(args...)) {
31 doChi2(dataEvents, mcEvents, fcn);
32 }
33
34 double chi2() const;
35 double nBins() const;
36 void writeBinningToFile(const std::string &filename);
37 void doChi2(const EventList_type &dataEvents, const EventList_type &mcEvents, const std::function<double(const Event &)> &fcn);
38
39 private:
40 double m_chi2;
41 size_t m_nBins;
42 BinDT m_binning;
43 };
44} // namespace AmpGen
45
46#endif /* end of include guard: AMPGEN_CHI2ESTIMATOR_H */
Container for a set of arguments Contains a set of arguments packed from a variadic constructor,...
Chi2Estimator(const EventList_type &dataEvents, const EventList_type &mcEvents, const std::function< double(const Event &)> &fcn, const argument_types &...args)
double nBins() const
double chi2() const
void doChi2(const EventList_type &dataEvents, const EventList_type &mcEvents, const std::function< double(const Event &)> &fcn)
void writeBinningToFile(const std::string &filename)
Encapsulates the final state particles of a single event.
Definition Event.h:19
Deals with final state configuration of events, specifically dealing with the ordering of particles i...
Definition EventType.h:22