YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DecayChannel.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_DecayChannel_h
22 #define yap_DecayChannel_h
23 
24 #include "fwd/DecayChannel.h"
25 
26 #include "fwd/Model.h"
27 #include "fwd/Particle.h"
28 #include "fwd/ParticleCombination.h"
29 #include "fwd/PhaseSpaceFactor.h"
30 #include "fwd/SpinAmplitude.h"
31 
32 #include <memory>
33 #include <string>
34 
35 namespace yap {
36 
41 {
42 public:
43 
46 
50  DecayChannel(const ParticleVector& daughters);
51 
53 
55  virtual bool consistent() const;
56 
59 
61  const ParticleVector& daughters() const
62  { return Daughters_; }
63 
65  const SpinAmplitudeVector& spinAmplitudes() const
66  { return SpinAmplitudes_; }
67 
69  const PhaseSpaceFactorMap& phaseSpaceFactors() const
70  { return PhaseSpaceFactors_; }
71 
73  const ParticleCombinationSet& particleCombinations() const
74  { return ParticleCombinations_; }
75 
77  const Model* model() const;
78 
80 
82  void addSpinAmplitude(std::shared_ptr<SpinAmplitude> sa);
83 
86  void addAllPossibleSpinAmplitudes(unsigned two_J);
87 
91  friend class DecayingParticle;
92 
93 protected:
94 
96  virtual void registerWithModel();
97 
99  virtual void addParticleCombination(std::shared_ptr<ParticleCombination> c);
100 
102  virtual void pruneParticleCombinations();
103 
104 private:
105 
107  ParticleVector Daughters_;
108 
110  SpinAmplitudeVector SpinAmplitudes_;
111 
113  PhaseSpaceFactorMap PhaseSpaceFactors_;
114 
116  ParticleCombinationSet ParticleCombinations_;
117 
118 };
119 
121 const int charge(const DecayChannel& dc);
122 
124 std::string to_string(const DecayChannel& dc);
125 
127 inline std::ostream& operator<< (std::ostream& os, const DecayChannel& dc)
128 { os << to_string(dc); return os; }
129 
130 }
131 
132 #endif
const ParticleCombinationSet & particleCombinations() const
Definition: DecayChannel.h:73
const ParticleVector & daughters() const
Get Daughters.
Definition: DecayChannel.h:61
const int charge(const DecayChannel &dc)
Definition: DecayChannel.cxx:293
ParticleCombinationSet ParticleCombinations_
vector of shared_ptr<ParticleCombination>
Definition: DecayChannel.h:116
void addAllPossibleSpinAmplitudes(unsigned two_J)
Definition: DecayChannel.cxx:201
virtual void registerWithModel()
register any necessary DataAccessor's with model
Definition: DecayChannel.cxx:179
const Model * model() const
Definition: DecayChannel.cxx:217
virtual bool consistent() const
check consistency of object
Definition: DecayChannel.cxx:251
DecayChannel(const ParticleVector &daughters)
Definition: DecayChannel.cxx:21
virtual void addParticleCombination(std::shared_ptr< ParticleCombination > c)
Add particle combination.
Definition: DecayChannel.cxx:153
std::ostream & operator<<(std::ostream &os, const DecayChannel &dc)
<< operator
Definition: DecayChannel.h:127
virtual void pruneParticleCombinations()
prune ParticleCombinations_ to only contain ParticleCombination's tracing back up the ISP ...
Definition: DecayChannel.cxx:192
Class implementing a PWA model.
Definition: Model.h:56
void addSpinAmplitude(std::shared_ptr< SpinAmplitude > sa)
add a spin amplitude
Definition: DecayChannel.cxx:223
std::string to_string(const CachedValue::Status &S)
streaming operator for CachedValue::Status
Definition: CachedValue.cxx:27
SpinAmplitudeVector SpinAmplitudes_
Vector of SpinAmplitudes.
Definition: DecayChannel.h:110
PhaseSpaceFactorMap PhaseSpaceFactors_
map of SpinAmplitude to PhaseSpaceFactor
Definition: DecayChannel.h:113
Definition: DecayingParticle.h:51
const SpinAmplitudeVector & spinAmplitudes() const
Get SpinAmplitude objects.
Definition: DecayChannel.h:65
ParticleVector Daughters_
daughters of the decay
Definition: DecayChannel.h:107
Class implementing a decay channel.
Definition: DecayChannel.h:40
const PhaseSpaceFactorMap & phaseSpaceFactors() const
Definition: DecayChannel.h:69