14 #include <mcbooster/GContainers.h> 15 #include <thrust/remove.h> 21 extern __constant__
unsigned int AmpIndices[500];
35 unsigned int MCeventsNorm = 5e6);
41 __host__
void setDataSize(
unsigned int dataSize,
unsigned int evtSize = 6);
46 tuple<mcbooster::ParticlesSet_h, mcbooster::VariableSet_h, mcbooster::RealVector_h, mcbooster::RealVector_h>
51 std::map<std::string, std::pair<std::vector<unsigned int>, std::vector<unsigned int>>> AmpMap;
52 std::map<std::string, unsigned int> compMap;
54 std::map<std::string, unsigned int> SpinMap;
55 std::vector<SpinFactor *> SpinFactors;
56 std::vector<AmpCalc *> AmpCalcs;
58 std::vector<SFCalculator *> sfcalculators;
59 std::vector<LSCalculator *> lscalculators;
62 mcbooster::RealVector_d norm_M12;
63 mcbooster::RealVector_d norm_M34;
64 mcbooster::RealVector_d norm_CosTheta12;
65 mcbooster::RealVector_d norm_CosTheta34;
66 mcbooster::RealVector_d norm_phi;
69 mutable mcbooster::RealVector_d norm_SF;
70 mutable mcbooster::mc_device_vector<fpcomplex> norm_LS;
77 thrust::device_vector<fpcomplex> *cachedResSF{
nullptr};
78 thrust::device_vector<fpcomplex> *cachedAMPs{
nullptr};
80 mutable bool generation_no_norm{
false};
81 mutable bool SpinsCalculated{
false};
83 mutable bool forceRedoIntegrals{
true};
88 int generation_offset{0};
91 class SFCalculator :
public thrust::unary_function<thrust::tuple<int, fptype *, int>, fpcomplex> {
95 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
98 unsigned int _spinfactor_i;
99 unsigned int _parameters;
103 :
public thrust::unary_function<thrust::tuple<fptype, fptype, fptype, fptype, fptype>, fptype> {
107 __device__
fptype operator()(thrust::tuple<fptype, fptype, fptype, fptype, fptype> t)
const;
110 unsigned int _spinfactor_i;
111 unsigned int _parameters;
114 class LSCalculator :
public thrust::unary_function<thrust::tuple<int, fptype *, int>, fpcomplex> {
118 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
121 unsigned int _resonance_i;
122 unsigned int _parameters;
126 :
public thrust::unary_function<
128 tuple<mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t>,
135 tuple<mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t> t)
139 unsigned int _resonance_i;
140 unsigned int _parameters;
143 class AmpCalc :
public thrust::unary_function<unsigned int, fpcomplex> {
145 AmpCalc(
unsigned int AmpIdx,
unsigned int pIdx,
unsigned int nPerm);
147 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
151 unsigned int _AmpIdx;
152 unsigned int _parameters;
155 class NormIntegrator :
public thrust::unary_function<thrust::tuple<int, int, fptype *, fpcomplex *>, fptype> {
158 __device__
fptype operator()(thrust::tuple<int, int, fptype *, fpcomplex *> t)
const;
161 unsigned int _parameters;
std::vector< Observable > observables
__host__ void setGenerationOffset(int off)
__host__ std::tuple< mcbooster::ParticlesSet_h, mcbooster::VariableSet_h, mcbooster::RealVector_h, mcbooster::RealVector_h > GenerateSig(unsigned int numEvents)
__host__ int getMCevents()
thrust::complex< fptype > fpcomplex
__host__ void setForceIntegrals(bool f=true)
DPPdf(std::string n, std::vector< Observable > observables, DecayInfo4 decay, GooPdf *eff, unsigned int MCeventsNorm=5e6)
__host__ void setDataSize(unsigned int dataSize, unsigned int evtSize=6)
__host__ fptype normalize() const override
A normalize function. This fills in the host_normalize.