YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TwoBodyPhaseSpaceFactor.h
Go to the documentation of this file.
1 /* YAP - Yet another PWA toolkit
2  Copyright 2015, Technische Universitaet Muenchen,
3  Authors: Daniel Greenwald, Johannes Rauch
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
20 
21 #ifndef yap_TwoBodyPhaseSpaceFactor_h
22 #define yap_TwoBodyPhaseSpaceFactor_h
23 
24 #include "fwd/TwoBodyPhaseSpaceFactor.h"
25 
26 #include "fwd/DataPoint.h"
27 #include "fwd/DecayChannel.h"
28 #include "fwd/MassShape.h"
29 #include "fwd/Model.h"
30 #include "fwd/ParticleCombination.h"
31 #include "fwd/SpinAmplitude.h"
32 
33 #include "PhaseSpaceFactor.h"
35 
36 namespace yap {
37 
42  public PhaseSpaceFactor,
44 {
45 public:
48 
50  virtual const std::complex<double> value(const DataPoint& d, const std::shared_ptr<ParticleCombination>& pc) const;
51 
53  virtual const Model* model() const
54  { return Model_; }
55 
57  void calculate(DataPartition& D) const {}
58 
60  virtual void updateCalculationStatus(StatusManager& D) const {}
61 
62 protected:
63 
65  virtual void addParticleCombination(std::shared_ptr<ParticleCombination> pc);
66 
67 private:
68 
70  const Model* Model_;
71 
72 };
73 
78 {
79 private:
82 
83 public:
84 
86  static std::shared_ptr<PhaseSpaceFactorFactory> instance()
87  {
88  static auto Instance_ = std::shared_ptr<PhaseSpaceFactorFactory>(new TwoBodyPhaseSpaceFactorFactory());
89  return Instance_;
90  }
91 
92 protected:
93 
95  virtual std::shared_ptr<PhaseSpaceFactor> phaseSpaceFactor(const DecayChannel& dc, const SpinAmplitude& sa, std::shared_ptr<MassShape> ms);
96 
97 private:
98 
100  std::map<const Model*, std::shared_ptr<TwoBodyPhaseSpaceFactor> > PHSPFactors_;
101 
102 };
103 
104 }
105 
106 #endif
Definition: RequiresMeasuredBreakupMomenta.h:30
Definition: TwoBodyPhaseSpaceFactor.h:77
Definition: PhaseSpaceFactor.h:42
Definition: TwoBodyPhaseSpaceFactor.h:41
virtual const Model * model() const
get raw pointer to Model (const)
Definition: TwoBodyPhaseSpaceFactor.h:53
TwoBodyPhaseSpaceFactorFactory()=default
private constructor; singleton
Class for holding data and cached values per data point for fast calculation.
Definition: DataPoint.h:35
const Model * Model_
raw pointer to owning model
Definition: TwoBodyPhaseSpaceFactor.h:70
TwoBodyPhaseSpaceFactor(const Model &m)
Constructor.
Definition: TwoBodyPhaseSpaceFactor.cxx:11
static std::shared_ptr< PhaseSpaceFactorFactory > instance()
Definition: TwoBodyPhaseSpaceFactor.h:86
virtual std::shared_ptr< PhaseSpaceFactor > phaseSpaceFactor(const DecayChannel &dc, const SpinAmplitude &sa, std::shared_ptr< MassShape > ms)
Definition: TwoBodyPhaseSpaceFactor.cxx:33
Class defining a partition of the DataSet.
Definition: DataPartition.h:158
Definition: StatusManager.h:32
Class implementing a PWA model.
Definition: Model.h:56
void calculate(DataPartition &D) const
do nothing
Definition: TwoBodyPhaseSpaceFactor.h:57
virtual void updateCalculationStatus(StatusManager &D) const
do nothing
Definition: TwoBodyPhaseSpaceFactor.h:60
virtual const std::complex< double > value(const DataPoint &d, const std::shared_ptr< ParticleCombination > &pc) const
Definition: TwoBodyPhaseSpaceFactor.cxx:19
std::map< const Model *, std::shared_ptr< TwoBodyPhaseSpaceFactor > > PHSPFactors_
single instance of TwoBodyPhaseSpaceFactor to be used by all objects
Definition: TwoBodyPhaseSpaceFactor.h:100
virtual void addParticleCombination(std::shared_ptr< ParticleCombination > pc)
add ParticleCombination to SymmetrizationIndices_
Definition: TwoBodyPhaseSpaceFactor.cxx:25
Class implementing a decay channel.
Definition: DecayChannel.h:40
Definition: PhaseSpaceFactor.h:56
Abstract base class implementing a spin amplitude.
Definition: SpinAmplitude.h:46