AmpGen 2.1
Loading...
Searching...
No Matches
PhaseSpace.h
Go to the documentation of this file.
1#ifndef AMPGEN_PHASESPACE_H
2#define AMPGEN_PHASESPACE_H
3
4#include <stddef.h>
5#include <vector>
6
7#include <TRandom.h>
8
9#include "AmpGen/Event.h"
10#include "AmpGen/EventType.h"
11
12namespace AmpGen
13{
21 class Particle;
22
24 {
25 public:
26 PhaseSpace() = default;
27 explicit PhaseSpace(const EventType& type, TRandom* rand = gRandom);
28 explicit PhaseSpace(const Particle& type, TRandom* rand = gRandom);
29
30 bool setDecay( const double& m0, const std::vector<double>& mass );
31 void setRandom( TRandom* rand ) { m_rand = rand; }
32 size_t size() const { return m_nt; }
35 void fill( double* output, unsigned stagger = 1 );
36 void debug( const Event& ) {};
37 private:
38 size_t m_nt = {0};
39 double m_mass[18] = {0};
40 double m_teCmTm = {0};
41 double m_wtMax = {0};
42 double m_decayTime = {0};
43 TRandom* m_rand = {nullptr};
44 EventType m_type;
45
46 double q(double a, double b, double c) const;
47 };
48} // namespace AmpGen
49#endif
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
Describes a particle, its decay process and subsequent decay products, which are also Particles.
Definition Particle.h:103
EventType eventType() const
Returns the EventType that this phase space is generating.
PhaseSpace()=default
Empty constructor.
void setRandom(TRandom *rand)
Set the random number used by this phase space generator.
Definition PhaseSpace.h:31
PhaseSpace(const Particle &type, TRandom *rand=gRandom)
Construct a phase space generator from a Particle.
Event makeEvent()
Make an event in this phase space.
bool setDecay(const double &m0, const std::vector< double > &mass)
Set the parameters of this phase space generator.
size_t size() const
Return the number of decay products.
Definition PhaseSpace.h:32
void fill(double *output, unsigned stagger=1)
void debug(const Event &)
Definition PhaseSpace.h:36
PhaseSpace(const EventType &type, TRandom *rand=gRandom)
Construct a phase space generator from an EventType.