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
16
17namespace AmpGen
18{
19 class EventType;
20 class Event;
21
23 {
24 #if ENABLE_AVX
25 typedef EventListSIMD EventList_type;
26 #else
27 typedef EventList EventList_type;
28 #endif
29 public:
30 template <typename... argument_types>
31 Chi2Estimator( const EventList_type& dataEvents, const EventList_type& mcEvents,
32 const std::function<double( const Event& )>& fcn,
33 const argument_types&... args ) : m_binning(dataEvents.begin(), dataEvents.end(), ArgumentPack(args...) )
34 {
35 doChi2(dataEvents, mcEvents, fcn);
36 }
37
38 double chi2() const;
39 double nBins() const;
40 void writeBinningToFile( const std::string& filename );
41 void doChi2( const EventList_type& dataEvents, const EventList_type& mcEvents,
42 const std::function<double( const Event& )>& fcn );
43 private:
44 double m_chi2;
45 size_t m_nBins;
46 BinDT m_binning;
47 };
48} // namespace AmpGen
49
50#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:18
Deals with final state configuration of events, specifically dealing with the ordering of particles i...
Definition EventType.h:22