15 #include <mcbooster/GContainers.h> 16 #include <thrust/remove.h> 21 class LSCalculator_TD;
23 class SFCalculator_TD;
24 class NormIntegrator_TD;
34 unsigned int MCeventsNorm = 5e6);
41 __host__
void setDataSize(
unsigned int dataSize,
unsigned int evtSize = 8);
52 tuple<mcbooster::ParticlesSet_h, mcbooster::VariableSet_h, mcbooster::RealVector_h, mcbooster::BoolVector_h>
57 std::map<std::string, std::pair<std::vector<unsigned int>, std::vector<unsigned int>>> AmpMap;
58 std::map<std::string, unsigned int> compMap;
60 std::map<std::string, unsigned int> SpinMap;
61 std::vector<SpinFactor *> SpinFactors;
62 std::vector<AmpCalc_TD *> AmpCalcs;
64 std::vector<SFCalculator_TD *> sfcalculators;
65 std::vector<LSCalculator_TD *> lscalculators;
68 mcbooster::RealVector_d norm_M12;
69 mcbooster::RealVector_d norm_M34;
70 mcbooster::RealVector_d norm_CosTheta12;
71 mcbooster::RealVector_d norm_CosTheta34;
72 mcbooster::RealVector_d norm_phi;
74 mutable mcbooster::RealVector_d norm_SF;
75 mutable mcbooster::mc_device_vector<fpcomplex> norm_LS;
82 thrust::device_vector<fpcomplex> *cachedResSF{
nullptr};
83 thrust::device_vector<fpcomplex> *cachedAMPs{
nullptr};
84 mutable bool generation_no_norm{
false};
85 mutable bool SpinsCalculated{
false};
87 mutable bool forceRedoIntegrals{
true};
92 unsigned int generation_offset{25031992};
96 class SFCalculator_TD :
public thrust::unary_function<thrust::tuple<int, fptype *, int>, fpcomplex> {
100 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
103 unsigned int _spinfactor_i;
104 unsigned int _parameters;
108 :
public thrust::unary_function<thrust::tuple<fptype, fptype, fptype, fptype, fptype>, fptype> {
112 __device__
fptype operator()(thrust::tuple<fptype, fptype, fptype, fptype, fptype> t)
const;
115 unsigned int _spinfactor_i;
116 unsigned int _parameters;
119 class LSCalculator_TD :
public thrust::unary_function<thrust::tuple<int, fptype *, int>, fpcomplex> {
123 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
126 unsigned int _resonance_i;
127 unsigned int _parameters;
131 :
public thrust::unary_function<
133 tuple<mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t>,
140 tuple<mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t, mcbooster::GReal_t> t)
144 unsigned int _resonance_i;
145 unsigned int _parameters;
148 class AmpCalc_TD :
public thrust::unary_function<unsigned int, fpcomplex> {
150 AmpCalc_TD(
unsigned int AmpIdx,
unsigned int pIdx,
unsigned int nPerm);
152 __device__
fpcomplex operator()(thrust::tuple<int, fptype *, int> t)
const;
156 unsigned int _AmpIdx;
157 unsigned int _parameters;
160 class NormIntegrator_TD :
public thrust::unary_function<thrust::tuple<int, int, fptype *, fpcomplex *>, fptype> {
163 __device__ thrust::tuple<fptype, fptype, fptype, fptype>
164 operator()(thrust::tuple<int, int, fptype *, fpcomplex *> t)
const;
167 unsigned int _parameters;
170 class FourDblTupleAdd :
public thrust::binary_function<thrust::tuple<fptype, fptype, fptype, fptype>,
171 thrust::tuple<fptype, fptype, fptype, fptype>,
172 thrust::tuple<fptype, fptype, fptype, fptype>> {
174 __host__ __device__ thrust::tuple<fptype, fptype, fptype, fptype>
175 operator()(thrust::tuple<fptype, fptype, fptype, fptype> one, thrust::tuple<fptype, fptype, fptype, fptype> two) {
176 return {thrust::get<0>(one) + thrust::get<0>(two),
177 thrust::get<1>(one) + thrust::get<1>(two),
178 thrust::get<2>(one) + thrust::get<2>(two),
179 thrust::get<3>(one) + thrust::get<3>(two)};
__host__ int getMCevents()
std::vector< Observable > observables
Special class for observables. Used in DataSets.
thrust::complex< fptype > fpcomplex
__host__ void setMaxWeight(fptype wmax)
TDDP4(std::string n, std::vector< Observable > observables, DecayInfo4t decay, MixingTimeResolution *r, GooPdf *eff, Observable *mistag, unsigned int MCeventsNorm=5e6)
__host__ void setForceIntegrals(bool f=true)
__host__ __device__ thrust::tuple< fptype, fptype, fptype, fptype > operator()(thrust::tuple< fptype, fptype, fptype, fptype > one, thrust::tuple< fptype, fptype, fptype, fptype > two)
__host__ void setGenerationOffset(int off)
__host__ void setDataSize(unsigned int dataSize, unsigned int evtSize=8)
__host__ std::tuple< mcbooster::ParticlesSet_h, mcbooster::VariableSet_h, mcbooster::RealVector_h, mcbooster::BoolVector_h > GenerateSig(unsigned int numEvents)
__host__ fptype normalize() const override
A normalize function. This fills in the host_normalize.