YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FinalStateParticle.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_FinalStateParticle_h
22 #define yap_FinalStateParticle_h
23 
24 #include "fwd/FinalStateParticle.h"
25 
26 #include "fwd/DataPoint.h"
27 #include "fwd/Model.h"
28 #include "fwd/ParticleCombination.h"
29 
30 #include "Constants.h"
31 #include "Particle.h"
32 
33 #include <complex>
34 #include <memory>
35 
36 namespace yap {
37 
42 
44 {
45 protected:
46 
49  FinalStateParticle(std::string name, const QuantumNumbers& q, double m);
50 
51 public:
52 
57  static std::shared_ptr<FinalStateParticle> create(std::string name, const QuantumNumbers& q, double m)
58  { return std::shared_ptr<FinalStateParticle>(new FinalStateParticle(name, q, m)); }
59 
61  double mass() const
62  { return Mass_; }
63 
65  const Model* model() const override
66  { return Model_; }
67 
69  friend class Model;
70 
71 protected:
72 
74  void setModel(Model* m)
75  { Model_ = m; }
76 
78  virtual void addParticleCombination(const std::shared_ptr<ParticleCombination>& pc) override;
79 
81  virtual void registerWithModel() override
82  { }
83 
84 private:
85 
88 
90  double Mass_;
91 
92 };
93 
95 bool valid_final_state(const std::shared_ptr<ParticleCombination>& pc, const FinalStateParticleVector& FSPs);
96 
97 }
98 
99 #endif
static std::shared_ptr< FinalStateParticle > create(std::string name, const QuantumNumbers &q, double m)
Definition: FinalStateParticle.h:57
Model * Model_
raw pointer to Model owning this final state particle
Definition: FinalStateParticle.h:87
double mass() const
Get mass [GeV].
Definition: FinalStateParticle.h:61
Class representing a final-state particle.
Definition: FinalStateParticle.h:43
const Model * model() const override
Definition: FinalStateParticle.h:65
Class implementing a PWA model.
Definition: Model.h:56
const std::string & name() const
Get name (const)
Definition: Particle.h:72
FinalStateParticle(std::string name, const QuantumNumbers &q, double m)
Definition: FinalStateParticle.cxx:11
virtual void addParticleCombination(const std::shared_ptr< ParticleCombination > &pc) override
add ParticleCombination to ParticleCombinations
Definition: FinalStateParticle.cxx:21
virtual void registerWithModel() override
register any necessary DataAccessor's with model
Definition: FinalStateParticle.h:81
Abstract Particle base class.
Definition: Particle.h:47
Quantum numbers of a Particle.
Definition: QuantumNumbers.h:35
void setModel(Model *m)
set raw pointer to owning Model
Definition: FinalStateParticle.h:74
double Mass_
Mass [GeV].
Definition: FinalStateParticle.h:90
bool valid_final_state(const std::shared_ptr< ParticleCombination > &pc, const FinalStateParticleVector &FSPs)
Definition: FinalStateParticle.cxx:33