ComPWA
Common Partial-Wave-Analysis Framework
RootGenerator.hpp
Go to the documentation of this file.
1 // Copyright (c) 2015, 2017 The ComPWA Team.
2 // This file is part of the ComPWA framework, check
3 // https://github.com/ComPWA/ComPWA/license.txt for details.
4 
5 #ifndef TOOLS_ROOTGENERATOR_HPP_
6 #define TOOLS_ROOTGENERATOR_HPP_
7 
8 #include <memory>
9 #include <sstream>
10 #include <string>
11 #include <vector>
12 
13 #include "TLorentzVector.h"
14 #include "TRandom3.h"
15 
16 #include "Core/Generator.hpp"
17 #include "Core/Properties.hpp"
18 
19 namespace ComPWA {
20 class UniformRealNumberGenerator;
21 namespace Physics {
22 class ParticleStateTransitionKinematicsInfo;
23 }
24 
25 namespace Data {
26 namespace Root {
27 
29  TRandom3 RandomGenerator;
30  int Seed;
31 
32 public:
33  RootUniformRealGenerator(int seed = 123456);
34 
35  double operator()() final;
36  int getSeed() const final;
37  void setSeed(int seed) final;
38 };
39 
41 public:
43  RootGenerator(const ComPWA::FourMomentum &CMSP4_,
44  const std::vector<double> &FinalStateMasses_,
45  const std::vector<ComPWA::pid> &FinalStatePIDs_);
46 
50 
53  RootGenerator(const ComPWA::ParticleList &PartL, std::vector<pid> FinalS,
54  std::vector<pid> InitialS);
55 
56  virtual ~RootGenerator(){};
57 
59  generate(unsigned int NumberOfEvents,
60  UniformRealNumberGenerator &RandomGenerator) const final;
61 
62 private:
63  void init();
65  double PDK(double a, double b, double c) const;
66  void BoostAlongY(TLorentzVector &vec, double beta_squared) const;
67 
69  std::vector<double> FinalStateMasses;
70  std::vector<ComPWA::pid> FinalStatePIDs;
71  double MaximumWeight;
72  TVector3 CMSBoostVector;
73  // total energy in C.M. minus the sum of the masses
75 };
76 
77 } // namespace Root
78 } // namespace Data
79 } // namespace ComPWA
80 
81 #endif
Interface class for PHSP event generators.
Definition: Generator.hpp:17
ComPWA four momentum class.
std::set< ParticleProperties > ParticleList
Definition: Properties.hpp:84
EventCollection generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator)
Definition: Generate.cpp:95
std::vector< ComPWA::pid > FinalStatePIDs
std::vector< double > FinalStateMasses