MCBooster
1.0.1
Tool to generate MC phase space samples in parallel.
|
Implementation of the event generator. More...
#include <Generate.h>
Public Member Functions | |
PhaseSpace (GReal_t _MotherMass, vector< GReal_t > _Masses, GLong_t _NEvents) | |
PhaseSpace ctor. More... | |
~PhaseSpace () | |
PhaseSpace() dtor. More... | |
void | FreeResources () |
Free resources. More... | |
void | Generate (Particles_d fMothers) |
void | Generate (const Vector4R fMother) |
Particles_d & | GetDaughters (GInt_t i) |
Get the daughter with index 'i' in the mass array. More... | |
GInt_t | GetNDaughters () const |
Returns the number of daughter particles. More... | |
GLong_t | GetNEvents () const |
Returns the number of events. More... | |
GLong_t | GetNAccepted () const |
const RealVector_d & | GetWeights () const |
Returns a device vector with the event weights. More... | |
GReal_t | GetEvtTime () const |
Returns the time spent in seconds to process the random numbers and set the phase space four-vectors. More... | |
GReal_t | GetExpTime () const |
Returns the time spent in seconds to export the generated events to a Events container. More... | |
GReal_t | GetRndTime () const |
Returns the time spent in seconds to generate the random numbers necessary for the calculation. More... | |
GReal_t | GetMaxWeight () const |
Returns the max event weight that can be found in the generated sample. More... | |
GInt_t | GetSeed () const |
void | SetSeed (GInt_t _seed) |
void | Export (Events *_Events) |
Export the events and all related information to host. More... | |
void | ExportUnweighted (Events *_Events) |
GULong_t | Unweight () |
Flag the accepted and rejected events. More... | |
void | Allocate (const GLong_t _nevents) |
Allocate resources on the device for event generation. More... | |
GReal_t | PDK (const GReal_t a, const GReal_t b, const GReal_t c) const |
PDK function. More... | |
Basic usage:
Definition at line 165 of file Generate.h.
|
inline |
Constructor of the phase-space generator takes as input parameters:
Definition at line 174 of file Generate.h.
|
inline |
The destructor explicitly frees all the resources owned by the class.
Definition at line 211 of file Generate.h.
|
inline |
Definition at line 324 of file Generate.h.
void MCBooster::PhaseSpace::Export | ( | Events * | _Events | ) |
Export the events and all related information to an Events object properly initialized.
Definition at line 474 of file Generate.h.
References CUDA_CHECK_RETURN, MCBooster::Events::fAccRejFlags, MCBooster::Events::fDaughters, MCBooster::Events::fMaxWeight, and MCBooster::Events::fWeights.
void MCBooster::PhaseSpace::ExportUnweighted | ( | Events * | _Events | ) |
Export the events and all related information to an Events object properly initialized.
Definition at line 397 of file Generate.h.
References CUDA_CHECK_RETURN, MCBooster::Events::fAccRejFlags, MCBooster::Events::fDaughters, MCBooster::Events::fMaxWeight, and MCBooster::Events::fWeights.
|
inline |
Free resources owned in host and device side by the PhaseSpace object.
Definition at line 221 of file Generate.h.
void MCBooster::PhaseSpace::Generate | ( | Particles_d | fMothers | ) |
Run the generator and calculate the maximum weight. It takes as input the device vector with the four-vectors of the mother particle in any system of reference. The daughters will be generated in this system.
Definition at line 669 of file Generate.h.
References MCBooster::time_diff(), and TIMER.
void MCBooster::PhaseSpace::Generate | ( | const Vector4R | fMother | ) |
Run the generator and calculate the maximum weight. It takes as input the fourvector of the mother particle in any system of reference. The daughters will be generated in this system.
Definition at line 541 of file Generate.h.
References MCBooster::time_diff(), and TIMER.
|
inline |
It return a device vector of particles by reference. Is responsibility of the user modify or not the particles in the container.
Definition at line 243 of file Generate.h.
|
inline |
Definition at line 274 of file Generate.h.
|
inline |
Definition at line 281 of file Generate.h.
|
inline |
Larger the sample, more accurate is this number.
Definition at line 296 of file Generate.h.
|
inline |
Definition at line 260 of file Generate.h.
|
inline |
Definition at line 249 of file Generate.h.
|
inline |
Definition at line 256 of file Generate.h.
|
inline |
Definition at line 288 of file Generate.h.
|
inline |
Definition at line 300 of file Generate.h.
|
inline |
Definition at line 267 of file Generate.h.
|
inline |
Definition at line 337 of file Generate.h.
|
inline |
Definition at line 304 of file Generate.h.
GULong_t MCBooster::PhaseSpace::Unweight | ( | ) |
Flag the accepted and rejected events
Definition at line 363 of file Generate.h.
References MCBooster::kTrue.