AmpGen 2.1
Loading...
Searching...
No Matches
TreePhaseSpace.h
Go to the documentation of this file.
1#ifndef AMPGEN_TREEPHASESPACE_H
2#define AMPGEN_TREEPHASESPACE_H
3
4#include <memory.h>
5#include <stddef.h>
6#include <algorithm>
7#include <memory>
8#include <ostream>
9#include <string>
10#include <vector>
11#include <utility>
12#include <random>
13
14#include "AmpGen/EventType.h"
15#include "AmpGen/Particle.h"
17#include "AmpGen/Configurable.h"
18#include "AmpGen/Property.h"
19#include <TRandom3.h>
20
21namespace AmpGen {
22 class Particle;
23 class Event;
25 class EventListSIMD;
38 class TreePhaseSpace : public Configurable<TreePhaseSpace> {
39 public:
40 TreePhaseSpace() = default;
41 explicit TreePhaseSpace(const EventType &type);
42 TreePhaseSpace(const Particle &decayChain, const EventType &type, TRandom *rndm = nullptr);
43 TreePhaseSpace(const std::vector<Particle> &decayChains, const EventType &type, TRandom *rndm = nullptr);
45
46 void setRandom(TRandom *rand);
48 size_t size() const;
50 const DecayChainStackBase *operator[](const unsigned i) const { return m_gen[i]; }
52
53 private:
54 void initialise_weights();
55 std::vector<DecayChainStackBase *> m_gen;
56 TRandom3 *m_rand{nullptr};
57 EventType m_type;
59 std::vector<unsigned> m_generatorRecord;
60 double m_wmax{0};
61 Property<bool> m_aggressiveOptimisation{this, "TreePhaseSpace::AggressiveOptimisation", false};
62 };
63} // namespace AmpGen
64
65#endif
Encapsulates the final state particles of a single event.
Definition Event.h:19
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
TreePhaseSpace(const std::vector< Particle > &decayChains, const EventType &type, TRandom *rndm=nullptr)
TreePhaseSpace(const EventType &type)
TreePhaseSpace(const Particle &decayChain, const EventType &type, TRandom *rndm=nullptr)
void setRandom(TRandom *rand)
const DecayChainStackBase * operator[](const unsigned i) const
void recalculate_weights(const EventListSIMD &events)
size_t size() const