AmpGen
2.1
Toggle main menu visibility
Loading...
Searching...
No Matches
PolarisedSum.h
Go to the documentation of this file.
1
#ifndef AMPGEN_POLARISEDAMPLITUDE_H
2
#define AMPGEN_POLARISEDAMPLITUDE_H
3
4
#include <stddef.h>
5
#include <complex>
6
#include <map>
7
#include <memory>
8
#include <string>
9
#include <utility>
10
#include <vector>
11
#include <array>
12
13
#include "
AmpGen/Types.h
"
14
#include "
AmpGen/AmplitudeRules.h
"
15
#include "
AmpGen/CompiledExpression.h
"
16
#include "
AmpGen/EventList.h
"
17
#include "
AmpGen/EventType.h
"
18
#include "
AmpGen/Integrator.h
"
19
#include "
AmpGen/CoherentSum.h
"
20
#include "
AmpGen/Expression.h
"
21
#include "
AmpGen/Tensor.h
"
22
#include "
AmpGen/MinuitParameter.h
"
23
#include "
AmpGen/enum.h
"
24
#include "
AmpGen/Configurable.h
"
25
26
namespace
AmpGen
{
27
class
LinearErrorPropagator
;
28
class
MinuitParameterSet
;
29
class
FitFraction
;
30
class
MinuitProxy
;
31
make_enum
(spaceType, spin, flavour);
32
33
class
PolarisedSum
:
public
Configurable
<PolarisedSum> {
34
public
:
35
#if ENABLE_AVX
36
using
EventList_type
=
EventListSIMD
;
37
#else
38
using
EventList_type
=
EventList
;
39
#endif
40
41
PolarisedSum
() =
default
;
42
virtual
~PolarisedSum
();
43
PolarisedSum
(
const
EventType
&,
MinuitParameterSet
&,
const
std::vector<MinuitProxy> & = {});
44
void
prepare
();
45
void
setEvents
(
EventList_type
&);
46
void
setMC
(
EventList_type
&);
47
#if ENABLE_AVX
48
void
setEvents
(
EventList
&evts) {
49
m_ownEvents =
true
;
50
setEvents
(*
new
EventList_type
(evts));
51
};
52
void
setMC
(
EventList
&evts) {
setMC
(*
new
EventList_type
(evts)); };
53
double
operator()
(
const
double
*,
const
unsigned
)
const
;
54
#endif
55
real_v
operator()
(
const
real_v
*,
const
unsigned
)
const
;
56
real_t
operator()
(
const
Event
&evt)
const
;
57
void
reset
(
const
bool
& =
false
);
58
void
debug
(
const
Event
&);
59
void
debug_norm
();
60
void
setWeight
(
MinuitProxy
);
61
double
getWeight
()
const
;
62
void
updateNorms
();
63
void
generateSourceCode
(
const
std::string &,
const
double
& = 1,
bool
=
false
);
64
Expression
probExpression
(
const
Tensor
&,
const
std::vector<Expression> &,
const
std::vector<Expression> &,
DebugSymbols
* =
nullptr
)
const
;
65
size_t
size
()
const
;
66
real_t
norm
()
const
;
67
complex_t
norm
(
const
size_t
&,
const
size_t
&,
Integrator
* =
nullptr
);
68
real_t
getValNoCache
(
const
Event
&)
const
;
69
std::vector<FitFraction>
fitFractions
(
const
LinearErrorPropagator
&,
bool
=
false
,
bool
=
false
);
70
std::vector<MatrixElement>
matrixElements
()
const
;
71
void
transferParameters
();
72
Tensor
transitionMatrix
()
const
;
73
const
MatrixElement
&
operator[]
(
const
size_t
&i)
const
{
return
m_matrixElements[i]; }
74
std::function<
real_t
(
const
Event
&)>
evaluator
(
const
EventList_type
* =
nullptr
)
const
;
75
KeyedFunctors
<double(
Event
)>
componentEvaluator
(
const
EventList_type
* =
nullptr
)
const
;
76
EventType
eventType
()
const
{
return
m_eventType; }
77
auto
cache
() {
return
m_cache; }
78
79
private
:
80
size_t
m_nCalls = {0};
81
real_t
m_norm = {1};
82
EventList_type
*m_events = {
nullptr
};
83
FunctionCache<EventList_type, complex_v, Alignment::AoS> m_cache = {};
84
FunctionCache<FunctionCache<EventList_type, complex_v, Alignment::AoS>,
real_v
,
Alignment::AoS
> m_pdfCache = {};
85
bool
m_ownEvents = {
false
};
86
MinuitParameterSet *m_mps = {
nullptr
};
87
MinuitProxy m_weight = {
nullptr
, 1};
88
MinuitProxy m_polParam = {
nullptr
};
89
std::vector<MinuitProxy> m_pVector = {};
90
std::vector<MinuitProxy> m_pfVector = {};
91
Integrator m_integrator;
92
std::vector<Bilinears> m_norms;
93
EventType m_eventType;
94
std::string m_prefix =
""
;
95
std::vector<complex_t> m_rho;
96
std::vector<size_t> m_integIndex;
97
std::pair<unsigned, unsigned> m_dim;
98
std::vector<MatrixElement> m_matrixElements;
99
CompiledExpression<
real_v
(
const
real_t
*,
const
complex_v
*)> m_probExpression;
100
101
Property<spaceType> m_spaceType{
this
,
"PolarisedSum::SpaceType"
, spaceType::spin};
102
};
103
}
// namespace AmpGen
104
105
#endif
AmplitudeRules.h
CoherentSum.h
CompiledExpression.h
Configurable.h
EventList.h
EventType.h
Expression.h
Integrator.h
MinuitParameter.h
Tensor.h
Types.h
AmpGen::Configurable
Definition
Configurable.h:10
AmpGen::Event
Encapsulates the final state particles of a single event.
Definition
Event.h:19
AmpGen::EventList
Definition
EventList.h:32
AmpGen::EventListSIMD
Definition
EventListSIMD.h:32
AmpGen::EventType
Deals with final state configuration of events, specifically dealing with the ordering of particles i...
Definition
EventType.h:22
AmpGen::Expression
Wrapper class for shared_ptrs to virtual expressions for use in conjunction with operators to build e...
Definition
Expression.h:135
AmpGen::FitFraction
Definition
FitFraction.h:16
AmpGen::Integrator
Definition
Integrator.h:14
AmpGen::LinearErrorPropagator
Propagates uncertainties on functors using either a MinuitParameterSet (thus assuming a diagonal cova...
Definition
ErrorPropagator.h:30
AmpGen::MatrixElement
Definition
MatrixElement.h:9
AmpGen::MinuitParameterSet
Definition
MinuitParameterSet.h:13
AmpGen::MinuitProxy
Definition
MinuitParameter.h:83
AmpGen::PolarisedSum::eventType
EventType eventType() const
Definition
PolarisedSum.h:76
AmpGen::PolarisedSum::reset
void reset(const bool &=false)
AmpGen::PolarisedSum::norm
real_t norm() const
AmpGen::PolarisedSum::transitionMatrix
Tensor transitionMatrix() const
AmpGen::PolarisedSum::setMC
void setMC(EventList_type &)
AmpGen::PolarisedSum::EventList_type
EventList EventList_type
Definition
PolarisedSum.h:38
AmpGen::PolarisedSum::getWeight
double getWeight() const
AmpGen::PolarisedSum::getValNoCache
real_t getValNoCache(const Event &) const
AmpGen::PolarisedSum::componentEvaluator
KeyedFunctors< double(Event)> componentEvaluator(const EventList_type *=nullptr) const
AmpGen::PolarisedSum::norm
complex_t norm(const size_t &, const size_t &, Integrator *=nullptr)
AmpGen::PolarisedSum::fitFractions
std::vector< FitFraction > fitFractions(const LinearErrorPropagator &, bool=false, bool=false)
AmpGen::PolarisedSum::PolarisedSum
PolarisedSum()=default
AmpGen::PolarisedSum::PolarisedSum
PolarisedSum(const EventType &, MinuitParameterSet &, const std::vector< MinuitProxy > &={})
AmpGen::PolarisedSum::evaluator
std::function< real_t(const Event &)> evaluator(const EventList_type *=nullptr) const
AmpGen::PolarisedSum::updateNorms
void updateNorms()
AmpGen::PolarisedSum::generateSourceCode
void generateSourceCode(const std::string &, const double &=1, bool=false)
AmpGen::PolarisedSum::matrixElements
std::vector< MatrixElement > matrixElements() const
AmpGen::PolarisedSum::debug_norm
void debug_norm()
AmpGen::PolarisedSum::~PolarisedSum
virtual ~PolarisedSum()
AmpGen::PolarisedSum::size
size_t size() const
AmpGen::PolarisedSum::operator()
real_t operator()(const Event &evt) const
AmpGen::PolarisedSum::transferParameters
void transferParameters()
AmpGen::PolarisedSum::operator()
real_v operator()(const real_v *, const unsigned) const
AmpGen::PolarisedSum::debug
void debug(const Event &)
AmpGen::PolarisedSum::prepare
void prepare()
AmpGen::PolarisedSum::setWeight
void setWeight(MinuitProxy)
AmpGen::PolarisedSum::setEvents
void setEvents(EventList_type &)
AmpGen::PolarisedSum::probExpression
Expression probExpression(const Tensor &, const std::vector< Expression > &, const std::vector< Expression > &, DebugSymbols *=nullptr) const
AmpGen::PolarisedSum::cache
auto cache()
Definition
PolarisedSum.h:77
AmpGen::PolarisedSum::operator[]
const MatrixElement & operator[](const size_t &i) const
Definition
PolarisedSum.h:73
AmpGen::Tensor
Definition
Tensor.h:29
enum.h
make_enum
#define make_enum(name,...)
Definition
enum.h:25
AmpGen
Definition
AddCPConjugate.h:2
AmpGen::real_t
double real_t
Definition
Types.h:6
AmpGen::complex_t
std::complex< real_t > complex_t
Definition
Types.h:7
AmpGen::real_v
AVX::real_v real_v
Definition
utils.h:47
AmpGen::complex_v
AVX::complex_v complex_v
Definition
utils.h:48
AmpGen::AoS
@ AoS
Definition
Store.h:12
AmpGen::DebugSymbols
std::vector< DebugSymbol > DebugSymbols
Definition
Expression.h:111
AmpGen::KeyedFunctors
Definition
KeyedFunctors.h:8
AmpGen
PolarisedSum.h
Generated on
for AmpGen by
1.17.0